diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1a3aefd3315d..78dad7611f6e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -22,6 +22,7 @@ specifiers: '@rush-temp/arm-network': file:./projects/arm-network.tgz '@rush-temp/arm-policy': file:./projects/arm-policy.tgz '@rush-temp/arm-purview': file:./projects/arm-purview.tgz + '@rush-temp/arm-rediscache': file:./projects/arm-rediscache.tgz '@rush-temp/arm-resources': file:./projects/arm-resources.tgz '@rush-temp/arm-resources-subscriptions': file:./projects/arm-resources-subscriptions.tgz '@rush-temp/arm-servicebus': file:./projects/arm-servicebus.tgz @@ -148,6 +149,7 @@ dependencies: '@rush-temp/arm-network': file:projects/arm-network.tgz '@rush-temp/arm-policy': file:projects/arm-policy.tgz '@rush-temp/arm-purview': file:projects/arm-purview.tgz + '@rush-temp/arm-rediscache': file:projects/arm-rediscache.tgz '@rush-temp/arm-resources': file:projects/arm-resources.tgz '@rush-temp/arm-resources-subscriptions': file:projects/arm-resources-subscriptions.tgz '@rush-temp/arm-servicebus': file:projects/arm-servicebus.tgz @@ -609,7 +611,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.2 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.2 @@ -3094,7 +3096,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -8680,6 +8682,30 @@ packages: uglify-js: 3.14.2 dev: false + file:projects/arm-rediscache.tgz: + resolution: {integrity: sha512-gdHGWiOe7LjN0S+jb3qkDGm/mnkKpeWaSqVcmga2nlIy4kP+ZkiOpI/xtAGCWZIBJV1aFZLP3wnRIe8ZwYgBig==, tarball: file:projects/arm-rediscache.tgz} + name: '@rush-temp/arm-rediscache' + version: 0.0.0 + dependencies: + '@azure/identity': 2.0.0-beta.6 + '@microsoft/api-extractor': 7.7.11 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.2 + transitivePeerDependencies: + - debug + - supports-color + dev: false + file:projects/arm-resources-subscriptions.tgz: resolution: {integrity: sha512-6GWFjnVvh/TZyCDi+Fj6ShcBGzmKQ8mvChj7v+n68IPy8QUwXlB08EvQ5zo/7+jii9EwFGCBOQok/5+BISRnJg==, tarball: file:projects/arm-resources-subscriptions.tgz} name: '@rush-temp/arm-resources-subscriptions' diff --git a/rush.json b/rush.json index 2990967f0dd3..9f2fe7f775a0 100644 --- a/rush.json +++ b/rush.json @@ -940,6 +940,11 @@ "packageName": "@azure/arm-apimanagement", "projectFolder": "sdk/apimanagement/arm-apimanagement", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-rediscache", + "projectFolder": "sdk/redis/arm-rediscache", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/redis/arm-rediscache/CHANGELOG.md b/sdk/redis/arm-rediscache/CHANGELOG.md new file mode 100644 index 000000000000..1c1ad062c63e --- /dev/null +++ b/sdk/redis/arm-rediscache/CHANGELOG.md @@ -0,0 +1,14 @@ +## 30.0.0-beta.1 (2021-09-28) + +This is the first preview for the new version of the `@azure/arm-rediscache` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services. + +While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/). + +Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies. + +**Noteworthy changes and features** +- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice. +- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead. +- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page. +- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`. +- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6. diff --git a/sdk/redis/arm-rediscache/LICENSE b/sdk/redis/arm-rediscache/LICENSE new file mode 100644 index 000000000000..ccb63b166732 --- /dev/null +++ b/sdk/redis/arm-rediscache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/redis/arm-rediscache/README.md b/sdk/redis/arm-rediscache/README.md index e11f8e65cae3..d96ab86bee75 100644 --- a/sdk/redis/arm-rediscache/README.md +++ b/sdk/redis/arm-rediscache/README.md @@ -1,99 +1,94 @@ -## Azure RedisManagementClient SDK for JavaScript +# Azure RedisManagement client library for JavaScript -This package contains an isomorphic SDK for RedisManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure RedisManagement client. + +REST API for Azure Redis Cache Service. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-rediscache) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-rediscache) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. -### How to Install +### Install the `@azure/arm-rediscache` package + +Install the Azure RedisManagement client library for JavaScript with `npm`: ```bash npm install @azure/arm-rediscache ``` -### How to use +### Create and authenticate a `RedisManagementClient` + +To create a client object to access the Azure RedisManagement API, you will need the `endpoint` of your Azure RedisManagement resource and a `credential`. The Azure RedisManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure RedisManagement resource in the [Azure Portal][azure_portal]. -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). -##### Install @azure/ms-rest-nodeauth +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" +npm install @azure/identity ``` -##### Sample code - -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { RedisManagementClient, RedisManagementModels, RedisManagementMappers } from "@azure/arm-rediscache"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RedisManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); +You will also need to **register a new AAD application and grant access to Azure RedisManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { RedisManagementClient } = require("@azure/arm-rediscache"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new RedisManagementClient(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +## Key concepts -##### Install @azure/ms-rest-browserauth +### RedisManagementClient -```bash -npm install @azure/ms-rest-browserauth -``` +`RedisManagementClient` is the primary interface for developers using the Azure RedisManagement client library. Explore the methods on this client object to understand the different features of the Azure RedisManagement service that you can access. + +## Troubleshooting + +### Logging -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-rediscache sample - - - - - - - - +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); ``` +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fredis%2Farm-rediscache%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/redis/arm-rediscache/README.png) +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/redis/arm-rediscache/_meta.json b/sdk/redis/arm-rediscache/_meta.json new file mode 100644 index 000000000000..34eca9a7891a --- /dev/null +++ b/sdk/redis/arm-rediscache/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "70c107255ecd734617cab71f514401151eadb1e9", + "readme": "specification/redis/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/redis/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.13", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-beta.13" +} \ No newline at end of file diff --git a/sdk/redis/arm-rediscache/api-extractor.json b/sdk/redis/arm-rediscache/api-extractor.json new file mode 100644 index 000000000000..9776e9904ed0 --- /dev/null +++ b/sdk/redis/arm-rediscache/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-rediscache.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/redis/arm-rediscache/package.json b/sdk/redis/arm-rediscache/package.json index 1938144a46ee..c875e6b592e3 100644 --- a/sdk/redis/arm-rediscache/package.json +++ b/sdk/redis/arm-rediscache/package.json @@ -1,12 +1,21 @@ { "name": "@azure/arm-rediscache", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "RedisManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0", + "description": "A generated SDK for RedisManagementClient.", + "version": "30.0.0-beta.1", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", - "tslib": "^1.10.0" + "@azure/abort-controller": "^1.0.0", + "@azure/arm-network": "^30.0.0-beta.3", + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.0.0", + "@azure/core-lro": "^2.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" }, "keywords": [ "node", @@ -16,15 +25,24 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/arm-rediscache.js", - "module": "./esm/redisManagementClient.js", - "types": "./esm/redisManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-rediscache.d.ts", "devDependencies": { - "typescript": "^3.5.3", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "@azure/identity": "2.0.0-beta.6", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache", "repository": { @@ -39,19 +57,46 @@ "dist/**/*.js.map", "dist/**/*.d.ts", "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-rediscache.js.map'\" -o ./dist/arm-rediscache.min.js ./dist/arm-rediscache.js", - "prepack": "npm install && npm run build" + "build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "echo skipped", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "prebuild": "echo skipped", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "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", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_create_for_redis_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_create_for_redis_test.js new file mode 100644 index 000000000000..fe475f154975 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_create_for_redis_test.js @@ -0,0 +1,149 @@ +let nock = require('nock'); + +module.exports.hash = "ccdcce1702a7562e93e55b55efdc2c72"; + +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', + '2da107f7-e92e-4f58-9bdd-6b58e1a20000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'Set-Cookie', + 'fpc=AheNjHVqKRNDh24Ip28o9aI; expires=Thu, 28-Oct-2021 02:49:34 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr4w9fM_MhFey9ynGTX2MO4-Y3sEi_E-AR3TQXg6wqqMcq6eOyoNfyX0jwdOVdNcLK2x1bH3NH3pEvllkkgTqQLQBRcy0QQNmz7opR_q87HT2ewhzSiY703FeG9YAyz4a3tEnNfxWw5HIncv_1fhE3AYF16zgqSsuJnPxE0o5szcwgAA; 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, 28 Sep 2021 02:49:34 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', + 'aee2f65e-a3f8-4c92-b384-e4323aaf1200', + 'x-ms-ests-server', + '2.1.12071.16 - KRSLR2 ProdSlices', + 'Set-Cookie', + 'fpc=AtdhcdHm1rpNsm-HBZ4aCKY; expires=Thu, 28-Oct-2021 02:49:34 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr6YRJy-L2LoF1AQZMfh0qLfMZc8lJc4qWmW4n82HzMhuwxiyJwsevziZvuWiGCXrC5FsweST7EJJ8p1y7mXzSCphAglMRALxy742CIU-iZR9uz2BFXcYW8R2m4-qJZ1-deKPv5hQp-izbT5C5sJn7Le_yqHnPmnZxyAJJ_aGoUPYgAA; 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, 28 Sep 2021 02:49:34 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=a4fbf508-2b27-4913-a337-b5bb4196ec7f&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', + 'ab07f05c-0ccb-4c02-be36-3e513fdb1100', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AmJrVvGzZ-9PtVXj1GzRDKUWPr5BAQAAAL555NgOAAAA; expires=Thu, 28-Oct-2021 02:49:34 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, 28 Sep 2021 02:49:34 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111/patchSchedules/default', {"properties":{"scheduleEntries":[{"dayOfWeek":"Monday","startHourUtc":12,"maintenanceWindow":"PT5H"},{"dayOfWeek":"Tuesday","startHourUtc":12}]}}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7ee2a6ba7f3d7f4f76c5de6cddd597e9eadcbf6a3d1476535cd8012a1789a356dfad56bfa70992d72fa2002c7bdd85eafd0268ec1cba03b6a4d28aff2ba2de88f47bff8a346bf395db6357ff4bd5ffcd12cbbfef2fcbb79fe1640ab25fd49af356d56b7df26227cd54e3f7ab4bb37fa689115cb365f66cb69fedd6239abaea8f9cb37f7bffdd12f198530deacf386fe7e4f20dfff25","bfe4ff01901f66f7b1010000"], [ + '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', + 'x-ms-request-id', + 'a54b44c7-aa8b-4e0d-b729-4d89ec33ee25', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-writes', + '1196', + 'x-ms-correlation-request-id', + '95ff8743-1fe8-46b4-a346-7e339950f1ac', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024935Z:95ff8743-1fe8-46b4-a346-7e339950f1ac', + 'Date', + 'Tue, 28 Sep 2021 02:49:34 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_delete_for_redis_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_delete_for_redis_test.js new file mode 100644 index 000000000000..008d958aa5b6 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_delete_for_redis_test.js @@ -0,0 +1,143 @@ +let nock = require('nock'); + +module.exports.hash = "65749f483bec44b27789ab7de1803338"; + +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', + '720ca505-9718-42d5-96f5-9ce95b2b1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR2 ProdSlices', + 'Set-Cookie', + 'fpc=Ak69H1zEcT1KkMxGnCRELJs; expires=Thu, 28-Oct-2021 03:04:44 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMhhjln1my4vASUDgSzqKDTTNCx3k1ak9yFxP7-KF4DWf44XvU4EoN4M0ndJp1LwSXrcmMO16eBKY_th0Hq681W2nhIQNlHnmV14BSZsBxvgFljRszTO4po4G9S_h26zJElx8-L73Y4xy069WcTpB0CSyaExAdlHCGtze4bD3MnMgAA; 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, 28 Sep 2021 03:04:44 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', + '720ca505-9718-42d5-96f5-9ce95e2b1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR2 ProdSlices', + 'Set-Cookie', + 'fpc=AjfTNyEUMutMmZgV6jLKitk; expires=Thu, 28-Oct-2021 03:04:44 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrtmVjTnBZz2-8qJdbkHp3-jBcs598V06EaXiYYpyT84T-kmEgeLniee8oVeNHjyKPsfqlYsZT1ZRdJvgQeMx2Cb8w8qCxbylkkMZDy5SpBQ6NmvAjgb1fN1647QZsJW77c-lLU_oYkgBSTBusaJMKbgb8fFOgrI4LSH26HdsFpOMgAA; 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, 28 Sep 2021 03:04:44 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=43e5e312-a6b4-4938-860c-30f17eaf5c47&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', + '84581fe2-705a-448a-97d0-56f4c58b1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR2 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AoBMqXCw69BInowxovNyDFcWPr5BAQAAAEx95NgOAAAA; expires=Thu, 28-Oct-2021 03:04:44 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, 28 Sep 2021 03:04:44 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111/patchSchedules/default') + .query(true) + .reply(200, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-request-id', + '1969d928-6b69-4046-ab2b-c1f3cfd767a3', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-deletes', + '14999', + 'x-ms-correlation-request-id', + '4e3a389b-ac03-47d3-874f-ea947b7f48d8', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030445Z:4e3a389b-ac03-47d3-874f-ea947b7f48d8', + 'Date', + 'Tue, 28 Sep 2021 03:04:44 GMT', + 'Content-Length', + '0' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_listbyredisresource_for_redis_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_listbyredisresource_for_redis_test.js new file mode 100644 index 000000000000..15fa1774e613 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_patchschedules_listbyredisresource_for_redis_test.js @@ -0,0 +1,149 @@ +let nock = require('nock'); + +module.exports.hash = "bae54761d18666b4e90d79da8ca31196"; + +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', + '46849707-a8ee-4333-b86a-9f2f28950000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'Set-Cookie', + 'fpc=ApWEtzmpfYdGgHx-bbwo_tM; expires=Thu, 28-Oct-2021 02:49:35 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrRyGlga6vq8KS6WJ1BrGZArXLFVy34NWiL8iElS3kAf4eXHcajyTvLFdzWbzpXV7PDgQ6aD1s_DA3o5xUA84L3rCU7uRQ7echzvTWABCnPzOQzSSIC8ahWwo0IhLY1VUOO1ipDHrdWi15X80fkkJ3x-hKOpaKcIfqmZan2xrDAVIgAA; 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, 28 Sep 2021 02:49:35 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', + '791d4b96-cf7d-4212-8f5b-a085969f1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'Set-Cookie', + 'fpc=Am6A6WJIm2hIjL7CW8ynFoE; expires=Thu, 28-Oct-2021 02:49:35 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrk6t6v0kFqP47wAd5LUvUaP7izg8x-1ckWu0eKyqjJ2laVQtOATUBDH1_o1nf4D6mfedb7W6ev3RUX-Fb6ADqxm41IErM8RXtoe9cFLlNQFq3ZJXUijBziDad5XUBoCGXcyWpiXuUu-fHo39JBmvng_2MNc46sfnN2pkvXcv85FcgAA; 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, 28 Sep 2021 02:49:35 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=05993f71-e2c9-49bc-b5bb-09b287fc2a99&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-Length', + '1351', + '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', + 'ab07f05c-0ccb-4c02-be36-3e5148db1100', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=Am-_ixQDEVhPrHdM2WueSl0WPr5BAQAAAL955NgOAAAA; expires=Thu, 28-Oct-2021 02:49:35 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, 28 Sep 2021 02:49:35 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111/patchSchedules') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e3936c3acfefbeca67051ad6f839c547efdebddbddddbdbbcadae9fc35fd3d5b97797377969f67ebb2fd68f451594d33a044289e664d9b7ef59a3e5c660b42fda3081cf7627bbd429b38062f83eea835a1bccaebb6a03f1efde28f1afde674d9d6fc115169965d7f79fedd3c7f0ba0d592fea4d79a36abdb6f1311be6aa71f3ddadd1b7db4c88a659b2fb3e534ff6eb19c5557d4fce59bfbdffee8978c42186fd679437fbf2790efff925ff2fd","5ff2ff00b0a333f4bd010000"], [ + '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', + 'x-ms-request-id', + 'e69289cb-e6b6-4bc2-add7-5c0d3c27ff3b', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11990', + 'x-ms-correlation-request-id', + '3fe5819e-1e8e-445a-acc1-cce5d0658723', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024935Z:3fe5819e-1e8e-445a-acc1-cce5d0658723', + 'Date', + 'Tue, 28 Sep 2021 02:49:35 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_create_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_create_test.js new file mode 100644 index 000000000000..efb848a54ce5 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_create_test.js @@ -0,0 +1,557 @@ +let nock = require('nock'); + +module.exports.hash = "baab33ab9d66c6c6e51c0f1b7a5984cc"; + +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', + '791d4b96-cf7d-4212-8f5b-a085069f1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'Set-Cookie', + 'fpc=AsJNfFGjz1pIlJ2YKXXOj0s; expires=Thu, 28-Oct-2021 02:49:18 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrO76yzqtUgNRoE1eIK-xAaKR-EpLlF8BcAwDCd0IyaM0cZoH4RIrt4XAlhS2T6PG7UXrj1AAQrJ5nDou4_K9unZIArhmKg7E0WMfWIVnbcBzVzZ5I_rzEn5_MfWtECi1qaaIKO66Hs0Eu5atDtGNWm4ngE6k1C3ISl9OrE-E2xEQgAA; 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, 28 Sep 2021 02:49: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', + 'ba098c41-5e24-43b7-aaf4-4a46acef1100', + 'x-ms-ests-server', + '2.1.12071.16 - KRSLR2 ProdSlices', + 'Set-Cookie', + 'fpc=Ag_MoVXdm8tDuAtH088A0xY; expires=Thu, 28-Oct-2021 02:49:18 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrmEz3Pl_9ipMOT_RQkWm-FF1G5q_VTiUMyVj9m5WBnp4DWGl06W0Il9H8_2mkjPrdjzE5FD-h0OhjR_M6jASaR3Ze66V3mQW83J9EVd-MVs7Aqjd959E7cNZfe6LsuTt96nZ3jWk7vqcT6n9axPXRjNUIBP6GkU1bV57P7WcP5_UgAA; 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, 28 Sep 2021 02:49: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.3.1&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=52d60697-153f-4346-98d4-9611384f2b31&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', + 'f9d979f1-57a4-42d5-bd48-4debeb890000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=ApYwTW-qYMxFrgPCmDcxQmUWPr5BAQAAAK155NgOAAAA; expires=Thu, 28-Oct-2021 02:49: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, 28 Sep 2021 02:49:18 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex', {"location":"eastus","properties":{"addressSpace":{"addressPrefixes":["10.0.0.0/16"]}}}) + .query(true) + .reply(201, {"name":"networknamex","id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex","etag":"W/\"b4ca6076-51b6-49c7-b262-7ee4754ba4eb\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Updating","resourceGuid":"2a0b207d-c156-4852-bb89-a5cdc18b544a","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '610', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '3', + 'x-ms-request-id', + '33c7836d-665b-4203-b112-c8d03efd8f5e', + 'Azure-AsyncOperation', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e?api-version=2021-03-01', + 'x-ms-correlation-request-id', + '962a5e0d-d582-40c9-b0c2-ff8e66226b97', + 'Azure-AsyncNotification', + 'Enabled', + 'x-ms-arm-service-request-id', + 'b609f49a-d7fa-4c4f-99ea-297a73b9c882', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-writes', + '1199', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024923Z:962a5e0d-d582-40c9-b0c2-ff8e66226b97', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:22 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e94767cb97757551e74df3d16f9cfc","92ff078f3cd6f41e000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Retry-After', + '10', + 'Vary', + 'Accept-Encoding', + 'x-ms-request-id', + 'bd7fe79b-6736-408c-a779-9eb53897e457', + 'x-ms-correlation-request-id', + '46f29927-4088-4892-98ff-9353ab3c5863', + 'x-ms-arm-service-request-id', + 'b3167d09-b97b-4f73-b043-fe31dd24f81f', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11999', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024923Z:46f29927-4088-4892-98ff-9353ab3c5863', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:22 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e94767cb97757551e74df3d16f9cfc","92ff078f3cd6f41e000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Retry-After', + '20', + 'Vary', + 'Accept-Encoding', + 'x-ms-request-id', + '6f1cc11b-1af8-44a5-863f-b723ed698338', + 'x-ms-correlation-request-id', + '05f35462-0a86-4586-a537-048900a8f2bc', + 'x-ms-arm-service-request-id', + '146cb18e-8734-4041-ad77-7f9d61d9cc8d', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11998', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024923Z:05f35462-0a86-4586-a537-048900a8f2bc', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:22 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e94767cb97757551e74df3d16f9cfc","92ff078f3cd6f41e000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Retry-After', + '20', + 'Vary', + 'Accept-Encoding', + 'x-ms-request-id', + '4b64a2b7-cfd5-4e76-b870-73c5a8452297', + 'x-ms-correlation-request-id', + 'f89e9795-669c-4985-a214-e51f28e0b4b3', + 'x-ms-arm-service-request-id', + 'e27b979e-1640-45ea-98dc-5689d4703dce', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11997', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024924Z:f89e9795-669c-4985-a214-e51f28e0b4b3', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:23 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e94767cb97757551e74df3d16f9cfc","92ff078f3cd6f41e000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Retry-After', + '40', + 'Vary', + 'Accept-Encoding', + 'x-ms-request-id', + 'eafb496d-961d-4943-aa85-2d1abe7553e4', + 'x-ms-correlation-request-id', + 'a42fbe1d-97d2-4f2f-b98e-b9102e3653bc', + 'x-ms-arm-service-request-id', + '4d688cb4-7f3f-4a2e-b637-55231ff82234', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11996', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024924Z:a42fbe1d-97d2-4f2f-b98e-b9102e3653bc', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:23 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e94767cb97757551e74df3d16f9cfc","92ff078f3cd6f41e000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Retry-After', + '40', + 'Vary', + 'Accept-Encoding', + 'x-ms-request-id', + 'eca88406-0e86-493b-8dc0-bd36ff6763bd', + 'x-ms-correlation-request-id', + '72bf0b4d-808b-44c2-b42b-1b41ac00bb11', + 'x-ms-arm-service-request-id', + '7ecaf9fc-090d-4294-9a39-b135a604c521', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11995', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024925Z:72bf0b4d-808b-44c2-b42b-1b41ac00bb11', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:24 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/33c7836d-665b-4203-b112-c8d03efd8f5e') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e947afd7d3699ecff2d947bf71f24b","fe1f4f9490471d000000"], [ + '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', + 'x-ms-request-id', + 'f22c9cf5-7f8c-4248-a556-6aaaf16fe9a8', + 'x-ms-correlation-request-id', + 'b1724d5d-2ae2-4536-af3d-7c486fa787a2', + 'x-ms-arm-service-request-id', + '690b280c-d96b-4ec8-81e4-7c27ece9161e', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11994', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024925Z:b1724d5d-2ae2-4536-af3d-7c486fa787a2', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:24 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex/subnets/subnetworknamex', {"properties":{"addressPrefix":"10.0.0.0/24"}}) + .query(true) + .reply(201, {"name":"subnetworknamex","id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex/subnets/subnetworknamex","etag":"W/\"34e68542-cb92-4729-ac5d-84b849d542b3\"","properties":{"provisioningState":"Updating","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '541', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '3', + 'x-ms-request-id', + '31c298bf-d021-4104-82ab-ed595ef9ae38', + 'Azure-AsyncOperation', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/31c298bf-d021-4104-82ab-ed595ef9ae38?api-version=2021-03-01', + 'x-ms-correlation-request-id', + '5a41a40a-0e24-4af0-bc14-776627b46d4c', + 'x-ms-arm-service-request-id', + '95955578-2d96-42f9-92a5-18a7ef418da4', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-writes', + '1198', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024925Z:5a41a40a-0e24-4af0-bc14-776627b46d4c', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:24 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Network/locations/eastus/operations/31c298bf-d021-4104-82ab-ed595ef9ae38') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e9474d9bb5ebe6a347e947afd7d3699ecff2d947bf71f24b","fe1f4f9490471d000000"], [ + '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', + 'x-ms-request-id', + '83a45b3d-caf1-4b5a-b196-d50894c82cff', + 'x-ms-correlation-request-id', + 'b7768a15-de6a-4282-ad3f-0270a78c955d', + 'x-ms-arm-service-request-id', + '635e883a-478e-4682-8ec1-9573624627b0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11993', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024926Z:b7768a15-de6a-4282-ad3f-0270a78c955d', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 02:49:26 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111', {"zones":["1"],"location":"eastus","properties":{"redisConfiguration":{"maxmemory-policy":"allkeys-lru"},"enableNonSslPort":true,"shardCount":2,"minimumTlsVersion":"1.2","sku":{"name":"Premium","family":"P","capacity":1},"subnetId":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex/subnets/subnetworknamex","staticIP":"10.0.0.5"}}) + .query(true) + .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/Redis/myrediscachexxx111","location":"East US","name":"myrediscachexxx111","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"4.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":true,"instances":[{"sslPort":15000,"nonSslPort":13000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"nonSslPort":13001,"isMaster":false,"isPrimary":false},{"sslPort":15002,"nonSslPort":13002,"isMaster":false,"isPrimary":false},{"sslPort":15003,"nonSslPort":13003,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxclients":"7500","maxmemory-reserved":"200","maxfragmentationmemory-reserved":"300","maxmemory-delta":"200"},"accessKeys":{"primaryKey":"8ybKetYwvgeRyIrsdEeS53o3XI55bnWhyUw723b0Vc8=","secondaryKey":"zBZ3dUhgwU6vQgFbnSNhCrgxZ4QQncqhzYKobLOIdJ0="},"hostName":"myrediscachexxx111.redis.cache.windows.net","port":6379,"sslPort":6380,"subnetId":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Network/virtualNetworks/networknamex/subnets/subnetworknamex","staticIP":"10.0.0.5","shardCount":2,"linkedServers":[]},"zones":["1"]}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '1357', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111?api-version=2020-12-01', + 'x-ms-request-id', + '63a7c40b-62c6-41e8-98c2-73f09f6c010c', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-writes', + '1197', + 'x-ms-correlation-request-id', + '9f6e576d-0af6-454b-b47c-3116b20233bd', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024933Z:9f6e576d-0af6-454b-b47c-3116b20233bd', + 'Date', + 'Tue, 28 Sep 2021 02:49:32 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac038a973ea7b7941af71473f49b8530bfa667fbc33dedda7cf9bb76bbcad08bdacf345b15ed0e7e7d9a228aff111fd31cd56d9b468e9cf5dea375f6693327f512d5f37e5cbaa6e3f7ad4d6eb7cf451b16cda6c39053adffbc51f35e6cbddfb3b3b3b3464affdee3dfea868be208ae4f5478fceb3b20184e6655d2cb29a3ae24f7ec9a80367b70f873e7a7f387b7d38f4d1fbc3b9d787431fdd0ce7fba38f16c5b258ac176f4a6f5676c77b44edd57a5216d317797b55d56f8fa74450a2e847a74cf5197dcf5379522dcf8b8b754df38b577ff1478becdd225f54f5f5f6aaa2d7a9ab8fb2b27c9b5f37db65bda6d7a8c1b42cf2650b680f0879f94c5f229ecfeb4b82ffe8a33df3d5799d5d2ce805eea3df8e062bedf4ab595eb6197d8ef7894d32c6fcf722043e7ab45c97e5e8a379d5b42f84d1fa9c3fe60fc6fcc9f8aa58ceaaab66bccc5bea62c5c4fdf4de8387c4af86d69fde3b201622e9a6366740e72efdfeb329e93a21772f8bba5d67a5fed9dca5fef10b24e8dd5dc281fe6ef4a7fd9c0641b2d116d3b39784e9ee0e49dfcef83e3e9d67f5eca45a2f6944c48165b17c9bcf5e83c23591ed7bdf273afea05ab2487db4fbd1f77f","c9ff03b438e1cbd6040000"], [ + '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', + 'x-ms-request-id', + '75643f2f-f9fd-4c4a-93c3-e90ea4c5f0f9', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11992', + 'x-ms-correlation-request-id', + 'c80d4646-f8ee-453e-88cd-e0a601381622', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024933Z:c80d4646-f8ee-453e-88cd-e0a601381622', + 'Date', + 'Tue, 28 Sep 2021 02:49:33 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_delete_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_delete_test.js new file mode 100644 index 000000000000..6b89845ce762 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_delete_test.js @@ -0,0 +1,3307 @@ +let nock = require('nock'); + +module.exports.hash = "8c2682d7281f12e52dc19ecd4daa097d"; + +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', + '84581fe2-705a-448a-97d0-56f4d28b1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR2 ProdSlices', + 'Set-Cookie', + 'fpc=AmeXlfhSQTtCtHzXkGEgEDU; expires=Thu, 28-Oct-2021 03:04:45 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrLZgVRBPcv1bUoJYFDFqcBrbniBRwgXiSvJvGkndNlBqHlUXeLhmu0hnP2yEoAQHBUhpcuOqI4inyXqTPtmlgSmJQ6eIQ1tt2CKQOD4JudCnaBQPsmf2W5Rp2DNW79bi41AfKQ9jw5hr8uxaSAAddIWMTBI1NHcTd5fuDPbDNMkYgAA; 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, 28 Sep 2021 03:04:45 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', + 'c41e99e2-d088-4724-9f13-5c79eb6a1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'Set-Cookie', + 'fpc=AvZJBJ3Rua5CmGTc5BECI68; expires=Thu, 28-Oct-2021 03:04:45 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrqivJB98zAMrJjHeDqKQYp_HW6SZxv0QYz5dpALcehK_3o13IkSMt96fsykpL-ZQUFZ1t1ftrCqNexyCDoUhSk2y2D9lAIkCsflFb0CCA72FixJpLPMLyJkuEOBuSi9M_iTa1A7MiZE89XJR5hCQ7ZOgQEKBK2cXvBnQN70hH38wgAA; 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, 28 Sep 2021 03:04:45 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=f3e4c1e5-c3ed-42a8-bf29-713ab7ce75fa&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', + 'c41e99e2-d088-4724-9f13-5c79f26a1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AiMlY1O1doxPolaZrpwGbDgWPr5BAQAAAE195NgOAAAA; expires=Thu, 28-Oct-2021 03:04:45 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, 28 Sep 2021 03:04:45 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c9624211-42da-4ffc-8329-7fc9c894426b', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-deletes', + '14998', + 'x-ms-correlation-request-id', + '3a9162e5-3c32-4546-952f-7c58951704fa', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030446Z:3a9162e5-3c32-4546-952f-7c58951704fa', + 'Date', + 'Tue, 28 Sep 2021 03:04:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '853c7978-10f6-4f63-b59c-1444a4058008', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11986', + 'x-ms-correlation-request-id', + '382987f0-9a50-4fec-a4d5-1051915dafd4', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030447Z:382987f0-9a50-4fec-a4d5-1051915dafd4', + 'Date', + 'Tue, 28 Sep 2021 03:04:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '2152d98f-a7fa-4c3a-8051-6efad05caf94', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11985', + 'x-ms-correlation-request-id', + '34b4f9e5-221a-464b-a6fa-7ca71bf54508', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030449Z:34b4f9e5-221a-464b-a6fa-7ca71bf54508', + 'Date', + 'Tue, 28 Sep 2021 03:04:48 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'aa5cdf05-0f5a-4288-847e-7fdaa7a5d2cb', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11984', + 'x-ms-correlation-request-id', + '743fd220-7275-429b-ab14-42923b7e2a13', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030451Z:743fd220-7275-429b-ab14-42923b7e2a13', + 'Date', + 'Tue, 28 Sep 2021 03:04:50 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '7930373c-6c68-4985-a663-c9c65f0d1c32', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11983', + 'x-ms-correlation-request-id', + '82e8bc2c-db8a-4168-8e6a-f8f28f1ab125', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030453Z:82e8bc2c-db8a-4168-8e6a-f8f28f1ab125', + 'Date', + 'Tue, 28 Sep 2021 03:04:53 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '75fb8899-7ae1-48e5-9abf-0986e461d541', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11982', + 'x-ms-correlation-request-id', + 'a1c5701c-079b-4acd-b185-3ce82a58a2b3', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030456Z:a1c5701c-079b-4acd-b185-3ce82a58a2b3', + 'Date', + 'Tue, 28 Sep 2021 03:04:55 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '8a6ec990-2d31-4502-914c-b43e2e9397af', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11981', + 'x-ms-correlation-request-id', + '91bb6650-ebf0-429d-bb86-02cbef1dc357', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030458Z:91bb6650-ebf0-429d-bb86-02cbef1dc357', + 'Date', + 'Tue, 28 Sep 2021 03:04:57 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'f0db7b46-c8ab-4ec4-9114-7a683fecda40', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11980', + 'x-ms-correlation-request-id', + '1feb5461-7a9f-4dc6-8b02-cf024dbbda3f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030500Z:1feb5461-7a9f-4dc6-8b02-cf024dbbda3f', + 'Date', + 'Tue, 28 Sep 2021 03:05:00 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '810c8839-d854-4376-98e4-3bf42120241e', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11979', + 'x-ms-correlation-request-id', + '741d9b08-a713-4478-8a75-48f065b060d4', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030503Z:741d9b08-a713-4478-8a75-48f065b060d4', + 'Date', + 'Tue, 28 Sep 2021 03:05:02 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c7895d69-077d-4e39-8091-e3ca006546c7', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11978', + 'x-ms-correlation-request-id', + '7c389fab-0006-42bd-8912-c29d68bed182', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030505Z:7c389fab-0006-42bd-8912-c29d68bed182', + 'Date', + 'Tue, 28 Sep 2021 03:05:04 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '15869aca-5c75-4c10-b019-3a0fd520f591', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11977', + 'x-ms-correlation-request-id', + 'f2ed2b36-318d-4511-bac0-8c8f759b6775', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030507Z:f2ed2b36-318d-4511-bac0-8c8f759b6775', + 'Date', + 'Tue, 28 Sep 2021 03:05:07 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '103876e1-b477-448b-9d9a-d275be093869', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11976', + 'x-ms-correlation-request-id', + 'fd07c20c-e68a-41c4-9a77-a94889afd8e6', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030510Z:fd07c20c-e68a-41c4-9a77-a94889afd8e6', + 'Date', + 'Tue, 28 Sep 2021 03:05:09 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '248c12da-a8a8-41a9-b427-d3d79496a760', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11975', + 'x-ms-correlation-request-id', + 'b9d1e18e-5c7f-4318-a5c8-62f8917656d1', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030512Z:b9d1e18e-5c7f-4318-a5c8-62f8917656d1', + 'Date', + 'Tue, 28 Sep 2021 03:05:11 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '095d6f81-f44b-4078-8d1b-f8440d3eb4c1', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11974', + 'x-ms-correlation-request-id', + '3a31ad60-951c-43b6-b06f-39a590540a33', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030515Z:3a31ad60-951c-43b6-b06f-39a590540a33', + 'Date', + 'Tue, 28 Sep 2021 03:05:14 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'adce0dc3-5eb2-4b80-851d-c8dc5c83fb2a', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11973', + 'x-ms-correlation-request-id', + '37d36dad-1cf4-4cb8-b067-5dd0fbc3e941', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030517Z:37d36dad-1cf4-4cb8-b067-5dd0fbc3e941', + 'Date', + 'Tue, 28 Sep 2021 03:05:16 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c94a1d83-b7ab-42e3-aaf3-2d032c161c1e', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11972', + 'x-ms-correlation-request-id', + '6261193b-0fb9-43f4-b1cb-e0e2ddcd4474', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030519Z:6261193b-0fb9-43f4-b1cb-e0e2ddcd4474', + 'Date', + 'Tue, 28 Sep 2021 03:05:18 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'ee709435-1b01-4ba7-a42f-4149675f7b03', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11971', + 'x-ms-correlation-request-id', + '6adce475-0eb4-411d-bb45-20ffdb6cd91d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030522Z:6adce475-0eb4-411d-bb45-20ffdb6cd91d', + 'Date', + 'Tue, 28 Sep 2021 03:05:22 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '6b027f23-be88-422d-a63d-be5830eb064b', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11970', + 'x-ms-correlation-request-id', + 'db84d2ec-b45d-4534-99eb-8989621336c6', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030524Z:db84d2ec-b45d-4534-99eb-8989621336c6', + 'Date', + 'Tue, 28 Sep 2021 03:05:24 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'b1174c0a-9bad-4c79-bca4-a8bbb40827ca', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11969', + 'x-ms-correlation-request-id', + '4d8803ea-3fc7-43dd-bb48-81b84753b9fd', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030526Z:4d8803ea-3fc7-43dd-bb48-81b84753b9fd', + 'Date', + 'Tue, 28 Sep 2021 03:05:26 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '468583d5-97f0-4d6f-9238-6085a660ab75', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11968', + 'x-ms-correlation-request-id', + 'c8e60875-dd0e-4124-a403-1cbba903e266', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030529Z:c8e60875-dd0e-4124-a403-1cbba903e266', + 'Date', + 'Tue, 28 Sep 2021 03:05:29 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'f23f9ee5-596f-4547-9329-eb1fde1c03a8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11967', + 'x-ms-correlation-request-id', + '46e9502b-f2df-40b2-910b-2d58c1b1389a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030531Z:46e9502b-f2df-40b2-910b-2d58c1b1389a', + 'Date', + 'Tue, 28 Sep 2021 03:05:31 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '959ed0d9-71ee-47aa-8228-87602b63a703', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11966', + 'x-ms-correlation-request-id', + '99b4773b-c9de-4400-a98b-da9c69dcbd72', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030537Z:99b4773b-c9de-4400-a98b-da9c69dcbd72', + 'Date', + 'Tue, 28 Sep 2021 03:05:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '72bc3b72-f5e3-4e20-b039-683640a7437e', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11965', + 'x-ms-correlation-request-id', + 'bb082141-f369-4d2c-831b-07b56f87b52b', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030540Z:bb082141-f369-4d2c-831b-07b56f87b52b', + 'Date', + 'Tue, 28 Sep 2021 03:05:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '33258056-05bc-4cd6-8667-1843e93eacc0', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11964', + 'x-ms-correlation-request-id', + '43452bdc-7cc7-4f9c-ae69-343cdb32d9e4', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030542Z:43452bdc-7cc7-4f9c-ae69-343cdb32d9e4', + 'Date', + 'Tue, 28 Sep 2021 03:05:42 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'aa9274aa-f12d-438b-9c68-07f58e0353d6', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11963', + 'x-ms-correlation-request-id', + '2fee2aa9-3f41-421e-b909-6538944d743a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030544Z:2fee2aa9-3f41-421e-b909-6538944d743a', + 'Date', + 'Tue, 28 Sep 2021 03:05:44 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '2c507064-c4ed-4cb7-a3e3-65a4dbd0710c', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11962', + 'x-ms-correlation-request-id', + '3a4c09a3-230f-472e-af49-303e26dea456', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030547Z:3a4c09a3-230f-472e-af49-303e26dea456', + 'Date', + 'Tue, 28 Sep 2021 03:05:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '9eac85e9-c5a5-4897-aa92-8956f20b007d', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11961', + 'x-ms-correlation-request-id', + 'e66583c5-0775-4b6a-bda5-98ba0fddca02', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030549Z:e66583c5-0775-4b6a-bda5-98ba0fddca02', + 'Date', + 'Tue, 28 Sep 2021 03:05:49 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '67887d98-7b94-4502-a978-3caa3fb057ab', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11960', + 'x-ms-correlation-request-id', + '2e951876-40f9-4dd1-b00d-5e6fb897623b', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030551Z:2e951876-40f9-4dd1-b00d-5e6fb897623b', + 'Date', + 'Tue, 28 Sep 2021 03:05:51 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '98f40e10-adf4-4e78-a9a9-40f3912fee17', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11959', + 'x-ms-correlation-request-id', + 'ec704677-05a9-47f1-b49c-10b6df75300d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030554Z:ec704677-05a9-47f1-b49c-10b6df75300d', + 'Date', + 'Tue, 28 Sep 2021 03:05:53 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'f6b530ff-963b-43fc-bbb5-0df05053cfe7', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11958', + 'x-ms-correlation-request-id', + 'dc4d4c81-c5a7-4cd6-9b56-8e48b87d6c91', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030556Z:dc4d4c81-c5a7-4cd6-9b56-8e48b87d6c91', + 'Date', + 'Tue, 28 Sep 2021 03:05:56 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '7a609f67-698e-4a6b-b24c-b8f23610d36a', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11957', + 'x-ms-correlation-request-id', + '4d40b222-418c-49c7-aeb4-37d3c7e0ad1d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030558Z:4d40b222-418c-49c7-aeb4-37d3c7e0ad1d', + 'Date', + 'Tue, 28 Sep 2021 03:05:58 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'e5f1740a-72b2-494d-bfa1-2b9dea6e9810', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11956', + 'x-ms-correlation-request-id', + '1524d87d-87c6-42d5-96a1-3ccec71f3d6a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030601Z:1524d87d-87c6-42d5-96a1-3ccec71f3d6a', + 'Date', + 'Tue, 28 Sep 2021 03:06:00 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'a174fabf-9c6d-4fbb-a53f-6e0fe58e9f3a', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11955', + 'x-ms-correlation-request-id', + 'dde3f8ad-7340-49fb-81cb-a5e716f87755', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030603Z:dde3f8ad-7340-49fb-81cb-a5e716f87755', + 'Date', + 'Tue, 28 Sep 2021 03:06:03 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'a88e7b5a-a4ec-46ac-85fd-8190403369b7', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11954', + 'x-ms-correlation-request-id', + 'f07fd107-14cb-4f6e-8ce8-53c9ca48912e', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030605Z:f07fd107-14cb-4f6e-8ce8-53c9ca48912e', + 'Date', + 'Tue, 28 Sep 2021 03:06:05 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '804512b3-6158-4f84-afee-970c9d3a745a', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11953', + 'x-ms-correlation-request-id', + 'c362e354-f553-4d0c-8312-a4640f2cba6d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030608Z:c362e354-f553-4d0c-8312-a4640f2cba6d', + 'Date', + 'Tue, 28 Sep 2021 03:06:07 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'bc5049aa-f492-44fc-8630-4a26c63b6845', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11952', + 'x-ms-correlation-request-id', + '9ca3e78a-32bb-4eb1-83ca-39e93a60f7bf', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030610Z:9ca3e78a-32bb-4eb1-83ca-39e93a60f7bf', + 'Date', + 'Tue, 28 Sep 2021 03:06:10 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '5e9e78f0-d867-4f4a-a5f5-1fec04ddcb3f', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11951', + 'x-ms-correlation-request-id', + '17548f22-c071-4488-96f7-46b85984dcc7', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030612Z:17548f22-c071-4488-96f7-46b85984dcc7', + 'Date', + 'Tue, 28 Sep 2021 03:06:12 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '2514ce50-da99-4a62-aeea-240dd9f04101', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11950', + 'x-ms-correlation-request-id', + '3c120e13-2d47-4f97-bc52-d4e86d8ba688', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030615Z:3c120e13-2d47-4f97-bc52-d4e86d8ba688', + 'Date', + 'Tue, 28 Sep 2021 03:06:14 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c6a031c5-a54a-43b7-8c3e-e7884f32c7ed', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11949', + 'x-ms-correlation-request-id', + '0c46c6c5-d52a-451b-9788-9a4910f2ad6a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030617Z:0c46c6c5-d52a-451b-9788-9a4910f2ad6a', + 'Date', + 'Tue, 28 Sep 2021 03:06:17 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '021b6407-6ccf-4a7f-b858-1c8ad639a599', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11948', + 'x-ms-correlation-request-id', + '4b791663-43e9-47e4-ad8c-5d17b8fef48d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030619Z:4b791663-43e9-47e4-ad8c-5d17b8fef48d', + 'Date', + 'Tue, 28 Sep 2021 03:06:19 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '2e9ae193-aa23-4e99-9aeb-d55b8d8d4923', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11947', + 'x-ms-correlation-request-id', + '7c2691bb-0182-4291-b099-1cc1e05cba9e', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030622Z:7c2691bb-0182-4291-b099-1cc1e05cba9e', + 'Date', + 'Tue, 28 Sep 2021 03:06:22 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '7c689d59-a83e-413e-8a2a-7d7d5915caf8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11946', + 'x-ms-correlation-request-id', + 'c9fb2c4b-27e9-4988-865d-46cd907e4ea6', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030625Z:c9fb2c4b-27e9-4988-865d-46cd907e4ea6', + 'Date', + 'Tue, 28 Sep 2021 03:06:24 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'cc1b8b09-3523-44a7-9744-bbe0856bad9f', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11945', + 'x-ms-correlation-request-id', + 'd674bf36-57ae-4f15-9275-06de2ffe847e', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030628Z:d674bf36-57ae-4f15-9275-06de2ffe847e', + 'Date', + 'Tue, 28 Sep 2021 03:06:27 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'dd5e4f2a-70af-425e-9e1b-8ac202937dce', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11944', + 'x-ms-correlation-request-id', + 'fe3df451-31ee-4701-92ae-a638bba51590', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030631Z:fe3df451-31ee-4701-92ae-a638bba51590', + 'Date', + 'Tue, 28 Sep 2021 03:06:30 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'd9164a7b-57b6-4703-aac2-33e707cf1262', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11943', + 'x-ms-correlation-request-id', + '508c78e1-406e-40c5-9e5c-df9982051db9', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030634Z:508c78e1-406e-40c5-9e5c-df9982051db9', + 'Date', + 'Tue, 28 Sep 2021 03:06:35 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '3f2f6352-6a0a-4d85-a490-d17e381ee0f2', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11942', + 'x-ms-correlation-request-id', + '7965e496-b44e-4ebe-8fa6-ea6c2efc026a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030637Z:7965e496-b44e-4ebe-8fa6-ea6c2efc026a', + 'Date', + 'Tue, 28 Sep 2021 03:06:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '5946ec4b-d395-4c47-9587-73f26db71ae3', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11941', + 'x-ms-correlation-request-id', + '1f446997-c49c-4259-8a0e-854539ae6f1d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030641Z:1f446997-c49c-4259-8a0e-854539ae6f1d', + 'Date', + 'Tue, 28 Sep 2021 03:06:41 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'a9c64006-37f1-4757-b98c-6e4878491338', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11940', + 'x-ms-correlation-request-id', + '0b0272df-32a3-4e60-8bef-23ba1755d8bd', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030643Z:0b0272df-32a3-4e60-8bef-23ba1755d8bd', + 'Date', + 'Tue, 28 Sep 2021 03:06:43 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '381528a2-f610-4271-b15f-413c549074df', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11939', + 'x-ms-correlation-request-id', + '535ddc70-26c6-46e1-94e8-acf1798b1229', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030646Z:535ddc70-26c6-46e1-94e8-acf1798b1229', + 'Date', + 'Tue, 28 Sep 2021 03:06:45 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'ebf1f33f-ab3f-4d1c-82dc-481567058412', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11938', + 'x-ms-correlation-request-id', + 'c1717076-0fcc-45d6-9b28-146826247f48', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030648Z:c1717076-0fcc-45d6-9b28-146826247f48', + 'Date', + 'Tue, 28 Sep 2021 03:06:48 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'eaeda977-9c19-44bf-a08f-f69787bdff29', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11937', + 'x-ms-correlation-request-id', + 'c6af2134-01f9-403d-9b60-55c8c7d5f119', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030650Z:c6af2134-01f9-403d-9b60-55c8c7d5f119', + 'Date', + 'Tue, 28 Sep 2021 03:06:50 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '2c170c54-150a-4080-86dd-fb85c0524647', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11936', + 'x-ms-correlation-request-id', + '68bee8e1-2007-4baa-aa97-00c6ec46736f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030653Z:68bee8e1-2007-4baa-aa97-00c6ec46736f', + 'Date', + 'Tue, 28 Sep 2021 03:06:52 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '994b3265-cab2-4885-8851-36f2005dacbb', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11935', + 'x-ms-correlation-request-id', + 'f4dac703-2201-4af8-8c5b-af604cc92abc', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030655Z:f4dac703-2201-4af8-8c5b-af604cc92abc', + 'Date', + 'Tue, 28 Sep 2021 03:06:54 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'b7f8c235-cadc-42fa-8972-042334324b43', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11934', + 'x-ms-correlation-request-id', + '7610d097-e1c4-45cd-9fd1-e2ef6fa59cd8', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030657Z:7610d097-e1c4-45cd-9fd1-e2ef6fa59cd8', + 'Date', + 'Tue, 28 Sep 2021 03:06:57 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '631cfc54-01f9-4d15-8d7a-d6652e136f71', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11933', + 'x-ms-correlation-request-id', + '5e2219c4-f9b6-4bbb-96c4-3d4877282159', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030700Z:5e2219c4-f9b6-4bbb-96c4-3d4877282159', + 'Date', + 'Tue, 28 Sep 2021 03:06:59 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '1db4f5b1-0d92-449f-8f93-9611892a9bdf', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11932', + 'x-ms-correlation-request-id', + '56598813-7cd1-47d6-9930-60f400d7980a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030702Z:56598813-7cd1-47d6-9930-60f400d7980a', + 'Date', + 'Tue, 28 Sep 2021 03:07:01 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c950a47c-8da4-4104-9488-3d552ec533b9', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11931', + 'x-ms-correlation-request-id', + '66316aa8-e958-4ac6-acbd-8581e9080c40', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030704Z:66316aa8-e958-4ac6-acbd-8581e9080c40', + 'Date', + 'Tue, 28 Sep 2021 03:07:04 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '9da5ff62-a905-404c-92bf-6205d7cafc2d', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11930', + 'x-ms-correlation-request-id', + 'd49e2416-e9ac-4aff-8fbd-0a6524a6d8e9', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030707Z:d49e2416-e9ac-4aff-8fbd-0a6524a6d8e9', + 'Date', + 'Tue, 28 Sep 2021 03:07:06 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c2e3fb47-467d-4858-953b-cc4a3ef81f54', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11929', + 'x-ms-correlation-request-id', + 'a1d0b062-4a3b-4fd3-baad-5b8b71f9c31a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030709Z:a1d0b062-4a3b-4fd3-baad-5b8b71f9c31a', + 'Date', + 'Tue, 28 Sep 2021 03:07:08 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '1260b0c6-1beb-4196-8275-e1198917d4ad', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11928', + 'x-ms-correlation-request-id', + '89cf1cc1-60c2-4222-bc19-22aba69d73a4', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030711Z:89cf1cc1-60c2-4222-bc19-22aba69d73a4', + 'Date', + 'Tue, 28 Sep 2021 03:07:11 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '21d8ec5c-15f7-40c4-9f94-7b077d13c6e4', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11927', + 'x-ms-correlation-request-id', + 'fefaf885-b357-4eea-990c-80a179d06a4f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030714Z:fefaf885-b357-4eea-990c-80a179d06a4f', + 'Date', + 'Tue, 28 Sep 2021 03:07:13 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'f12ddb16-02ad-409b-96c7-87ccdd2b3c46', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11926', + 'x-ms-correlation-request-id', + '038e4d74-bd65-4ebf-9005-b12a06a0b25f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030716Z:038e4d74-bd65-4ebf-9005-b12a06a0b25f', + 'Date', + 'Tue, 28 Sep 2021 03:07:15 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '41322feb-6cad-407a-8fbf-ba5420f64cdb', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11925', + 'x-ms-correlation-request-id', + '2cf6dd73-8154-4935-adb0-08c28df0fe29', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030718Z:2cf6dd73-8154-4935-adb0-08c28df0fe29', + 'Date', + 'Tue, 28 Sep 2021 03:07:18 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'e73d4bfa-e8ed-4a12-ba29-243cc6b1def8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11924', + 'x-ms-correlation-request-id', + '5452a778-5264-4223-b565-195a3423a4b8', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030721Z:5452a778-5264-4223-b565-195a3423a4b8', + 'Date', + 'Tue, 28 Sep 2021 03:07:20 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '92646756-6dd6-4813-b970-1eec6fd0fcb4', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11923', + 'x-ms-correlation-request-id', + '24805fa7-d9cc-4825-ac88-60129a55509f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030723Z:24805fa7-d9cc-4825-ac88-60129a55509f', + 'Date', + 'Tue, 28 Sep 2021 03:07:22 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'e364916e-9236-4fdb-a116-5e54c7ef32f6', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11922', + 'x-ms-correlation-request-id', + 'dd8172f0-b032-4d9d-80f1-d6623bc9fd3d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030725Z:dd8172f0-b032-4d9d-80f1-d6623bc9fd3d', + 'Date', + 'Tue, 28 Sep 2021 03:07:25 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '9a44a96a-fed6-4be5-b54f-86f192c6ab82', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11921', + 'x-ms-correlation-request-id', + '42467b08-7eed-41b6-834f-a88d52f16005', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030728Z:42467b08-7eed-41b6-834f-a88d52f16005', + 'Date', + 'Tue, 28 Sep 2021 03:07:27 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '77569352-afe8-483b-adff-f34d9fa642f7', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11920', + 'x-ms-correlation-request-id', + '74ebdad5-2840-4a65-bee8-2c34d6ae340a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030730Z:74ebdad5-2840-4a65-bee8-2c34d6ae340a', + 'Date', + 'Tue, 28 Sep 2021 03:07:29 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '9d303276-1832-4406-8e17-2f60668ce50e', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11919', + 'x-ms-correlation-request-id', + 'd6dfa82d-1534-48d5-bfac-c0335126a656', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030732Z:d6dfa82d-1534-48d5-bfac-c0335126a656', + 'Date', + 'Tue, 28 Sep 2021 03:07:32 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '17c1f8d2-7cc7-4617-94e3-2d5985ead8c2', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11918', + 'x-ms-correlation-request-id', + '5b7f509d-4e17-4a81-983c-a324e05101ee', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030735Z:5b7f509d-4e17-4a81-983c-a324e05101ee', + 'Date', + 'Tue, 28 Sep 2021 03:07:34 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'e77f3721-8a25-45a1-be82-31a69580566c', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11917', + 'x-ms-correlation-request-id', + '3e6d3b7b-fde7-4020-9b46-8c09c649d3cc', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030737Z:3e6d3b7b-fde7-4020-9b46-8c09c649d3cc', + 'Date', + 'Tue, 28 Sep 2021 03:07:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'ba1bd907-d81c-4a8b-a731-ccf80ed2705f', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11916', + 'x-ms-correlation-request-id', + '33c05447-ac3f-44ee-b3bc-735c04870c82', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030739Z:33c05447-ac3f-44ee-b3bc-735c04870c82', + 'Date', + 'Tue, 28 Sep 2021 03:07:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'd690a9f8-a1a4-4325-9cbd-cd887001360a', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11915', + 'x-ms-correlation-request-id', + '58e467df-6154-4f43-a885-2478b5ab85eb', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030742Z:58e467df-6154-4f43-a885-2478b5ab85eb', + 'Date', + 'Tue, 28 Sep 2021 03:07:41 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '96930182-6e7e-498f-b5ff-4cb7a18cf144', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11914', + 'x-ms-correlation-request-id', + 'aa7776ad-3234-4334-8190-7d3f6122dcce', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030744Z:aa7776ad-3234-4334-8190-7d3f6122dcce', + 'Date', + 'Tue, 28 Sep 2021 03:07:44 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c727a21b-0111-449f-80ba-b51f0f07a8cb', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11913', + 'x-ms-correlation-request-id', + 'f42dfb9f-7ed3-4b70-a3d7-ca9a848d96ca', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030747Z:f42dfb9f-7ed3-4b70-a3d7-ca9a848d96ca', + 'Date', + 'Tue, 28 Sep 2021 03:07:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c77e9f54-2247-4da5-9adb-810311a5a16f', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11912', + 'x-ms-correlation-request-id', + '58a85ab6-12bf-45e5-afba-e8d04eec76e3', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030749Z:58a85ab6-12bf-45e5-afba-e8d04eec76e3', + 'Date', + 'Tue, 28 Sep 2021 03:07:49 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '6b206ff6-7fc5-4cbd-a0e5-70400d6aa1fa', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11911', + 'x-ms-correlation-request-id', + 'f6c0b154-5ee1-4fe4-b153-56a0e10f3b4e', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030751Z:f6c0b154-5ee1-4fe4-b153-56a0e10f3b4e', + 'Date', + 'Tue, 28 Sep 2021 03:07:51 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '760d3c51-4d6d-4e82-b506-3a81c330d4f5', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11910', + 'x-ms-correlation-request-id', + 'd5bfe7c6-7b10-4c6a-925c-dddcab612247', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030754Z:d5bfe7c6-7b10-4c6a-925c-dddcab612247', + 'Date', + 'Tue, 28 Sep 2021 03:07:54 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'c8f3c9e8-cfb4-4bfa-af44-b0dc17341147', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11909', + 'x-ms-correlation-request-id', + 'bf1b0582-da89-42b4-a184-ff6b8536ffc5', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030756Z:bf1b0582-da89-42b4-a184-ff6b8536ffc5', + 'Date', + 'Tue, 28 Sep 2021 03:07:56 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '84a83a7b-aa28-41eb-885c-594763811b4d', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11908', + 'x-ms-correlation-request-id', + '3a751bf0-bbd5-44da-b2d3-0a006b5a8416', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030758Z:3a751bf0-bbd5-44da-b2d3-0a006b5a8416', + 'Date', + 'Tue, 28 Sep 2021 03:07:58 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '485348f1-a8b5-4ca8-92dd-e98d6df4d759', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11907', + 'x-ms-correlation-request-id', + '66844100-eacb-4d9b-b14d-1d393c89e636', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030801Z:66844100-eacb-4d9b-b14d-1d393c89e636', + 'Date', + 'Tue, 28 Sep 2021 03:08:01 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '4a37ab9a-bf4b-459b-9f8b-4981b34393e4', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11906', + 'x-ms-correlation-request-id', + '6850140e-1f2b-428a-af87-c5261361ae29', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030803Z:6850140e-1f2b-428a-af87-c5261361ae29', + 'Date', + 'Tue, 28 Sep 2021 03:08:03 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '7a70e76a-bea6-45ea-8501-a2d4ad6798b8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11905', + 'x-ms-correlation-request-id', + '7a179a2f-be79-463e-b7c1-fced9323dff0', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030805Z:7a179a2f-be79-463e-b7c1-fced9323dff0', + 'Date', + 'Tue, 28 Sep 2021 03:08:05 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '885e4d98-24b0-45be-94e9-a7d008cc46c4', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11904', + 'x-ms-correlation-request-id', + '9222d6e6-1151-47a8-a36c-ada92e862123', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030808Z:9222d6e6-1151-47a8-a36c-ada92e862123', + 'Date', + 'Tue, 28 Sep 2021 03:08:08 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '26be9aed-e7f9-4bcc-9e39-cbbad14bbc53', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11903', + 'x-ms-correlation-request-id', + 'a27d521e-eaa3-4c3c-baa9-e3b0a1e46a9a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030810Z:a27d521e-eaa3-4c3c-baa9-e3b0a1e46a9a', + 'Date', + 'Tue, 28 Sep 2021 03:08:10 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '5026958e-e13c-43c9-b596-c74ddf644df5', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11902', + 'x-ms-correlation-request-id', + 'f482f361-fd28-4f62-939b-b87df6bdadb8', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030813Z:f482f361-fd28-4f62-939b-b87df6bdadb8', + 'Date', + 'Tue, 28 Sep 2021 03:08:13 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'ba66a456-8172-4e9a-a4ec-0b8de0749d90', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11901', + 'x-ms-correlation-request-id', + '84ed1d48-070c-4a74-a3b1-944fc676dcb9', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030815Z:84ed1d48-070c-4a74-a3b1-944fc676dcb9', + 'Date', + 'Tue, 28 Sep 2021 03:08:15 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'bdcac188-0ce5-4bfb-b6ee-9af8c31681fa', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11900', + 'x-ms-correlation-request-id', + 'ea45e675-7a8f-43fd-8c98-54d2da9ddea4', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030818Z:ea45e675-7a8f-43fd-8c98-54d2da9ddea4', + 'Date', + 'Tue, 28 Sep 2021 03:08:17 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'b91a65b8-5223-4faa-974e-b866b926c201', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11899', + 'x-ms-correlation-request-id', + '431e2648-d2f3-43b7-9f6d-280a1aadf58a', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030820Z:431e2648-d2f3-43b7-9f6d-280a1aadf58a', + 'Date', + 'Tue, 28 Sep 2021 03:08:20 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + '7fb2fa93-d6d6-4820-b935-df2deaaf5ad8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11898', + 'x-ms-correlation-request-id', + '16c28bd1-ddb8-4085-8107-8d2c1d7f69ff', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030826Z:16c28bd1-ddb8-4085-8107-8d2c1d7f69ff', + 'Date', + 'Tue, 28 Sep 2021 03:08:25 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(504, {"error":{"code":"GatewayTimeout","message":"The gateway did not receive a response from 'Microsoft.Cache' within the specified time period."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-failure-cause', + 'service', + 'x-ms-request-id', + 'f32869dd-a926-45a0-9e82-60797261b329', + 'x-ms-correlation-request-id', + 'f32869dd-a926-45a0-9e82-60797261b329', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030928Z:f32869dd-a926-45a0-9e82-60797261b329', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 28 Sep 2021 03:09:28 GMT', + 'Connection', + 'close', + 'Content-Length', + '143' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(202, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'Location', + 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b?api-version=2020-12-01', + 'x-ms-request-id', + 'b41ee15b-7c7b-4586-9d32-1af4cbbf2282', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11896', + 'x-ms-correlation-request-id', + '007269e8-ec34-43a8-a80b-bdcda145e92b', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030941Z:007269e8-ec34-43a8-a80b-bdcda145e92b', + 'Date', + 'Tue, 28 Sep 2021 03:09:41 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/providers/Microsoft.Cache/locations/East%20US/operationresults/c9624211-42da-4ffc-8329-7fc9c894426b') + .query(true) + .reply(200, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-request-id', + '71bd099e-581a-48f0-9d10-5dbf1f7bfb72', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11895', + 'x-ms-correlation-request-id', + '1c519040-93c7-4c8d-87d0-f5a5f881bb3b', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030947Z:1c519040-93c7-4c8d-87d0-f5a5f881bb3b', + 'Date', + 'Tue, 28 Sep 2021 03:09:47 GMT', + 'Content-Length', + '0' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff","92ff0742ea40440c000000"], [ + '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', + 'x-ms-request-id', + '4dfad72b-a011-4b2d-8978-8175c8376556', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11894', + 'x-ms-correlation-request-id', + 'f219b3aa-9068-47e4-a0ba-339c01f40b9c', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030949Z:f219b3aa-9068-47e4-a0ba-339c01f40b9c', + 'Date', + 'Tue, 28 Sep 2021 03:09:49 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_get_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_get_test.js new file mode 100644 index 000000000000..2a0d0c4a65d6 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_get_test.js @@ -0,0 +1,149 @@ +let nock = require('nock'); + +module.exports.hash = "0c8e4228309b12e6f31b264a6a092163"; + +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', + '46849707-a8ee-4333-b86a-9f2f15950000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'Set-Cookie', + 'fpc=ApP6-qs9mgxFnCVlcJMyHko; expires=Thu, 28-Oct-2021 02:49:33 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrkzmc3nU0s6ziuxcpgQZcIOnr6QrOYVzfsYKG9Old4Y8PT-MASte1ML_xBzuoatSM3yzMZdTogecRx0KYbjSE8oF3eubDVSaWTgnwVsmKk9_HvOBSxCN6iheB5X35w4J9HPdIv8YeCC4IeYrdQe7Y8zsW3DWE4zGQI6_1_BdzUHAgAA; 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, 28 Sep 2021 02:49:33 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', + 'ba098c41-5e24-43b7-aaf4-4a4629f01100', + 'x-ms-ests-server', + '2.1.12071.16 - KRSLR2 ProdSlices', + 'Set-Cookie', + 'fpc=AjyFg87GoY9Nq8mtw589JJ0; expires=Thu, 28-Oct-2021 02:49:33 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrrRv2boOfOGVyuWSQYqUYal-8SZZbdTh8cCKqXW_MwEkvqsmGU4nRZ5tH0gkAISj7hYgm0S10iPz35Fl2KtJFRxIkPa0U5iFnK0kf4XoowGXg0xPDmeU01QvFOFABj1uSh_5N9DdLLEkqIW4UAhznRc7303eO4aS25ijW9dFiscMgAA; 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, 28 Sep 2021 02:49:33 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=20227b87-d6cd-4173-a0d2-490602eae8e9&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', + '791d4b96-cf7d-4212-8f5b-a0858d9f1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=As2fhR0oeKhNpykdaasGiHwWPr5BAQAAAL155NgOAAAA; expires=Thu, 28-Oct-2021 02:49:33 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, 28 Sep 2021 02:49:33 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac038a973ea7b7941af71473f49b8530bfa667fbc33dedda7cf9bb76bbcad08bdacf345b15ed0e7e7d9a228aff111fd31cd56d9b468e9cf5dea375f6693327f512d5f37e5cbaa6e3f7ad4d6eb7cf451b16cda6c39053adffbc51f35e6cbddfb3b3b3b3464affdee3dfea868be208ae4f5478fceb3b20184e6655d2cb29a3ae24f7ec9a80367b70f873e7a7f387b7d38f4d1fbc3b9d787431fdd0ce7fba38f16c5b258ac176f4a6f5676c77b44edd57a5216d317797b55d56f8fa74450a2e847a74cf5197dcf5379522dcf8b8b754df38b577ff1478becdd225f54f5f5f6aaa2d7a9ab8fb2b27c9b5f37db65bda6d7a8c1b42cf2650b680f0879f94c5f229ecfeb4b82ffe8a33df3d5799d5d2ce805eea3df8e062bedf4ab595eb6197d8ef7894d32c6fcf722043e7ab45c97e5e8a379d5b42f84d1fa9c3fe60fc6fcc9f8aa58ceaaab66bccc5bea62c5c4fdf4de8387c4af86d69fde3b201622e9a6366740e72efdfeb329e93a21772f8bba5d67a5fed9dca5fef10b24e8dd5dc281fe6ef4a7fd9c0641b2d116d3b39784e9ee0e49dfcef83e3e9d67f5eca45a2f6944c48165b17c9bcf5e83c23591ed7bdf273afea05ab2487db4fbd1f77f","c9ff03b438e1cbd6040000"], [ + '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', + 'x-ms-request-id', + 'fb9210fd-4e92-4ad2-93ed-fc7698550f8c', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11991', + 'x-ms-correlation-request-id', + '2bb41c11-4286-426b-be2f-6680421cc216', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024934Z:2bb41c11-4286-426b-be2f-6680421cc216', + 'Date', + 'Tue, 28 Sep 2021 02:49:34 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_listbyresourcegroup_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_listbyresourcegroup_test.js new file mode 100644 index 000000000000..696c17e2ff2e --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_listbyresourcegroup_test.js @@ -0,0 +1,149 @@ +let nock = require('nock'); + +module.exports.hash = "6c4609f6a5b5fbcc676d2f31d151cc20"; + +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', + 'f9222132-b683-47ff-a49e-b4f286a81100', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR2 ProdSlices', + 'Set-Cookie', + 'fpc=AjpOovHmyt9NgFXYxehPjcI; expires=Thu, 28-Oct-2021 02:49:35 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr1ReOZjgf0q7vWR65GdP0hx9R6ZTUMlRbgy8PIgUZ2f3H3pymKGyQs84Bx9NZC_ux8YV2KqKSAyHOl_JtO9P_8mD45KdioFcGecyNA_g7WdTPMWekBqQ3z0PuzTYw2xxtPslJjMSAMvhj8E0v-55Vyjz7I0ckuI4_gdWx3aJaFcogAA; 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, 28 Sep 2021 02:49:35 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', + '791d4b96-cf7d-4212-8f5b-a0859a9f1200', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'Set-Cookie', + 'fpc=AgidRWo3judFvOJGWP_u1rY; expires=Thu, 28-Oct-2021 02:49:35 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrgsbrWq0yjPnKGLDvojNCDQrbGUm_6Re7ij9BZuhBNpF1Jww6DCSnLdq6PEuzMuicqIgp2SBiaFKadtMN_E2YSbFZzoWvL-sEw1G-S3mqj6GiqSQqRy5lqahsnZjxrO-9Pf4uEPuB4MvnDCXbC80U2xTUH6UhBAy0vG8xfY66Q0QgAA; 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, 28 Sep 2021 02:49:35 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=e291fb01-250b-417f-a497-b50a58eca3cc&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', + 'f9d979f1-57a4-42d5-bd48-4deb6e8a0000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=Aoea2JppXmBJtkV-1Ue8p5IWPr5BAQAAAL955NgOAAAA; expires=Thu, 28-Oct-2021 02:49:36 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, 28 Sep 2021 02:49:35 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e3936c3acfefbeca67051ad6f839c547efdebddbddddfd68f451594d33f44db89c664d9b7ef59a3e5c660bc2f1a3e80bedf50adf45bbc0d7d945f3d1a35ffc4b461f113aabbc6e8b1c7fe3afcba2a18e8ae5c5eb366b01e3a4cea9efe505bdc61dfd24e14e2de89bfdf1ce78779f3e6fdeaef1b622f4b2ce17c57a419f9f678ba2bcc647f4c7345b65d3a2a53f77a9df7c994dcafc45b57cdd942fabbafde8515baff3d147c5b269b3e514e810f51bf3e5eefd9d9d1d1ab2d77ef71e7f54345f1045f2faa347e759d90042f3b22e16594d1df127bf64d481b3db87431fbd3f9cbd3e1cfae8fde1dcebc3a18f6e86f3fdd1478b62592cd68b37a5372bbbe33da2f66a3d298be98bbcbdaaeab7c753222851f4a353a6fa8cbee7a93ca996e7c5c5baa6f9c5abbff8a345f66e912faafa7a7b55d1ebd4d5475959becdaf9bedb25ed36bd4605a16f9b205b40784bc7ca62f11cfe7f525c17ff4d19ef9eabcce2e16f402f7d16f47839576fad52c2fdb8c3ec7fbc4261963fe7b11021f3d5aaecb72f4d1bc6ada17c2687dce1ff30763fe647c552c67d555335ee62d75b162e27e7aefc143e25743eb4fef1d100b9174539b33a073977effd994749d90bb9745ddaeb352ff6cee52fff80512f4ee2ee1407f37fad37e4e8320d9688be9d94bc2747787a46f677c1f9fceb37a7652ad973422e2c0b258becd67af41e19ac8f6bdef131d7f502d59a43edafde8fbbfe4fbbf","e4ff011b16d338e2040000"], [ + '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', + 'x-ms-request-id', + '01984311-1590-4991-861e-15f7b14d17ed', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11989', + 'x-ms-correlation-request-id', + '6f139cf6-018e-41c9-99b8-c1d0c710f8c5', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024936Z:6f139cf6-018e-41c9-99b8-c1d0c710f8c5', + 'Date', + 'Tue, 28 Sep 2021 02:49:36 GMT' +]); diff --git a/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_update_test.js b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_update_test.js new file mode 100644 index 000000000000..fb8659fcbd03 --- /dev/null +++ b/sdk/redis/arm-rediscache/recordings/node/redis_test/recording_redis_update_test.js @@ -0,0 +1,301 @@ +let nock = require('nock'); + +module.exports.hash = "0cc7ad135f8e0c1b076126ea485bd3ea"; + +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', + '46849707-a8ee-4333-b86a-9f2f32950000', + 'x-ms-ests-server', + '2.1.12071.17 - KRSLR1 ProdSlices', + 'Set-Cookie', + 'fpc=AhgoP7GVDa5LgKfIpM23JGM; expires=Thu, 28-Oct-2021 02:49:36 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrKZttJrwUBHh5v-u08E7mCXSbtaw7mD6mdw5wc2HTurCqkps8X9crdkK8q7ah4VEW3kOee8fGrlDC_-NLuCyk6PyDm3BlIVU8QdNatWZxp_BS6usicSuYK0vlp9GwRY12dQT0ge_nyRbtTlrRs_624DRzG0zystFPlOMd7ou2_RsgAA; 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, 28 Sep 2021 02:49:36 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', + 'd8394544-8497-4b9f-986e-ff4941a41100', + 'x-ms-ests-server', + '2.1.12071.16 - KRSLR2 ProdSlices', + 'Set-Cookie', + 'fpc=Ajb8tTPgyBNDtMSzI-YzjnU; expires=Thu, 28-Oct-2021 02:49:36 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrlKTxxUb6RQUJaH3gQ2sgCEjVxELufur47acYWEtfqxwPbABsbzyjK0NwHjrfzlWcRn-xD3CtwzusERGQTJyf69Ji0ozAF_TUgfqbtrSumqX2mRUUAfb0JJmIHwiDXU9pCXqFfTbFA_FODSFZNdCEluI4Q7jFYmD941CZUL-8bOUgAA; 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, 28 Sep 2021 02:49:36 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.1&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=25f926d8-ff70-4af5-8043-dfbd8f28aa83&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', + '9e574ff0-b0e5-4838-a6c0-a7cb386c1100', + 'x-ms-ests-server', + '2.1.12071.16 - SEASLR1 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=At0Bvvse7kpFuCNG-1Uos9oWPr5BAQAAAMB55NgOAAAA; expires=Thu, 28-Oct-2021 02:49:36 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, 28 Sep 2021 02:49:36 GMT', + 'Content-Length', + '1351' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac038a973ea7b7941af71473f49b8530bfa667fbc33dedda7cf9bb76bbcad08bdacf345b15ed0e7e7d9a228aff111fd31cd56d9b468e9cf5dea375f6693327f512d5f37e5cbaa6e3f7ad4d6eb7cf451b16cda6c39053adffbc51f35e6cbddfb3b3b3b3464affdee3dfea868be208ae4f5478fceb3b20184e6655d2cb29a3ae24f7ec9a80367b70f873e7a7f387b7d38f4d1fbc3b9d787431fdd0ce7fba38f16c5b258ac176f4a6f5676c77b44edd57a5216d317797b55d56f8fa74450a2e847a74cf5197dcf5379522dcf8b8b754df38b577ff1478becdd225f54f5f5f6aaa2d7a9ab8fb2b27c9b5f37db65bda6d7a8c1b42cf2650b680f0879f94c5f229ecfeb4b82ffe8a33df3d5799d5d2ce805eea3df8e062bedf4ab595eb6197d8ef7894d32c6fcf722043e7ab45c97e5e8a379d5b42f84d1fa9c3fe60fc6fcc9f8aa58ceaaab66bccc5bea62c5c4fdf4de8387c4af86d69fde3b201622e9a6366740e72efdfeb329e93a21772f8bba5d67a5fed9dca5fef10b24e8dd5dc281fe6ef4a7fd9c0641b2d116d3b39784e9ee0e49dfcef83e3e9d67f5eca45a2f6944c48165b17c9bcf5e83c23591ed7bdf273afea05ab2487db4fbd1f77f","c9ff03b438e1cbd6040000"], [ + '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', + 'x-ms-request-id', + '7749b169-e8cb-474c-964b-61f1003e0b35', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11988', + 'x-ms-correlation-request-id', + 'fb18f47a-b847-40ce-b5cc-3922e80a2225', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T024937Z:fb18f47a-b847-40ce-b5cc-3922e80a2225', + 'Date', + 'Tue, 28 Sep 2021 02:49:36 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac038a973ea7b7941af71473f49b8530bfa667fbc33dedda7cf9bb76bbcad08bdacf345b15ed0e7e7d9a228aff111fd31cd56d9b468e9cf5dea375f6693327f512d5f37e5cbaa6e3f7ad4d6eb7cf451b16cda6c39053adffbc51f35e6cbddfb3b3b3b3464affdee3dfea868be208ae4f5478fceb3b20184e6655d2cb29a3ae24f7ec9a80367b70f873e7a7f387b7d38f4d1fbc3b9d787431fdd0ce7fba38f16c5b258ac176f4a6f5676c77b44edd57a5216d317797b55d56f8fa74450a2e847a74cf5197dcf5379522dcf8b8b754df38b577ff1478becdd225f54f5f5f6aaa2d7a9ab8fb2b27c9b5f37db65bda6d7a8c1b42cf2650b680f0879f94c5f229ecfeb4b82ffe8a33df3d5799d5d2ce805eea3df8e062bedf4ab595eb6197d8ef7894d32c6fcf722043e7ab45c97e5e8a379d5b42f84d1fa9c3fe60fc6fcc9f8aa58ceaaab66bccc5bea62c5c4fdf4de8387c4af86d69fde3b201622e9a6366740e72efdfeb329e93a21772f8bba5d67a5fed9dca5fef10b24e8dd5dc281fe6ef4a7fd9c0641b2d116d3b39784e9ee0e49dfcef83e3e9d67f5eca45a2f6944c48165b17c9bcf5e83c23591ed7bdf273afea05ab2487db4fbd1f77f","c9ff03b438e1cbd6040000"], [ + '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', + 'x-ms-request-id', + '5756828d-785d-498a-b545-0fe294de6697', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11999', + 'x-ms-correlation-request-id', + '92abfbef-6537-46ba-a0b1-887889f9ef88', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T025438Z:92abfbef-6537-46ba-a0b1-887889f9ef88', + 'Date', + 'Tue, 28 Sep 2021 02:54:38 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac038a973ea7b7941af71473f49b8530bfa667fbc33dedda7cf9bb76bbcad08bdacf345b15ed0e7e7d9a228aff111fd31cd56d9b468e9cf5dea375f6693327f512d5f37e5cbaa6e3f7ad4d6eb7cf451b16cda6c39053adffbc51f35e6cbddfb3b3b3b3464affdee3dfee807d5129d62d0cd3cab67673461f471d17c9111c1eb8f1e9d676503c0cdcbba586435f5cf9ffc925107fc6e1f3c7df48d81dfeb83a78f62e0a9d7f7077faf0f9e3efadae0bf3ffa68512c8bc57af1a6f4667c77bc47a056eb49594c5fe4ed5555bf3d9ed264d16c7d74bac48ccee87b6693936a795e5cac6be21dbcfa8b3f5a64ef16f9a2aaafb75715bd4e5d7d9495e5dbfcbad92eeb35bd460da665912f5b407b406392cff42592a7bcbe24f88f3eda335f9dd7d9c5825ee03efaed8806d24ebf9ae5659bd1e7789f583063cc7f2f42e0a347cb75598e3e9a574dfb4298b82f5563fe60cc9f8caf8ae5acba6ac6cbbca52e564cf34fef3d7848743653f0e9bd036214d21cd40674ff59d7223a21772f8bba5d67a5fed9dca5fef10ba4f3dd5dc281fe6ef4a7fd9c064172d716d3b39784e9ee0e49f6cef83e3e05db9c54eb258d88f8b52c966ff3d96b50b826b27deffb444730197e2736fbfe","2ff97f00731eee9a32050000"], [ + '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', + 'x-ms-request-id', + 'afb7f21f-f01d-4a91-8141-4d659d2df406', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11998', + 'x-ms-correlation-request-id', + '73bcaa08-87e1-44ee-b4b6-dcb9f5aaec3d', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T025940Z:73bcaa08-87e1-44ee-b4b6-dcb9f5aaec3d', + 'Date', + 'Tue, 28 Sep 2021 02:59:40 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac078bd9e4ef37c96cfe83deee92709796a425fed8f77c6bbfbf479f3768dd715a39775be28d60bfafc3c5b14e5353ea23fa6d92a9b162dfdb94b1de7cb6c52e62faae5eba67c59d5ed478fda7a9d8f3e2a964d9b2da7c0e77bbff8a3c67cb97b7f676787c6ecb5dfbdc71ffda05aa2538cba9967f5ec8c668c3e2e9a2f32a2786de1362feb6291d5d43d3ef825a30ef0dd3e70fae846e0e759d984d0f9931ef8bd3e78fa28069e7a75e0812afeb6d0f1410ff8bd3e70fae846e08c293eb0d0f9935ff2fdd1478b62592cd68b37a537dbbbe33d02b55a4fca62fa226fafaafaed31b1464333f5d1e912b36959e4a45a9e1717eb5a99f6177fb4c8de2df245555f6faf2a7a9dbafa282bcbb7f975b35dd66b7a8d1a4ccb225fb680f680c6249fe94b244c797d49f01f7db467be3aafb38b05bdc07df4db110da49d7e35cbcb36a3cff13eb15fc698ff5e84c0478f96ebb21c7d34af9af68530705fa4c6fcc1983f195f15cb5975d58c97794b5dac98e69fde7bf090e86ca6e0d37b07c426a436a80de8feb3ae427442ee5e1675bbce4afdb3b94bfde31748e6bbbb8403fddde84ffb390d8264ae2da6672f09d3dd1d92ea9df17d7c0ab639a9d64b1a11716b592cdfe6b3d7a0704d64fbdef7898e6032fc4e6cf6fd","5ff2ff00033652e12f050000"], [ + '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', + 'x-ms-request-id', + 'a2d7cf4a-3d20-426b-894a-ed8e529afcf8', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-reads', + '11987', + 'x-ms-correlation-request-id', + 'bba977d7-b2de-4ad6-8693-fffc6490e915', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030442Z:bba977d7-b2de-4ad6-8693-fffc6490e915', + 'Date', + 'Tue, 28 Sep 2021 03:04:41 GMT' +]); + +nock('https://management.azure.com:443', {"encodedQueryParams":true}) + .patch('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Cache/redis/myrediscachexxx111', {"properties":{"enableNonSslPort":true}}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4fb2e93cbffb2a9f156858e3e7141fbd7bf76e7777f7a3d1476535cdd037e1729a356dfad56bfa70992d72fa20fa427bbdc277d12ef07576d17cf4e817ff92d14784ce2aafdb22c7dff8ebb268a8a36279f1bacd5ac078bd9e4ef37c96cfe83deee92709796a425fed8f77c6bbfbf479f3768dd715a39775be28d60bfafc3c5b14e5353ea23fa6d92a9b162dfdb94b1de7cb6c52e62faae5eba67c59d5ed478fda7a9d8f3e2a964d9b2da7c0e77bbff8a3c67cb97b7f676787c6ecb5dfbdc71ffda05aa2538cba9967f5ec8c668c3e2e9a2f32a2786de1362feb6291d5d43d3ef825a30ef0dd3e70fae846e0e759d984d0f9931ef8bd3e78fa28069e7a75e0812afeb6d0f1410ff8bd3e70fae846e08c293eb0d0f9935ff2fdd1478b62592cd68b37a537dbbbe33d02b55a4fca62fa226fafaafaed31b1464333f5d1e912b36959e4a45a9e1717eb5a99f6177fb4c8de2df245555f6faf2a7a9dbafa282bcbb7f975b35dd66b7a8d1a4ccb225fb680f680c6249fe94b244c797d49f01f7db467be3aafb38b05bdc07df4db110da49d7e35cbcb36a3cff13eb15fc698ff5e84c0478f96ebb21c7d34af9af68530705fa4c6fcc1983f195f15cb5975d58c97794b5dac98e69fde7bf090e86ca6e0d37b07c426a436a80de8feb3ae427442ee5e1675bbce4afdb3b94bfde31748e6bbbb8403fddde84ffb390d8264ae2da6672f09d3dd1d92ea9df17d7c0ab639a9d64b1a11716b592cdfe6b3d7a0704d64fbdef7898e6032fc4e6cf6fd","5ff2ff00033652e12f050000"], [ + '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', + 'x-ms-request-id', + 'f671fd97-358f-4c5b-851f-c2d4830e67b2', + 'x-rp-server-mvid', + 'c8066022-f720-49e8-9fec-c4ac03b5b4cd', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'x-ms-ratelimit-remaining-subscription-writes', + '1195', + 'x-ms-correlation-request-id', + '70e434bb-02c3-4c69-9bf9-23dc6301cc3f', + 'x-ms-routing-request-id', + 'JAPANEAST:20210928T030443Z:70e434bb-02c3-4c69-9bf9-23dc6301cc3f', + 'Date', + 'Tue, 28 Sep 2021 03:04:42 GMT' +]); diff --git a/sdk/redis/arm-rediscache/review/arm-rediscache.api.md b/sdk/redis/arm-rediscache/review/arm-rediscache.api.md new file mode 100644 index 000000000000..3a83c2aaa851 --- /dev/null +++ b/sdk/redis/arm-rediscache/review/arm-rediscache.api.md @@ -0,0 +1,879 @@ +## API Report File for "@azure/arm-rediscache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export interface CheckNameAvailabilityParameters { + name: string; + type: string; +} + +// @public +export type DayOfWeek = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" | "Everyday" | "Weekend"; + +// @public +export type DefaultName = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExportRDBParameters { + container: string; + format?: string; + prefix: string; +} + +// @public +export interface FirewallRules { + createOrUpdate(resourceGroupName: string, cacheName: string, ruleName: string, parameters: RedisFirewallRule, options?: FirewallRulesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, cacheName: string, ruleName: string, options?: FirewallRulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, cacheName: string, ruleName: string, options?: FirewallRulesGetOptionalParams): Promise; + list(resourceGroupName: string, cacheName: string, options?: FirewallRulesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FirewallRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallRulesCreateOrUpdateResponse = RedisFirewallRule; + +// @public +export interface FirewallRulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface FirewallRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallRulesGetResponse = RedisFirewallRule; + +// @public +export interface FirewallRulesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallRulesListNextResponse = RedisFirewallRuleListResult; + +// @public +export interface FirewallRulesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallRulesListResponse = RedisFirewallRuleListResult; + +// @public +export interface ImportRDBParameters { + files: string[]; + format?: string; +} + +// @public +export enum KnownDefaultName { + // (undocumented) + Default = "default" +} + +// @public +export enum KnownPrivateEndpointConnectionProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + // (undocumented) + Approved = "Approved", + // (undocumented) + Pending = "Pending", + // (undocumented) + Rejected = "Rejected" +} + +// @public +export enum KnownProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Failed = "Failed", + // (undocumented) + Linking = "Linking", + // (undocumented) + Provisioning = "Provisioning", + // (undocumented) + RecoveringScaleFailure = "RecoveringScaleFailure", + // (undocumented) + Scaling = "Scaling", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Unlinking = "Unlinking", + // (undocumented) + Unprovisioning = "Unprovisioning", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownPublicNetworkAccess { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownRebootType { + // (undocumented) + AllNodes = "AllNodes", + // (undocumented) + PrimaryNode = "PrimaryNode", + // (undocumented) + SecondaryNode = "SecondaryNode" +} + +// @public +export enum KnownSkuFamily { + // (undocumented) + C = "C", + // (undocumented) + P = "P" +} + +// @public +export enum KnownSkuName { + // (undocumented) + Basic = "Basic", + // (undocumented) + Premium = "Premium", + // (undocumented) + Standard = "Standard" +} + +// @public +export enum KnownTlsVersion { + // (undocumented) + One0 = "1.0", + // (undocumented) + One1 = "1.1", + // (undocumented) + One2 = "1.2" +} + +// @public +export interface LinkedServer { + beginCreate(resourceGroupName: string, name: string, linkedServerName: string, parameters: RedisLinkedServerCreateParameters, options?: LinkedServerCreateOptionalParams): Promise, LinkedServerCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, name: string, linkedServerName: string, parameters: RedisLinkedServerCreateParameters, options?: LinkedServerCreateOptionalParams): Promise; + delete(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerDeleteOptionalParams): Promise; + get(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerGetOptionalParams): Promise; + list(resourceGroupName: string, name: string, options?: LinkedServerListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LinkedServerCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LinkedServerCreateResponse = RedisLinkedServerWithProperties; + +// @public +export interface LinkedServerDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface LinkedServerGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkedServerGetResponse = RedisLinkedServerWithProperties; + +// @public +export interface LinkedServerListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkedServerListNextResponse = RedisLinkedServerWithPropertiesList; + +// @public +export interface LinkedServerListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkedServerListResponse = RedisLinkedServerWithPropertiesList; + +// @public +export interface NotificationListResponse { + readonly nextLink?: string; + value?: UpgradeNotification[]; +} + +// @public +export interface Operation { + display?: OperationDisplay; + name?: string; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface PatchSchedules { + createOrUpdate(resourceGroupName: string, name: string, parameters: RedisPatchSchedule, defaultParam: DefaultName, options?: PatchSchedulesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesGetOptionalParams): Promise; + listByRedisResource(resourceGroupName: string, cacheName: string, options?: PatchSchedulesListByRedisResourceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PatchSchedulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PatchSchedulesCreateOrUpdateResponse = RedisPatchSchedule; + +// @public +export interface PatchSchedulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface PatchSchedulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PatchSchedulesGetResponse = RedisPatchSchedule; + +// @public +export interface PatchSchedulesListByRedisResourceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PatchSchedulesListByRedisResourceNextResponse = RedisPatchScheduleListResult; + +// @public +export interface PatchSchedulesListByRedisResourceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PatchSchedulesListByRedisResourceResponse = RedisPatchScheduleListResult; + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export type PrivateEndpointConnection = Resource & { + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +// @public +export interface PrivateEndpointConnectionListResult { + value?: PrivateEndpointConnection[]; +} + +// @public +export type PrivateEndpointConnectionProvisioningState = string; + +// @public +export interface PrivateEndpointConnections { + beginPut(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise, PrivateEndpointConnectionsPutResponse>>; + beginPutAndWait(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise; + delete(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; + list(resourceGroupName: string, cacheName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsPutOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export type PrivateLinkResource = Resource & { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +}; + +// @public +export interface PrivateLinkResourceListResult { + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkResources { + listByRedisCache(resourceGroupName: string, cacheName: string, options?: PrivateLinkResourcesListByRedisCacheOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkResourcesListByRedisCacheOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByRedisCacheResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} + +// @public +export type ProvisioningState = string; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type PublicNetworkAccess = string; + +// @public +export type RebootType = string; + +// @public +export interface Redis { + beginCreate(resourceGroupName: string, name: string, parameters: RedisCreateParameters, options?: RedisCreateOptionalParams): Promise, RedisCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, name: string, parameters: RedisCreateParameters, options?: RedisCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, name: string, options?: RedisDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, name: string, options?: RedisDeleteOptionalParams): Promise; + beginExportData(resourceGroupName: string, name: string, parameters: ExportRDBParameters, options?: RedisExportDataOptionalParams): Promise, void>>; + beginExportDataAndWait(resourceGroupName: string, name: string, parameters: ExportRDBParameters, options?: RedisExportDataOptionalParams): Promise; + beginImportData(resourceGroupName: string, name: string, parameters: ImportRDBParameters, options?: RedisImportDataOptionalParams): Promise, void>>; + beginImportDataAndWait(resourceGroupName: string, name: string, parameters: ImportRDBParameters, options?: RedisImportDataOptionalParams): Promise; + checkNameAvailability(parameters: CheckNameAvailabilityParameters, options?: RedisCheckNameAvailabilityOptionalParams): Promise; + forceReboot(resourceGroupName: string, name: string, parameters: RedisRebootParameters, options?: RedisForceRebootOptionalParams): Promise; + get(resourceGroupName: string, name: string, options?: RedisGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: RedisListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: RedisListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listKeys(resourceGroupName: string, name: string, options?: RedisListKeysOptionalParams): Promise; + listUpgradeNotifications(resourceGroupName: string, name: string, history: number, options?: RedisListUpgradeNotificationsOptionalParams): PagedAsyncIterableIterator; + regenerateKey(resourceGroupName: string, name: string, parameters: RedisRegenerateKeyParameters, options?: RedisRegenerateKeyOptionalParams): Promise; + update(resourceGroupName: string, name: string, parameters: RedisUpdateParameters, options?: RedisUpdateOptionalParams): Promise; +} + +// @public +export interface RedisAccessKeys { + readonly primaryKey?: string; + readonly secondaryKey?: string; +} + +// @public +export interface RedisCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface RedisCommonProperties { + enableNonSslPort?: boolean; + minimumTlsVersion?: TlsVersion; + publicNetworkAccess?: PublicNetworkAccess; + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + redisVersion?: string; + replicasPerMaster?: number; + replicasPerPrimary?: number; + shardCount?: number; + tenantSettings?: { + [propertyName: string]: string; + }; +} + +// @public +export interface RedisCommonPropertiesRedisConfiguration { + [property: string]: any; + aofStorageConnectionString0?: string; + aofStorageConnectionString1?: string; + readonly maxclients?: string; + maxfragmentationmemoryReserved?: string; + maxmemoryDelta?: string; + maxmemoryPolicy?: string; + maxmemoryReserved?: string; + rdbBackupEnabled?: string; + rdbBackupFrequency?: string; + rdbBackupMaxSnapshotCount?: string; + rdbStorageConnectionString?: string; +} + +// @public +export interface RedisCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RedisCreateParameters { + enableNonSslPort?: boolean; + location: string; + minimumTlsVersion?: TlsVersion; + publicNetworkAccess?: PublicNetworkAccess; + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + redisVersion?: string; + replicasPerMaster?: number; + replicasPerPrimary?: number; + shardCount?: number; + sku: Sku; + staticIP?: string; + subnetId?: string; + tags?: { + [propertyName: string]: string; + }; + tenantSettings?: { + [propertyName: string]: string; + }; + zones?: string[]; +} + +// @public +export type RedisCreateProperties = RedisCommonProperties & { + sku: Sku; + subnetId?: string; + staticIP?: string; +}; + +// @public +export type RedisCreateResponse = RedisResource; + +// @public +export interface RedisDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RedisExportDataOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RedisFirewallRule = ProxyResource & { + startIP: string; + endIP: string; +}; + +// @public +export type RedisFirewallRuleCreateParameters = RedisFirewallRule & {}; + +// @public +export interface RedisFirewallRuleListResult { + readonly nextLink?: string; + value?: RedisFirewallRule[]; +} + +// @public +export type RedisForceRebootOperationResponse = RedisForceRebootResponse; + +// @public +export interface RedisForceRebootOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface RedisForceRebootResponse { + readonly message?: string; +} + +// @public +export interface RedisGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisGetResponse = RedisResource; + +// @public +export interface RedisImportDataOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RedisInstanceDetails { + readonly isMaster?: boolean; + readonly isPrimary?: boolean; + readonly nonSslPort?: number; + readonly shardId?: number; + readonly sslPort?: number; + readonly zone?: string; +} + +// @public +export type RedisKeyType = "Primary" | "Secondary"; + +// @public +export interface RedisLinkedServer { + readonly id?: string; +} + +// @public +export interface RedisLinkedServerCreateParameters { + linkedRedisCacheId: string; + linkedRedisCacheLocation: string; + serverRole: ReplicationRole; +} + +// @public +export interface RedisLinkedServerCreateProperties { + linkedRedisCacheId: string; + linkedRedisCacheLocation: string; + serverRole: ReplicationRole; +} + +// @public +export type RedisLinkedServerProperties = RedisLinkedServerCreateProperties & { + readonly provisioningState?: string; +}; + +// @public +export type RedisLinkedServerWithProperties = ProxyResource & { + linkedRedisCacheId?: string; + linkedRedisCacheLocation?: string; + serverRole?: ReplicationRole; + readonly provisioningState?: string; +}; + +// @public +export interface RedisLinkedServerWithPropertiesList { + readonly nextLink?: string; + value?: RedisLinkedServerWithProperties[]; +} + +// @public +export interface RedisListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListByResourceGroupNextResponse = RedisListResult; + +// @public +export interface RedisListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListByResourceGroupResponse = RedisListResult; + +// @public +export interface RedisListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListBySubscriptionNextResponse = RedisListResult; + +// @public +export interface RedisListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListBySubscriptionResponse = RedisListResult; + +// @public +export interface RedisListKeysOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListKeysResponse = RedisAccessKeys; + +// @public +export interface RedisListResult { + readonly nextLink?: string; + value?: RedisResource[]; +} + +// @public +export interface RedisListUpgradeNotificationsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListUpgradeNotificationsNextResponse = NotificationListResponse; + +// @public +export interface RedisListUpgradeNotificationsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RedisListUpgradeNotificationsResponse = NotificationListResponse; + +// @public (undocumented) +export class RedisManagementClient extends RedisManagementClientContext { + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: RedisManagementClientOptionalParams); + // (undocumented) + firewallRules: FirewallRules; + // (undocumented) + linkedServer: LinkedServer; + // (undocumented) + operations: Operations; + // (undocumented) + patchSchedules: PatchSchedules; + // (undocumented) + privateEndpointConnections: PrivateEndpointConnections; + // (undocumented) + privateLinkResources: PrivateLinkResources; + // (undocumented) + redis: Redis; +} + +// @public (undocumented) +export class RedisManagementClientContext extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: RedisManagementClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface RedisManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type RedisPatchSchedule = ProxyResource & { + scheduleEntries: ScheduleEntry[]; +}; + +// @public +export interface RedisPatchScheduleListResult { + readonly nextLink?: string; + value?: RedisPatchSchedule[]; +} + +// @public +export type RedisProperties = RedisCreateProperties & { + readonly provisioningState?: ProvisioningState; + readonly hostName?: string; + readonly port?: number; + readonly sslPort?: number; + readonly accessKeys?: RedisAccessKeys; + readonly linkedServers?: RedisLinkedServer[]; + readonly instances?: RedisInstanceDetails[]; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +}; + +// @public +export interface RedisRebootParameters { + ports?: number[]; + rebootType?: RebootType; + shardId?: number; +} + +// @public +export interface RedisRegenerateKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface RedisRegenerateKeyParameters { + keyType: RedisKeyType; +} + +// @public +export type RedisRegenerateKeyResponse = RedisAccessKeys; + +// @public +export type RedisResource = TrackedResource & { + zones?: string[]; + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + redisVersion?: string; + enableNonSslPort?: boolean; + replicasPerMaster?: number; + replicasPerPrimary?: number; + tenantSettings?: { + [propertyName: string]: string; + }; + shardCount?: number; + minimumTlsVersion?: TlsVersion; + publicNetworkAccess?: PublicNetworkAccess; + sku: Sku; + subnetId?: string; + staticIP?: string; + readonly provisioningState?: ProvisioningState; + readonly hostName?: string; + readonly port?: number; + readonly sslPort?: number; + readonly accessKeys?: RedisAccessKeys; + readonly linkedServers?: RedisLinkedServer[]; + readonly instances?: RedisInstanceDetails[]; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +}; + +// @public +export interface RedisUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface RedisUpdateParameters { + enableNonSslPort?: boolean; + minimumTlsVersion?: TlsVersion; + publicNetworkAccess?: PublicNetworkAccess; + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + redisVersion?: string; + replicasPerMaster?: number; + replicasPerPrimary?: number; + shardCount?: number; + sku?: Sku; + tags?: { + [propertyName: string]: string; + }; + tenantSettings?: { + [propertyName: string]: string; + }; +} + +// @public +export type RedisUpdateProperties = RedisCommonProperties & { + sku?: Sku; +}; + +// @public +export type RedisUpdateResponse = RedisResource; + +// @public +export type ReplicationRole = "Primary" | "Secondary"; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ScheduleEntry { + dayOfWeek: DayOfWeek; + maintenanceWindow?: string; + startHourUtc: number; +} + +// @public +export interface Sku { + capacity: number; + family: SkuFamily; + name: SkuName; +} + +// @public +export type SkuFamily = string; + +// @public +export type SkuName = string; + +// @public +export type TlsVersion = string; + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UpgradeNotification { + readonly name?: string; + readonly timestamp?: Date; + readonly upsellNotification?: { + [propertyName: string]: string; + }; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/redis/arm-rediscache/rollup.config.js b/sdk/redis/arm-rediscache/rollup.config.js index 8d2642be4eba..9be1955eb7f1 100644 --- a/sdk/redis/arm-rediscache/rollup.config.js +++ b/sdk/redis/arm-rediscache/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; +/* + * 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler /** - * @type {rollup.RollupFileOptions} + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. */ -const config = { - input: "./esm/redisManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-rediscache.js", - format: "umd", - name: "Azure.ArmRediscache", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] }, - banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false }; -export default config; +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/redis/arm-rediscache/src/index.ts b/sdk/redis/arm-rediscache/src/index.ts new file mode 100644 index 000000000000..b0c38635fee9 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * from "./models"; +export { RedisManagementClient } from "./redisManagementClient"; +export { RedisManagementClientContext } from "./redisManagementClientContext"; +export * from "./operationsInterfaces"; diff --git a/sdk/redis/arm-rediscache/src/lroImpl.ts b/sdk/redis/arm-rediscache/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/redis/arm-rediscache/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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 { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts b/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts deleted file mode 100644 index cf356274183a..000000000000 --- a/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - BaseResource, - CloudError, - ProxyResource, - RedisAccessKeys, - RedisFirewallRule, - RedisFirewallRuleCreateParameters, - RedisFirewallRuleListResult, - RedisInstanceDetails, - RedisLinkedServer, - RedisLinkedServerWithProperties, - RedisPatchSchedule, - RedisResource, - Resource, - ScheduleEntry, - Sku, - TrackedResource -} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/index.ts b/sdk/redis/arm-rediscache/src/models/index.ts index b61bfc6cd69f..56fa5a95b23f 100644 --- a/sdk/redis/arm-rediscache/src/models/index.ts +++ b/sdk/redis/arm-rediscache/src/models/index.ts @@ -1,1321 +1,1154 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export { BaseResource, CloudError }; - -/** - * SKU parameters supplied to the create Redis operation. - */ -export interface Sku { - /** - * The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium). Possible values - * include: 'Basic', 'Standard', 'Premium' - */ - name: SkuName; - /** - * The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). Possible - * values include: 'C', 'P' - */ - family: SkuFamily; +/** Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. */ +export interface OperationListResult { + /** List of operations supported by the resource provider. */ + value?: Operation[]; /** - * The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, - * 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). + * URL to get the next set of operation list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - capacity: number; + readonly nextLink?: string; } -/** - * Redis cache access keys. - */ -export interface RedisAccessKeys { - /** - * The current primary key that clients can use to authenticate with Redis cache. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly primaryKey?: string; - /** - * The current secondary key that clients can use to authenticate with Redis cache. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly secondaryKey?: string; +/** REST API operation */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that describes the operation. */ + display?: OperationDisplay; } -/** - * Linked server Id - */ -export interface RedisLinkedServer { - /** - * Linked server Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; +/** The object that describes the operation. */ +export interface OperationDisplay { + /** Friendly name of the resource provider */ + provider?: string; + /** Operation type: read, write, delete, listKeys/action, etc. */ + operation?: string; + /** Resource type on which the operation is performed. */ + resource?: string; + /** Friendly name of the operation */ + description?: string; } -/** - * Details of single instance of redis. - */ -export interface RedisInstanceDetails { +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { /** - * Redis instance SSL port. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sslPort?: number; + readonly code?: string; /** - * If enableNonSslPort is true, provides Redis instance Non-SSL port. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nonSslPort?: number; + readonly message?: string; /** - * If the Cache uses availability zones, specifies availability zone where this instance is - * located. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zone?: string; + readonly target?: string; /** - * If clustering is enabled, the Shard ID of Redis Instance - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly shardId?: number; + readonly details?: ErrorDetail[]; /** - * Specifies whether the instance is a master node. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isMaster?: boolean; + readonly additionalInfo?: ErrorAdditionalInfo[]; } -/** - * The Resource definition. - */ -export interface Resource extends BaseResource { - /** - * Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly type?: string; /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly info?: Record; } -/** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags - */ -export interface ProxyResource extends Resource { +/** Parameters body to pass for resource name availability check. */ +export interface CheckNameAvailabilityParameters { + /** Resource name. */ + name: string; + /** Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'. */ + type: string; } -/** - * The resource model definition for a ARM tracked top level resource - */ -export interface TrackedResource extends Resource { - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; +/** The response of listUpgradeNotifications. */ +export interface NotificationListResponse { + /** List of all notifications. */ + value?: UpgradeNotification[]; /** - * The geo-location where the resource lives + * Link for next set of notifications. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - location: string; + readonly nextLink?: string; } -/** - * Parameters supplied to the Create Redis operation. - */ -export interface RedisCreateParameters { +/** Properties of upgrade notification. */ +export interface UpgradeNotification { /** - * All Redis Settings. Few possible keys: - * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - * etc. + * Name of upgrade notification. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - redisConfiguration?: { [propertyName: string]: string }; + readonly name?: string; /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. + * Timestamp when upgrade notification occurred. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableNonSslPort?: boolean; + readonly timestamp?: Date; /** - * The number of replicas to be created per master. + * Details about this upgrade notification + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly upsellNotification?: { [propertyName: string]: string }; +} + +/** Parameters supplied to the Create Redis operation. */ +export interface RedisCreateParameters { + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** The geo-location where the resource lives */ + location: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */ + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + /** Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6) */ + redisVersion?: string; + /** Specifies whether the non-ssl Redis server port (6379) is enabled. */ + enableNonSslPort?: boolean; + /** The number of replicas to be created per primary. */ replicasPerMaster?: number; - /** - * A dictionary of tenant settings - */ + /** The number of replicas to be created per primary. */ + replicasPerPrimary?: number; + /** A dictionary of tenant settings */ tenantSettings?: { [propertyName: string]: string }; - /** - * The number of shards to be created on a Premium Cluster Cache. - */ + /** The number of shards to be created on a Premium Cluster Cache. */ shardCount?: number; - /** - * Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', - * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' - */ + /** Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2') */ minimumTlsVersion?: TlsVersion; - /** - * The SKU of the Redis cache to deploy. - */ + /** Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** The SKU of the Redis cache to deploy. */ sku: Sku; - /** - * The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example - * format: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - */ + /** The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 */ subnetId?: string; - /** - * Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual - * Network. - */ + /** Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. */ staticIP?: string; - /** - * A list of availability zones denoting where the resource needs to come from. - */ - zones?: string[]; - /** - * The geo-location where the resource lives - */ - location: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; } -/** - * Parameters supplied to the Update Redis operation. - */ -export interface RedisUpdateParameters { - /** - * All Redis Settings. Few possible keys: - * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - * etc. - */ - redisConfiguration?: { [propertyName: string]: string }; - /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. - */ +/** Create/Update/Get common properties of the redis cache. */ +export interface RedisCommonProperties { + /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */ + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + /** Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6) */ + redisVersion?: string; + /** Specifies whether the non-ssl Redis server port (6379) is enabled. */ enableNonSslPort?: boolean; - /** - * The number of replicas to be created per master. - */ + /** The number of replicas to be created per primary. */ replicasPerMaster?: number; - /** - * A dictionary of tenant settings - */ + /** The number of replicas to be created per primary. */ + replicasPerPrimary?: number; + /** A dictionary of tenant settings */ tenantSettings?: { [propertyName: string]: string }; - /** - * The number of shards to be created on a Premium Cluster Cache. - */ + /** The number of shards to be created on a Premium Cluster Cache. */ shardCount?: number; + /** Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2') */ + minimumTlsVersion?: TlsVersion; + /** Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */ +export interface RedisCommonPropertiesRedisConfiguration { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Specifies whether the rdb backup is enabled */ + rdbBackupEnabled?: string; + /** Specifies the frequency for creating rdb backup */ + rdbBackupFrequency?: string; + /** Specifies the maximum number of snapshots for rdb backup */ + rdbBackupMaxSnapshotCount?: string; + /** The storage account connection string for storing rdb file */ + rdbStorageConnectionString?: string; + /** First storage account connection string */ + aofStorageConnectionString0?: string; + /** Second storage account connection string */ + aofStorageConnectionString1?: string; + /** Value in megabytes reserved for fragmentation per shard */ + maxfragmentationmemoryReserved?: string; + /** The eviction strategy used when your data won't fit within its memory limit. */ + maxmemoryPolicy?: string; + /** Value in megabytes reserved for non-cache usage per shard e.g. failover. */ + maxmemoryReserved?: string; + /** Value in megabytes reserved for non-cache usage per shard e.g. failover. */ + maxmemoryDelta?: string; + /** + * The max clients config + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxclients?: string; +} + +/** SKU parameters supplied to the create Redis operation. */ +export interface Sku { + /** The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) */ + name: SkuName; + /** The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). */ + family: SkuFamily; + /** The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). */ + capacity: number; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', - * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. */ - minimumTlsVersion?: TlsVersion; + readonly id?: string; /** - * The SKU of the Redis cache to deploy. + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sku?: Sku; + readonly name?: string; /** - * Resource tags. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly type?: string; } -/** - * Specifies a range of IP addresses permitted to connect to the cache - */ -export interface RedisFirewallRuleProperties { +/** Redis cache access keys. */ +export interface RedisAccessKeys { /** - * lowest IP address included in the range + * The current primary key that clients can use to authenticate with Redis cache. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - startIP: string; + readonly primaryKey?: string; /** - * highest IP address included in the range + * The current secondary key that clients can use to authenticate with Redis cache. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - endIP: string; + readonly secondaryKey?: string; } -/** - * A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses - * permitted to connect - */ -export interface RedisFirewallRule extends ProxyResource { - /** - * lowest IP address included in the range - */ - startIP: string; +/** Linked server Id */ +export interface RedisLinkedServer { /** - * highest IP address included in the range + * Linked server Id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - endIP: string; + readonly id?: string; } -/** - * Parameters required for creating a firewall rule on redis cache. - */ -export interface RedisFirewallRuleCreateParameters { +/** Details of single instance of redis. */ +export interface RedisInstanceDetails { /** - * lowest IP address included in the range + * Redis instance SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - startIP: string; + readonly sslPort?: number; /** - * highest IP address included in the range + * If enableNonSslPort is true, provides Redis instance Non-SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - endIP: string; -} - -/** - * A single Redis item in List or Get Operation. - */ -export interface RedisResource extends TrackedResource { + readonly nonSslPort?: number; /** - * All Redis Settings. Few possible keys: - * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - * etc. + * If the Cache uses availability zones, specifies availability zone where this instance is located. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - redisConfiguration?: { [propertyName: string]: string }; + readonly zone?: string; /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. + * If clustering is enabled, the Shard ID of Redis Instance + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableNonSslPort?: boolean; + readonly shardId?: number; /** - * The number of replicas to be created per master. + * Specifies whether the instance is a primary node. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - replicasPerMaster?: number; + readonly isMaster?: boolean; /** - * A dictionary of tenant settings + * Specifies whether the instance is a primary node. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tenantSettings?: { [propertyName: string]: string }; + readonly isPrimary?: boolean; +} + +/** The Private Endpoint resource. */ +export interface PrivateEndpoint { /** - * The number of shards to be created on a Premium Cluster Cache. + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly id?: string; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +/** Parameters supplied to the Update Redis operation. */ +export interface RedisUpdateParameters { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */ + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + /** Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6) */ + redisVersion?: string; + /** Specifies whether the non-ssl Redis server port (6379) is enabled. */ + enableNonSslPort?: boolean; + /** The number of replicas to be created per primary. */ + replicasPerMaster?: number; + /** The number of replicas to be created per primary. */ + replicasPerPrimary?: number; + /** A dictionary of tenant settings */ + tenantSettings?: { [propertyName: string]: string }; + /** The number of shards to be created on a Premium Cluster Cache. */ shardCount?: number; - /** - * Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', - * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' - */ + /** Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2') */ minimumTlsVersion?: TlsVersion; + /** Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** The SKU of the Redis cache to deploy. */ + sku?: Sku; +} + +/** The response of list Redis operation. */ +export interface RedisListResult { + /** List of Redis cache instances. */ + value?: RedisResource[]; /** - * The SKU of the Redis cache to deploy. - */ - sku: Sku; - /** - * The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example - * format: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - */ - subnetId?: string; - /** - * Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual - * Network. - */ - staticIP?: string; - /** - * Redis version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly redisVersion?: string; - /** - * Redis instance provisioning status. Possible values include: 'Creating', 'Deleting', - * 'Disabled', 'Failed', 'Linking', 'Provisioning', 'RecoveringScaleFailure', 'Scaling', - * 'Succeeded', 'Unlinking', 'Unprovisioning', 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - /** - * Redis host name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hostName?: string; - /** - * Redis non-SSL port. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly port?: number; - /** - * Redis SSL port. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sslPort?: number; - /** - * The keys of the Redis cache - not set if this object is not the response to Create or Update - * redis cache - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly accessKeys?: RedisAccessKeys; - /** - * List of the linked servers associated with the cache - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly linkedServers?: RedisLinkedServer[]; - /** - * List of the Redis instances associated with the cache - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instances?: RedisInstanceDetails[]; - /** - * A list of availability zones denoting where the resource needs to come from. + * Link for next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zones?: string[]; + readonly nextLink?: string; } -/** - * Specifies which Redis access keys to reset. - */ +/** Specifies which Redis access keys to reset. */ export interface RedisRegenerateKeyParameters { - /** - * The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - */ + /** The Redis access key to regenerate. */ keyType: RedisKeyType; } -/** - * Specifies which Redis node(s) to reboot. - */ +/** Specifies which Redis node(s) to reboot. */ export interface RedisRebootParameters { - /** - * Which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values - * include: 'PrimaryNode', 'SecondaryNode', 'AllNodes' - */ + /** Which Redis node(s) to reboot. Depending on this value data loss is possible. */ rebootType?: RebootType; - /** - * If clustering is enabled, the ID of the shard to be rebooted. - */ + /** If clustering is enabled, the ID of the shard to be rebooted. */ shardId?: number; - /** - * A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports. - */ + /** A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports. */ ports?: number[]; } -/** - * Parameters for Redis export operation. - */ -export interface ExportRDBParameters { - /** - * File format. - */ - format?: string; - /** - * Prefix to use for exported files. - */ - prefix: string; +/** Response to force reboot for Redis cache. */ +export interface RedisForceRebootResponse { /** - * Container name to export to. + * Status message + * NOTE: This property will not be serialized. It can only be populated by the server. */ - container: string; + readonly message?: string; } -/** - * Parameters for Redis import operation. - */ +/** Parameters for Redis import operation. */ export interface ImportRDBParameters { - /** - * File format. - */ + /** File format. */ format?: string; - /** - * files to import. - */ + /** files to import. */ files: string[]; } -/** - * Patch schedule entry for a Premium Redis Cache. - */ -export interface ScheduleEntry { - /** - * Day of the week when a cache can be patched. Possible values include: 'Monday', 'Tuesday', - * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' - */ - dayOfWeek: DayOfWeek; - /** - * Start hour after which cache patching can start. - */ - startHourUtc: number; - /** - * ISO8601 timespan specifying how much time cache patching can take. - */ - maintenanceWindow?: string; +/** Parameters for Redis export operation. */ +export interface ExportRDBParameters { + /** File format. */ + format?: string; + /** Prefix to use for exported files. */ + prefix: string; + /** Container name to export to. */ + container: string; } -/** - * List of patch schedules for a Redis cache. - */ -export interface ScheduleEntries { +/** The response of list firewall rules Redis operation. */ +export interface RedisFirewallRuleListResult { + /** Results of the list firewall rules operation. */ + value?: RedisFirewallRule[]; /** - * List of patch schedules for a Redis cache. + * Link for next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - scheduleEntries: ScheduleEntry[]; + readonly nextLink?: string; } -/** - * Response to put/get patch schedules for Redis cache. - */ -export interface RedisPatchSchedule extends ProxyResource { +/** The response of list patch schedules Redis operation. */ +export interface RedisPatchScheduleListResult { + /** Results of the list patch schedules operation. */ + value?: RedisPatchSchedule[]; /** - * List of patch schedules for a Redis cache. + * Link for next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - scheduleEntries: ScheduleEntry[]; + readonly nextLink?: string; } -/** - * Response to force reboot for Redis cache. - */ -export interface RedisForceRebootResponse { - /** - * Status message - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; +/** Patch schedule entry for a Premium Redis Cache. */ +export interface ScheduleEntry { + /** Day of the week when a cache can be patched. */ + dayOfWeek: DayOfWeek; + /** Start hour after which cache patching can start. */ + startHourUtc: number; + /** ISO8601 timespan specifying how much time cache patching can take. */ + maintenanceWindow?: string; } -/** - * Create properties for a linked server - */ +/** Parameter required for creating a linked server to redis cache. */ +export interface RedisLinkedServerCreateParameters { + /** Fully qualified resourceId of the linked redis cache. */ + linkedRedisCacheId: string; + /** Location of the linked redis cache. */ + linkedRedisCacheLocation: string; + /** Role of the linked server. */ + serverRole: ReplicationRole; +} + +/** Create properties for a linked server */ export interface RedisLinkedServerCreateProperties { - /** - * Fully qualified resourceId of the linked redis cache. - */ + /** Fully qualified resourceId of the linked redis cache. */ linkedRedisCacheId: string; - /** - * Location of the linked redis cache. - */ + /** Location of the linked redis cache. */ linkedRedisCacheLocation: string; - /** - * Role of the linked server. Possible values include: 'Primary', 'Secondary' - */ + /** Role of the linked server. */ serverRole: ReplicationRole; } -/** - * Properties of a linked server to be returned in get/put response - */ -export interface RedisLinkedServerProperties extends RedisLinkedServerCreateProperties { +/** List of linked servers (with properties) of a Redis cache. */ +export interface RedisLinkedServerWithPropertiesList { + /** List of linked servers (with properties) of a Redis cache. */ + value?: RedisLinkedServerWithProperties[]; /** - * Terminal state of the link between primary and secondary redis cache. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link for next set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly nextLink?: string; } -/** - * Response to put/get linked server (with properties) for Redis cache. - */ -export interface RedisLinkedServerWithProperties extends ProxyResource { +/** List of private endpoint connection associated with the specified storage account */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; +} + +/** Properties supplied to Create Redis operation. */ +export type RedisCreateProperties = RedisCommonProperties & { + /** The SKU of the Redis cache to deploy. */ + sku: Sku; + /** The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 */ + subnetId?: string; + /** Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. */ + staticIP?: string; +}; + +/** Patchable properties of the redis cache. */ +export type RedisUpdateProperties = RedisCommonProperties & { + /** The SKU of the Redis cache to deploy. */ + sku?: Sku; +}; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +}; + +/** The Private Endpoint Connection resource. */ +export type PrivateEndpointConnection = Resource & { + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; /** - * Fully qualified resourceId of the linked redis cache. + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linkedRedisCacheId: string; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +}; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** A private link resource */ +export type PrivateLinkResource = Resource & { /** - * Location of the linked redis cache. + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linkedRedisCacheLocation: string; + readonly groupId?: string; /** - * Role of the linked server. Possible values include: 'Primary', 'Secondary' + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serverRole: ReplicationRole; + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; +}; + +/** Properties of a linked server to be returned in get/put response */ +export type RedisLinkedServerProperties = RedisLinkedServerCreateProperties & { /** * Terminal state of the link between primary and secondary redis cache. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; -} +}; -/** - * Parameter required for creating a linked server to redis cache. - */ -export interface RedisLinkedServerCreateParameters { +/** Properties of the redis cache. */ +export type RedisProperties = RedisCreateProperties & { /** - * Fully qualified resourceId of the linked redis cache. + * Redis instance provisioning status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linkedRedisCacheId: string; + readonly provisioningState?: ProvisioningState; /** - * Location of the linked redis cache. + * Redis host name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linkedRedisCacheLocation: string; + readonly hostName?: string; /** - * Role of the linked server. Possible values include: 'Primary', 'Secondary' + * Redis non-SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serverRole: ReplicationRole; -} - -/** - * The object that describes the operation. - */ -export interface OperationDisplay { + readonly port?: number; /** - * Friendly name of the resource provider + * Redis SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - provider?: string; + readonly sslPort?: number; /** - * Operation type: read, write, delete, listKeys/action, etc. + * The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - operation?: string; + readonly accessKeys?: RedisAccessKeys; /** - * Resource type on which the operation is performed. + * List of the linked servers associated with the cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resource?: string; + readonly linkedServers?: RedisLinkedServer[]; /** - * Friendly name of the operation + * List of the Redis instances associated with the cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - description?: string; -} + readonly instances?: RedisInstanceDetails[]; + /** + * List of private endpoint connection associated with the specified redis cache + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +}; -/** - * REST API operation - */ -export interface Operation { +/** A single Redis item in List or Get Operation. */ +export type RedisResource = TrackedResource & { + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */ + redisConfiguration?: RedisCommonPropertiesRedisConfiguration; + /** Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6) */ + redisVersion?: string; + /** Specifies whether the non-ssl Redis server port (6379) is enabled. */ + enableNonSslPort?: boolean; + /** The number of replicas to be created per primary. */ + replicasPerMaster?: number; + /** The number of replicas to be created per primary. */ + replicasPerPrimary?: number; + /** A dictionary of tenant settings */ + tenantSettings?: { [propertyName: string]: string }; + /** The number of shards to be created on a Premium Cluster Cache. */ + shardCount?: number; + /** Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2') */ + minimumTlsVersion?: TlsVersion; + /** Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** The SKU of the Redis cache to deploy. */ + sku: Sku; + /** The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 */ + subnetId?: string; + /** Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. */ + staticIP?: string; /** - * Operation name: {provider}/{resource}/{operation} + * Redis instance provisioning status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly provisioningState?: ProvisioningState; /** - * The object that describes the operation. + * Redis host name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - display?: OperationDisplay; -} - -/** - * Parameters body to pass for resource name availability check. - */ -export interface CheckNameAvailabilityParameters { + readonly hostName?: string; /** - * Resource name. + * Redis non-SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly port?: number; /** - * Resource type. The only legal value of this property for checking redis cache name - * availability is 'Microsoft.Cache/redis'. + * Redis SSL port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type: string; -} - -/** - * Properties of upgrade notification. - */ -export interface UpgradeNotification { + readonly sslPort?: number; /** - * Name of upgrade notification. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly accessKeys?: RedisAccessKeys; /** - * Timestamp when upgrade notification occurred. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of the linked servers associated with the cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timestamp?: Date; + readonly linkedServers?: RedisLinkedServer[]; /** - * Details about this upgrade notification - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of the Redis instances associated with the cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly upsellNotification?: { [propertyName: string]: string }; -} - -/** - * The response of listUpgradeNotifications. - */ -export interface NotificationListResponse { + readonly instances?: RedisInstanceDetails[]; /** - * List of all notifications. + * List of private endpoint connection associated with the specified redis cache + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value?: UpgradeNotification[]; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +}; + +/** A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect */ +export type RedisFirewallRule = ProxyResource & { + /** lowest IP address included in the range */ + startIP: string; + /** highest IP address included in the range */ + endIP: string; +}; + +/** Response to put/get patch schedules for Redis cache. */ +export type RedisPatchSchedule = ProxyResource & { + /** List of patch schedules for a Redis cache. */ + scheduleEntries: ScheduleEntry[]; +}; + +/** Response to put/get linked server (with properties) for Redis cache. */ +export type RedisLinkedServerWithProperties = ProxyResource & { + /** Fully qualified resourceId of the linked redis cache. */ + linkedRedisCacheId?: string; + /** Location of the linked redis cache. */ + linkedRedisCacheLocation?: string; + /** Role of the linked server. */ + serverRole?: ReplicationRole; /** - * Link for next set of notifications. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Terminal state of the link between primary and secondary redis cache. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly provisioningState?: string; +}; + +/** Parameters required for creating a firewall rule on redis cache. (Note, you can just use the FirewallRule type instead now.) */ +export type RedisFirewallRuleCreateParameters = RedisFirewallRule & {}; + +/** Known values of {@link TlsVersion} that the service accepts. */ +export enum KnownTlsVersion { + One0 = "1.0", + One1 = "1.1", + One2 = "1.2" } /** - * An interface representing RedisManagementClientOptions. + * Defines values for TlsVersion. \ + * {@link KnownTlsVersion} can be used interchangeably with TlsVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **1.0** \ + * **1.1** \ + * **1.2** */ -export interface RedisManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export type TlsVersion = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + Enabled = "Enabled", + Disabled = "Disabled" } /** - * @interface - * Result of the request to list REST API operations. It contains a list of operations and a URL - * nextLink to get the next set of results. - * @extends Array + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export interface OperationListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type PublicNetworkAccess = string; + +/** Known values of {@link SkuName} that the service accepts. */ +export enum KnownSkuName { + Basic = "Basic", + Standard = "Standard", + Premium = "Premium" } /** - * @interface - * The response of list Redis operation. - * @extends Array + * Defines values for SkuName. \ + * {@link KnownSkuName} can be used interchangeably with SkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic** \ + * **Standard** \ + * **Premium** */ -export interface RedisListResult extends Array { - /** - * Link for next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type SkuName = string; + +/** Known values of {@link SkuFamily} that the service accepts. */ +export enum KnownSkuFamily { + C = "C", + P = "P" } /** - * @interface - * The response of list firewall rules Redis operation. - * @extends Array - */ -export interface RedisFirewallRuleListResult extends Array { - /** - * Link for next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; + * Defines values for SkuFamily. \ + * {@link KnownSkuFamily} can be used interchangeably with SkuFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **C** \ + * **P** + */ +export type SkuFamily = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Disabled = "Disabled", + Failed = "Failed", + Linking = "Linking", + Provisioning = "Provisioning", + RecoveringScaleFailure = "RecoveringScaleFailure", + Scaling = "Scaling", + Succeeded = "Succeeded", + Unlinking = "Unlinking", + Unprovisioning = "Unprovisioning", + Updating = "Updating" } /** - * @interface - * The response of list patch schedules Redis operation. - * @extends Array - */ -export interface RedisPatchScheduleListResult extends Array { - /** - * Link for next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Deleting** \ + * **Disabled** \ + * **Failed** \ + * **Linking** \ + * **Provisioning** \ + * **RecoveringScaleFailure** \ + * **Scaling** \ + * **Succeeded** \ + * **Unlinking** \ + * **Unprovisioning** \ + * **Updating** + */ +export type ProvisioningState = string; + +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + Pending = "Pending", + Approved = "Approved", + Rejected = "Rejected" } /** - * @interface - * List of linked servers (with properties) of a Redis cache. - * @extends Array + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Rejected** */ -export interface RedisLinkedServerWithPropertiesList extends Array { - /** - * Link for next set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type PrivateEndpointServiceConnectionStatus = string; + +/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + Succeeded = "Succeeded", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed" } /** - * Defines values for SkuName. - * Possible values include: 'Basic', 'Standard', 'Premium' - * @readonly - * @enum {string} + * Defines values for PrivateEndpointConnectionProvisioningState. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Deleting** \ + * **Failed** */ -export type SkuName = 'Basic' | 'Standard' | 'Premium'; +export type PrivateEndpointConnectionProvisioningState = string; -/** - * Defines values for SkuFamily. - * Possible values include: 'C', 'P' - * @readonly - * @enum {string} - */ -export type SkuFamily = 'C' | 'P'; +/** Known values of {@link RebootType} that the service accepts. */ +export enum KnownRebootType { + PrimaryNode = "PrimaryNode", + SecondaryNode = "SecondaryNode", + AllNodes = "AllNodes" +} /** - * Defines values for TlsVersion. - * Possible values include: '1.0', '1.1', '1.2' - * @readonly - * @enum {string} + * Defines values for RebootType. \ + * {@link KnownRebootType} can be used interchangeably with RebootType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PrimaryNode** \ + * **SecondaryNode** \ + * **AllNodes** */ -export type TlsVersion = '1.0' | '1.1' | '1.2'; +export type RebootType = string; -/** - * Defines values for ProvisioningState. - * Possible values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', - * 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', 'Unlinking', 'Unprovisioning', - * 'Updating' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Creating' | 'Deleting' | 'Disabled' | 'Failed' | 'Linking' | 'Provisioning' | 'RecoveringScaleFailure' | 'Scaling' | 'Succeeded' | 'Unlinking' | 'Unprovisioning' | 'Updating'; +/** Known values of {@link DefaultName} that the service accepts. */ +export enum KnownDefaultName { + Default = "default" +} /** - * Defines values for RedisKeyType. - * Possible values include: 'Primary', 'Secondary' - * @readonly - * @enum {string} - */ -export type RedisKeyType = 'Primary' | 'Secondary'; + * Defines values for DefaultName. \ + * {@link KnownDefaultName} can be used interchangeably with DefaultName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type DefaultName = string; +/** Defines values for RedisKeyType. */ +export type RedisKeyType = "Primary" | "Secondary"; +/** Defines values for DayOfWeek. */ +export type DayOfWeek = + | "Monday" + | "Tuesday" + | "Wednesday" + | "Thursday" + | "Friday" + | "Saturday" + | "Sunday" + | "Everyday" + | "Weekend"; +/** Defines values for ReplicationRole. */ +export type ReplicationRole = "Primary" | "Secondary"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface RedisCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface RedisListUpgradeNotificationsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listUpgradeNotifications operation. */ +export type RedisListUpgradeNotificationsResponse = NotificationListResponse; + +/** Optional parameters. */ +export interface RedisCreateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Defines values for RebootType. - * Possible values include: 'PrimaryNode', 'SecondaryNode', 'AllNodes' - * @readonly - * @enum {string} - */ -export type RebootType = 'PrimaryNode' | 'SecondaryNode' | 'AllNodes'; +/** Contains response data for the create operation. */ +export type RedisCreateResponse = RedisResource; -/** - * Defines values for DayOfWeek. - * Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', - * 'Sunday', 'Everyday', 'Weekend' - * @readonly - * @enum {string} - */ -export type DayOfWeek = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday' | 'Everyday' | 'Weekend'; +/** Optional parameters. */ +export interface RedisUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ReplicationRole. - * Possible values include: 'Primary', 'Secondary' - * @readonly - * @enum {string} - */ -export type ReplicationRole = 'Primary' | 'Secondary'; +/** Contains response data for the update operation. */ +export type RedisUpdateResponse = RedisResource; -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = OperationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface RedisDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type OperationsListNextResponse = OperationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface RedisGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the listUpgradeNotifications operation. - */ -export type RedisListUpgradeNotificationsResponse = NotificationListResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: NotificationListResponse; - }; -}; +/** Contains response data for the get operation. */ +export type RedisGetResponse = RedisResource; -/** - * Contains response data for the create operation. - */ -export type RedisCreateResponse = RedisResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisResource; - }; -}; +/** Optional parameters. */ +export interface RedisListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type RedisUpdateResponse = RedisResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisResource; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type RedisListByResourceGroupResponse = RedisListResult; -/** - * Contains response data for the get operation. - */ -export type RedisGetResponse = RedisResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisResource; - }; -}; +/** Optional parameters. */ +export interface RedisListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type RedisListByResourceGroupResponse = RedisListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisListResult; - }; -}; +/** Contains response data for the listBySubscription operation. */ +export type RedisListBySubscriptionResponse = RedisListResult; -/** - * Contains response data for the list operation. - */ -export type RedisListResponse = RedisListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisListResult; - }; -}; +/** Optional parameters. */ +export interface RedisListKeysOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listKeys operation. - */ -export type RedisListKeysResponse = RedisAccessKeys & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisAccessKeys; - }; -}; +/** Contains response data for the listKeys operation. */ +export type RedisListKeysResponse = RedisAccessKeys; -/** - * Contains response data for the regenerateKey operation. - */ -export type RedisRegenerateKeyResponse = RedisAccessKeys & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisAccessKeys; - }; -}; +/** Optional parameters. */ +export interface RedisRegenerateKeyOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the forceReboot operation. - */ -export type RedisForceRebootResponse2 = RedisForceRebootResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisForceRebootResponse; - }; -}; +/** Contains response data for the regenerateKey operation. */ +export type RedisRegenerateKeyResponse = RedisAccessKeys; -/** - * Contains response data for the beginCreate operation. - */ -export type RedisBeginCreateResponse = RedisResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisResource; - }; -}; +/** Optional parameters. */ +export interface RedisForceRebootOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type RedisListByResourceGroupNextResponse = RedisListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisListResult; - }; -}; +/** Contains response data for the forceReboot operation. */ +export type RedisForceRebootOperationResponse = RedisForceRebootResponse; -/** - * Contains response data for the listNext operation. - */ -export type RedisListNextResponse = RedisListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisListResult; - }; -}; +/** Optional parameters. */ +export interface RedisImportDataOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByRedisResource operation. - */ -export type FirewallRulesListByRedisResourceResponse = RedisFirewallRuleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisFirewallRuleListResult; - }; -}; +/** Optional parameters. */ +export interface RedisExportDataOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type FirewallRulesCreateOrUpdateResponse = RedisFirewallRule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisFirewallRule; - }; -}; +/** Optional parameters. */ +export interface RedisListUpgradeNotificationsNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type FirewallRulesGetResponse = RedisFirewallRule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisFirewallRule; - }; -}; +/** Contains response data for the listUpgradeNotificationsNext operation. */ +export type RedisListUpgradeNotificationsNextResponse = NotificationListResponse; -/** - * Contains response data for the listByRedisResourceNext operation. - */ -export type FirewallRulesListByRedisResourceNextResponse = RedisFirewallRuleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisFirewallRuleListResult; - }; -}; +/** Optional parameters. */ +export interface RedisListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByRedisResource operation. - */ -export type PatchSchedulesListByRedisResourceResponse = RedisPatchScheduleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisPatchScheduleListResult; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type RedisListByResourceGroupNextResponse = RedisListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type PatchSchedulesCreateOrUpdateResponse = RedisPatchSchedule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisPatchSchedule; - }; -}; +/** Optional parameters. */ +export interface RedisListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type PatchSchedulesGetResponse = RedisPatchSchedule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisPatchSchedule; - }; -}; +/** Contains response data for the listBySubscriptionNext operation. */ +export type RedisListBySubscriptionNextResponse = RedisListResult; -/** - * Contains response data for the listByRedisResourceNext operation. - */ -export type PatchSchedulesListByRedisResourceNextResponse = RedisPatchScheduleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisPatchScheduleListResult; - }; -}; +/** Optional parameters. */ +export interface FirewallRulesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type LinkedServerCreateResponse = RedisLinkedServerWithProperties & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisLinkedServerWithProperties; - }; -}; +/** Contains response data for the list operation. */ +export type FirewallRulesListResponse = RedisFirewallRuleListResult; -/** - * Contains response data for the get operation. - */ -export type LinkedServerGetResponse = RedisLinkedServerWithProperties & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisLinkedServerWithProperties; - }; -}; +/** Optional parameters. */ +export interface FirewallRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type LinkedServerListResponse = RedisLinkedServerWithPropertiesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisLinkedServerWithPropertiesList; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type FirewallRulesCreateOrUpdateResponse = RedisFirewallRule; -/** - * Contains response data for the beginCreate operation. - */ -export type LinkedServerBeginCreateResponse = RedisLinkedServerWithProperties & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisLinkedServerWithProperties; - }; -}; +/** Optional parameters. */ +export interface FirewallRulesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type LinkedServerListNextResponse = RedisLinkedServerWithPropertiesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RedisLinkedServerWithPropertiesList; - }; -}; +/** Contains response data for the get operation. */ +export type FirewallRulesGetResponse = RedisFirewallRule; + +/** Optional parameters. */ +export interface FirewallRulesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface FirewallRulesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FirewallRulesListNextResponse = RedisFirewallRuleListResult; + +/** Optional parameters. */ +export interface PatchSchedulesListByRedisResourceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByRedisResource operation. */ +export type PatchSchedulesListByRedisResourceResponse = RedisPatchScheduleListResult; + +/** Optional parameters. */ +export interface PatchSchedulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type PatchSchedulesCreateOrUpdateResponse = RedisPatchSchedule; + +/** Optional parameters. */ +export interface PatchSchedulesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface PatchSchedulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PatchSchedulesGetResponse = RedisPatchSchedule; + +/** Optional parameters. */ +export interface PatchSchedulesListByRedisResourceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByRedisResourceNext operation. */ +export type PatchSchedulesListByRedisResourceNextResponse = RedisPatchScheduleListResult; + +/** Optional parameters. */ +export interface LinkedServerCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type LinkedServerCreateResponse = RedisLinkedServerWithProperties; + +/** Optional parameters. */ +export interface LinkedServerDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface LinkedServerGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LinkedServerGetResponse = RedisLinkedServerWithProperties; + +/** Optional parameters. */ +export interface LinkedServerListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type LinkedServerListResponse = RedisLinkedServerWithPropertiesList; + +/** Optional parameters. */ +export interface LinkedServerListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type LinkedServerListNextResponse = RedisLinkedServerWithPropertiesList; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsPutOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the put operation. */ +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByRedisCacheOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByRedisCache operation. */ +export type PrivateLinkResourcesListByRedisCacheResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface RedisManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts b/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts deleted file mode 100644 index 8c4b9cc9739d..000000000000 --- a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - BaseResource, - CloudError, - ProxyResource, - RedisAccessKeys, - RedisFirewallRule, - RedisInstanceDetails, - RedisLinkedServer, - RedisLinkedServerCreateParameters, - RedisLinkedServerWithProperties, - RedisLinkedServerWithPropertiesList, - RedisPatchSchedule, - RedisResource, - Resource, - ScheduleEntry, - Sku, - TrackedResource -} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/mappers.ts b/sdk/redis/arm-rediscache/src/models/mappers.ts index 07812bd8021c..a81499d9d6b2 100644 --- a/sdk/redis/arm-rediscache/src/models/mappers.ts +++ b/sdk/redis/arm-rediscache/src/models/mappers.ts @@ -1,64 +1,88 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; - -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Sku", + className: "OperationListResult", modelProperties: { - name: { - required: true, - serializedName: "name", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - family: { - required: true, - serializedName: "family", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - capacity: { - required: true, - serializedName: "capacity", + display: { + serializedName: "display", type: { - name: "Number" + name: "Composite", + className: "OperationDisplay" } } } } }; -export const RedisAccessKeys: msRest.CompositeMapper = { - serializedName: "RedisAccessKeys", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisAccessKeys", + className: "OperationDisplay", modelProperties: { - primaryKey: { - readOnly: true, - serializedName: "primaryKey", + provider: { + serializedName: "provider", type: { name: "String" } }, - secondaryKey: { - readOnly: true, - serializedName: "secondaryKey", + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -67,91 +91,117 @@ export const RedisAccessKeys: msRest.CompositeMapper = { } }; -export const RedisLinkedServer: msRest.CompositeMapper = { - serializedName: "RedisLinkedServer", +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisLinkedServer", + className: "ErrorResponse", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } } }; -export const RedisInstanceDetails: msRest.CompositeMapper = { - serializedName: "RedisInstanceDetails", +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisInstanceDetails", + className: "ErrorDetail", modelProperties: { - sslPort: { + code: { + serializedName: "code", readOnly: true, - serializedName: "sslPort", type: { - name: "Number" + name: "String" } }, - nonSslPort: { + message: { + serializedName: "message", readOnly: true, - serializedName: "nonSslPort", type: { - name: "Number" + name: "String" } }, - zone: { + target: { + serializedName: "target", readOnly: true, - serializedName: "zone", type: { name: "String" } }, - shardId: { + details: { + serializedName: "details", readOnly: true, - serializedName: "shardId", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } } }, - isMaster: { + additionalInfo: { + serializedName: "additionalInfo", readOnly: true, - serializedName: "isMaster", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ErrorAdditionalInfo", modelProperties: { - id: { + type: { + serializedName: "type", readOnly: true, - serializedName: "id", type: { name: "String" } }, - name: { + info: { + serializedName: "info", readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const CheckNameAvailabilityParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityParameters", + modelProperties: { + name: { serializedName: "name", + required: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + required: true, type: { name: "String" } @@ -160,63 +210,108 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const NotificationListResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "NotificationListResponse", modelProperties: { - ...Resource.type.modelProperties + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpgradeNotification" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const UpgradeNotification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "UpgradeNotification", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - location: { - required: true, - serializedName: "location", + timestamp: { + serializedName: "timestamp", + readOnly: true, type: { - name: "String" + name: "DateTime" + } + }, + upsellNotification: { + serializedName: "upsellNotification", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const RedisCreateParameters: msRest.CompositeMapper = { - serializedName: "RedisCreateParameters", +export const RedisCreateParameters: coreClient.CompositeMapper = { type: { name: "Composite", className: "RedisCreateParameters", modelProperties: { - redisConfiguration: { - serializedName: "properties.redisConfiguration", + zones: { + serializedName: "zones", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } } } }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + redisConfiguration: { + serializedName: "properties.redisConfiguration", + type: { + name: "Composite", + className: "RedisCommonPropertiesRedisConfiguration" + } + }, + redisVersion: { + serializedName: "properties.redisVersion", + type: { + name: "String" + } + }, enableNonSslPort: { serializedName: "properties.enableNonSslPort", type: { @@ -229,15 +324,17 @@ export const RedisCreateParameters: msRest.CompositeMapper = { name: "Number" } }, + replicasPerPrimary: { + serializedName: "properties.replicasPerPrimary", + type: { + name: "Number" + } + }, tenantSettings: { serializedName: "properties.tenantSettings", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, shardCount: { @@ -252,8 +349,13 @@ export const RedisCreateParameters: msRest.CompositeMapper = { name: "String" } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, sku: { - required: true, serializedName: "properties.sku", type: { name: "Composite", @@ -261,171 +363,223 @@ export const RedisCreateParameters: msRest.CompositeMapper = { } }, subnetId: { - serializedName: "properties.subnetId", constraints: { - Pattern: /^\/subscriptions\/[^\/]*\/resourceGroups\/[^\/]*\/providers\/Microsoft.(ClassicNetwork|Network)\/virtualNetworks\/[^\/]*\/subnets\/[^\/]*$/ + Pattern: new RegExp( + "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" + ) }, + serializedName: "properties.subnetId", type: { name: "String" } }, staticIP: { - serializedName: "properties.staticIP", constraints: { - Pattern: /^\d+\.\d+\.\d+\.\d+$/ + Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$") }, + serializedName: "properties.staticIP", type: { name: "String" } - }, - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } } } } }; -export const RedisUpdateParameters: msRest.CompositeMapper = { - serializedName: "RedisUpdateParameters", +export const RedisCommonProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisUpdateParameters", + className: "RedisCommonProperties", modelProperties: { redisConfiguration: { - serializedName: "properties.redisConfiguration", + serializedName: "redisConfiguration", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "RedisCommonPropertiesRedisConfiguration" + } + }, + redisVersion: { + serializedName: "redisVersion", + type: { + name: "String" } }, enableNonSslPort: { - serializedName: "properties.enableNonSslPort", + serializedName: "enableNonSslPort", type: { name: "Boolean" } }, replicasPerMaster: { - serializedName: "properties.replicasPerMaster", + serializedName: "replicasPerMaster", + type: { + name: "Number" + } + }, + replicasPerPrimary: { + serializedName: "replicasPerPrimary", type: { name: "Number" } }, tenantSettings: { - serializedName: "properties.tenantSettings", + serializedName: "tenantSettings", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, shardCount: { - serializedName: "properties.shardCount", + serializedName: "shardCount", type: { name: "Number" } }, minimumTlsVersion: { - serializedName: "properties.minimumTlsVersion", + serializedName: "minimumTlsVersion", type: { name: "String" } }, - sku: { - serializedName: "properties.sku", + publicNetworkAccess: { + serializedName: "publicNetworkAccess", type: { - name: "Composite", - className: "Sku" + name: "String" + } + } + } + } +}; + +export const RedisCommonPropertiesRedisConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisCommonPropertiesRedisConfiguration", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + rdbBackupEnabled: { + serializedName: "rdb-backup-enabled", + type: { + name: "String" } }, - tags: { - serializedName: "tags", + rdbBackupFrequency: { + serializedName: "rdb-backup-frequency", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" + } + }, + rdbBackupMaxSnapshotCount: { + serializedName: "rdb-backup-max-snapshot-count", + type: { + name: "String" + } + }, + rdbStorageConnectionString: { + serializedName: "rdb-storage-connection-string", + type: { + name: "String" + } + }, + aofStorageConnectionString0: { + serializedName: "aof-storage-connection-string-0", + type: { + name: "String" + } + }, + aofStorageConnectionString1: { + serializedName: "aof-storage-connection-string-1", + type: { + name: "String" + } + }, + maxfragmentationmemoryReserved: { + serializedName: "maxfragmentationmemory-reserved", + type: { + name: "String" + } + }, + maxmemoryPolicy: { + serializedName: "maxmemory-policy", + type: { + name: "String" + } + }, + maxmemoryReserved: { + serializedName: "maxmemory-reserved", + type: { + name: "String" + } + }, + maxmemoryDelta: { + serializedName: "maxmemory-delta", + type: { + name: "String" + } + }, + maxclients: { + serializedName: "maxclients", + readOnly: true, + type: { + name: "String" } } } } }; -export const RedisFirewallRuleProperties: msRest.CompositeMapper = { - serializedName: "RedisFirewallRuleProperties", +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisFirewallRuleProperties", + className: "Sku", modelProperties: { - startIP: { + name: { + serializedName: "name", required: true, - serializedName: "startIP", type: { name: "String" } }, - endIP: { + family: { + serializedName: "family", required: true, - serializedName: "endIP", type: { name: "String" } + }, + capacity: { + serializedName: "capacity", + required: true, + type: { + name: "Number" + } } } } }; -export const RedisFirewallRule: msRest.CompositeMapper = { - serializedName: "RedisFirewallRule", +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisFirewallRule", + className: "Resource", modelProperties: { - ...ProxyResource.type.modelProperties, - startIP: { - required: true, - serializedName: "properties.startIP", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - endIP: { - required: true, - serializedName: "properties.endIP", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } @@ -434,22 +588,21 @@ export const RedisFirewallRule: msRest.CompositeMapper = { } }; -export const RedisFirewallRuleCreateParameters: msRest.CompositeMapper = { - serializedName: "RedisFirewallRuleCreateParameters", +export const RedisAccessKeys: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisFirewallRuleCreateParameters", + className: "RedisAccessKeys", modelProperties: { - startIP: { - required: true, - serializedName: "properties.startIP", + primaryKey: { + serializedName: "primaryKey", + readOnly: true, type: { name: "String" } }, - endIP: { - required: true, - serializedName: "properties.endIP", + secondaryKey: { + serializedName: "secondaryKey", + readOnly: true, type: { name: "String" } @@ -458,192 +611,241 @@ export const RedisFirewallRuleCreateParameters: msRest.CompositeMapper = { } }; -export const RedisResource: msRest.CompositeMapper = { - serializedName: "RedisResource", +export const RedisLinkedServer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisResource", + className: "RedisLinkedServer", modelProperties: { - ...TrackedResource.type.modelProperties, - redisConfiguration: { - serializedName: "properties.redisConfiguration", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } - }, - enableNonSslPort: { - serializedName: "properties.enableNonSslPort", + } + } + } +}; + +export const RedisInstanceDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisInstanceDetails", + modelProperties: { + sslPort: { + serializedName: "sslPort", + readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - replicasPerMaster: { - serializedName: "properties.replicasPerMaster", + nonSslPort: { + serializedName: "nonSslPort", + readOnly: true, type: { name: "Number" } }, - tenantSettings: { - serializedName: "properties.tenantSettings", + zone: { + serializedName: "zone", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - shardCount: { - serializedName: "properties.shardCount", + shardId: { + serializedName: "shardId", + readOnly: true, type: { name: "Number" } }, - minimumTlsVersion: { - serializedName: "properties.minimumTlsVersion", + isMaster: { + serializedName: "isMaster", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - sku: { - required: true, - serializedName: "properties.sku", + isPrimary: { + serializedName: "isPrimary", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "Boolean" } - }, - subnetId: { - serializedName: "properties.subnetId", - constraints: { - Pattern: /^\/subscriptions\/[^\/]*\/resourceGroups\/[^\/]*\/providers\/Microsoft.(ClassicNetwork|Network)\/virtualNetworks\/[^\/]*\/subnets\/[^\/]*$/ - }, + } + } + } +}; + +export const PrivateEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } - }, - staticIP: { - serializedName: "properties.staticIP", - constraints: { - Pattern: /^\d+\.\d+\.\d+\.\d+$/ - }, + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - redisVersion: { - readOnly: true, - serializedName: "properties.redisVersion", + description: { + serializedName: "description", type: { name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + actionsRequired: { + serializedName: "actionsRequired", type: { name: "String" } - }, - hostName: { - readOnly: true, - serializedName: "properties.hostName", + } + } + } +}; + +export const RedisUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - port: { - readOnly: true, - serializedName: "properties.port", + redisConfiguration: { + serializedName: "properties.redisConfiguration", + type: { + name: "Composite", + className: "RedisCommonPropertiesRedisConfiguration" + } + }, + redisVersion: { + serializedName: "properties.redisVersion", + type: { + name: "String" + } + }, + enableNonSslPort: { + serializedName: "properties.enableNonSslPort", + type: { + name: "Boolean" + } + }, + replicasPerMaster: { + serializedName: "properties.replicasPerMaster", type: { name: "Number" } }, - sslPort: { - readOnly: true, - serializedName: "properties.sslPort", + replicasPerPrimary: { + serializedName: "properties.replicasPerPrimary", type: { name: "Number" } }, - accessKeys: { - readOnly: true, - serializedName: "properties.accessKeys", + tenantSettings: { + serializedName: "properties.tenantSettings", type: { - name: "Composite", - className: "RedisAccessKeys" + name: "Dictionary", + value: { type: { name: "String" } } } }, - linkedServers: { - readOnly: true, - serializedName: "properties.linkedServers", + shardCount: { + serializedName: "properties.shardCount", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RedisLinkedServer" - } - } + name: "Number" } }, - instances: { - readOnly: true, - serializedName: "properties.instances", + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + +export const RedisListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RedisInstanceDetails" + className: "RedisResource" } } } }, - zones: { - serializedName: "zones", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const RedisRegenerateKeyParameters: msRest.CompositeMapper = { - serializedName: "RedisRegenerateKeyParameters", +export const RedisRegenerateKeyParameters: coreClient.CompositeMapper = { type: { name: "Composite", className: "RedisRegenerateKeyParameters", modelProperties: { keyType: { - required: true, serializedName: "keyType", + required: true, type: { name: "Enum", - allowedValues: [ - "Primary", - "Secondary" - ] + allowedValues: ["Primary", "Secondary"] } } } } }; -export const RedisRebootParameters: msRest.CompositeMapper = { - serializedName: "RedisRebootParameters", +export const RedisRebootParameters: coreClient.CompositeMapper = { type: { name: "Composite", className: "RedisRebootParameters", @@ -675,28 +877,14 @@ export const RedisRebootParameters: msRest.CompositeMapper = { } }; -export const ExportRDBParameters: msRest.CompositeMapper = { - serializedName: "ExportRDBParameters", +export const RedisForceRebootResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExportRDBParameters", + className: "RedisForceRebootResponse", modelProperties: { - format: { - serializedName: "format", - type: { - name: "String" - } - }, - prefix: { - required: true, - serializedName: "prefix", - type: { - name: "String" - } - }, - container: { - required: true, - serializedName: "container", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } @@ -705,8 +893,7 @@ export const ExportRDBParameters: msRest.CompositeMapper = { } }; -export const ImportRDBParameters: msRest.CompositeMapper = { - serializedName: "ImportRDBParameters", +export const ImportRDBParameters: coreClient.CompositeMapper = { type: { name: "Composite", className: "ImportRDBParameters", @@ -718,8 +905,8 @@ export const ImportRDBParameters: msRest.CompositeMapper = { } }, files: { - required: true, serializedName: "files", + required: true, type: { name: "Sequence", element: { @@ -733,268 +920,292 @@ export const ImportRDBParameters: msRest.CompositeMapper = { } }; -export const ScheduleEntry: msRest.CompositeMapper = { - serializedName: "ScheduleEntry", +export const ExportRDBParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScheduleEntry", + className: "ExportRDBParameters", modelProperties: { - dayOfWeek: { - required: true, - serializedName: "dayOfWeek", + format: { + serializedName: "format", type: { - name: "Enum", - allowedValues: [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday", - "Everyday", - "Weekend" - ] + name: "String" } }, - startHourUtc: { + prefix: { + serializedName: "prefix", required: true, - serializedName: "startHourUtc", type: { - name: "Number" + name: "String" } }, - maintenanceWindow: { - serializedName: "maintenanceWindow", + container: { + serializedName: "container", + required: true, type: { - name: "TimeSpan" + name: "String" } } } } }; -export const ScheduleEntries: msRest.CompositeMapper = { - serializedName: "ScheduleEntries", +export const RedisFirewallRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScheduleEntries", + className: "RedisFirewallRuleListResult", modelProperties: { - scheduleEntries: { - required: true, - serializedName: "scheduleEntries", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScheduleEntry" + className: "RedisFirewallRule" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const RedisPatchSchedule: msRest.CompositeMapper = { - serializedName: "RedisPatchSchedule", +export const RedisPatchScheduleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisPatchSchedule", + className: "RedisPatchScheduleListResult", modelProperties: { - ...ProxyResource.type.modelProperties, - scheduleEntries: { - required: true, - serializedName: "properties.scheduleEntries", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScheduleEntry" + className: "RedisPatchSchedule" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const RedisForceRebootResponse: msRest.CompositeMapper = { - serializedName: "RedisForceRebootResponse", +export const ScheduleEntry: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisForceRebootResponse", + className: "ScheduleEntry", modelProperties: { - message: { - readOnly: true, - serializedName: "message", + dayOfWeek: { + serializedName: "dayOfWeek", + required: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + "Everyday", + "Weekend" + ] + } + }, + startHourUtc: { + serializedName: "startHourUtc", + required: true, + type: { + name: "Number" + } + }, + maintenanceWindow: { + serializedName: "maintenanceWindow", + type: { + name: "TimeSpan" } } } } }; -export const RedisLinkedServerCreateProperties: msRest.CompositeMapper = { - serializedName: "RedisLinkedServerCreateProperties", +export const RedisLinkedServerCreateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisLinkedServerCreateProperties", + className: "RedisLinkedServerCreateParameters", modelProperties: { linkedRedisCacheId: { + serializedName: "properties.linkedRedisCacheId", required: true, - serializedName: "linkedRedisCacheId", type: { name: "String" } }, linkedRedisCacheLocation: { + serializedName: "properties.linkedRedisCacheLocation", required: true, - serializedName: "linkedRedisCacheLocation", type: { name: "String" } }, serverRole: { + serializedName: "properties.serverRole", required: true, - serializedName: "serverRole", type: { name: "Enum", - allowedValues: [ - "Primary", - "Secondary" - ] - } - } - } - } -}; - -export const RedisLinkedServerProperties: msRest.CompositeMapper = { - serializedName: "RedisLinkedServerProperties", - type: { - name: "Composite", - className: "RedisLinkedServerProperties", - modelProperties: { - ...RedisLinkedServerCreateProperties.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "provisioningState", - type: { - name: "String" + allowedValues: ["Primary", "Secondary"] } } } } }; -export const RedisLinkedServerWithProperties: msRest.CompositeMapper = { - serializedName: "RedisLinkedServerWithProperties", +export const RedisLinkedServerCreateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisLinkedServerWithProperties", + className: "RedisLinkedServerCreateProperties", modelProperties: { - ...ProxyResource.type.modelProperties, linkedRedisCacheId: { + serializedName: "linkedRedisCacheId", required: true, - serializedName: "properties.linkedRedisCacheId", type: { name: "String" } }, linkedRedisCacheLocation: { + serializedName: "linkedRedisCacheLocation", required: true, - serializedName: "properties.linkedRedisCacheLocation", type: { name: "String" } }, serverRole: { + serializedName: "serverRole", required: true, - serializedName: "properties.serverRole", type: { name: "Enum", - allowedValues: [ - "Primary", - "Secondary" - ] - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" + allowedValues: ["Primary", "Secondary"] } } } } }; -export const RedisLinkedServerCreateParameters: msRest.CompositeMapper = { - serializedName: "RedisLinkedServerCreateParameters", +export const RedisLinkedServerWithPropertiesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisLinkedServerCreateParameters", + className: "RedisLinkedServerWithPropertiesList", modelProperties: { - linkedRedisCacheId: { - required: true, - serializedName: "properties.linkedRedisCacheId", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RedisLinkedServerWithProperties" + } + } } }, - linkedRedisCacheLocation: { - required: true, - serializedName: "properties.linkedRedisCacheLocation", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - serverRole: { - required: true, - serializedName: "properties.serverRole", + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "Enum", - allowedValues: [ - "Primary", - "Secondary" - ] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "PrivateLinkResourceListResult", modelProperties: { - provider: { - serializedName: "provider", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } } - }, - operation: { - serializedName: "operation", + } + } + } +}; + +export const RedisCreateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisCreateProperties", + modelProperties: { + ...RedisCommonProperties.type.modelProperties, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - resource: { - serializedName: "resource", + subnetId: { + constraints: { + Pattern: new RegExp( + "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" + ) + }, + serializedName: "subnetId", type: { name: "String" } }, - description: { - serializedName: "description", + staticIP: { + constraints: { + Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$") + }, + serializedName: "staticIP", type: { name: "String" } @@ -1003,45 +1214,39 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const RedisUpdateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "RedisUpdateProperties", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", + ...RedisCommonProperties.type.modelProperties, + sku: { + serializedName: "sku", type: { name: "Composite", - className: "OperationDisplay" + className: "Sku" } } } } }; -export const CheckNameAvailabilityParameters: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityParameters", +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityParameters", + className: "TrackedResource", modelProperties: { - name: { - required: true, - serializedName: "name", + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - type: { + location: { + serializedName: "location", required: true, - serializedName: "type", type: { name: "String" } @@ -1050,63 +1255,96 @@ export const CheckNameAvailabilityParameters: msRest.CompositeMapper = { } }; -export const UpgradeNotification: msRest.CompositeMapper = { - serializedName: "UpgradeNotification", +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpgradeNotification", + className: "PrivateEndpointConnection", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "String" + name: "Composite", + className: "PrivateEndpoint" } }, - timestamp: { - readOnly: true, - serializedName: "timestamp", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "DateTime" + name: "Composite", + className: "PrivateLinkServiceConnectionState" } }, - upsellNotification: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "upsellNotification", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const NotificationListResponse: msRest.CompositeMapper = { - serializedName: "NotificationListResponse", +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotificationListResponse", + className: "ProxyResource", modelProperties: { - value: { - serializedName: "value", + ...Resource.type.modelProperties + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "UpgradeNotification" + name: "String" } } } }, - nextLink: { + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RedisLinkedServerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisLinkedServerProperties", + modelProperties: { + ...RedisLinkedServerCreateProperties.type.modelProperties, + provisioningState: { + serializedName: "provisioningState", readOnly: true, - serializedName: "nextLink", type: { name: "String" } @@ -1115,114 +1353,284 @@ export const NotificationListResponse: msRest.CompositeMapper = { } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const RedisProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "RedisProperties", modelProperties: { - value: { - serializedName: "", + ...RedisCreateProperties.type.modelProperties, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + }, + port: { + serializedName: "port", + readOnly: true, + type: { + name: "Number" + } + }, + sslPort: { + serializedName: "sslPort", + readOnly: true, + type: { + name: "Number" + } + }, + accessKeys: { + serializedName: "accessKeys", + type: { + name: "Composite", + className: "RedisAccessKeys" + } + }, + linkedServers: { + serializedName: "linkedServers", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "RedisLinkedServer" } } } }, - nextLink: { + instances: { + serializedName: "instances", readOnly: true, - serializedName: "nextLink", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RedisInstanceDetails" + } + } + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } } } } }; -export const RedisListResult: msRest.CompositeMapper = { - serializedName: "RedisListResult", +export const RedisResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisListResult", + className: "RedisResource", modelProperties: { - value: { - serializedName: "", + ...TrackedResource.type.modelProperties, + zones: { + serializedName: "zones", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "RedisResource" + name: "String" } } } }, - nextLink: { + redisConfiguration: { + serializedName: "properties.redisConfiguration", + type: { + name: "Composite", + className: "RedisCommonPropertiesRedisConfiguration" + } + }, + redisVersion: { + serializedName: "properties.redisVersion", + type: { + name: "String" + } + }, + enableNonSslPort: { + serializedName: "properties.enableNonSslPort", + type: { + name: "Boolean" + } + }, + replicasPerMaster: { + serializedName: "properties.replicasPerMaster", + type: { + name: "Number" + } + }, + replicasPerPrimary: { + serializedName: "properties.replicasPerPrimary", + type: { + name: "Number" + } + }, + tenantSettings: { + serializedName: "properties.tenantSettings", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + shardCount: { + serializedName: "properties.shardCount", + type: { + name: "Number" + } + }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "Sku" + } + }, + subnetId: { + constraints: { + Pattern: new RegExp( + "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" + ) + }, + serializedName: "properties.subnetId", + type: { + name: "String" + } + }, + staticIP: { + constraints: { + Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$") + }, + serializedName: "properties.staticIP", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "nextLink", type: { name: "String" } - } - } - } -}; - -export const RedisFirewallRuleListResult: msRest.CompositeMapper = { - serializedName: "RedisFirewallRuleListResult", - type: { - name: "Composite", - className: "RedisFirewallRuleListResult", - modelProperties: { - value: { - serializedName: "", + }, + hostName: { + serializedName: "properties.hostName", + readOnly: true, + type: { + name: "String" + } + }, + port: { + serializedName: "properties.port", + readOnly: true, + type: { + name: "Number" + } + }, + sslPort: { + serializedName: "properties.sslPort", + readOnly: true, + type: { + name: "Number" + } + }, + accessKeys: { + serializedName: "properties.accessKeys", + type: { + name: "Composite", + className: "RedisAccessKeys" + } + }, + linkedServers: { + serializedName: "properties.linkedServers", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RedisFirewallRule" + className: "RedisLinkedServer" } } } }, - nextLink: { + instances: { + serializedName: "properties.instances", readOnly: true, - serializedName: "nextLink", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RedisInstanceDetails" + } + } + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } } } } }; -export const RedisPatchScheduleListResult: msRest.CompositeMapper = { - serializedName: "RedisPatchScheduleListResult", +export const RedisFirewallRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisPatchScheduleListResult", + className: "RedisFirewallRule", modelProperties: { - value: { - serializedName: "", + ...ProxyResource.type.modelProperties, + startIP: { + serializedName: "properties.startIP", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RedisPatchSchedule" - } - } + name: "String" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + endIP: { + serializedName: "properties.endIP", + required: true, type: { name: "String" } @@ -1231,27 +1639,57 @@ export const RedisPatchScheduleListResult: msRest.CompositeMapper = { } }; -export const RedisLinkedServerWithPropertiesList: msRest.CompositeMapper = { - serializedName: "RedisLinkedServerWithPropertiesList", +export const RedisPatchSchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RedisLinkedServerWithPropertiesList", + className: "RedisPatchSchedule", modelProperties: { - value: { - serializedName: "", + ...ProxyResource.type.modelProperties, + scheduleEntries: { + serializedName: "properties.scheduleEntries", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RedisLinkedServerWithProperties" + className: "ScheduleEntry" } } } + } + } + } +}; + +export const RedisLinkedServerWithProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisLinkedServerWithProperties", + modelProperties: { + ...ProxyResource.type.modelProperties, + linkedRedisCacheId: { + serializedName: "properties.linkedRedisCacheId", + type: { + name: "String" + } }, - nextLink: { + linkedRedisCacheLocation: { + serializedName: "properties.linkedRedisCacheLocation", + type: { + name: "String" + } + }, + serverRole: { + serializedName: "properties.serverRole", + type: { + name: "Enum", + allowedValues: ["Primary", "Secondary"] + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "nextLink", type: { name: "String" } @@ -1259,3 +1697,13 @@ export const RedisLinkedServerWithPropertiesList: msRest.CompositeMapper = { } } }; + +export const RedisFirewallRuleCreateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedisFirewallRuleCreateParameters", + modelProperties: { + ...RedisFirewallRule.type.modelProperties + } + } +}; diff --git a/sdk/redis/arm-rediscache/src/models/operationsMappers.ts b/sdk/redis/arm-rediscache/src/models/operationsMappers.ts deleted file mode 100644 index 689688180be7..000000000000 --- a/sdk/redis/arm-rediscache/src/models/operationsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - CloudError, - Operation, - OperationDisplay, - OperationListResult -} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/parameters.ts b/sdk/redis/arm-rediscache/src/models/parameters.ts index e80292daf04e..09440d09462f 100644 --- a/sdk/redis/arm-rediscache/src/models/parameters.ts +++ b/sdk/redis/arm-rediscache/src/models/parameters.ts @@ -1,125 +1,240 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper, + RedisCreateParameters as RedisCreateParametersMapper, + RedisUpdateParameters as RedisUpdateParametersMapper, + RedisRegenerateKeyParameters as RedisRegenerateKeyParametersMapper, + RedisRebootParameters as RedisRebootParametersMapper, + ImportRDBParameters as ImportRDBParametersMapper, + ExportRDBParameters as ExportRDBParametersMapper, + RedisFirewallRule as RedisFirewallRuleMapper, + RedisPatchSchedule as RedisPatchScheduleMapper, + RedisLinkedServerCreateParameters as RedisLinkedServerCreateParametersMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper +} from "../models/mappers"; -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const apiVersion: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-12-01", + isConstant: true, serializedName: "api-version", type: { name: "String" } } }; -export const cacheName: msRest.OperationURLParameter = { - parameterPath: "cacheName", + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { + serializedName: "nextLink", required: true, - serializedName: "cacheName", type: { name: "String" } - } + }, + skipEncoding: true }; -export const defaultParameter: msRest.OperationURLParameter = { - parameterPath: "defaultParameter", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, + defaultValue: "application/json", isConstant: true, - serializedName: "default", - defaultValue: 'default', + serializedName: "Content-Type", type: { name: "String" } } }; -export const history: msRest.OperationQueryParameter = { - parameterPath: "history", + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: CheckNameAvailabilityParametersMapper +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { + serializedName: "subscriptionId", required: true, - serializedName: "history", type: { - name: "Number" + name: "String" } } }; -export const linkedServerName: msRest.OperationURLParameter = { - parameterPath: "linkedServerName", + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { + serializedName: "resourceGroupName", required: true, - serializedName: "linkedServerName", type: { name: "String" } } }; -export const name: msRest.OperationURLParameter = { + +export const name: OperationURLParameter = { parameterPath: "name", mapper: { - required: true, serializedName: "name", + required: true, type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const history: OperationQueryParameter = { + parameterPath: "history", mapper: { + serializedName: "history", required: true, - serializedName: "nextLink", type: { - name: "String" + name: "Number" } - }, - skipEncoding: true + } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: RedisCreateParametersMapper +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: RedisUpdateParametersMapper +}; + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: RedisRegenerateKeyParametersMapper +}; + +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: RedisRebootParametersMapper +}; + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: ImportRDBParametersMapper +}; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: ExportRDBParametersMapper +}; + +export const cacheName: OperationURLParameter = { + parameterPath: "cacheName", mapper: { + serializedName: "cacheName", required: true, - serializedName: "resourceGroupName", type: { name: "String" } } }; -export const ruleName: msRest.OperationURLParameter = { + +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: RedisFirewallRuleMapper +}; + +export const ruleName: OperationURLParameter = { parameterPath: "ruleName", mapper: { - required: true, serializedName: "ruleName", + required: true, type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const parameters8: OperationParameter = { + parameterPath: "parameters", + mapper: RedisPatchScheduleMapper +}; + +export const defaultParam: OperationURLParameter = { + parameterPath: "defaultParam", mapper: { + serializedName: "default", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: RedisLinkedServerCreateParametersMapper +}; + +export const linkedServerName: OperationURLParameter = { + parameterPath: "linkedServerName", + mapper: { + serializedName: "linkedServerName", + required: true, + type: { + name: "String" + } + } +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: PrivateEndpointConnectionMapper +}; diff --git a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts b/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts deleted file mode 100644 index 3f414b53ae84..000000000000 --- a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - BaseResource, - CloudError, - ProxyResource, - RedisAccessKeys, - RedisFirewallRule, - RedisInstanceDetails, - RedisLinkedServer, - RedisLinkedServerWithProperties, - RedisPatchSchedule, - RedisPatchScheduleListResult, - RedisResource, - Resource, - ScheduleEntry, - Sku, - TrackedResource -} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/redisMappers.ts b/sdk/redis/arm-rediscache/src/models/redisMappers.ts deleted file mode 100644 index 597dbcc9fdc7..000000000000 --- a/sdk/redis/arm-rediscache/src/models/redisMappers.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - BaseResource, - CheckNameAvailabilityParameters, - CloudError, - ExportRDBParameters, - ImportRDBParameters, - NotificationListResponse, - ProxyResource, - RedisAccessKeys, - RedisCreateParameters, - RedisFirewallRule, - RedisForceRebootResponse, - RedisInstanceDetails, - RedisLinkedServer, - RedisLinkedServerWithProperties, - RedisListResult, - RedisPatchSchedule, - RedisRebootParameters, - RedisRegenerateKeyParameters, - RedisResource, - RedisUpdateParameters, - Resource, - ScheduleEntry, - Sku, - TrackedResource, - UpgradeNotification -} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/operations/firewallRules.ts b/sdk/redis/arm-rediscache/src/operations/firewallRules.ts index 1f26b29976d4..a0147f9aaf0c 100644 --- a/sdk/redis/arm-rediscache/src/operations/firewallRules.ts +++ b/sdk/redis/arm-rediscache/src/operations/firewallRules.ts @@ -1,26 +1,38 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/firewallRulesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { FirewallRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { + RedisFirewallRule, + FirewallRulesListNextOptionalParams, + FirewallRulesListOptionalParams, + FirewallRulesListResponse, + FirewallRulesCreateOrUpdateOptionalParams, + FirewallRulesCreateOrUpdateResponse, + FirewallRulesGetOptionalParams, + FirewallRulesGetResponse, + FirewallRulesDeleteOptionalParams, + FirewallRulesListNextResponse +} from "../models"; -/** Class representing a FirewallRules. */ -export class FirewallRules { +/// +/** Class containing FirewallRules operations. */ +export class FirewallRulesImpl implements FirewallRules { private readonly client: RedisManagementClientContext; /** - * Create a FirewallRules. - * @param {RedisManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class FirewallRules class. + * @param client Reference to the service client */ constructor(client: RedisManagementClientContext) { this.client = client; @@ -30,72 +42,97 @@ export class FirewallRules { * Gets all firewall rules in the specified redis cache. * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param callback The callback - */ - listByRedisResource(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param options The optional parameters - * @param callback The callback - */ - listByRedisResource(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public list( + resourceGroupName: string, + cacheName: string, + options?: FirewallRulesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, cacheName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, cacheName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + cacheName: string, + options?: FirewallRulesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, cacheName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, cacheName, + continuationToken, options - }, - listByRedisResourceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + cacheName: string, + options?: FirewallRulesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + cacheName, + options + )) { + yield* page; + } } /** - * Create or update a redis cache firewall rule - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, cacheName: string, ruleName: string, parameters: Models.RedisFirewallRuleCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** + * Gets all firewall rules in the specified redis cache. * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, cacheName: string, ruleName: string, parameters: Models.RedisFirewallRuleCreateParameters, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + cacheName: string, + options?: FirewallRulesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, options }, + listOperationSpec + ); + } + /** + * Create or update a redis cache firewall rule * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param ruleName The name of the firewall rule. * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, cacheName: string, ruleName: string, parameters: Models.RedisFirewallRuleCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, cacheName: string, ruleName: string, parameters: Models.RedisFirewallRuleCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + cacheName: string, + ruleName: string, + parameters: RedisFirewallRule, + options?: FirewallRulesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cacheName, - ruleName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, cacheName, ruleName, parameters, options }, + createOrUpdateOperationSpec + ); } /** @@ -103,35 +140,18 @@ export class FirewallRules { * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param ruleName The name of the firewall rule. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, cacheName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param callback The callback - */ - get(resourceGroupName: string, cacheName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, cacheName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, cacheName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + cacheName: string, + ruleName: string, + options?: FirewallRulesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cacheName, - ruleName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, cacheName, ruleName, options }, + getOperationSpec + ); } /** @@ -139,115 +159,68 @@ export class FirewallRules { * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param ruleName The name of the firewall rule. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, cacheName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, cacheName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, cacheName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, cacheName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + cacheName: string, + ruleName: string, + options?: FirewallRulesDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cacheName, - ruleName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, cacheName, ruleName, options }, + deleteOperationSpec + ); } /** - * Gets all firewall rules in the specified redis cache. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByRedisResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listByRedisResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + cacheName: string, + nextLink: string, + options?: FirewallRulesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByRedisResourceNextOperationSpec, - callback) as Promise; + { resourceGroupName, cacheName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByRedisResourceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cacheName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.RedisFirewallRuleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.cacheName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.cacheName ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RedisFirewallRuleCreateParameters, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RedisFirewallRule @@ -256,80 +229,86 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisFirewallRule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.cacheName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.ruleName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisFirewallRule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.cacheName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.ruleName ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", + httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.ruleName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisFirewallRuleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/redis/arm-rediscache/src/operations/index.ts b/sdk/redis/arm-rediscache/src/operations/index.ts index a2f30803474f..8121e046bc73 100644 --- a/sdk/redis/arm-rediscache/src/operations/index.ts +++ b/sdk/redis/arm-rediscache/src/operations/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export * from "./operations"; @@ -13,3 +11,5 @@ export * from "./redis"; export * from "./firewallRules"; export * from "./patchSchedules"; export * from "./linkedServer"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/redis/arm-rediscache/src/operations/linkedServer.ts b/sdk/redis/arm-rediscache/src/operations/linkedServer.ts index a070b31122df..c10e3298c8db 100644 --- a/sdk/redis/arm-rediscache/src/operations/linkedServer.ts +++ b/sdk/redis/arm-rediscache/src/operations/linkedServer.ts @@ -1,80 +1,217 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/linkedServerMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { LinkedServer } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + RedisLinkedServerWithProperties, + LinkedServerListNextOptionalParams, + LinkedServerListOptionalParams, + RedisLinkedServerCreateParameters, + LinkedServerCreateOptionalParams, + LinkedServerCreateResponse, + LinkedServerDeleteOptionalParams, + LinkedServerGetOptionalParams, + LinkedServerGetResponse, + LinkedServerListResponse, + LinkedServerListNextResponse +} from "../models"; -/** Class representing a LinkedServer. */ -export class LinkedServer { +/// +/** Class containing LinkedServer operations. */ +export class LinkedServerImpl implements LinkedServer { private readonly client: RedisManagementClientContext; /** - * Create a LinkedServer. - * @param {RedisManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class LinkedServer class. + * @param client Reference to the service client */ constructor(client: RedisManagementClientContext) { this.client = client; } /** - * Adds a linked server to the Redis cache (requires Premium SKU). + * Gets the list of linked servers associated with this redis cache (requires Premium SKU). * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @param [options] The optional parameters - * @returns Promise + * @param name The name of the redis cache. + * @param options The options parameters. */ - create(resourceGroupName: string, name: string, linkedServerName: string, parameters: Models.RedisLinkedServerCreateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,name,linkedServerName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public list( + resourceGroupName: string, + name: string, + options?: LinkedServerListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, name, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, name, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + name: string, + options?: LinkedServerListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, name, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + name, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + name: string, + options?: LinkedServerListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + name, + options + )) { + yield* page; + } } /** - * Deletes the linked server from a redis cache (requires Premium SKU). + * Adds a linked server to the Redis cache (requires Premium SKU). * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. + * @param name The name of the Redis cache. * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Linked server operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, linkedServerName: string, options?: msRest.RequestOptionsBase): Promise; + async beginCreate( + resourceGroupName: string, + name: string, + linkedServerName: string, + parameters: RedisLinkedServerCreateParameters, + options?: LinkedServerCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LinkedServerCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, name, linkedServerName, parameters, options }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + /** + * Adds a linked server to the Redis cache (requires Premium SKU). * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. + * @param name The name of the Redis cache. * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param callback The callback + * @param parameters Parameters supplied to the Create Linked server operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, linkedServerName: string, callback: msRest.ServiceCallback): void; + async beginCreateAndWait( + resourceGroupName: string, + name: string, + linkedServerName: string, + parameters: RedisLinkedServerCreateParameters, + options?: LinkedServerCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + name, + linkedServerName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * Deletes the linked server from a redis cache (requires Premium SKU). * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, linkedServerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, name: string, linkedServerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + name: string, + linkedServerName: string, + options?: LinkedServerDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - linkedServerName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, name, linkedServerName, options }, + deleteOperationSpec + ); } /** @@ -82,250 +219,179 @@ export class LinkedServer { * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param linkedServerName The name of the linked server. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, name: string, linkedServerName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @param callback The callback - */ - get(resourceGroupName: string, name: string, linkedServerName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, name: string, linkedServerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, name: string, linkedServerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + name: string, + linkedServerName: string, + options?: LinkedServerGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - linkedServerName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, name, linkedServerName, options }, + getOperationSpec + ); } /** * Gets the list of linked servers associated with this redis cache (requires Premium SKU). * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param callback The callback - */ - list(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + name: string, + options?: LinkedServerListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, name, options }, + listOperationSpec + ); } /** - * Adds a linked server to the Redis cache (requires Premium SKU). + * ListNext * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, name: string, linkedServerName: string, parameters: Models.RedisLinkedServerCreateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - linkedServerName, - parameters, - options - }, - beginCreateOperationSpec, - options); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * @param name The name of the redis cache. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + name: string, + nextLink: string, + options?: LinkedServerListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, name, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RedisLinkedServerWithProperties + }, + 201: { + bodyMapper: Mappers.RedisLinkedServerWithProperties + }, + 202: { + bodyMapper: Mappers.RedisLinkedServerWithProperties + }, + 204: { + bodyMapper: Mappers.RedisLinkedServerWithProperties + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.name, - Parameters.linkedServerName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.linkedServerName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", + httpMethod: "DELETE", responses: { 200: {}, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.name, - Parameters.linkedServerName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.linkedServerName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisLinkedServerWithProperties }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.linkedServerName ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisLinkedServerWithPropertiesList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.linkedServerName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion + Parameters.name ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RedisLinkedServerCreateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.RedisLinkedServerWithProperties - }, - 201: { - bodyMapper: Mappers.RedisLinkedServerWithProperties - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisLinkedServerWithPropertiesList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/redis/arm-rediscache/src/operations/operations.ts b/sdk/redis/arm-rediscache/src/operations/operations.ts index 00b63249fdd4..b77e79002d66 100644 --- a/sdk/redis/arm-rediscache/src/operations/operations.ts +++ b/sdk/redis/arm-rediscache/src/operations/operations.ts @@ -1,26 +1,33 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { private readonly client: RedisManagementClientContext; /** - * Create a Operations. - * @param {RedisManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ constructor(client: RedisManagementClientContext) { this.client = client; @@ -28,96 +35,103 @@ export class Operations { /** * Lists all of the available REST API operations of the Microsoft.Cache provider. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listOperationSpec, - callback) as Promise; + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** * Lists all of the available REST API operations of the Microsoft.Cache provider. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Cache/operations", httpMethod: "GET", - path: "providers/Microsoft.Cache/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts b/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts index 4e8a39613a00..4dc966177f90 100644 --- a/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts +++ b/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts @@ -1,26 +1,39 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/patchSchedulesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PatchSchedules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { + RedisPatchSchedule, + PatchSchedulesListByRedisResourceNextOptionalParams, + PatchSchedulesListByRedisResourceOptionalParams, + PatchSchedulesListByRedisResourceResponse, + DefaultName, + PatchSchedulesCreateOrUpdateOptionalParams, + PatchSchedulesCreateOrUpdateResponse, + PatchSchedulesDeleteOptionalParams, + PatchSchedulesGetOptionalParams, + PatchSchedulesGetResponse, + PatchSchedulesListByRedisResourceNextResponse +} from "../models"; -/** Class representing a PatchSchedules. */ -export class PatchSchedules { +/// +/** Class containing PatchSchedules operations. */ +export class PatchSchedulesImpl implements PatchSchedules { private readonly client: RedisManagementClientContext; /** - * Create a PatchSchedules. - * @param {RedisManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class PatchSchedules class. + * @param client Reference to the service client */ constructor(client: RedisManagementClientContext) { this.client = client; @@ -30,214 +43,197 @@ export class PatchSchedules { * Gets all patch schedules in the specified redis cache (there is only one). * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param callback The callback - */ - listByRedisResource(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param options The optional parameters - * @param callback The callback - */ - listByRedisResource(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByRedisResource( + resourceGroupName: string, + cacheName: string, + options?: PatchSchedulesListByRedisResourceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRedisResourcePagingAll( + resourceGroupName, + cacheName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByRedisResourcePagingPage( + resourceGroupName, + cacheName, + options + ); + } + }; + } + + private async *listByRedisResourcePagingPage( + resourceGroupName: string, + cacheName: string, + options?: PatchSchedulesListByRedisResourceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByRedisResource( + resourceGroupName, + cacheName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByRedisResourceNext( resourceGroupName, cacheName, + continuationToken, options - }, - listByRedisResourceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByRedisResourcePagingAll( + resourceGroupName: string, + cacheName: string, + options?: PatchSchedulesListByRedisResourceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRedisResourcePagingPage( + resourceGroupName, + cacheName, + options + )) { + yield* page; + } } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, name: string, scheduleEntries: Models.ScheduleEntry[], options?: msRest.RequestOptionsBase): Promise; - /** + * Gets all patch schedules in the specified redis cache (there is only one). * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @param callback The callback + * @param cacheName The name of the Redis cache. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, name: string, scheduleEntries: Models.ScheduleEntry[], callback: msRest.ServiceCallback): void; + private _listByRedisResource( + resourceGroupName: string, + cacheName: string, + options?: PatchSchedulesListByRedisResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, options }, + listByRedisResourceOperationSpec + ); + } + /** + * Create or replace the patching schedule for Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @param options The optional parameters - * @param callback The callback + * @param parameters Parameters to set the patching schedule for Redis cache. + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, name: string, scheduleEntries: Models.ScheduleEntry[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, name: string, scheduleEntries: Models.ScheduleEntry[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + name: string, + parameters: RedisPatchSchedule, + defaultParam: DefaultName, + options?: PatchSchedulesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - scheduleEntries, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, name, parameters, defaultParam, options }, + createOrUpdateOperationSpec + ); } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + name: string, + defaultParam: DefaultName, + options?: PatchSchedulesDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, name, defaultParam, options }, + deleteOperationSpec + ); } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Gets the patching schedule of a redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param callback The callback + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. */ - get(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + name: string, + defaultParam: DefaultName, + options?: PatchSchedulesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, name, defaultParam, options }, + getOperationSpec + ); } /** - * Gets all patch schedules in the specified redis cache (there is only one). - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByRedisResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByRedisResourceNext + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param nextLink The nextLink from the previous successful call to the ListByRedisResource method. + * @param options The options parameters. */ - listByRedisResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByRedisResourceNext( + resourceGroupName: string, + cacheName: string, + nextLink: string, + options?: PatchSchedulesListByRedisResourceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByRedisResourceNextOperationSpec, - callback) as Promise; + { resourceGroupName, cacheName, nextLink, options }, + listByRedisResourceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByRedisResourceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByRedisResourceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/patchSchedules", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/patchSchedules", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cacheName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.RedisPatchScheduleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.defaultParameter, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.cacheName ], - requestBody: { - parameterPath: { - scheduleEntries: "scheduleEntries" - }, - mapper: { - ...Mappers.RedisPatchSchedule, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RedisPatchSchedule @@ -246,80 +242,86 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisPatchSchedule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.name, - Parameters.defaultParameter, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.defaultParam ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", + httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.name, - Parameters.defaultParameter, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.defaultParam ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisPatchSchedule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.defaultParam + ], + headerParameters: [Parameters.accept], serializer }; - -const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByRedisResourceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisPatchScheduleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts b/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..2ca5e630a91e --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts @@ -0,0 +1,353 @@ +/* + * 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 { PrivateEndpointConnections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsListOptionalParams, + PrivateEndpointConnectionsListResponse, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsPutOptionalParams, + PrivateEndpointConnectionsPutResponse, + PrivateEndpointConnectionsDeleteOptionalParams +} from "../models"; + +/// +/** Class containing PrivateEndpointConnections operations. */ +export class PrivateEndpointConnectionsImpl + implements PrivateEndpointConnections { + private readonly client: RedisManagementClientContext; + + /** + * Initialize a new instance of the class PrivateEndpointConnections class. + * @param client Reference to the service client + */ + constructor(client: RedisManagementClientContext) { + this.client = client; + } + + /** + * List all the private endpoint connections associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + cacheName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, cacheName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, cacheName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + cacheName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, cacheName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + cacheName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + cacheName, + options + )) { + yield* page; + } + } + + /** + * List all the private endpoint connections associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + cacheName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, options }, + listOperationSpec + ); + } + + /** + * Gets the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, privateEndpointConnectionName, options }, + getOperationSpec + ); + } + + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginPut( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsPutOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsPutResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + cacheName, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + async beginPutAndWait( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsPutOptionalParams + ): Promise { + const poller = await this.beginPut( + resourceGroupName, + cacheName, + privateEndpointConnectionName, + properties, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, privateEndpointConnectionName, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts b/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..7285d7778981 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts @@ -0,0 +1,135 @@ +/* + * 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 { PrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { + PrivateLinkResource, + PrivateLinkResourcesListByRedisCacheOptionalParams, + PrivateLinkResourcesListByRedisCacheResponse +} from "../models"; + +/// +/** Class containing PrivateLinkResources operations. */ +export class PrivateLinkResourcesImpl implements PrivateLinkResources { + private readonly client: RedisManagementClientContext; + + /** + * Initialize a new instance of the class PrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: RedisManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + public listByRedisCache( + resourceGroupName: string, + cacheName: string, + options?: PrivateLinkResourcesListByRedisCacheOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRedisCachePagingAll( + resourceGroupName, + cacheName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByRedisCachePagingPage( + resourceGroupName, + cacheName, + options + ); + } + }; + } + + private async *listByRedisCachePagingPage( + resourceGroupName: string, + cacheName: string, + options?: PrivateLinkResourcesListByRedisCacheOptionalParams + ): AsyncIterableIterator { + let result = await this._listByRedisCache( + resourceGroupName, + cacheName, + options + ); + yield result.value || []; + } + + private async *listByRedisCachePagingAll( + resourceGroupName: string, + cacheName: string, + options?: PrivateLinkResourcesListByRedisCacheOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRedisCachePagingPage( + resourceGroupName, + cacheName, + options + )) { + yield* page; + } + } + + /** + * Gets the private link resources that need to be created for a redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + private _listByRedisCache( + resourceGroupName: string, + cacheName: string, + options?: PrivateLinkResourcesListByRedisCacheOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cacheName, options }, + listByRedisCacheOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByRedisCacheOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/redis/arm-rediscache/src/operations/redis.ts b/sdk/redis/arm-rediscache/src/operations/redis.ts index 03ee10850310..0c70a6037c1d 100644 --- a/sdk/redis/arm-rediscache/src/operations/redis.ts +++ b/sdk/redis/arm-rediscache/src/operations/redis.ts @@ -1,97 +1,280 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/redisMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Redis } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { RedisManagementClientContext } from "../redisManagementClientContext"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + UpgradeNotification, + RedisListUpgradeNotificationsNextOptionalParams, + RedisListUpgradeNotificationsOptionalParams, + RedisResource, + RedisListByResourceGroupNextOptionalParams, + RedisListByResourceGroupOptionalParams, + RedisListBySubscriptionNextOptionalParams, + RedisListBySubscriptionOptionalParams, + CheckNameAvailabilityParameters, + RedisCheckNameAvailabilityOptionalParams, + RedisListUpgradeNotificationsResponse, + RedisCreateParameters, + RedisCreateOptionalParams, + RedisCreateResponse, + RedisUpdateParameters, + RedisUpdateOptionalParams, + RedisUpdateResponse, + RedisDeleteOptionalParams, + RedisGetOptionalParams, + RedisGetResponse, + RedisListByResourceGroupResponse, + RedisListBySubscriptionResponse, + RedisListKeysOptionalParams, + RedisListKeysResponse, + RedisRegenerateKeyParameters, + RedisRegenerateKeyOptionalParams, + RedisRegenerateKeyResponse, + RedisRebootParameters, + RedisForceRebootOptionalParams, + RedisForceRebootOperationResponse, + ImportRDBParameters, + RedisImportDataOptionalParams, + ExportRDBParameters, + RedisExportDataOptionalParams, + RedisListUpgradeNotificationsNextResponse, + RedisListByResourceGroupNextResponse, + RedisListBySubscriptionNextResponse +} from "../models"; -/** Class representing a Redis. */ -export class Redis { +/// +/** Class containing Redis operations. */ +export class RedisImpl implements Redis { private readonly client: RedisManagementClientContext; /** - * Create a Redis. - * @param {RedisManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Redis class. + * @param client Reference to the service client */ constructor(client: RedisManagementClientContext) { this.client = client; } /** - * Checks that the redis cache name is valid and is not already in use. - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only - * supported resource type is 'Microsoft.Cache/redis' - * @param [options] The optional parameters - * @returns Promise - */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only - * supported resource type is 'Microsoft.Cache/redis' - * @param callback The callback + * Gets any upgrade notifications for a Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param history how many minutes in past to look for upgrade notifications + * @param options The options parameters. */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback): void; + public listUpgradeNotifications( + resourceGroupName: string, + name: string, + history: number, + options?: RedisListUpgradeNotificationsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listUpgradeNotificationsPagingAll( + resourceGroupName, + name, + history, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listUpgradeNotificationsPagingPage( + resourceGroupName, + name, + history, + options + ); + } + }; + } + + private async *listUpgradeNotificationsPagingPage( + resourceGroupName: string, + name: string, + history: number, + options?: RedisListUpgradeNotificationsOptionalParams + ): AsyncIterableIterator { + let result = await this._listUpgradeNotifications( + resourceGroupName, + name, + history, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listUpgradeNotificationsNext( + resourceGroupName, + name, + history, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listUpgradeNotificationsPagingAll( + resourceGroupName: string, + name: string, + history: number, + options?: RedisListUpgradeNotificationsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listUpgradeNotificationsPagingPage( + resourceGroupName, + name, + history, + options + )) { + yield* page; + } + } + /** - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only - * supported resource type is 'Microsoft.Cache/redis' - * @param options The optional parameters - * @param callback The callback + * Lists all Redis caches in a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options + public listByResourceGroup( + resourceGroupName: string, + options?: RedisListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - checkNameAvailabilityOperationSpec, - callback); + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: RedisListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: RedisListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets any upgrade notifications for a Redis cache. - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @param [options] The optional parameters - * @returns Promise + * Gets all Redis caches in the specified subscription. + * @param options The options parameters. */ - listUpgradeNotifications(resourceGroupName: string, name: string, history: number, options?: msRest.RequestOptionsBase): Promise; + public listBySubscription( + options?: RedisListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: RedisListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: RedisListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @param callback The callback + * Checks that the redis cache name is valid and is not already in use. + * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only + * supported resource type is 'Microsoft.Cache/redis' + * @param options The options parameters. */ - listUpgradeNotifications(resourceGroupName: string, name: string, history: number, callback: msRest.ServiceCallback): void; + checkNameAvailability( + parameters: CheckNameAvailabilityParameters, + options?: RedisCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkNameAvailabilityOperationSpec + ); + } + /** + * Gets any upgrade notifications for a Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param history how many minutes in past to look for upgrade notifications - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listUpgradeNotifications(resourceGroupName: string, name: string, history: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listUpgradeNotifications(resourceGroupName: string, name: string, history: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listUpgradeNotifications( + resourceGroupName: string, + name: string, + history: number, + options?: RedisListUpgradeNotificationsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - history, - options - }, - listUpgradeNotificationsOperationSpec, - callback) as Promise; + { resourceGroupName, name, history, options }, + listUpgradeNotificationsOperationSpec + ); } /** @@ -99,144 +282,226 @@ export class Redis { * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters supplied to the Create Redis operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - create(resourceGroupName: string, name: string, parameters: Models.RedisCreateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,name,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreate( + resourceGroupName: string, + name: string, + parameters: RedisCreateParameters, + options?: RedisCreateOptionalParams + ): Promise< + PollerLike, RedisCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, name, parameters, options }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Update an existing Redis cache. - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters supplied to the Update Redis operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, name: string, parameters: Models.RedisUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** + * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param parameters Parameters supplied to the Update Redis operation. - * @param callback The callback + * @param parameters Parameters supplied to the Create Redis operation. + * @param options The options parameters. */ - update(resourceGroupName: string, name: string, parameters: Models.RedisUpdateParameters, callback: msRest.ServiceCallback): void; + async beginCreateAndWait( + resourceGroupName: string, + name: string, + parameters: RedisCreateParameters, + options?: RedisCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + name, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * Update an existing Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters supplied to the Update Redis operation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - update(resourceGroupName: string, name: string, parameters: Models.RedisUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, name: string, parameters: Models.RedisUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + name: string, + parameters: RedisUpdateParameters, + options?: RedisUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, name, parameters, options }, + updateOperationSpec + ); } /** * Deletes a Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,name,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + resourceGroupName: string, + name: string, + options?: RedisDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, name, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Gets a Redis cache (resource description). - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Deletes a Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + async beginDeleteAndWait( + resourceGroupName: string, + name: string, + options?: RedisDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, name, options); + return poller.pollUntilDone(); + } + /** + * Gets a Redis cache (resource description). * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + name: string, + options?: RedisGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, name, options }, + getOperationSpec + ); } /** * Lists all Redis caches in a resource group. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: RedisListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Gets all Redis caches in the specified subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscription( + options?: RedisListBySubscriptionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + { options }, + listBySubscriptionOperationSpec + ); } /** @@ -244,32 +509,17 @@ export class Redis { * resource. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listKeys(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param callback The callback - */ - listKeys(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param options The optional parameters - * @param callback The callback - */ - listKeys(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeys(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listKeys( + resourceGroupName: string, + name: string, + options?: RedisListKeysOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - listKeysOperationSpec, - callback) as Promise; + { resourceGroupName, name, options }, + listKeysOperationSpec + ); } /** @@ -277,39 +527,19 @@ export class Redis { * resource. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', - * 'Secondary' - * @param [options] The optional parameters - * @returns Promise + * @param parameters Specifies which key to regenerate. + * @param options The options parameters. */ - regenerateKey(resourceGroupName: string, name: string, keyType: Models.RedisKeyType, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', - * 'Secondary' - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, name: string, keyType: Models.RedisKeyType, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', - * 'Secondary' - * @param options The optional parameters - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, name: string, keyType: Models.RedisKeyType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - regenerateKey(resourceGroupName: string, name: string, keyType: Models.RedisKeyType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regenerateKey( + resourceGroupName: string, + name: string, + parameters: RedisRegenerateKeyParameters, + options?: RedisRegenerateKeyOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - keyType, - options - }, - regenerateKeyOperationSpec, - callback) as Promise; + { resourceGroupName, name, parameters, options }, + regenerateKeyOperationSpec + ); } /** @@ -318,35 +548,18 @@ export class Redis { * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Specifies which Redis node(s) to reboot. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - forceReboot(resourceGroupName: string, name: string, parameters: Models.RedisRebootParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @param callback The callback - */ - forceReboot(resourceGroupName: string, name: string, parameters: Models.RedisRebootParameters, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @param options The optional parameters - * @param callback The callback - */ - forceReboot(resourceGroupName: string, name: string, parameters: Models.RedisRebootParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - forceReboot(resourceGroupName: string, name: string, parameters: Models.RedisRebootParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + forceReboot( + resourceGroupName: string, + name: string, + parameters: RedisRebootParameters, + options?: RedisForceRebootOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - name, - parameters, - options - }, - forceRebootOperationSpec, - callback) as Promise; + { resourceGroupName, name, parameters, options }, + forceRebootOperationSpec + ); } /** @@ -354,575 +567,586 @@ export class Redis { * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters for Redis import operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - importData(resourceGroupName: string, name: string, parameters: Models.ImportRDBParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginImportData(resourceGroupName,name,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } + async beginImportData( + resourceGroupName: string, + name: string, + parameters: ImportRDBParameters, + options?: RedisImportDataOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Export data from the redis cache to blobs in a container. - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @param [options] The optional parameters - * @returns Promise - */ - exportData(resourceGroupName: string, name: string, parameters: Models.ExportRDBParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginExportData(resourceGroupName,name,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + const lro = new LroImpl( + sendOperation, + { resourceGroupName, name, parameters, options }, + importDataOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. + * Import data into Redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param parameters Parameters supplied to the Create Redis operation. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters for Redis import operation. + * @param options The options parameters. */ - beginCreate(resourceGroupName: string, name: string, parameters: Models.RedisCreateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - parameters, - options - }, - beginCreateOperationSpec, - options); + async beginImportDataAndWait( + resourceGroupName: string, + name: string, + parameters: ImportRDBParameters, + options?: RedisImportDataOptionalParams + ): Promise { + const poller = await this.beginImportData( + resourceGroupName, + name, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Deletes a Redis cache. + * Export data from the redis cache to blobs in a container. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters for Redis export operation. + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginExportData( + resourceGroupName: string, + name: string, + parameters: ExportRDBParameters, + options?: RedisExportDataOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, name, parameters, options }, + exportDataOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Import data into Redis cache. + * Export data from the redis cache to blobs in a container. * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters for Redis export operation. + * @param options The options parameters. */ - beginImportData(resourceGroupName: string, name: string, parameters: Models.ImportRDBParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - parameters, - options - }, - beginImportDataOperationSpec, - options); + async beginExportDataAndWait( + resourceGroupName: string, + name: string, + parameters: ExportRDBParameters, + options?: RedisExportDataOptionalParams + ): Promise { + const poller = await this.beginExportData( + resourceGroupName, + name, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Export data from the redis cache to blobs in a container. + * ListUpgradeNotificationsNext * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @param [options] The optional parameters - * @returns Promise + * @param history how many minutes in past to look for upgrade notifications + * @param nextLink The nextLink from the previous successful call to the ListUpgradeNotifications + * method. + * @param options The options parameters. */ - beginExportData(resourceGroupName: string, name: string, parameters: Models.ExportRDBParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - parameters, - options - }, - beginExportDataOperationSpec, - options); + private _listUpgradeNotificationsNext( + resourceGroupName: string, + name: string, + history: number, + nextLink: string, + options?: RedisListUpgradeNotificationsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, history, nextLink, options }, + listUpgradeNotificationsNextOperationSpec + ); } /** - * Lists all Redis caches in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: RedisListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Gets all Redis caches in the specified subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: RedisListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckNameAvailabilityParameters, - required: true - } - }, responses: { 200: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listUpgradeNotificationsOperationSpec: msRest.OperationSpec = { +const listUpgradeNotificationsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listUpgradeNotifications", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listUpgradeNotifications", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.history - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.NotificationListResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + queryParameters: [Parameters.apiVersion, Parameters.history], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion + Parameters.name ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RedisUpdateParameters, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RedisResource }, + 201: { + bodyMapper: Mappers.RedisResource + }, + 202: { + bodyMapper: Mappers.RedisResource + }, + 204: { + bodyMapper: Mappers.RedisResource + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.RedisResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.name ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RedisListResult + bodyMapper: Mappers.RedisResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const listKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/redis", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RedisAccessKeys + bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const regenerateKeyOperationSpec: msRest.OperationSpec = { +const listKeysOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - keyType: "keyType" - }, - mapper: { - ...Mappers.RedisRegenerateKeyParameters, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.RedisAccessKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const forceRebootOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.name ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RedisRebootParameters, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const regenerateKeyOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/regenerateKey", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.RedisForceRebootResponse + bodyMapper: Mappers.RedisAccessKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId + Parameters.name ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RedisCreateParameters, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const forceRebootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/forceReboot", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.RedisResource - }, - 201: { - bodyMapper: Mappers.RedisResource + bodyMapper: Mappers.RedisForceRebootResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const importDataOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/import", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginImportDataOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import", + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion + Parameters.name ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ImportRDBParameters, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const exportDataOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/export", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginExportDataOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export", + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion + Parameters.name ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ExportRDBParameters, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listUpgradeNotificationsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.NotificationListResponse + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion, Parameters.history], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/firewallRules.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/firewallRules.ts new file mode 100644 index 000000000000..d6ced9f389a2 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/firewallRules.ts @@ -0,0 +1,75 @@ +/* + * 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 { + RedisFirewallRule, + FirewallRulesListOptionalParams, + FirewallRulesCreateOrUpdateOptionalParams, + FirewallRulesCreateOrUpdateResponse, + FirewallRulesGetOptionalParams, + FirewallRulesGetResponse, + FirewallRulesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a FirewallRules. */ +export interface FirewallRules { + /** + * Gets all firewall rules in the specified redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + cacheName: string, + options?: FirewallRulesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a redis cache firewall rule + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param ruleName The name of the firewall rule. + * @param parameters Parameters supplied to the create or update redis firewall rule operation. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + cacheName: string, + ruleName: string, + parameters: RedisFirewallRule, + options?: FirewallRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets a single firewall rule in a specified redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param ruleName The name of the firewall rule. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + cacheName: string, + ruleName: string, + options?: FirewallRulesGetOptionalParams + ): Promise; + /** + * Deletes a single firewall rule in a specified redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param ruleName The name of the firewall rule. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + cacheName: string, + ruleName: string, + options?: FirewallRulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/index.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..8121e046bc73 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/index.ts @@ -0,0 +1,15 @@ +/* + * 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 * from "./operations"; +export * from "./redis"; +export * from "./firewallRules"; +export * from "./patchSchedules"; +export * from "./linkedServer"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/linkedServer.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/linkedServer.ts new file mode 100644 index 000000000000..2b5e16d12073 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/linkedServer.ts @@ -0,0 +1,97 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RedisLinkedServerWithProperties, + LinkedServerListOptionalParams, + RedisLinkedServerCreateParameters, + LinkedServerCreateOptionalParams, + LinkedServerCreateResponse, + LinkedServerDeleteOptionalParams, + LinkedServerGetOptionalParams, + LinkedServerGetResponse +} from "../models"; + +/// +/** Interface representing a LinkedServer. */ +export interface LinkedServer { + /** + * Gets the list of linked servers associated with this redis cache (requires Premium SKU). + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + name: string, + options?: LinkedServerListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Adds a linked server to the Redis cache (requires Premium SKU). + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param linkedServerName The name of the linked server that is being added to the Redis cache. + * @param parameters Parameters supplied to the Create Linked server operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + name: string, + linkedServerName: string, + parameters: RedisLinkedServerCreateParameters, + options?: LinkedServerCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LinkedServerCreateResponse + > + >; + /** + * Adds a linked server to the Redis cache (requires Premium SKU). + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param linkedServerName The name of the linked server that is being added to the Redis cache. + * @param parameters Parameters supplied to the Create Linked server operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + name: string, + linkedServerName: string, + parameters: RedisLinkedServerCreateParameters, + options?: LinkedServerCreateOptionalParams + ): Promise; + /** + * Deletes the linked server from a redis cache (requires Premium SKU). + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param linkedServerName The name of the linked server that is being added to the Redis cache. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + linkedServerName: string, + options?: LinkedServerDeleteOptionalParams + ): Promise; + /** + * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param linkedServerName The name of the linked server. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + linkedServerName: string, + options?: LinkedServerGetOptionalParams + ): Promise; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/operations.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..5f19c5128309 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * 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 { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available REST API operations of the Microsoft.Cache provider. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/patchSchedules.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/patchSchedules.ts new file mode 100644 index 000000000000..ccf3d7fad2fb --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/patchSchedules.ts @@ -0,0 +1,76 @@ +/* + * 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 { + RedisPatchSchedule, + PatchSchedulesListByRedisResourceOptionalParams, + DefaultName, + PatchSchedulesCreateOrUpdateOptionalParams, + PatchSchedulesCreateOrUpdateResponse, + PatchSchedulesDeleteOptionalParams, + PatchSchedulesGetOptionalParams, + PatchSchedulesGetResponse +} from "../models"; + +/// +/** Interface representing a PatchSchedules. */ +export interface PatchSchedules { + /** + * Gets all patch schedules in the specified redis cache (there is only one). + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + listByRedisResource( + resourceGroupName: string, + cacheName: string, + options?: PatchSchedulesListByRedisResourceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or replace the patching schedule for Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters to set the patching schedule for Redis cache. + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + name: string, + parameters: RedisPatchSchedule, + defaultParam: DefaultName, + options?: PatchSchedulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the patching schedule of a redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + defaultParam: DefaultName, + options?: PatchSchedulesDeleteOptionalParams + ): Promise; + /** + * Gets the patching schedule of a redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param defaultParam Default string modeled as parameter for auto generation to work correctly. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + defaultParam: DefaultName, + options?: PatchSchedulesGetOptionalParams + ): Promise; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/privateEndpointConnections.ts new file mode 100644 index 000000000000..17937ea28e24 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/privateEndpointConnections.ts @@ -0,0 +1,100 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsListOptionalParams, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsPutOptionalParams, + PrivateEndpointConnectionsPutResponse, + PrivateEndpointConnectionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnections. */ +export interface PrivateEndpointConnections { + /** + * List all the private endpoint connections associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + cacheName: string, + options?: PrivateEndpointConnectionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise; + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginPut( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsPutOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsPutResponse + > + >; + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param properties The private endpoint connection properties. + * @param options The options parameters. + */ + beginPutAndWait( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + properties: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsPutOptionalParams + ): Promise; + /** + * Deletes the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + cacheName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/privateLinkResources.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/privateLinkResources.ts new file mode 100644 index 000000000000..b8740b709a79 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/privateLinkResources.ts @@ -0,0 +1,29 @@ +/* + * 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 { + PrivateLinkResource, + PrivateLinkResourcesListByRedisCacheOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateLinkResources. */ +export interface PrivateLinkResources { + /** + * Gets the private link resources that need to be created for a redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The options parameters. + */ + listByRedisCache( + resourceGroupName: string, + cacheName: string, + options?: PrivateLinkResourcesListByRedisCacheOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/redis/arm-rediscache/src/operationsInterfaces/redis.ts b/sdk/redis/arm-rediscache/src/operationsInterfaces/redis.ts new file mode 100644 index 000000000000..29876eca4345 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operationsInterfaces/redis.ts @@ -0,0 +1,250 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + UpgradeNotification, + RedisListUpgradeNotificationsOptionalParams, + RedisResource, + RedisListByResourceGroupOptionalParams, + RedisListBySubscriptionOptionalParams, + CheckNameAvailabilityParameters, + RedisCheckNameAvailabilityOptionalParams, + RedisCreateParameters, + RedisCreateOptionalParams, + RedisCreateResponse, + RedisUpdateParameters, + RedisUpdateOptionalParams, + RedisUpdateResponse, + RedisDeleteOptionalParams, + RedisGetOptionalParams, + RedisGetResponse, + RedisListKeysOptionalParams, + RedisListKeysResponse, + RedisRegenerateKeyParameters, + RedisRegenerateKeyOptionalParams, + RedisRegenerateKeyResponse, + RedisRebootParameters, + RedisForceRebootOptionalParams, + RedisForceRebootOperationResponse, + ImportRDBParameters, + RedisImportDataOptionalParams, + ExportRDBParameters, + RedisExportDataOptionalParams +} from "../models"; + +/// +/** Interface representing a Redis. */ +export interface Redis { + /** + * Gets any upgrade notifications for a Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param history how many minutes in past to look for upgrade notifications + * @param options The options parameters. + */ + listUpgradeNotifications( + resourceGroupName: string, + name: string, + history: number, + options?: RedisListUpgradeNotificationsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all Redis caches in a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: RedisListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets all Redis caches in the specified subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: RedisListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that the redis cache name is valid and is not already in use. + * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only + * supported resource type is 'Microsoft.Cache/redis' + * @param options The options parameters. + */ + checkNameAvailability( + parameters: CheckNameAvailabilityParameters, + options?: RedisCheckNameAvailabilityOptionalParams + ): Promise; + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters supplied to the Create Redis operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + name: string, + parameters: RedisCreateParameters, + options?: RedisCreateOptionalParams + ): Promise< + PollerLike, RedisCreateResponse> + >; + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters supplied to the Create Redis operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + name: string, + parameters: RedisCreateParameters, + options?: RedisCreateOptionalParams + ): Promise; + /** + * Update an existing Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters supplied to the Update Redis operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + name: string, + parameters: RedisUpdateParameters, + options?: RedisUpdateOptionalParams + ): Promise; + /** + * Deletes a Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + name: string, + options?: RedisDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + name: string, + options?: RedisDeleteOptionalParams + ): Promise; + /** + * Gets a Redis cache (resource description). + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + options?: RedisGetOptionalParams + ): Promise; + /** + * Retrieve a Redis cache's access keys. This operation requires write permission to the cache + * resource. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + name: string, + options?: RedisListKeysOptionalParams + ): Promise; + /** + * Regenerate Redis cache's access keys. This operation requires write permission to the cache + * resource. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Specifies which key to regenerate. + * @param options The options parameters. + */ + regenerateKey( + resourceGroupName: string, + name: string, + parameters: RedisRegenerateKeyParameters, + options?: RedisRegenerateKeyOptionalParams + ): Promise; + /** + * Reboot specified Redis node(s). This operation requires write permission to the cache resource. + * There can be potential data loss. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Specifies which Redis node(s) to reboot. + * @param options The options parameters. + */ + forceReboot( + resourceGroupName: string, + name: string, + parameters: RedisRebootParameters, + options?: RedisForceRebootOptionalParams + ): Promise; + /** + * Import data into Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters for Redis import operation. + * @param options The options parameters. + */ + beginImportData( + resourceGroupName: string, + name: string, + parameters: ImportRDBParameters, + options?: RedisImportDataOptionalParams + ): Promise, void>>; + /** + * Import data into Redis cache. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters for Redis import operation. + * @param options The options parameters. + */ + beginImportDataAndWait( + resourceGroupName: string, + name: string, + parameters: ImportRDBParameters, + options?: RedisImportDataOptionalParams + ): Promise; + /** + * Export data from the redis cache to blobs in a container. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters for Redis export operation. + * @param options The options parameters. + */ + beginExportData( + resourceGroupName: string, + name: string, + parameters: ExportRDBParameters, + options?: RedisExportDataOptionalParams + ): Promise, void>>; + /** + * Export data from the redis cache to blobs in a container. + * @param resourceGroupName The name of the resource group. + * @param name The name of the Redis cache. + * @param parameters Parameters for Redis export operation. + * @param options The options parameters. + */ + beginExportDataAndWait( + resourceGroupName: string, + name: string, + parameters: ExportRDBParameters, + options?: RedisExportDataOptionalParams + ): Promise; +} diff --git a/sdk/redis/arm-rediscache/src/redisManagementClient.ts b/sdk/redis/arm-rediscache/src/redisManagementClient.ts index cd3b8b9dfe2e..6e0db07c1ce7 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClient.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClient.ts @@ -1,51 +1,61 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; +import * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + RedisImpl, + FirewallRulesImpl, + PatchSchedulesImpl, + LinkedServerImpl, + PrivateEndpointConnectionsImpl, + PrivateLinkResourcesImpl +} from "./operations"; +import { + Operations, + Redis, + FirewallRules, + PatchSchedules, + LinkedServer, + PrivateEndpointConnections, + PrivateLinkResources +} from "./operationsInterfaces"; import { RedisManagementClientContext } from "./redisManagementClientContext"; +import { RedisManagementClientOptionalParams } from "./models"; - -class RedisManagementClient extends RedisManagementClientContext { - // Operation groups - operations: operations.Operations; - redis: operations.Redis; - firewallRules: operations.FirewallRules; - patchSchedules: operations.PatchSchedules; - linkedServer: operations.LinkedServer; - +export class RedisManagementClient extends RedisManagementClientContext { /** * Initializes a new instance of the RedisManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options + * subscription. The subscription ID forms part of the URI for every service call. + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisManagementClientOptions) { + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: RedisManagementClientOptionalParams + ) { super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.redis = new operations.Redis(this); - this.firewallRules = new operations.FirewallRules(this); - this.patchSchedules = new operations.PatchSchedules(this); - this.linkedServer = new operations.LinkedServer(this); + this.operations = new OperationsImpl(this); + this.redis = new RedisImpl(this); + this.firewallRules = new FirewallRulesImpl(this); + this.patchSchedules = new PatchSchedulesImpl(this); + this.linkedServer = new LinkedServerImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + this.privateLinkResources = new PrivateLinkResourcesImpl(this); } -} -// Operation Specifications - -export { - RedisManagementClient, - RedisManagementClientContext, - Models as RedisManagementModels, - Mappers as RedisManagementMappers -}; -export * from "./operations"; + operations: Operations; + redis: Redis; + firewallRules: FirewallRules; + patchSchedules: PatchSchedules; + linkedServer: LinkedServer; + privateEndpointConnections: PrivateEndpointConnections; + privateLinkResources: PrivateLinkResources; +} diff --git a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts index 286d06abeb1f..4f87ebf2d64f 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts @@ -1,63 +1,71 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { RedisManagementClientOptionalParams } from "./models"; -const packageName = "@azure/arm-rediscache"; -const packageVersion = "4.0.0"; - -export class RedisManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; +export class RedisManagementClientContext extends coreClient.ServiceClient { + $host: string; + apiVersion: string; subscriptionId: string; - apiVersion?: string; /** - * Initializes a new instance of the RedisManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * Initializes a new instance of the RedisManagementClientContext class. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options + * subscription. The subscription ID forms part of the URI for every service call. + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RedisManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: RedisManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); } - if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); } + // Initializing default values for options if (!options) { options = {}; } - if(!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } + const defaults: RedisManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; - super(credentials, options); + const packageDetails = `azsdk-js-arm-rediscache/30.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; - this.apiVersion = '2019-07-01'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2020-12-01"; } } diff --git a/sdk/redis/arm-rediscache/test/redis_examples.ts b/sdk/redis/arm-rediscache/test/redis_examples.ts new file mode 100644 index 000000000000..73b692d0c070 --- /dev/null +++ b/sdk/redis/arm-rediscache/test/redis_examples.ts @@ -0,0 +1,184 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; +import { ClientSecretCredential } from "@azure/identity"; +import { RedisManagementClient } from "../src/redisManagementClient"; +import { NetworkManagementClient, VirtualNetwork } from "@azure/arm-network"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("Redis test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: RedisManagementClient; + let network_client: NetworkManagementClient; + let location: string; + let resourceGroupName: string; + let networkName: string; + let subnetName: string; + let name: string; + + beforeEach(async function () { + recorder = record(this, recorderEnvSetup); + subscriptionId = env.SUBSCRIPTION_ID; + // This is an example of how the environment variables are used + const credential = new ClientSecretCredential( + env.AZURE_TENANT_ID, + env.AZURE_CLIENT_ID, + env.AZURE_CLIENT_SECRET + ); + client = new RedisManagementClient(credential, subscriptionId); + network_client = new NetworkManagementClient(credential, subscriptionId); + location = "eastus"; + resourceGroupName = "myjstest"; + networkName = "networknamex"; + subnetName = "subnetworknamex"; + name = "myrediscachexxx111"; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)) + } + + async function createVirtualNetwork( + groupName: any, + location: any, + networkName: any, + subnetName: any + ) { + const parameter: VirtualNetwork = { + location: location, + addressSpace: { + addressPrefixes: ["10.0.0.0/16"], + }, + }; + //network create + const network_create = await network_client.virtualNetworks.beginCreateOrUpdateAndWait(groupName, networkName, parameter); + //subnet create + const subnet_info = await network_client.subnets.beginCreateOrUpdateAndWait(groupName, networkName, subnetName, { addressPrefix: "10.0.0.0/24" }); + } + + it("Redis create test", async function () { + //create network resource + await createVirtualNetwork(resourceGroupName, location, networkName, subnetName); + const res = await client.redis.beginCreateAndWait(resourceGroupName, name, { + location: location, + zones: [ + "1" + ], + sku: { + name: "Premium", + family: "P", + capacity: 1 + }, + enableNonSslPort: true, + shardCount: 2, + redisConfiguration: { + maxmemoryPolicy: "allkeys-lru" + }, + subnetId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName + "/providers/Microsoft.Network/virtualNetworks/" + networkName + "/subnets/" + subnetName, + staticIP: "10.0.0.5", + minimumTlsVersion: "1.2" + }); + assert.equal(res.name, name); + }); + + it("redis get test", async function () { + const res = await client.redis.get(resourceGroupName, name); + assert.equal(res.name, name); + }); + + it("patchSchedules create for redis test", async function () { + const res = await client.patchSchedules.createOrUpdate(resourceGroupName, name, { + scheduleEntries: [ + { + dayOfWeek: "Monday", + startHourUtc: 12, + maintenanceWindow: "PT5H" + }, + { + dayOfWeek: "Tuesday", + startHourUtc: 12 + } + ] + }, "default"); + assert.equal(res.type, "Microsoft.Cache/Redis/PatchSchedules"); + }); + + it("patchSchedules listByRedisResource for redis test", async function () { + const resArray = new Array(); + for await (let item of client.patchSchedules.listByRedisResource(resourceGroupName, name)) { + resArray.push(item); + } + assert.equal(resArray.length, 1); + }); + + it("redis listByResourceGroup test", async function () { + const resArray = new Array(); + for await (let item of client.redis.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + assert.equal(resArray.length, 1); + }); + + it("redis update test", async function () { + let count = 0; + while (count < 20) { + count++; + const res = await client.redis.get(resourceGroupName, name); + if (res.provisioningState == "Succeeded") { + const res = await client.redis.update(resourceGroupName, name, { enableNonSslPort: true }); + assert.equal(res.enableNonSslPort, true); + break; + } else { + // The resource is activating + await sleep(300000); + } + } + }).timeout(3600000); + + it("patchSchedules delete for redis test", async function () { + const res = await client.patchSchedules.delete(resourceGroupName, name, "default"); + // It's can not run patchSchedules.listByRedisResource after patchSchedules.delete operation + }); + + it("redis delete test", async function () { + const res = await client.redis.beginDeleteAndWait(resourceGroupName, name); + const resArray = new Array(); + for await (let item of client.redis.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + assert.equal(resArray.length, 0); + }); +}); diff --git a/sdk/redis/arm-rediscache/tsconfig.json b/sdk/redis/arm-rediscache/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/redis/arm-rediscache/tsconfig.json +++ b/sdk/redis/arm-rediscache/tsconfig.json @@ -3,7 +3,7 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, @@ -11,9 +11,9 @@ "forceConsistentCasingInFileNames": true, "lib": ["es6", "dom"], "declaration": true, - "outDir": "./esm", + "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"], "exclude": ["node_modules"] } diff --git a/sdk/redis/ci.yml b/sdk/redis/ci.yml new file mode 100644 index 000000000000..d48f73ae3903 --- /dev/null +++ b/sdk/redis/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/redis/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/redis/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: redis + Artifacts: + - name: azure-arm-rediscache + safeName: azurearmrediscache + \ No newline at end of file