diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b55cd8b76fd0..8db0deda8215 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,7 +10,7 @@ # Core /sdk/core/abort-controller/ @chradek @xirzec @bterlson -/sdk/core/core-amqp/ @ramya-rao-a @chradek @richardpark-msft +/sdk/core/core-amqp/ @ramya-rao-a @chradek @richardpark-msft @HarshaNalluru /sdk/core/core-auth/ @daviwil @xirzec @bterlson /sdk/core/core-http/ @daviwil @xirzec @bterlson @chradek @jeremymeng /sdk/core/core-lro/ @sadasant @xirzec @bterlson @@ -24,10 +24,10 @@ /sdk/batch/ @xingwu1 @matthchr @bgklein /sdk/cosmosdb/ @southpolesteve @zfoster -/sdk/eventhub/ @ramya-rao-a @chradek @richardpark-msft +/sdk/eventhub/ @ramya-rao-a @chradek @richardpark-msft @HarshaNalluru /sdk/servicebus/ @ramya-rao-a @chradek @richardpark-msft @HarshaNalluru -/sdk/identity/ @schaabs @daviwil @jonathandturner +/sdk/identity/ @schaabs @daviwil @jonathandturner @sadasant /sdk/keyvault/ @jonathandturner @sadasant /sdk/storage/ @XiaoningLiu @jeremymeng @HarshaNalluru @vinjiang @jiacfan @ljian3377 @@ -41,7 +41,7 @@ /common/smoke-test/ @ramya-rao-a @chradek @jonathandturner @sadasant @jeremymeng @southpolesteve # API review files -/sdk/**/review/*api.md @bterlson +/sdk/**/review/*api.md @bterlson @xirzec # Management Plane /**/*Management*.ts @qiaozha diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index eafa6d1d8a2c..023a54c5f663 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -19,6 +19,7 @@ dependencies: '@rush-temp/eventhubs-checkpointstore-blob': 'file:projects/eventhubs-checkpointstore-blob.tgz' '@rush-temp/identity': 'file:projects/identity.tgz' '@rush-temp/keyvault-certificates': 'file:projects/keyvault-certificates.tgz' + '@rush-temp/keyvault-common': 'file:projects/keyvault-common.tgz' '@rush-temp/keyvault-keys': 'file:projects/keyvault-keys.tgz' '@rush-temp/keyvault-secrets': 'file:projects/keyvault-secrets.tgz' '@rush-temp/logger': 'file:projects/logger.tgz' @@ -46,7 +47,7 @@ packages: is-buffer: 2.0.4 jssha: 2.4.2 process: 0.11.10 - rhea: 1.0.21 + rhea: 1.0.22 rhea-promise: 0.1.15 stream-browserify: 2.0.2 tslib: 1.13.0 @@ -65,11 +66,11 @@ packages: integrity: sha512-ZKUpCd7Dlyfn7bdc+/zC/sf0aRIaNQMDuSj2RhYRFe3p70hVAnYGp3TX4cnG2yoEALp/LTj/XnZGQ8Xzf6Ja/Q== /@azure/eslint-plugin-azure-sdk/2.0.1_984cbb313f9ea271f36cadd8f9814e06: dependencies: - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 fast-levenshtein: 2.0.6 glob: 7.1.6 - typescript: 3.8.3 + typescript: 3.9.5 deprecated: 'This package is now a private implementation detail of https://github.com/Azure/azure-sdk-for-js' dev: false engines: @@ -124,22 +125,22 @@ packages: dev: false resolution: integrity: sha512-aFHRw/IHhg3I9ZJW+Va4L+sCirFHMVIu6B7lFdL5mGLfG3xC5vDIdd957LRXFgy2OiKFRUC0QaKknd0YCsQIqA== - /@babel/code-frame/7.8.3: + /@babel/code-frame/7.10.1: dependencies: - '@babel/highlight': 7.9.0 + '@babel/highlight': 7.10.1 dev: false resolution: - integrity: sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - /@babel/core/7.9.6: + integrity: sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw== + /@babel/core/7.10.2: dependencies: - '@babel/code-frame': 7.8.3 - '@babel/generator': 7.9.6 - '@babel/helper-module-transforms': 7.9.0 - '@babel/helpers': 7.9.6 - '@babel/parser': 7.9.6 - '@babel/template': 7.8.6 - '@babel/traverse': 7.9.6 - '@babel/types': 7.9.6 + '@babel/code-frame': 7.10.1 + '@babel/generator': 7.10.2 + '@babel/helper-module-transforms': 7.10.1 + '@babel/helpers': 7.10.1 + '@babel/parser': 7.10.2 + '@babel/template': 7.10.1 + '@babel/traverse': 7.10.1 + '@babel/types': 7.10.2 convert-source-map: 1.7.0 debug: 4.1.1 gensync: 1.0.0-beta.1 @@ -152,139 +153,139 @@ packages: engines: node: '>=6.9.0' resolution: - integrity: sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== - /@babel/generator/7.9.6: + integrity: sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ== + /@babel/generator/7.10.2: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 jsesc: 2.5.2 lodash: 4.17.15 source-map: 0.5.7 dev: false resolution: - integrity: sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== - /@babel/helper-function-name/7.9.5: + integrity: sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA== + /@babel/helper-function-name/7.10.1: dependencies: - '@babel/helper-get-function-arity': 7.8.3 - '@babel/template': 7.8.6 - '@babel/types': 7.9.6 + '@babel/helper-get-function-arity': 7.10.1 + '@babel/template': 7.10.1 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== - /@babel/helper-get-function-arity/7.8.3: + integrity: sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ== + /@babel/helper-get-function-arity/7.10.1: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== - /@babel/helper-member-expression-to-functions/7.8.3: + integrity: sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw== + /@babel/helper-member-expression-to-functions/7.10.1: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== - /@babel/helper-module-imports/7.8.3: + integrity: sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g== + /@babel/helper-module-imports/7.10.1: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== - /@babel/helper-module-transforms/7.9.0: + integrity: sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg== + /@babel/helper-module-transforms/7.10.1: dependencies: - '@babel/helper-module-imports': 7.8.3 - '@babel/helper-replace-supers': 7.9.6 - '@babel/helper-simple-access': 7.8.3 - '@babel/helper-split-export-declaration': 7.8.3 - '@babel/template': 7.8.6 - '@babel/types': 7.9.6 + '@babel/helper-module-imports': 7.10.1 + '@babel/helper-replace-supers': 7.10.1 + '@babel/helper-simple-access': 7.10.1 + '@babel/helper-split-export-declaration': 7.10.1 + '@babel/template': 7.10.1 + '@babel/types': 7.10.2 lodash: 4.17.15 dev: false resolution: - integrity: sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== - /@babel/helper-optimise-call-expression/7.8.3: + integrity: sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg== + /@babel/helper-optimise-call-expression/7.10.1: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== - /@babel/helper-replace-supers/7.9.6: + integrity: sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg== + /@babel/helper-replace-supers/7.10.1: dependencies: - '@babel/helper-member-expression-to-functions': 7.8.3 - '@babel/helper-optimise-call-expression': 7.8.3 - '@babel/traverse': 7.9.6 - '@babel/types': 7.9.6 + '@babel/helper-member-expression-to-functions': 7.10.1 + '@babel/helper-optimise-call-expression': 7.10.1 + '@babel/traverse': 7.10.1 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA== - /@babel/helper-simple-access/7.8.3: + integrity: sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A== + /@babel/helper-simple-access/7.10.1: dependencies: - '@babel/template': 7.8.6 - '@babel/types': 7.9.6 + '@babel/template': 7.10.1 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== - /@babel/helper-split-export-declaration/7.8.3: + integrity: sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw== + /@babel/helper-split-export-declaration/7.10.1: dependencies: - '@babel/types': 7.9.6 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== - /@babel/helper-validator-identifier/7.9.5: + integrity: sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g== + /@babel/helper-validator-identifier/7.10.1: dev: false resolution: - integrity: sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== - /@babel/helpers/7.9.6: + integrity: sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw== + /@babel/helpers/7.10.1: dependencies: - '@babel/template': 7.8.6 - '@babel/traverse': 7.9.6 - '@babel/types': 7.9.6 + '@babel/template': 7.10.1 + '@babel/traverse': 7.10.1 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== - /@babel/highlight/7.9.0: + integrity: sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw== + /@babel/highlight/7.10.1: dependencies: - '@babel/helper-validator-identifier': 7.9.5 + '@babel/helper-validator-identifier': 7.10.1 chalk: 2.4.2 js-tokens: 4.0.0 dev: false resolution: - integrity: sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== - /@babel/parser/7.9.6: + integrity: sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg== + /@babel/parser/7.10.2: dev: false engines: node: '>=6.0.0' hasBin: true resolution: - integrity: sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== - /@babel/template/7.8.6: + integrity: sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ== + /@babel/template/7.10.1: dependencies: - '@babel/code-frame': 7.8.3 - '@babel/parser': 7.9.6 - '@babel/types': 7.9.6 + '@babel/code-frame': 7.10.1 + '@babel/parser': 7.10.2 + '@babel/types': 7.10.2 dev: false resolution: - integrity: sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== - /@babel/traverse/7.9.6: + integrity: sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig== + /@babel/traverse/7.10.1: dependencies: - '@babel/code-frame': 7.8.3 - '@babel/generator': 7.9.6 - '@babel/helper-function-name': 7.9.5 - '@babel/helper-split-export-declaration': 7.8.3 - '@babel/parser': 7.9.6 - '@babel/types': 7.9.6 + '@babel/code-frame': 7.10.1 + '@babel/generator': 7.10.2 + '@babel/helper-function-name': 7.10.1 + '@babel/helper-split-export-declaration': 7.10.1 + '@babel/parser': 7.10.2 + '@babel/types': 7.10.2 debug: 4.1.1 globals: 11.12.0 lodash: 4.17.15 dev: false resolution: - integrity: sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== - /@babel/types/7.9.6: + integrity: sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ== + /@babel/types/7.10.2: dependencies: - '@babel/helper-validator-identifier': 7.9.5 + '@babel/helper-validator-identifier': 7.10.1 lodash: 4.17.15 to-fast-properties: 2.0.0 dev: false resolution: - integrity: sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== + integrity: sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng== /@bahmutov/data-driven/1.0.0: dependencies: check-more-types: 2.24.0 @@ -348,9 +349,9 @@ packages: integrity: sha512-5bHhlTBBq82ti3qPT15TRxkYTFPPQWbnkkQkmHPtqiS1XcTB69cEKd3Jm7Cfi/vkPoyxapmePE9tyA7EzLt8SQ== /@rollup/plugin-commonjs/11.0.2_rollup@1.32.1: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@1.32.1 + '@rollup/pluginutils': 3.1.0_rollup@1.32.1 estree-walker: 1.0.1 - is-reference: 1.1.4 + is-reference: 1.2.0 magic-string: 0.25.7 resolve: 1.17.0 rollup: 1.32.1 @@ -363,7 +364,7 @@ packages: integrity: sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g== /@rollup/plugin-inject/4.0.2_rollup@1.32.1: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@1.32.1 + '@rollup/pluginutils': 3.1.0_rollup@1.32.1 estree-walker: 1.0.1 magic-string: 0.25.7 rollup: 1.32.1 @@ -372,15 +373,15 @@ packages: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-TSLMA8waJ7Dmgmoc8JfPnwUwVZgLjjIAM6MqeIFqPO2ODK36JqE0Cf2F54UTgCUuW8da93Mvoj75a6KAVWgylw== - /@rollup/plugin-json/4.0.3_rollup@1.32.1: + /@rollup/plugin-json/4.1.0_rollup@1.32.1: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@1.32.1 + '@rollup/pluginutils': 3.1.0_rollup@1.32.1 rollup: 1.32.1 dev: false peerDependencies: rollup: ^1.20.0 || ^2.0.0 resolution: - integrity: sha512-QMUT0HZNf4CX17LMdwaslzlYHUKTYGuuk34yYIgZrNdu+pMEfqMS55gck7HEeHBKXHM4cz5Dg1OVwythDdbbuQ== + integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== /@rollup/plugin-multi-entry/3.0.1_rollup@1.32.1: dependencies: matched: 1.0.2 @@ -390,11 +391,13 @@ packages: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-Gcp9E8y68Kx+Jo8zy/ZpiiAkb0W01cSqnxOz6h9bPR7MU3gaoTEdRf7xXYplwli1SBFEswXX588ESj+50Brfxw== - /@rollup/plugin-node-resolve/7.1.3_rollup@1.32.1: + /@rollup/plugin-node-resolve/8.0.1_rollup@1.32.1: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@1.32.1 + '@rollup/pluginutils': 3.1.0_rollup@1.32.1 '@types/resolve': 0.0.8 builtin-modules: 3.1.0 + deep-freeze: 0.0.1 + deepmerge: 4.2.2 is-module: 1.0.0 resolve: 1.17.0 rollup: 1.32.1 @@ -404,18 +407,18 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 resolution: - integrity: sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q== - /@rollup/plugin-replace/2.3.2_rollup@1.32.1: + integrity: sha512-KIeAmueDDaYMqMBnUngLVVZhURwxA12nq/YB6nGm5/JpVyOMwI1fCVU3oL/dAnnLBG7oiPXntO5LHOiMrfNXCA== + /@rollup/plugin-replace/2.3.3_rollup@1.32.1: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@1.32.1 + '@rollup/pluginutils': 3.1.0_rollup@1.32.1 magic-string: 0.25.7 rollup: 1.32.1 dev: false peerDependencies: rollup: ^1.20.0 || ^2.0.0 resolution: - integrity: sha512-KEEL7V2tMNOsbAoNMKg91l1sNXBDoiP31GFlqXVOuV5691VQKzKBh91+OKKOG4uQWYqcFskcjFyh1d5YnZd0Zw== - /@rollup/pluginutils/3.0.10_rollup@1.32.1: + integrity: sha512-XPmVXZ7IlaoWaJLkSCDaa0Y6uVo5XQYHhiMFzOd5qSv5rE+t/UJToPIOE56flKIxBFQI27ONsxb7dqHnwSsjKQ== + /@rollup/pluginutils/3.1.0_rollup@1.32.1: dependencies: '@types/estree': 0.0.39 estree-walker: 1.0.1 @@ -427,7 +430,7 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 resolution: - integrity: sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw== + integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== /@rushstack/node-core-library/3.19.6: dependencies: '@types/node': 10.17.13 @@ -454,21 +457,27 @@ packages: dev: false resolution: integrity: sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q== - /@sinonjs/formatio/3.2.2: + /@sinonjs/fake-timers/6.0.1: dependencies: '@sinonjs/commons': 1.8.0 - '@sinonjs/samsam': 3.3.3 dev: false resolution: - integrity: sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ== - /@sinonjs/samsam/3.3.3: + integrity: sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== + /@sinonjs/formatio/5.0.1: dependencies: '@sinonjs/commons': 1.8.0 - array-from: 2.1.1 - lodash: 4.17.15 + '@sinonjs/samsam': 5.0.3 dev: false resolution: - integrity: sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ== + integrity: sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ== + /@sinonjs/samsam/5.0.3: + dependencies: + '@sinonjs/commons': 1.8.0 + lodash.get: 4.4.2 + type-detect: 4.0.8 + dev: false + resolution: + integrity: sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ== /@sinonjs/text-encoding/0.7.1: dev: false resolution: @@ -488,7 +497,7 @@ packages: /@types/body-parser/1.19.0: dependencies: '@types/connect': 3.4.33 - '@types/node': 14.0.4 + '@types/node': 8.10.61 dev: false resolution: integrity: sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== @@ -514,7 +523,7 @@ packages: integrity: sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== /@types/connect/3.4.33: dependencies: - '@types/node': 14.0.4 + '@types/node': 8.10.61 dev: false resolution: integrity: sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== @@ -529,7 +538,7 @@ packages: /@types/eslint/4.16.8: dependencies: '@types/estree': 0.0.39 - '@types/json-schema': 7.0.4 + '@types/json-schema': 7.0.5 dev: false resolution: integrity: sha512-n0ZvaIpPeBxproRvV+tZoCHRxIoNAk+k+XMvQefKgx3qM3IundoogQBAwiNEnqW0GDP1j1ATe5lFy9xxutFAHg== @@ -541,13 +550,9 @@ packages: dev: false resolution: integrity: sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g== - /@types/events/3.0.0: - dev: false - resolution: - integrity: sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== /@types/express-serve-static-core/4.17.7: dependencies: - '@types/node': 14.0.4 + '@types/node': 8.10.61 '@types/qs': 6.9.3 '@types/range-parser': 1.2.3 dev: false @@ -572,56 +577,39 @@ packages: dev: false resolution: integrity: sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== - /@types/glob/7.1.1: + /@types/glob/7.1.2: dependencies: - '@types/events': 3.0.0 '@types/minimatch': 3.0.3 '@types/node': 8.10.61 dev: false resolution: - integrity: sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + integrity: sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA== /@types/is-buffer/2.0.0: dependencies: '@types/node': 8.10.61 dev: false resolution: integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw== - /@types/json-schema/7.0.4: - dev: false - resolution: - integrity: sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== - /@types/jssha/2.0.0: + /@types/json-schema/7.0.5: dev: false resolution: - integrity: sha512-oBnY3csYnXfqZXDRBJwP1nDDJCW/+VMJ88UHT4DCy0deSXpJIQvMCwYlnmdW4M+u7PiSfQc44LmiFcUbJ8hLEw== + integrity: sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== /@types/jws/3.2.2: dependencies: '@types/node': 8.10.61 dev: false resolution: integrity: sha512-S0ohSSX8ioT65zu8KbG99xKyFV3InIjbM3c8roYqWy4+5HpYPyUHLYykfhM6MEI5B/3s7KSZPGFyCzCrZ2TOZA== - /@types/karma/3.0.9: - dependencies: - '@types/bluebird': 3.5.32 - '@types/node': 8.10.61 - log4js: 4.5.1 - dev: false - resolution: - integrity: sha512-GEhyutKIjZstOI1o9HHu58ApHLdgpyvihiUzLaPK3Ig5LIjRTagtSB5RbwKsmfKjmoh0qPNOCmZTYL37VTTcbA== /@types/long/4.0.1: dev: false resolution: integrity: sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== - /@types/md5/2.1.33: + /@types/md5/2.2.0: dependencies: '@types/node': 8.10.61 dev: false resolution: - integrity: sha512-8+X960EtKLoSblhauxLKy3zzotagjoj3Jt1Tx9oaxUdZEPIBl+mkrUz6PNKpzJgkrKSN9YgkWTA29c0KnLshmA== - /@types/mime-types/2.1.0: - dev: false - resolution: - integrity: sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= + integrity: sha512-JN8OVL/wiDlCWTPzplsgMPu0uE9Q6blwp68rYsfk2G8aokRUQ8XD9MEhZwihfAiQvoyE+m31m6i3GFXwYWomKQ== /@types/mime/2.0.2: dev: false resolution: @@ -665,10 +653,6 @@ packages: dev: false resolution: integrity: sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== - /@types/node/14.0.4: - dev: false - resolution: - integrity: sha512-k3NqigXWRzQZVBDS5D1U70A5E8Qk4Kh+Ha/x4M8Bt9pF0X05eggfnC9+63Usc9Q928hRUIpIhTQaXsZwZBl4Ew== /@types/node/8.10.61: dev: false resolution: @@ -691,7 +675,7 @@ packages: integrity: sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== /@types/resolve/0.0.8: dependencies: - '@types/node': 14.0.4 + '@types/node': 10.17.13 dev: false resolution: integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== @@ -706,17 +690,23 @@ packages: dev: false resolution: integrity: sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug== - /@types/sinon/7.5.2: + /@types/sinon/9.0.4: + dependencies: + '@types/sinonjs__fake-timers': 6.0.1 + dev: false + resolution: + integrity: sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw== + /@types/sinonjs__fake-timers/6.0.1: dev: false resolution: - integrity: sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg== - /@types/tough-cookie/2.3.7: + integrity: sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA== + /@types/tough-cookie/4.0.0: dev: false resolution: - integrity: sha512-rMQbgMGxnLsdn8e9aPVyuN+zMQLrZ2QW8xlv7eWS1mydfGXN+tsTKffcIzd8rGCcLdmi3xvQw2MDaZI1bBNTaw== + integrity: sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A== /@types/tunnel/0.0.0: dependencies: - '@types/node': 14.0.4 + '@types/node': 8.10.61 dev: false resolution: integrity: sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg== @@ -726,20 +716,20 @@ packages: dev: false resolution: integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A== - /@types/underscore/1.10.0: + /@types/underscore/1.10.1: dev: false resolution: - integrity: sha512-ZAbqul7QAKpM2h1PFGa5ETN27ulmqtj0QviYHasw9LffvXZvVHuraOx/FOsIPPDNGZN0Qo1nASxxSfMYOtSoCw== - /@types/uuid/3.4.9: + integrity: sha512-RRQWytGzPUhybKdf7jhfcySkdEHMDsVZ0gU3XVIxeqms1UKu3+ICaTXNaNGAkcUbIJ8SUKpmUIS1z9mDVc7seg== + /@types/uuid/8.0.0: dev: false resolution: - integrity: sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ== - /@types/ws/6.0.4: + integrity: sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== + /@types/ws/7.2.5: dependencies: '@types/node': 8.10.61 dev: false resolution: - integrity: sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg== + integrity: sha512-4UEih9BI1nBKii385G9id1oFrSkLcClbwtDfcYj8HJLQqZVAtb/42vXVrYvRWCcufNF/a+rZD3MxNwghA7UmCg== /@types/xml2js/0.4.5: dependencies: '@types/node': 8.10.61 @@ -750,19 +740,26 @@ packages: dev: false resolution: integrity: sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== - /@types/yargs/13.0.9: + /@types/yargs/15.0.5: dependencies: '@types/yargs-parser': 15.0.0 dev: false resolution: - integrity: sha512-xrvhZ4DZewMDhoH1utLtOAwYQy60eYFoXeje30TzM3VOvQlBwQaEpKFq5m34k1wOw2AKIi2pwtiAjdmhvlBUzg== - /@typescript-eslint/eslint-plugin-tslint/2.34.0_fecc5d28141122f1c31d1ed9d728f517: + integrity: sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== + /@types/yauzl/2.9.1: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/node': 8.10.61 + dev: false + optional: true + resolution: + integrity: sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== + /@typescript-eslint/eslint-plugin-tslint/2.34.0_81790f39504d9fb1ae55c5faec13eab0: + dependencies: + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 lodash: 4.17.15 - tslint: 5.20.1_typescript@3.8.3 - typescript: 3.8.3 + tslint: 5.20.1_typescript@3.9.5 + typescript: 3.9.5 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -772,15 +769,15 @@ packages: typescript: '*' resolution: integrity: sha512-sCPCbFm1qRTzloeMUlHEKfgQH/2u9bUcW7tX5wjzRw1LWzsr+iNXS8I+2or9ep8mlqqE0Vy6hsMm4vVF82M2jw== - /@typescript-eslint/eslint-plugin/2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b: + /@typescript-eslint/eslint-plugin/2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.8.3 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.5 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 functional-red-black-tree: 1.0.1 regexpp: 3.1.0 - tsutils: 3.17.1_typescript@3.8.3 - typescript: 3.8.3 + tsutils: 3.17.1_typescript@3.9.5 + typescript: 3.9.5 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -793,14 +790,14 @@ packages: optional: true resolution: integrity: sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ== - /@typescript-eslint/experimental-utils/2.34.0_eslint@6.8.0+typescript@3.8.3: + /@typescript-eslint/experimental-utils/2.34.0_eslint@6.8.0+typescript@3.9.5: dependencies: - '@types/json-schema': 7.0.4 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.8.3 + '@types/json-schema': 7.0.5 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.5 eslint: 6.8.0 - eslint-scope: 5.0.0 - eslint-utils: 2.0.0 - typescript: 3.8.3 + eslint-scope: 5.1.0 + eslint-utils: 2.1.0 + typescript: 3.9.5 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -809,14 +806,14 @@ packages: typescript: '*' resolution: integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== - /@typescript-eslint/parser/2.34.0_eslint@6.8.0+typescript@3.8.3: + /@typescript-eslint/parser/2.34.0_eslint@6.8.0+typescript@3.9.5: dependencies: '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.8.3 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.8.3 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.5 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.5 eslint: 6.8.0 - eslint-visitor-keys: 1.1.0 - typescript: 3.8.3 + eslint-visitor-keys: 1.2.0 + typescript: 3.9.5 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -828,16 +825,16 @@ packages: optional: true resolution: integrity: sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== - /@typescript-eslint/typescript-estree/2.34.0_typescript@3.8.3: + /@typescript-eslint/typescript-estree/2.34.0_typescript@3.9.5: dependencies: debug: 4.1.1 - eslint-visitor-keys: 1.1.0 + eslint-visitor-keys: 1.2.0 glob: 7.1.6 is-glob: 4.0.1 lodash: 4.17.15 semver: 7.3.2 - tsutils: 3.17.1_typescript@3.8.3 - typescript: 3.8.3 + tsutils: 3.17.1_typescript@3.9.5 + typescript: 3.9.5 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -861,21 +858,21 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - /acorn-jsx/5.2.0_acorn@7.2.0: + /acorn-jsx/5.2.0_acorn@7.3.1: dependencies: - acorn: 7.2.0 + acorn: 7.3.1 dev: false peerDependencies: acorn: ^6.0.0 || ^7.0.0 resolution: integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== - /acorn/7.2.0: + /acorn/7.3.1: dev: false engines: node: '>=0.4.0' hasBin: true resolution: - integrity: sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== + integrity: sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== /adal-node/0.1.28: dependencies: '@types/node': 8.10.61 @@ -918,9 +915,17 @@ packages: node: '>= 6.0.0' resolution: integrity: sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + /agent-base/6.0.0: + dependencies: + debug: 4.1.1 + dev: false + engines: + node: '>= 6.0.0' + resolution: + integrity: sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== /ajv/6.12.2: dependencies: - fast-deep-equal: 3.1.1 + fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.2.2 @@ -1080,10 +1085,6 @@ packages: dev: false resolution: integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - /array-from/2.1.1: - dev: false - resolution: - integrity: sha1-z+nYwmYoudxa7MYqn12PHzUsEZU= /array-uniq/1.0.3: dev: false engines: @@ -1184,10 +1185,10 @@ packages: dev: false resolution: integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - /aws4/1.9.1: + /aws4/1.10.0: dev: false resolution: - integrity: sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + integrity: sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA== /axios/0.19.2: dependencies: follow-redirects: 1.5.10 @@ -1267,10 +1268,6 @@ packages: dev: false resolution: integrity: sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= - /big.js/5.2.2: - dev: false - resolution: - integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== /binary-extensions/2.0.0: dev: false engines: @@ -1687,17 +1684,6 @@ packages: dev: false resolution: integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - /concat-stream/1.6.2: - dependencies: - buffer-from: 1.1.1 - inherits: 2.0.4 - readable-stream: 2.3.7 - typedarray: 0.0.6 - dev: false - engines: - '0': node >= 0.8 - resolution: - integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== /connect/3.7.0: dependencies: debug: 2.6.9 @@ -1776,15 +1762,17 @@ packages: node: '>=6' resolution: integrity: sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA== - /cross-env/6.0.3: + /cross-env/7.0.2: dependencies: - cross-spawn: 7.0.2 + cross-spawn: 7.0.3 dev: false engines: - node: '>=8.0' + node: '>=10.14' + npm: '>=6' + yarn: '>=1' hasBin: true resolution: - integrity: sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag== + integrity: sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw== /cross-spawn/4.0.2: dependencies: lru-cache: 4.1.5 @@ -1804,7 +1792,7 @@ packages: node: '>=4.8' resolution: integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - /cross-spawn/7.0.2: + /cross-spawn/7.0.3: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -1813,7 +1801,7 @@ packages: engines: node: '>= 8' resolution: - integrity: sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== + integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== /crypt/0.0.2: dev: false resolution: @@ -1928,10 +1916,20 @@ packages: node: '>=4.0.0' resolution: integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + /deep-freeze/0.0.1: + dev: false + resolution: + integrity: sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ= /deep-is/0.1.3: dev: false resolution: integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + /deepmerge/4.2.2: + dev: false + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== /default-require-extensions/2.0.0: dependencies: strip-bom: 3.0.0 @@ -1951,7 +1949,7 @@ packages: /degenerator/1.0.4: dependencies: ast-types: 0.13.3 - escodegen: 1.14.1 + escodegen: 1.14.2 esprima: 3.1.3 dev: false resolution: @@ -2045,7 +2043,7 @@ packages: /downlevel-dts/0.4.0: dependencies: shelljs: 0.8.4 - typescript: 3.8.3 + typescript: 3.9.5 dev: false hasBin: true resolution: @@ -2085,12 +2083,6 @@ packages: dev: false resolution: integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - /emojis-list/3.0.0: - dev: false - engines: - node: '>= 4' - resolution: - integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== /encodeurl/1.0.2: dev: false engines: @@ -2140,54 +2132,37 @@ packages: dev: false resolution: integrity: sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== - /enhanced-resolve/4.1.1: - dependencies: - graceful-fs: 4.2.4 - memory-fs: 0.5.0 - tapable: 1.1.3 - dev: false - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== /ent/2.2.0: dev: false resolution: integrity: sha1-6WQhkyWiHQX0RGai9obtbOX13R0= - /errno/0.1.7: - dependencies: - prr: 1.0.1 - dev: false - hasBin: true - resolution: - integrity: sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== /error-ex/1.3.2: dependencies: is-arrayish: 0.2.1 dev: false resolution: integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - /es-abstract/1.17.5: + /es-abstract/1.17.6: dependencies: es-to-primitive: 1.2.1 function-bind: 1.1.1 has: 1.0.3 has-symbols: 1.0.1 - is-callable: 1.1.5 - is-regex: 1.0.5 + is-callable: 1.2.0 + is-regex: 1.1.0 object-inspect: 1.7.0 object-keys: 1.1.1 object.assign: 4.1.0 - string.prototype.trimleft: 2.1.2 - string.prototype.trimright: 2.1.2 + string.prototype.trimend: 1.0.1 + string.prototype.trimstart: 1.0.1 dev: false engines: node: '>= 0.4' resolution: - integrity: sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + integrity: sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== /es-to-primitive/1.2.1: dependencies: - is-callable: 1.1.5 + is-callable: 1.2.0 is-date-object: 1.0.2 is-symbol: 1.0.3 dev: false @@ -2235,7 +2210,7 @@ packages: node: '>=0.8.0' resolution: integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - /escodegen/1.14.1: + /escodegen/1.14.2: dependencies: esprima: 4.0.1 estraverse: 4.3.0 @@ -2248,7 +2223,7 @@ packages: optionalDependencies: source-map: 0.6.1 resolution: - integrity: sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== + integrity: sha512-InuOIiKk8wwuOFg6x9BQXbzjrQhtyXh46K9bqVTPzSo2FnyMBaYGBMC6PhQy7yxxil9vIedFBweQBMK74/7o8A== /escodegen/1.8.1: dependencies: esprima: 2.7.3 @@ -2295,7 +2270,7 @@ packages: node: '>=6' resolution: integrity: sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== - /eslint-scope/5.0.0: + /eslint-scope/5.1.0: dependencies: esrecurse: 4.2.1 estraverse: 4.3.0 @@ -2303,40 +2278,40 @@ packages: engines: node: '>=8.0.0' resolution: - integrity: sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + integrity: sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== /eslint-utils/1.4.3: dependencies: - eslint-visitor-keys: 1.1.0 + eslint-visitor-keys: 1.2.0 dev: false engines: node: '>=6' resolution: integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== - /eslint-utils/2.0.0: + /eslint-utils/2.1.0: dependencies: - eslint-visitor-keys: 1.1.0 + eslint-visitor-keys: 1.2.0 dev: false engines: node: '>=6' resolution: - integrity: sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== - /eslint-visitor-keys/1.1.0: + integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + /eslint-visitor-keys/1.2.0: dev: false engines: node: '>=4' resolution: - integrity: sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + integrity: sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ== /eslint/6.8.0: dependencies: - '@babel/code-frame': 7.8.3 + '@babel/code-frame': 7.10.1 ajv: 6.12.2 chalk: 2.4.2 cross-spawn: 6.0.5 debug: 4.1.1 doctrine: 3.0.0 - eslint-scope: 5.0.0 + eslint-scope: 5.1.0 eslint-utils: 1.4.3 - eslint-visitor-keys: 1.1.0 + eslint-visitor-keys: 1.2.0 espree: 6.2.1 esquery: 1.3.1 esutils: 2.0.3 @@ -2347,9 +2322,9 @@ packages: ignore: 4.0.6 import-fresh: 3.2.1 imurmurhash: 0.1.4 - inquirer: 7.1.0 + inquirer: 7.2.0 is-glob: 4.0.1 - js-yaml: 3.13.1 + js-yaml: 3.14.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.3.0 lodash: 4.17.15 @@ -2364,7 +2339,7 @@ packages: strip-json-comments: 3.1.0 table: 5.4.6 text-table: 0.2.0 - v8-compile-cache: 2.1.0 + v8-compile-cache: 2.1.1 dev: false engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 @@ -2379,9 +2354,9 @@ packages: integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== /espree/6.2.1: dependencies: - acorn: 7.2.0 - acorn-jsx: 5.2.0_acorn@7.2.0 - eslint-visitor-keys: 1.1.0 + acorn: 7.3.1 + acorn-jsx: 5.2.0_acorn@7.3.1 + eslint-visitor-keys: 1.2.0 dev: false engines: node: '>=6.0.0' @@ -2488,7 +2463,7 @@ packages: integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== /execa/3.4.0: dependencies: - cross-spawn: 7.0.2 + cross-spawn: 7.0.3 get-stream: 5.1.0 human-signals: 1.1.1 is-stream: 2.0.0 @@ -2568,16 +2543,19 @@ packages: node: '>=4' resolution: integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - /extract-zip/1.7.0: + /extract-zip/2.0.1: dependencies: - concat-stream: 1.6.2 - debug: 2.6.9 - mkdirp: 0.5.5 + debug: 4.1.1 + get-stream: 5.1.0 yauzl: 2.10.0 dev: false + engines: + node: '>= 10.17.0' hasBin: true + optionalDependencies: + '@types/yauzl': 2.9.1 resolution: - integrity: sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== + integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== /extsprintf/1.3.0: dev: false engines: @@ -2595,10 +2573,10 @@ packages: node: '>= 0.10' resolution: integrity: sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== - /fast-deep-equal/3.1.1: + /fast-deep-equal/3.1.3: dev: false resolution: - integrity: sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== /fast-json-stable-stringify/2.1.0: dev: false resolution: @@ -2617,11 +2595,13 @@ packages: dev: false resolution: integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - /fetch-mock/8.3.2_node-fetch@2.6.0: + /fetch-mock/9.10.1_node-fetch@2.6.0: dependencies: babel-runtime: 6.26.0 core-js: 3.6.5 + debug: 4.1.1 glob-to-regexp: 0.4.1 + is-subset: 0.1.1 lodash.isequal: 4.5.0 node-fetch: 2.6.0 path-to-regexp: 2.4.0 @@ -2636,7 +2616,7 @@ packages: node-fetch: optional: true resolution: - integrity: sha512-RUdLbhIBTvECX20I8htNhmLRrCplCiOP62srst8UQsSV0m8taJe31PBsQybL7OIq5fEf6tnqVGvQ62ZnZ4IFfQ== + integrity: sha512-pTSLpg/Z9LvoqTRu8S9Aeyu4wsyNHLcqON6F5iw1nLHkSOZ+snKgkijwtOVtVsgNzyiZCq9NHRwGxPRpLwth7A== /figures/3.2.0: dependencies: escape-string-regexp: 1.0.5 @@ -2740,14 +2720,12 @@ packages: dev: false resolution: integrity: sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ== - /follow-redirects/1.11.0: - dependencies: - debug: 3.2.6 + /follow-redirects/1.12.1: dev: false engines: node: '>=4.0' resolution: - integrity: sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA== + integrity: sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg== /follow-redirects/1.5.10: dependencies: debug: 3.1.0 @@ -3103,7 +3081,7 @@ packages: node: '>=0.4.7' hasBin: true optionalDependencies: - uglify-js: 3.9.3 + uglify-js: 3.9.4 resolution: integrity: sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== /har-schema/2.0.0: @@ -3276,7 +3254,7 @@ packages: /http-proxy/1.18.1: dependencies: eventemitter3: 4.0.4 - follow-redirects: 1.11.0 + follow-redirects: 1.12.1 requires-port: 1.0.0 dev: false engines: @@ -3312,6 +3290,15 @@ packages: node: '>= 6.0.0' resolution: integrity: sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + /https-proxy-agent/5.0.0: + dependencies: + agent-base: 6.0.0 + debug: 4.1.1 + dev: false + engines: + node: '>= 6' + resolution: + integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== /human-signals/1.1.1: dev: false engines: @@ -3386,7 +3373,7 @@ packages: dev: false resolution: integrity: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - /inquirer/7.1.0: + /inquirer/7.2.0: dependencies: ansi-escapes: 4.3.1 chalk: 3.0.0 @@ -3403,21 +3390,15 @@ packages: through: 2.3.8 dev: false engines: - node: '>=6.0.0' + node: '>=8.0.0' resolution: - integrity: sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== - /interpret/1.2.0: + integrity: sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ== + /interpret/1.4.0: dev: false engines: node: '>= 0.10' resolution: - integrity: sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - /ip-regex/2.1.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== /ip/1.1.5: dev: false resolution: @@ -3456,12 +3437,12 @@ packages: node: '>=4' resolution: integrity: sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - /is-callable/1.1.5: + /is-callable/1.2.0: dev: false engines: node: '>= 0.4' resolution: - integrity: sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + integrity: sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== /is-ci/2.0.0: dependencies: ci-info: 2.0.0 @@ -3545,20 +3526,20 @@ packages: node: '>=0.12.0' resolution: integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - /is-reference/1.1.4: + /is-reference/1.2.0: dependencies: - '@types/estree': 0.0.39 + '@types/estree': 0.0.44 dev: false resolution: - integrity: sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== - /is-regex/1.0.5: + integrity: sha512-ZVxq+5TkOx6GQdnoMm2aRdCKADdcrOWXLGzGT+vIA8DMpqEJaRk5AL1bS80zJ2bjHunVmjdzfCt0e4BymIEqKQ== + /is-regex/1.1.0: dependencies: - has: 1.0.3 + has-symbols: 1.0.1 dev: false engines: node: '>= 0.4' resolution: - integrity: sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + integrity: sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw== /is-stream/1.1.0: dev: false engines: @@ -3571,6 +3552,10 @@ packages: node: '>=8' resolution: integrity: sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + /is-subset/0.1.1: + dev: false + resolution: + integrity: sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= /is-symbol/1.0.3: dependencies: has-symbols: 1.0.1 @@ -3582,7 +3567,7 @@ packages: /is-typed-array/1.1.3: dependencies: available-typed-arrays: 1.0.2 - es-abstract: 1.17.5 + es-abstract: 1.17.6 foreach: 2.0.5 has-symbols: 1.0.1 dev: false @@ -3610,12 +3595,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - /is-wsl/1.1.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= /is-wsl/2.2.0: dependencies: is-docker: 2.0.0 @@ -3674,11 +3653,11 @@ packages: integrity: sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA== /istanbul-lib-instrument/3.3.0: dependencies: - '@babel/generator': 7.9.6 - '@babel/parser': 7.9.6 - '@babel/template': 7.8.6 - '@babel/traverse': 7.9.6 - '@babel/types': 7.9.6 + '@babel/generator': 7.10.2 + '@babel/parser': 7.10.2 + '@babel/template': 7.10.1 + '@babel/traverse': 7.10.1 + '@babel/types': 7.10.2 istanbul-lib-coverage: 2.0.5 semver: 6.3.0 dev: false @@ -3688,7 +3667,7 @@ packages: integrity: sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== /istanbul-lib-instrument/4.0.3: dependencies: - '@babel/core': 7.9.6 + '@babel/core': 7.10.2 '@istanbuljs/schema': 0.1.2 istanbul-lib-coverage: 3.0.0 semver: 6.3.0 @@ -3764,7 +3743,7 @@ packages: esprima: 2.7.3 glob: 5.0.15 handlebars: 4.7.6 - js-yaml: 3.13.1 + js-yaml: 3.14.0 mkdirp: 0.5.5 nopt: 3.0.6 once: 1.4.0 @@ -3815,6 +3794,14 @@ packages: hasBin: true resolution: integrity: sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + /js-yaml/3.14.0: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: false + hasBin: true + resolution: + integrity: sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== /jsbn/0.1.1: dev: false resolution: @@ -3852,13 +3839,6 @@ packages: dev: false resolution: integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - /json5/1.0.1: - dependencies: - minimist: 1.2.5 - dev: false - hasBin: true - resolution: - integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== /json5/2.1.3: dependencies: minimist: 1.2.5 @@ -3895,6 +3875,10 @@ packages: dev: false resolution: integrity: sha512-/jsi/9C0S70zfkT/4UlKQa5E1xKurDnXcQizcww9JSR/Fv+uIbWM2btG+bFcL3iNoK9jIGS0ls9HWLr1iw0kFg== + /jssha/3.1.0: + dev: false + resolution: + integrity: sha512-tPCmr8xSLd8ug6N51k0rbF1tAQWZz1i/uCVHpCH9dl+Te+wM/T375R3lTexP3bk1HPmQ+NlJHQPYLmYuyk6slA== /just-extend/4.1.0: dev: false resolution: @@ -3907,6 +3891,14 @@ packages: dev: false resolution: integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + /jwa/2.0.0: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== /jws/3.2.2: dependencies: jwa: 1.4.1 @@ -3914,6 +3906,13 @@ packages: dev: false resolution: integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + /jws/4.0.0: + dependencies: + jwa: 2.0.0 + safe-buffer: 5.2.1 + dev: false + resolution: + integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== /karma-chai/0.1.0_chai@4.2.0+karma@4.4.1: dependencies: chai: 4.2.0 @@ -4061,7 +4060,7 @@ packages: isbinaryfile: 3.0.3 lodash: 4.17.15 log4js: 4.5.1 - mime: 2.4.5 + mime: 2.4.6 minimatch: 3.0.4 optimist: 0.6.1 qjobs: 1.2.0 @@ -4124,16 +4123,6 @@ packages: node: '>=4' resolution: integrity: sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - /loader-utils/1.4.0: - dependencies: - big.js: 5.2.2 - emojis-list: 3.0.0 - json5: 1.0.1 - dev: false - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== /locate-path/3.0.0: dependencies: p-locate: 3.0.0 @@ -4282,16 +4271,6 @@ packages: node: '>=6.0' resolution: integrity: sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw== - /lolex/4.2.0: - dev: false - resolution: - integrity: sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg== - /lolex/5.1.2: - dependencies: - '@sinonjs/commons': 1.8.0 - dev: false - resolution: - integrity: sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A== /long/4.0.0: dev: false resolution: @@ -4402,15 +4381,6 @@ packages: node: '>= 0.6' resolution: integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - /memory-fs/0.5.0: - dependencies: - errno: 0.1.7 - readable-stream: 2.3.7 - dev: false - engines: - node: '>=4.3.0 <5.0.0 || >=5.10' - resolution: - integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== /memorystream/0.3.1: dev: false engines: @@ -4454,15 +4424,6 @@ packages: node: '>= 0.6' resolution: integrity: sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - /micromatch/4.0.2: - dependencies: - braces: 3.0.2 - picomatch: 2.2.2 - dev: false - engines: - node: '>=8' - resolution: - integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== /mime-db/1.44.0: dev: false engines: @@ -4484,13 +4445,13 @@ packages: hasBin: true resolution: integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - /mime/2.4.5: + /mime/2.4.6: dev: false engines: node: '>=4.0.0' hasBin: true resolution: - integrity: sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== + integrity: sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== /mimic-fn/2.1.0: dev: false engines: @@ -4550,12 +4511,12 @@ packages: hasBin: true resolution: integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - /mocha-junit-reporter/1.23.3_mocha@7.1.2: + /mocha-junit-reporter/1.23.3_mocha@7.2.0: dependencies: debug: 2.6.9 md5: 2.2.1 mkdirp: 0.5.5 - mocha: 7.1.2 + mocha: 7.2.0 strip-ansi: 4.0.0 xml: 1.0.1 dev: false @@ -4563,7 +4524,7 @@ packages: mocha: '>=2.2.5' resolution: integrity: sha512-ed8LqbRj1RxZfjt/oC9t12sfrWsjZ3gNnbhV1nuj9R/Jb5/P3Xb4duv2eCfCDMYH+fEu0mqca7m4wsiVjsxsvA== - /mocha/7.1.2: + /mocha/7.2.0: dependencies: ansi-colors: 3.2.3 browser-stdout: 1.3.1 @@ -4594,7 +4555,7 @@ packages: node: '>= 8.10.0' hasBin: true resolution: - integrity: sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== + integrity: sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== /mock-fs/4.12.0: dev: false resolution: @@ -4608,10 +4569,10 @@ packages: node: '>=4.3.0' resolution: integrity: sha512-lLzfLHcyc10MKQnNUCv7dMcoY/2Qxd6wJfbqCcVk3LDb8An4hF6ohk5AztrvgKhJCqj36uyzi/p5se+tvyD+Wg== - /moment/2.26.0: + /moment/2.27.0: dev: false resolution: - integrity: sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw== + integrity: sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== /ms/2.0.0: dev: false resolution: @@ -4624,14 +4585,14 @@ packages: dev: false resolution: integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - /msal/1.3.1: + /msal/1.3.2: dependencies: tslib: 1.13.0 dev: false engines: node: '>=0.8.0' resolution: - integrity: sha512-xfnn8k3GCTmNV571R8Sy0zeLIrpoMB/10MRG1XkeoiFNIQKY19ncq3isZNCRCMDMRy2qa/vd8exYEhK9EPLHIg== + integrity: sha512-vhcpM/ELL+UI7i4HzCegcbSfPMLqf3kp8mAT840bK1ZaDcb7Z1mOJik1jg202V0yfnh/bBPxZhQP6xFgD9g5eA== /multipipe/0.1.2: dependencies: duplexer2: 0.0.2 @@ -4646,10 +4607,13 @@ packages: dev: false resolution: integrity: sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== - /nanoid/2.1.11: + /nanoid/3.1.10: dev: false + engines: + node: ^10 || ^12 || >=13.7 + hasBin: true resolution: - integrity: sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + integrity: sha512-iZFMXKeXWkxzlfmMfM91gw7YhN2sdJtixY+eZh9V6QWJWTOiurhpKhBMgr82pfzgSqglQgqYSCowEYsz8D++6w== /napi-build-utils/1.0.2: dev: false resolution: @@ -4682,34 +4646,33 @@ packages: dev: false resolution: integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - /nise/1.5.3: + /nise/4.0.3: dependencies: - '@sinonjs/formatio': 3.2.2 + '@sinonjs/commons': 1.8.0 + '@sinonjs/fake-timers': 6.0.1 '@sinonjs/text-encoding': 0.7.1 just-extend: 4.1.0 - lolex: 5.1.2 path-to-regexp: 1.8.0 dev: false resolution: - integrity: sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ== - /nock/11.9.1: + integrity: sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg== + /nock/12.0.3: dependencies: debug: 4.1.1 json-stringify-safe: 5.0.1 lodash: 4.17.15 - mkdirp: 0.5.5 propagate: 2.0.1 dev: false engines: - node: '>= 8.0' + node: '>= 10.13' resolution: - integrity: sha512-U5wPctaY4/ar2JJ5Jg4wJxlbBfayxgKbiAeGh+a1kk6Pwnc2ZEuKviLyDSG6t0uXl56q7AALIxoM6FJrBSsVXA== - /node-abi/2.17.0: + integrity: sha512-QNb/j8kbFnKCiyqi9C5DD0jH/FubFGj5rt9NQFONXwQm3IPB0CULECg/eS3AU1KgZb/6SwUa4/DTRKhVxkGABw== + /node-abi/2.18.0: dependencies: semver: 5.7.1 dev: false resolution: - integrity: sha512-dFRAA0ACk/aBo0TIXQMEWMLUTyWYYT8OBYIzLmEUrQTElGRjxDCvyBZIsDL0QA7QCaj9PrawhOmTEdsuLY4uOQ== + integrity: sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw== /node-abort-controller/1.0.4: dev: false resolution: @@ -4825,7 +4788,7 @@ packages: istanbul-lib-report: 2.0.8 istanbul-lib-source-maps: 3.0.6 istanbul-reports: 2.2.7 - js-yaml: 3.13.1 + js-yaml: 3.14.0 make-dir: 2.1.0 merge-source-map: 1.1.0 resolve-from: 4.0.0 @@ -4886,7 +4849,7 @@ packages: /object.getownpropertydescriptors/2.1.0: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.5 + es-abstract: 1.17.6 dev: false engines: node: '>= 0.8' @@ -4914,14 +4877,6 @@ packages: node: '>=6' resolution: integrity: sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== - /open/6.4.0: - dependencies: - is-wsl: 1.1.0 - dev: false - engines: - node: '>=8' - resolution: - integrity: sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== /open/7.0.4: dependencies: is-docker: 2.0.0 @@ -4960,7 +4915,7 @@ packages: /os-name/3.1.0: dependencies: macos-release: 2.3.0 - windows-release: 3.3.0 + windows-release: 3.3.1 dev: false engines: node: '>=6' @@ -5260,7 +5215,7 @@ packages: minimist: 1.2.5 mkdirp: 0.5.5 napi-build-utils: 1.0.2 - node-abi: 2.17.0 + node-abi: 2.18.0 noop-logger: 0.1.1 npmlog: 4.1.2 pump: 3.0.0 @@ -5352,10 +5307,6 @@ packages: dev: false resolution: integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - /prr/1.0.1: - dev: false - resolution: - integrity: sha1-0/wRS6BplaRexok/SEzrHXj19HY= /pseudomap/1.0.2: dev: false resolution: @@ -5389,24 +5340,24 @@ packages: node: '>=8' resolution: integrity: sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== - /puppeteer/2.1.1: + /puppeteer/3.3.0: dependencies: - '@types/mime-types': 2.1.0 debug: 4.1.1 - extract-zip: 1.7.0 + extract-zip: 2.0.1 https-proxy-agent: 4.0.0 - mime: 2.4.5 - mime-types: 2.1.27 + mime: 2.4.6 progress: 2.0.3 proxy-from-env: 1.1.0 - rimraf: 2.7.1 - ws: 6.2.1 + rimraf: 3.0.2 + tar-fs: 2.1.0 + unbzip2-stream: 1.4.3 + ws: 7.3.0 dev: false engines: - node: '>=8.16.0' + node: '>=10.18.1' requiresBuild: true resolution: - integrity: sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg== + integrity: sha512-23zNqRltZ1PPoK28uRefWJ/zKb5Jhnzbbwbpcna2o5+QMn17F0khq5s1bdH3vPlyj+J36pubccR8wiNA/VE0Vw== /qjobs/1.2.0: dev: false engines: @@ -5671,7 +5622,7 @@ packages: /request/2.88.2: dependencies: aws-sign2: 0.7.0 - aws4: 1.9.1 + aws4: 1.10.0 caseless: 0.12.0 combined-stream: 1.0.8 extend: 3.0.2 @@ -5769,7 +5720,7 @@ packages: /rhea-promise/0.1.15: dependencies: debug: 3.2.6 - rhea: 1.0.21 + rhea: 1.0.22 tslib: 1.13.0 dev: false resolution: @@ -5777,17 +5728,17 @@ packages: /rhea-promise/1.0.0: dependencies: debug: 3.2.6 - rhea: 1.0.21 + rhea: 1.0.22 tslib: 1.13.0 dev: false resolution: integrity: sha512-odAjpbB/IpFFBenPDwPkTWMQldt+DUlMBH9yI48Ct5OgTeDuuQcBnlhB+YCc6g2z8+URiP2ejms88joEanNCaw== - /rhea/1.0.21: + /rhea/1.0.22: dependencies: debug: 3.2.6 dev: false resolution: - integrity: sha512-9ddxyJR0nlWmynukzZTWN+bSYWu7KLHVMkIH/7PpFG5RHfV5t7zXIfZ6rqJSJe9wBAgnNr2Xz41KM2nPujWiFQ== + integrity: sha512-FLZtI4+Nka43ppZUvpdzC0TadWrLsXHhGEDm4WidmqSRVhaXs0Q3jCdCHCoQCBIV80KJU1cj79Xviklx4Avgag== /rimraf/2.6.3: dependencies: glob: 7.1.6 @@ -5832,12 +5783,12 @@ packages: integrity: sha1-YhJaqUCHqt97g+9N+vYptHMTXoc= /rollup-plugin-terser/5.3.0_rollup@1.32.1: dependencies: - '@babel/code-frame': 7.8.3 + '@babel/code-frame': 7.10.1 jest-worker: 24.9.0 rollup: 1.32.1 rollup-pluginutils: 2.8.2 serialize-javascript: 2.1.2 - terser: 4.7.0 + terser: 4.8.0 dev: false peerDependencies: rollup: '>=0.66.0 <3' @@ -5845,33 +5796,32 @@ packages: integrity: sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g== /rollup-plugin-uglify/6.0.4_rollup@1.32.1: dependencies: - '@babel/code-frame': 7.8.3 + '@babel/code-frame': 7.10.1 jest-worker: 24.9.0 rollup: 1.32.1 serialize-javascript: 2.1.2 - uglify-js: 3.9.3 + uglify-js: 3.9.4 dev: false peerDependencies: rollup: '>=0.66.0 <2' resolution: integrity: sha512-ddgqkH02klveu34TF0JqygPwZnsbhHVI6t8+hGTcYHngPkQb5MIHI0XiztXIN/d6V9j+efwHAqEL7LspSxQXGw== - /rollup-plugin-visualizer/3.3.2_rollup@1.32.1: + /rollup-plugin-visualizer/4.0.4_rollup@1.32.1: dependencies: - mkdirp: 0.5.5 - nanoid: 2.1.11 - open: 6.4.0 + nanoid: 3.1.10 + open: 7.0.4 pupa: 2.0.1 rollup: 1.32.1 source-map: 0.7.3 yargs: 15.3.1 dev: false engines: - node: '>=8.10' + node: '>=10' hasBin: true peerDependencies: - rollup: '>=0.60.0' + rollup: '>=1.20.0' resolution: - integrity: sha512-jAJxpC97jHoWU5mQkGw5MroguV8fbZsLPxdV7MdE/fX7lAR+t1UDLpSH41rqdxyJCtqi2/UoDOBuADCyZdHaYA== + integrity: sha512-odkyLiVxCEXh4AWFSl75+pbIapzhEZkOVww8pKUgraOHicSH67MYMnAOHWQVK/BYeD1cCiF/0kk8/XNX2+LM9A== /rollup-pluginutils/2.8.2: dependencies: estree-walker: 0.6.1 @@ -5882,7 +5832,7 @@ packages: dependencies: '@types/estree': 0.0.44 '@types/node': 8.10.61 - acorn: 7.2.0 + acorn: 7.3.1 dev: false hasBin: true resolution: @@ -6027,7 +5977,7 @@ packages: /shelljs/0.8.4: dependencies: glob: 7.1.6 - interpret: 1.2.0 + interpret: 1.4.0 rechoir: 0.6.2 dev: false engines: @@ -6062,18 +6012,18 @@ packages: dev: false resolution: integrity: sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - /sinon/7.5.0: + /sinon/9.0.2: dependencies: '@sinonjs/commons': 1.8.0 - '@sinonjs/formatio': 3.2.2 - '@sinonjs/samsam': 3.3.3 - diff: 3.5.0 - lolex: 4.2.0 - nise: 1.5.3 - supports-color: 5.5.0 + '@sinonjs/fake-timers': 6.0.1 + '@sinonjs/formatio': 5.0.1 + '@sinonjs/samsam': 5.0.3 + diff: 4.0.2 + nise: 4.0.3 + supports-color: 7.1.0 dev: false resolution: - integrity: sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q== + integrity: sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A== /slice-ansi/2.1.0: dependencies: ansi-styles: 3.2.1 @@ -6274,13 +6224,13 @@ packages: dev: false resolution: integrity: sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw== - /spdx-correct/3.1.0: + /spdx-correct/3.1.1: dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.5 dev: false resolution: - integrity: sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== /spdx-exceptions/2.3.0: dev: false resolution: @@ -6330,6 +6280,13 @@ packages: dev: false resolution: integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + /stream-browserify/3.0.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.0 + dev: false + resolution: + integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== /streamroller/1.0.6: dependencies: async: 2.6.3 @@ -6390,7 +6347,7 @@ packages: /string.prototype.padend/3.1.0: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.5 + es-abstract: 1.17.6 dev: false engines: node: '>= 0.4' @@ -6399,34 +6356,14 @@ packages: /string.prototype.trimend/1.0.1: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.5 + es-abstract: 1.17.6 dev: false resolution: integrity: sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - /string.prototype.trimleft/2.1.2: - dependencies: - define-properties: 1.1.3 - es-abstract: 1.17.5 - string.prototype.trimstart: 1.0.1 - dev: false - engines: - node: '>= 0.4' - resolution: - integrity: sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== - /string.prototype.trimright/2.1.2: - dependencies: - define-properties: 1.1.3 - es-abstract: 1.17.5 - string.prototype.trimend: 1.0.1 - dev: false - engines: - node: '>= 0.4' - resolution: - integrity: sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== /string.prototype.trimstart/1.0.1: dependencies: define-properties: 1.1.3 - es-abstract: 1.17.5 + es-abstract: 1.17.6 dev: false resolution: integrity: sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== @@ -6582,12 +6519,6 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== - /tapable/1.1.3: - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== /tar-fs/2.1.0: dependencies: chownr: 1.1.4 @@ -6607,7 +6538,7 @@ packages: dev: false resolution: integrity: sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== - /terser/4.7.0: + /terser/4.8.0: dependencies: commander: 2.20.3 source-map: 0.6.1 @@ -6617,7 +6548,7 @@ packages: node: '>=6.0.0' hasBin: true resolution: - integrity: sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw== + integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== /test-exclude/5.2.3: dependencies: glob: 7.1.6 @@ -6699,16 +6630,16 @@ packages: node: '>=0.8' resolution: integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - /tough-cookie/3.0.1: + /tough-cookie/4.0.0: dependencies: - ip-regex: 2.1.0 psl: 1.8.0 punycode: 2.1.1 + universalify: 0.1.2 dev: false engines: node: '>=6' resolution: - integrity: sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== + integrity: sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== /tr46/1.0.1: dependencies: punycode: 2.1.1 @@ -6721,28 +6652,13 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-WIeWa7WCpFA6QetST301ARgVphM= - /ts-loader/6.2.2_typescript@3.8.3: - dependencies: - chalk: 2.4.2 - enhanced-resolve: 4.1.1 - loader-utils: 1.4.0 - micromatch: 4.0.2 - semver: 6.3.0 - typescript: 3.8.3 - dev: false - engines: - node: '>=8.6' - peerDependencies: - typescript: '*' - resolution: - integrity: sha512-HDo5kXZCBml3EUPcc7RlZOV/JGlLHwppTLEHb3SHnr5V7NXD4klMEkrhJe5wgRbaWsSXi+Y1SIBN/K9B6zWGWQ== - /ts-node/8.10.1_typescript@3.8.3: + /ts-node/8.10.2_typescript@3.9.5: dependencies: arg: 4.1.3 diff: 4.0.2 make-error: 1.3.6 source-map-support: 0.5.19 - typescript: 3.8.3 + typescript: 3.9.5 yn: 3.1.1 dev: false engines: @@ -6751,11 +6667,15 @@ packages: peerDependencies: typescript: '>=2.7' resolution: - integrity: sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw== + integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== /tslib/1.13.0: dev: false resolution: integrity: sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + /tslib/2.0.0: + dev: false + resolution: + integrity: sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g== /tslint-config-prettier/1.18.0: dev: false engines: @@ -6763,22 +6683,22 @@ packages: hasBin: true resolution: integrity: sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - /tslint/5.20.1_typescript@3.8.3: + /tslint/5.20.1_typescript@3.9.5: dependencies: - '@babel/code-frame': 7.8.3 + '@babel/code-frame': 7.10.1 builtin-modules: 1.1.1 chalk: 2.4.2 commander: 2.20.3 diff: 4.0.2 glob: 7.1.6 - js-yaml: 3.13.1 + js-yaml: 3.14.0 minimatch: 3.0.4 mkdirp: 0.5.5 resolve: 1.17.0 semver: 5.7.1 tslib: 1.13.0 - tsutils: 2.29.0_typescript@3.8.3 - typescript: 3.8.3 + tsutils: 2.29.0_typescript@3.9.5 + typescript: 3.9.5 dev: false engines: node: '>=4.8.0' @@ -6787,19 +6707,19 @@ packages: typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev' resolution: integrity: sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== - /tsutils/2.29.0_typescript@3.8.3: + /tsutils/2.29.0_typescript@3.9.5: dependencies: tslib: 1.13.0 - typescript: 3.8.3 + typescript: 3.9.5 dev: false peerDependencies: typescript: '>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev' resolution: integrity: sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - /tsutils/3.17.1_typescript@3.8.3: + /tsutils/3.17.1_typescript@3.9.5: dependencies: tslib: 1.13.0 - typescript: 3.8.3 + typescript: 3.9.5 dev: false engines: node: '>= 6' @@ -6858,10 +6778,6 @@ packages: node: '>= 0.6' resolution: integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - /typedarray/0.0.6: - dev: false - resolution: - integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= /typedoc-default-themes/0.6.3: dependencies: backbone: 1.4.0 @@ -6899,14 +6815,14 @@ packages: hasBin: true resolution: integrity: sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== - /typescript/3.8.3: + /typescript/3.9.5: dev: false engines: node: '>=4.2.0' hasBin: true resolution: - integrity: sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== - /uglify-js/3.9.3: + integrity: sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== + /uglify-js/3.9.4: dependencies: commander: 2.20.3 dev: false @@ -6914,11 +6830,18 @@ packages: node: '>=0.8.0' hasBin: true resolution: - integrity: sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA== + integrity: sha512-8RZBJq5smLOa7KslsNsVcSH+KOXf1uDU8yqLeNuVKwmT0T3FA0ZoXlinQfRad7SDcbZZRZE4ov+2v71EnxNyCA== /ultron/1.1.1: dev: false resolution: integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + /unbzip2-stream/1.4.3: + dependencies: + buffer: 5.6.0 + through: 2.3.8 + dev: false + resolution: + integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== /underscore/1.10.2: dev: false resolution: @@ -7002,13 +6925,18 @@ packages: hasBin: true resolution: integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - /v8-compile-cache/2.1.0: + /uuid/8.1.0: + dev: false + hasBin: true + resolution: + integrity: sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== + /v8-compile-cache/2.1.1: dev: false resolution: - integrity: sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + integrity: sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== /validate-npm-package-license/3.0.4: dependencies: - spdx-correct: 3.1.0 + spdx-correct: 3.1.1 spdx-expression-parse: 3.0.1 dev: false resolution: @@ -7087,7 +7015,7 @@ packages: /which-typed-array/1.1.2: dependencies: available-typed-arrays: 1.0.2 - es-abstract: 1.17.5 + es-abstract: 1.17.6 foreach: 2.0.5 function-bind: 1.1.1 has-symbols: 1.0.1 @@ -7119,14 +7047,14 @@ packages: dev: false resolution: integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - /windows-release/3.3.0: + /windows-release/3.3.1: dependencies: execa: 1.0.0 dev: false engines: node: '>=6' resolution: - integrity: sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ== + integrity: sha512-Pngk/RDCaI/DkuHPlGTdIkDiTAnAkyMjoQMZqRsxydNl1qGXNIoZrB7RK8g53F2tEgQBMqQJHQdYZuQEEAu54A== /word-wrap/1.2.3: dev: false engines: @@ -7191,12 +7119,6 @@ packages: dev: false resolution: integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - /ws/6.2.1: - dependencies: - async-limiter: 1.0.1 - dev: false - resolution: - integrity: sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== /ws/7.3.0: dev: false engines: @@ -7387,14 +7309,14 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 delay: 4.3.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -7412,21 +7334,21 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-+U50rbtOuP97e6o1LzJHG461q/ATB9T6B9X7nFmakGCLoaM+9IJ5Uy24i0Wl53FLewyKPt4JIgG74uSthuuFfQ== + integrity: sha512-CP1NBDwa1NQHEdixtTsw4YFZpb9n5A1RZQZf6eFR73qUfOPHGJOj6TCFSypUSr7V2tHLzvfa9j4HG8ONyLNIfw== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/ai-form-recognizer.tgz': @@ -7435,20 +7357,20 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -7469,8 +7391,8 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 @@ -7478,15 +7400,15 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - sinon: 7.5.0 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/ai-form-recognizer' resolution: - integrity: sha512-S7DeKnzahpdWfC5DkYUYawPn+AZQoXPDRfNrVw9aAQ/Sx2EgXBl0kyPw1KjDEGx5gPfv3vX9d7I4MySf2gKBKw== + integrity: sha512-P0PSfCHnohJwrhyAU9rO7IkxOvg1bO2qkravGsjWMLAo2Fcj1GQKcbkXf+DdjRqT+DX8UmtaCXHoRgX8UFV+ow== tarball: 'file:projects/ai-form-recognizer.tgz' version: 0.0.0 'file:projects/ai-text-analytics.tgz': @@ -7495,20 +7417,20 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -7528,8 +7450,8 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 @@ -7537,15 +7459,15 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - sinon: 7.5.0 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/ai-text-analytics' resolution: - integrity: sha512-0h0t7T1G3FanBlSu7gQaeigaX8F4Q6p2e+zkeh73smykH9DXnNtkiaczzbosEODnaeq0Bnn4iEXDStk/mqrXnw== + integrity: sha512-B0be6oZmrFXIvVTYM45Dj1ftw9Z8q2Vq/TGSqH9qipxxkz2WE+sB3V5+diwfoUPssDJYJybfvisjmz6AkS00DA== tarball: 'file:projects/ai-text-analytics.tgz' version: 0.0.0 'file:projects/app-configuration.tgz': @@ -7554,14 +7476,14 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 + '@types/sinon': 9.0.4 assert: 1.5.0 chai: 4.2.0 dotenv: 8.2.0 @@ -7571,24 +7493,24 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 - nock: 11.9.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nock: 12.0.3 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 7.5.0 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + sinon: 9.0.2 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 dev: false name: '@rush-temp/app-configuration' resolution: - integrity: sha512-eqUTjcKmzKdmatFRLb/vYOOsUmvWygq+Simg4HuMa8E87xSm55mD2LFtqwRUhtYaWh0y739viBXjO5663aAgjQ== + integrity: sha512-/l/1QpBF1T8FJGve4d5OQEXHRcYKCQQJpeqY1lv32gJoo09wot54tviqFeqCnaXioTNiYzipcuWPb4FtAZ0Jhw== tarball: 'file:projects/app-configuration.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': @@ -7596,27 +7518,26 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 '@types/debug': 4.1.5 '@types/is-buffer': 2.0.0 - '@types/jssha': 2.0.0 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 async-lock: 1.2.4 buffer: 5.6.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 downlevel-dts: 0.4.0 @@ -7627,86 +7548,86 @@ packages: eslint-plugin-promise: 4.2.1 events: 3.1.0 is-buffer: 2.0.4 - jssha: 2.4.2 + jssha: 3.1.0 karma: 4.4.1 karma-chrome-launcher: 3.1.0 karma-mocha: 1.3.0 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 process: 0.11.10 - puppeteer: 2.1.1 - rhea: 1.0.21 + puppeteer: 3.3.0 + rhea: 1.0.22 rhea-promise: 1.0.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 7.5.0 - stream-browserify: 2.0.2 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + sinon: 9.0.2 + stream-browserify: 3.0.0 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 url: 0.11.0 util: 0.12.3 ws: 7.3.0 dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-NdEb9MmK1wTvolMck3O7SchTQRpdvTeJsWLPjaXj4lfhKiE+6UkHkiltM4Hz19Pse6P11CLQOfN0DEbV3kEEIA== + integrity: sha512-vQuyRkXvsxNXFld08NdABYHJ7GykKzizzfXA/PjeGjlzVQGSkdycxTAG8iu/g+/IAw04CWNIvgo0UODO79lOdQ== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': dependencies: - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 npm-run-all: 4.1.5 nyc: 14.1.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 shx: 0.3.2 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-1qMPTU5XX+O3mEz4qLE0XDqGlnMxYZn/m6/6/Z5tx8b4Ax/SbMlhA0ZAc/HxZmGuOxVo//aN3rSWatio1drukg== + integrity: sha512-hEat51eRrK1WH8H5b2lAHXb2p9iyuUsbzVg6OFxnyKIOFbseeTx4vyQgeNrpcA/qJhosheJR78ybSj9z3opvGw== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': dependencies: '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 prettier: 1.19.1 - typescript: 3.8.3 + typescript: 3.9.5 dev: false name: '@rush-temp/core-asynciterator-polyfill' resolution: - integrity: sha512-69f+DjfbfiipGVM6Vx0KXehWvmc5YstJn+Fayg8f1/OzRbqIBw1skZTIxQATkZUOOSFHhYg5ALjbkdNRTNgMng== + integrity: sha512-H+PZImxHoD4ZcrJie2qstZmXk1/DHGyIq9b+eSSv4TjT9VsCbeaaEEaZ/iCsoUyzDuLWTj2MYqNEgU4L9ROTzA== tarball: 'file:projects/core-asynciterator-polyfill.tgz' version: 0.0.0 'file:projects/core-auth.tgz': @@ -7715,16 +7636,16 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 downlevel-dts: 0.4.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -7732,21 +7653,21 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 inherits: 2.0.4 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-XOCLdTLVtEDNsvnHXQQ3g9x/3cuc0i+gPMzAVW07gtkfaGsad9L21SwkuDj56HOscIcUpBlY/RH+HS5wvZVBBA== + integrity: sha512-i2QFSjrS1hTQZZZNL5JoYk3cfdydWOs6eZNq6bzRBuhICjXfOHx5TARU8q0VsN4KCfvueMQzuocD6SE5ugVAEA== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': @@ -7757,26 +7678,25 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 '@types/chai': 4.2.11 '@types/express': 4.17.6 - '@types/glob': 7.1.1 - '@types/karma': 3.0.9 + '@types/glob': 7.1.2 '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/node-fetch': 2.5.7 - '@types/sinon': 7.5.2 - '@types/tough-cookie': 2.3.7 + '@types/sinon': 9.0.4 + '@types/tough-cookie': 4.0.0 '@types/tunnel': 0.0.1 - '@types/uuid': 3.4.9 + '@types/uuid': 8.0.0 '@types/xml2js': 0.4.5 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 babel-runtime: 6.26.0 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 downlevel-dts: 0.4.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -7784,7 +7704,7 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 express: 4.17.1 - fetch-mock: 8.3.2_node-fetch@2.6.0 + fetch-mock: 9.10.1_node-fetch@2.6.0 form-data: 3.0.0 glob: 7.1.6 karma: 4.4.1 @@ -7795,59 +7715,63 @@ packages: karma-mocha: 1.3.0 karma-rollup-preprocessor: 7.0.5_rollup@1.32.1 karma-sourcemap-loader: 0.3.7 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 node-fetch: 2.6.0 npm-run-all: 4.1.5 nyc: 14.1.1 prettier: 1.19.1 process: 0.11.10 - puppeteer: 2.1.1 + puppeteer: 3.3.0 regenerator-runtime: 0.13.5 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 shx: 0.3.2 - sinon: 7.5.0 - tough-cookie: 3.0.1 - ts-loader: 6.2.2_typescript@3.8.3 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 + sinon: 9.0.2 + tough-cookie: 4.0.0 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 tunnel: 0.0.6 - typescript: 3.8.3 - uglify-js: 3.9.3 - uuid: 3.4.0 + typescript: 3.9.5 + uglify-js: 3.9.4 + uuid: 8.1.0 xhr-mock: 2.5.1 xml2js: 0.4.23 dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-C3Rzc3Ll8X1bMewSo78GuDbLJrBvlG934evHz110L/pbHgkIMpwCHZgeyCiu+4BX7+J5hvMr9n4+a9nO6o7MZQ== + integrity: sha512-B2ZGxHSjobksvIEc9HpR0NPX6fxxUOVIMKcioUy4z8EfgKCS4SCTWkeHgPPXa7fDG4CHitae+VmTzpnD5q/pWQ== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-https.tgz': dependencies: + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@types/uuid': 8.0.0 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 downlevel-dts: 0.4.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 + form-data: 3.0.0 + https-proxy-agent: 5.0.0 inherits: 2.0.4 karma: 4.4.1 karma-chrome-launcher: 3.1.0 @@ -7860,21 +7784,24 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 + source-map-support: 0.5.19 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 + uuid: 8.1.0 dev: false name: '@rush-temp/core-https' resolution: - integrity: sha512-ghT8B1K5CYEO7RLp2joI4uvwHB62Y5bUjRF2z8oZgK582YvdCWUJmiPVExpY8pGK+/5hnPRg49LSEbmWu6Vaeg== + integrity: sha512-bEkkjOgJgxKr5ZOi1FJTbApY36v1Xx50acbjFHH6sIBCLLqMDVNw0xV4sneRBHux43ZeBqrgieStp4Fsj2VNag== tarball: 'file:projects/core-https.tgz' version: 0.0.0 'file:projects/core-lro.tgz': @@ -7883,13 +7810,13 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 eslint: 6.8.0 @@ -7909,8 +7836,8 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 npm-run-all: 4.1.5 nyc: 14.1.1 prettier: 1.19.1 @@ -7919,33 +7846,33 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 dev: false name: '@rush-temp/core-lro' resolution: - integrity: sha512-rFIGXMcDoORghUnDOFgkyV1b9j22vLg2WtsAinDKtg8rspMwqYX7CJaSY+v1AIsfCrEwLtlueSitAQuE8NYpJQ== + integrity: sha512-bI++qCtuicjHHHOYy/0UZeNfseXzdhVCQXrLUqKiw4ew8uGVnHrp+VYdQelc+ZJIBCBr9MC8eaVCmFKfhuu4Fw== tarball: 'file:projects/core-lro.tgz' version: 0.0.0 'file:projects/core-paging.tgz': dependencies: '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 prettier: 1.19.1 - typescript: 3.8.3 + typescript: 3.9.5 dev: false name: '@rush-temp/core-paging' resolution: - integrity: sha512-YM2ktK/Xu8ZPTM8d3yWvGN1SdHr+Ekw3j6bu8PcxVO8PjCqkkQZ/cetvFKWRJtiApxNjMRC+YnBbPRgRhn8nWA== + integrity: sha512-jLeKpwyTeRLv1nD/QCwOzTvrQAceI3vZS3lGSxxR569SGdt4luWEKPxpql0GZ5jXLX8vg+t1dbnxeUcHikJWPw== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 'file:projects/core-tracing.tgz': @@ -7954,44 +7881,44 @@ packages: '@opencensus/web-types': 0.0.7 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 inherits: 2.0.4 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/core-tracing' resolution: - integrity: sha512-GAOODMqIJbrrtg5NvzYVmeU5oEyw31NbKJvcgXZJuCvoL+UjHxAXhhl5oShvgKx54Z6OqSDcmHgWJi2sWAKTHw== + integrity: sha512-DXwjq+nIqEQLgnm1tiM6e+eyySwsWYp0Kdzli3RjPzmxAmD382fIrChGURS7SU8TbXu8YzPJSq5aCAAg+RLYIg== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/cosmos.tgz': dependencies: '@azure/eslint-plugin-azure-sdk': 2.0.1_984cbb313f9ea271f36cadd8f9814e06 '@microsoft/api-extractor': 7.7.11 - '@rollup/plugin-json': 4.0.3_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 '@types/debug': 4.1.5 '@types/fast-json-stable-stringify': 2.0.0 @@ -8000,14 +7927,14 @@ packages: '@types/node-fetch': 2.5.7 '@types/priorityqueuejs': 1.0.1 '@types/semaphore': 1.1.0 - '@types/sinon': 7.5.2 + '@types/sinon': 9.0.4 '@types/tunnel': 0.0.1 - '@types/underscore': 1.10.0 - '@types/uuid': 3.4.9 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/eslint-plugin-tslint': 2.34.0_fecc5d28141122f1c31d1ed9d728f517 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 - cross-env: 6.0.3 + '@types/underscore': 1.10.1 + '@types/uuid': 8.0.0 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/eslint-plugin-tslint': 2.34.0_81790f39504d9fb1ae55c5faec13eab0 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 + cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 downlevel-dts: 0.4.0 @@ -8019,8 +7946,8 @@ packages: esm: 3.2.25 execa: 3.4.0 fast-json-stable-stringify: 2.1.0 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 node-abort-controller: 1.0.4 node-fetch: 2.6.0 os-name: 3.1.0 @@ -8032,20 +7959,20 @@ packages: rollup: 1.32.1 rollup-plugin-local-resolve: 1.0.7 semaphore: 1.1.0 - sinon: 7.5.0 + sinon: 9.0.2 snap-shot-it: 7.9.3 source-map-support: 0.5.19 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - tslint: 5.20.1_typescript@3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + tslint: 5.20.1_typescript@3.9.5 tslint-config-prettier: 1.18.0 typedoc: 0.15.8 - typescript: 3.8.3 - uuid: 3.4.0 + typescript: 3.9.5 + uuid: 8.1.0 dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-KQvL7GazobTLvfKydVCzGymriq5ryD4MWzKdofwEG0KYiQf/UANkqcVagjJjGJhUg6ivN9iLOKztCMvHyj0VFw== + integrity: sha512-AEA+nq1Up+clYIiCU7RhTM+oZZ/EaPeJ44lZCT5K+9zIQhdVK7SnXEh7R1W7ySRlBc/wvUH2v5M2gZPa2pYcPA== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/eslint-plugin-azure-sdk.tgz': @@ -8054,13 +7981,13 @@ packages: '@types/chai': 4.2.11 '@types/eslint': 4.16.8 '@types/estree': 0.0.39 - '@types/glob': 7.1.1 + '@types/glob': 7.1.2 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.8.3 - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/experimental-utils': 2.34.0_eslint@6.8.0+typescript@3.9.5 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 + '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.5 bluebird: 3.7.2 chai: 4.2.0 eslint: 6.8.0 @@ -8068,17 +7995,17 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 glob: 7.1.6 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 prettier: 1.19.1 rimraf: 3.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/eslint-plugin-azure-sdk' resolution: - integrity: sha512-4rgkTckc9Q3R25MDEIybhrx1ZpMwK6PXTh2/cLjbpZ04+AVT0yctfN5HQuFKWOoJ/j/duroFLNoTs38/dsgtRA== + integrity: sha512-xuus5wsdkMICaNiqnO+aFLntroiwfATOf5ksUz0FabvdgHk73JqiD4K0k77lraWQxTo48ww+fsufinYd8Jp/cQ== tarball: 'file:projects/eslint-plugin-azure-sdk.tgz' version: 0.0.0 'file:projects/event-hubs.tgz': @@ -8088,10 +8015,10 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 @@ -8100,18 +8027,17 @@ packages: '@types/long': 4.0.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@types/uuid': 3.4.9 - '@types/ws': 6.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@types/uuid': 8.0.0 + '@types/ws': 7.2.5 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - async-lock: 1.2.4 buffer: 5.6.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 chai-string: 1.5.0_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 downlevel-dts: 0.4.0 @@ -8121,9 +8047,6 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - https-proxy-agent: 3.0.1 - is-buffer: 2.0.4 - jssha: 2.4.2 karma: 4.4.1 karma-chrome-launcher: 3.1.0 karma-coverage: 2.0.2 @@ -8135,28 +8058,28 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 process: 0.11.10 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rhea-promise: 1.0.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 7.5.0 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 - uuid: 3.4.0 + sinon: 9.0.2 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + uuid: 8.1.0 ws: 7.3.0 dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-l6eRUH+L5Yh7Ddob1ydBnri28dFbcnPrIwuAl6D02yO7HcAKEJeAMvIMtHdsToxVyeccOsdKkXjcNhs1tUCtWg== + integrity: sha512-J7EZ5qh4xzw3vYG95t2MkavJiaq9ViaD2YHAkFDOjjaLuh8MEc+lF3ocZQOcfnTYyh/IPPxHvbugQ4FEyS12sQ== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -8166,10 +8089,10 @@ packages: '@azure/ms-rest-nodeauth': 0.9.3 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/async-lock': 1.1.2 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 @@ -8177,16 +8100,16 @@ packages: '@types/debug': 4.1.5 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/uuid': 3.4.9 - '@types/ws': 6.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/uuid': 8.0.0 + '@types/ws': 7.2.5 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 async-lock: 1.2.4 azure-storage: 2.10.3 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 chai-string: 1.5.0_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 eslint: 6.8.0 @@ -8195,9 +8118,9 @@ packages: eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 - https-proxy-agent: 3.0.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + https-proxy-agent: 5.0.0 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 path-browserify: 1.0.1 prettier: 1.19.1 @@ -8205,15 +8128,15 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-uglify: 6.0.4_rollup@1.32.1 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 - uuid: 3.4.0 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + uuid: 8.1.0 ws: 7.3.0 dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-o0lja9JmvdssBTAv5EqriAn2EQ3/xc3EQOFfbtHmwVSdlmXANyFx69xu7mcWnGd3dvDfJVCCYnlEC8ZN6LX5dw== + integrity: sha512-v8//igZBDMs+pWxrztd05w2tLFKpZA2XZVqaXKMVMUGVrBZOspFux/4jR2xRJYWgpgzu/u/cJ6B8Tj9XBkI5Pw== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/eventhubs-checkpointstore-blob.tgz': @@ -8221,23 +8144,23 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 '@types/chai-string': 1.4.2 '@types/debug': 4.1.5 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 chai-string: 1.5.0_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 debug: 4.1.1 dotenv: 8.2.0 eslint: 6.8.0 @@ -8260,8 +8183,8 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 @@ -8269,15 +8192,15 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/eventhubs-checkpointstore-blob' resolution: - integrity: sha512-UOWIkdN9h/drjlrM19TQ9n2F90F87ve76xhXc4vS6G9MgbDf4/DEJVghHMaavVkWRk8t4hzouyY86E7iwiHkLg== + integrity: sha512-WeR08au7K0lgwkV/nQjy3NP/6dOrJ9YBd2C4fPnaW01kDV65CeAwtbNbDRR0gqfzGZYi62Q3gFEdfzsuJjL2Wg== tarball: 'file:projects/eventhubs-checkpointstore-blob.tgz' version: 0.0.0 'file:projects/identity.tgz': @@ -8286,25 +8209,25 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/express': 4.17.6 '@types/jws': 3.2.2 '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/qs': 6.9.3 - '@types/uuid': 3.4.9 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/uuid': 8.0.0 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 eslint: 6.8.0 events: 3.1.0 express: 4.17.1 inherits: 2.0.4 - jws: 3.2.2 + jws: 4.0.0 karma: 4.4.1 karma-chrome-launcher: 3.1.0 karma-coverage: 2.0.2 @@ -8314,26 +8237,26 @@ packages: karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 keytar: 5.6.0 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 - msal: 1.3.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + msal: 1.3.2 open: 7.0.4 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 qs: 6.9.4 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 - uuid: 3.4.0 + uuid: 8.1.0 dev: false name: '@rush-temp/identity' resolution: - integrity: sha512-ZMogVt0EVtES/40MkMWXhfAillgcml9v8rK4KtH9x5l5Q1rBdlfN2nwLA7/fGtWd6kwmY6KezRCrM4TaPnksNA== + integrity: sha512-CkIN2Ipd9woAinYzfwgONBGFRPN4H1uANREOcTDT+tcKzT2+OR4jArnbnTX1KDygfPu7mrsGEOcNt/PYhyvGXw== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': @@ -8342,20 +8265,21 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/query-string': 6.2.0 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -8377,49 +8301,61 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 query-string: 5.1.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 url: 0.11.0 dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-8zMe3ibaW81OgzRunWJHW57GK5WXNhYwHEwrl4Z9/whvItZgPGuk9F7E+S5PIRk801MRfO8Ipq9YpL7co9Sa2A== + integrity: sha512-Z1PeLBZEpC6G6hzlKont/PQ8OKj0dzr31deJdnOXSN1mebC6JtMo7Pl79Qzl6F+FjAcxSBUAWbHaxW7WTQJN7A== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 + 'file:projects/keyvault-common.tgz': + dependencies: + tslib: 2.0.0 + typescript: 3.9.5 + dev: false + name: '@rush-temp/keyvault-common' + resolution: + integrity: sha512-0FhcouFj7LZXJzuUWtSIbX4sfRzNgUOFZBWzlTHpOrexSj13GUPi1AvuQ9sQkuzXwXIwosVFO8rVjfOgh2QtWQ== + tarball: 'file:projects/keyvault-common.tgz' + version: 0.0.0 'file:projects/keyvault-keys.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/query-string': 6.2.0 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -8441,27 +8377,28 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 query-string: 5.1.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 url: 0.11.0 dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-9qXoMnPOjenPLWHxP0t3sk59kTP7yTEHUkk+6G+RKB0R5ZJNf+nx0hRiD60O49zi3+dyOoiNkoQ1xPupOsXM9w== + integrity: sha512-Rm8+Z6FjPz3tGtRCyfMzMFwwYbeCSM9P2C/kKDvpSNDXfegvLr4AXnj3XGkUhh8nJT10FGxtpOqX12ZXcbBAPA== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': @@ -8470,20 +8407,21 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/query-string': 6.2.0 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -8505,27 +8443,28 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 query-string: 5.1.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 - tslib: 1.13.0 - typescript: 3.8.3 - uglify-js: 3.9.3 + tslib: 2.0.0 + typescript: 3.9.5 + uglify-js: 3.9.4 url: 0.11.0 dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-9cHdwrE0M3YNfql2qQG1mHrppa2CQEKFL3IqrnD7A61UQW2NBWWwCeuESIWXkTb9nkX0he+E8XW5hvIklyDH8A== + integrity: sha512-aUW6Ha5QeBesanZehFAF26ykukKgLITTSfO0KvlsN4H7PUeMqdoXfIKleqZKq5QUTiZUDP72MALnqra9doD1fg== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/logger.tgz': @@ -8533,17 +8472,17 @@ packages: '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 delay: 4.3.0 dotenv: 8.2.0 eslint: 6.8.0 @@ -8562,23 +8501,23 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - sinon: 7.5.0 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + sinon: 9.0.2 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/logger' resolution: - integrity: sha512-MhNFck4q25CPlZFkorhQezRsAXK9Z/TNs5GGF0Ng0JB1c2hOu3VzR9p3SQ8e1l9yKZpEriD009K1Sz9mn8tl7g== + integrity: sha512-DeR/cH/+CueWgvrfb5NOhy4FZD6drOOP9/u7zHTT8UHDEOVrPfE3VHbz5ZgXY5HjbMrs46qRmy/UbZ/gQifGGg== tarball: 'file:projects/logger.tgz' version: 0.0.0 'file:projects/search-documents.tgz': @@ -8587,18 +8526,18 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/sinon': 7.5.2 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 @@ -8619,8 +8558,8 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 @@ -8628,16 +8567,16 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - sinon: 7.5.0 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/search-documents' resolution: - integrity: sha512-NZTV+lS2jZrfA1ylRg2mQ8BVZNF1709uChNt5oMi1x0A/+n0krX2Fox27sYf7tDrVdsM1IOt4nPIuopG49p7IQ== + integrity: sha512-dty3mODPX8OTZhW5GmWkYtvIK4HeGOrkNkIH6nph4iKH6PjR+Ed1+a3Me9Bo8CA4GBLu19HGNe0t3WHP6BnUGw== tarball: 'file:projects/search-documents.tgz' version: 0.0.0 'file:projects/service-bus.tgz': @@ -8647,28 +8586,27 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 - '@types/async-lock': 1.1.2 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/chai-as-promised': 7.1.2 '@types/debug': 4.1.5 - '@types/glob': 7.1.1 + '@types/glob': 7.1.2 '@types/is-buffer': 2.0.0 '@types/long': 4.0.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@types/ws': 6.0.4 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@types/ws': 7.2.5 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 buffer: 5.6.0 chai: 4.2.0 chai-as-promised: 7.1.1_chai@4.2.0 chai-exclude: 2.0.2_chai@4.2.0 - cross-env: 6.0.3 + cross-env: 7.0.2 debug: 4.1.1 delay: 4.3.0 dotenv: 8.2.0 @@ -8680,7 +8618,6 @@ packages: eslint-plugin-promise: 4.2.1 esm: 3.2.25 glob: 7.1.6 - https-proxy-agent: 3.0.1 is-buffer: 2.0.4 karma: 4.4.1 karma-chrome-launcher: 3.1.0 @@ -8694,28 +8631,28 @@ packages: karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 long: 4.0.0 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 - moment: 2.26.0 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + moment: 2.27.0 nyc: 14.1.1 prettier: 1.19.1 process: 0.11.10 promise: 8.1.0 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rhea-promise: 1.0.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 ws: 7.3.0 dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-b828xmJrpi/+VYklayvTWJdkjz/Qvl6R7n2VGqZ1FuRcrruU4guNtaXPLr2CbUonsWeihhv5qhXKR4lc+j5ciQ== + integrity: sha512-wvwki9VUk1OBa5vOKDNUtNv48hISwA4O1yQGklLVg3K/WdRmz/a7r4stTezbEKbjTk0mOYSU2hX3HgUSssIisA== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': @@ -8725,14 +8662,14 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 downlevel-dts: 0.4.0 es6-promise: 4.2.8 @@ -8757,26 +8694,26 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-C9XlnxCE4aMhIOrRe5C9tT3/keD6MMAguq/1rUgruetoHeYnAd1q65NGI5YuKKIQ3BfGo3YYiLC/rOu1F3S8og== + integrity: sha512-X5SpvKqUvP2trk070l4e4dFQPQJmfl5dTbJsXHfr2/KWnjsi2h0HwbzrugwGrfcO5z3LntB5cXnkvPYCooLbkQ== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file-datalake.tgz': @@ -8786,17 +8723,16 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/fs-extra': 8.1.1 '@types/mocha': 7.0.2 - '@types/nise': 1.4.0 '@types/node': 8.10.61 '@types/query-string': 6.2.0 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 downlevel-dts: 0.4.0 es6-promise: 4.2.8 @@ -8823,29 +8759,27 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 - nise: 1.5.3 - nock: 11.9.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 query-string: 5.1.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-JPD7i5Im/tbFEYgIQyG6j1tzyNcVXXHzWjGkX1Njz/UtVVKp+2zDGj2e7/WFv5z5Tjmq2h/L6H3M9hUIMHs/Lw== + integrity: sha512-+5A/p1Sz5BnPMXppQ+6CGY6vD+UtG0X93WoPzcmUjX4zlbtPZ1GGut1tEMMqoVtVO6DrbTWAfG1RqcZeQ4NnWw== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': @@ -8855,14 +8789,14 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 downlevel-dts: 0.4.0 es6-promise: 4.2.8 @@ -8887,26 +8821,26 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/storage-file-share' resolution: - integrity: sha512-0b+vEmFEbM8wc0JboG10ufdwj5f4JdIWbHtznsOPa4/kgYZBmgPC7akvBkp0JjDpDIEYY94lxqIPIUAzNVPnhg== + integrity: sha512-+grl8U9yaRX3UGYxkRfmey6oX4gRB/IiUff3B44r+s0ulNndZDPlBLj9zzDu5e7TEfl9kSZayeDdy4ufKwRFSg== tarball: 'file:projects/storage-file-share.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': @@ -8916,14 +8850,14 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 dotenv: 8.2.0 downlevel-dts: 0.4.0 es6-promise: 4.2.8 @@ -8947,26 +8881,26 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 nyc: 14.1.1 prettier: 1.19.1 - puppeteer: 2.1.1 + puppeteer: 3.3.0 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 source-map-support: 0.5.19 - ts-node: 8.10.1_typescript@3.8.3 - tslib: 1.13.0 - typescript: 3.8.3 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-wdtM6V3zw/sz6aAZgPG6aZMtVvfeTnzrtuc+SEB/pNQ5s2agzcVn1ilkYxL/KzIuy8J/gWBzK4BQcOY+232H0w== + integrity: sha512-E6ImWiOuPf5pQGhAIZQazY04aR9GAiR0cFUblCT5s5f346DmloID1VfAsleww7nyzDtj1iRdUaWMzy/rpVYlMw== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': @@ -8974,16 +8908,16 @@ packages: '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.0.3_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': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/mocha': 7.0.2 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 assert: 1.5.0 - cross-env: 6.0.3 + cross-env: 7.0.2 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 @@ -9002,21 +8936,21 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + tslib: 2.0.0 + typescript: 3.9.5 util: 0.12.3 dev: false name: '@rush-temp/template' resolution: - integrity: sha512-fez95uatWabkhoMC1/bs/GdMSbARJCHPDKBTvLYcriT92DHo483rgZhnrN+KK/KsdAtAAe+NQwc57kR3Axo4ug== + integrity: sha512-yn9mQtHrTPcgiJQ3EQJmjMFevQZTghhRirBjJLygW0/MGreO7RvTR598dbFkRZAITJ3vHHiIkDdOEbsJwcMYxA== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/test-utils-perfstress.tgz': @@ -9025,8 +8959,8 @@ packages: '@types/minimist': 1.2.0 '@types/node': 8.10.61 '@types/node-fetch': 2.5.7 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 eslint: 6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 @@ -9038,12 +8972,12 @@ packages: node-fetch: 2.6.0 prettier: 1.19.1 rimraf: 3.0.2 - tslib: 1.13.0 - typescript: 3.8.3 + tslib: 2.0.0 + typescript: 3.9.5 dev: false name: '@rush-temp/test-utils-perfstress' resolution: - integrity: sha512-4ZLFBeVDO2cVkeIIQOdTOZx/9voPj+vrJuEvp18smNkJ36vFb0h7RqbNPVfzCO8F756AvCPsIpKcA7xvJnujwQ== + integrity: sha512-O7bReyg1fdESUEL1lqFWT/Ep00qElgRtkMiCOonBdfR+ZkQRJDdhtQSx2s7BsWzJOg5OyGxSewcRFN5nDXpAqg== tarball: 'file:projects/test-utils-perfstress.tgz' version: 0.0.0 'file:projects/test-utils-recorder.tgz': @@ -9051,18 +8985,18 @@ packages: '@opentelemetry/api': 0.6.1 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1 - '@rollup/plugin-replace': 2.3.2_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 '@types/chai': 4.2.11 '@types/fs-extra': 8.1.1 - '@types/md5': 2.1.33 + '@types/md5': 2.2.0 '@types/mocha': 7.0.2 '@types/mock-fs': 4.10.0 '@types/mock-require': 2.0.0 '@types/nise': 1.4.0 '@types/node': 8.10.61 - '@typescript-eslint/eslint-plugin': 2.34.0_fbe180e5e50b8ec89ec2be5e2ce5513b - '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.8.3 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.5 chai: 4.2.0 eslint: 6.8.0 eslint-plugin-no-only-tests: 2.4.0 @@ -9082,12 +9016,12 @@ packages: karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 md5: 2.2.1 - mocha: 7.1.2 - mocha-junit-reporter: 1.23.3_mocha@7.1.2 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 mock-fs: 4.12.0 mock-require: 3.0.3 - nise: 1.5.3 - nock: 11.9.1 + nise: 4.0.3 + nock: 12.0.3 npm-run-all: 4.1.5 nyc: 14.1.1 prettier: 1.19.1 @@ -9096,35 +9030,35 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 - rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 - tslib: 1.13.0 - typescript: 3.8.3 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + tslib: 2.0.0 + typescript: 3.9.5 xhr-mock: 2.5.1 dev: false name: '@rush-temp/test-utils-recorder' resolution: - integrity: sha512-C1muEQ5h7AVq2wY2lR5FIYNg1dy8p8CZ+446TbVcN744D37bc7P4kI+Wn+MXB6twOyT390AVX8qN7TSSCuqRMQ== + integrity: sha512-fvGz4wXaTJ6CW39tLAXW9eyu8cSiA6WaLCOYrocpeI7uwkPaCYk50hEHV5hMgtT1a1UQZyj8uemuBBGwldz6eA== tarball: 'file:projects/test-utils-recorder.tgz' version: 0.0.0 'file:projects/testhub.tgz': dependencies: '@azure/event-hubs': 2.1.4 '@types/node': 8.10.61 - '@types/uuid': 3.4.9 - '@types/yargs': 13.0.9 + '@types/uuid': 8.0.0 + '@types/yargs': 15.0.5 async-lock: 1.2.4 death: 1.1.0 debug: 4.1.1 - rhea: 1.0.21 + rhea: 1.0.22 rimraf: 3.0.2 - tslib: 1.13.0 - typescript: 3.8.3 - uuid: 3.4.0 + tslib: 2.0.0 + typescript: 3.9.5 + uuid: 8.1.0 yargs: 15.3.1 dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-Z6HTwhIIFE79DucKmLYyHiLO/5MWSxWLowoNyqcCIJgl0p54t1oRpa6SRRiVZwrTwzkLU5iA8vrYAnUmfSeGbQ== + integrity: sha512-wWCeWZLGFaZKJOdG2zTpsvZxIdzw5SSDZfCYo/gcI3i0/IK+ukijKncP1wy1SpQG7pnc0CRY3IaJ6UdaMI93bg== tarball: 'file:projects/testhub.tgz' version: 0.0.0 registry: '' @@ -9149,6 +9083,7 @@ specifiers: '@rush-temp/eventhubs-checkpointstore-blob': 'file:./projects/eventhubs-checkpointstore-blob.tgz' '@rush-temp/identity': 'file:./projects/identity.tgz' '@rush-temp/keyvault-certificates': 'file:./projects/keyvault-certificates.tgz' + '@rush-temp/keyvault-common': 'file:./projects/keyvault-common.tgz' '@rush-temp/keyvault-keys': 'file:./projects/keyvault-keys.tgz' '@rush-temp/keyvault-secrets': 'file:./projects/keyvault-secrets.tgz' '@rush-temp/logger': 'file:./projects/logger.tgz' diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index 7fc381d5640a..4cc67a75b166 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -34,12 +34,12 @@ function _getRushVersion() { } catch (e) { throw new Error(`Unable to determine the required version of Rush from rush.json (${rushJsonFolder}). ` + - 'The \'rushVersion\' field is either not assigned in rush.json or was specified ' + + "The 'rushVersion' field is either not assigned in rush.json or was specified " + 'using an unexpected syntax.'); } } function _run() { - const [nodePath, /* Ex: /bin/node */ scriptPath, /* /repo/common/scripts/install-run-rush.js */ ...packageBinArgs /* [build, --to, myproject] */] = process.argv; + const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, ...packageBinArgs /* [build, --to, myproject] */] = process.argv; // Detect if this script was directly invoked, or if the install-run-rushx script was invokved to select the // appropriate binary inside the rush package to run const scriptName = path.basename(scriptPath); diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 670a9637a56f..53e27aa69ba1 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -292,8 +292,8 @@ function _cleanInstallFolder(rushTempFolder, packageInstallFolder) { } const nodeModulesFolder = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME); if (fs.existsSync(nodeModulesFolder)) { - const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler', `install-run-${Date.now().toString()}`); - fs.renameSync(nodeModulesFolder, rushRecyclerFolder); + const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler'); + fs.renameSync(nodeModulesFolder, path.join(rushRecyclerFolder, `install-run-${Date.now().toString()}`)); } } catch (e) { @@ -303,14 +303,14 @@ function _cleanInstallFolder(rushTempFolder, packageInstallFolder) { function _createPackageJson(packageInstallFolder, name, version) { try { const packageJsonContents = { - 'name': 'ci-rush', - 'version': '0.0.0', - 'dependencies': { + name: 'ci-rush', + version: '0.0.0', + dependencies: { [name]: version }, - 'description': 'DON\'T WARN', - 'repository': 'DON\'T WARN', - 'license': 'MIT' + description: "DON'T WARN", + repository: "DON'T WARN", + license: 'MIT' }; const packageJsonPath = path.join(packageInstallFolder, PACKAGE_JSON_FILENAME); fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContents, undefined, 2)); @@ -345,7 +345,7 @@ function _installPackage(packageInstallFolder, name, version) { */ function _getBinPath(packageInstallFolder, binName) { const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); - const resolvedBinName = (os.platform() === 'win32') ? `${binName}.cmd` : binName; + const resolvedBinName = os.platform() === 'win32' ? `${binName}.cmd` : binName; return path.resolve(binFolderPath, resolvedBinName); } /** @@ -378,10 +378,11 @@ function installAndRun(packageName, packageVersion, packageBinName, packageBinAr const statusMessageLine = new Array(statusMessage.length + 1).join('-'); console.log(os.EOL + statusMessage + os.EOL + statusMessageLine + os.EOL); const binPath = _getBinPath(packageInstallFolder, packageBinName); + const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); const result = childProcess.spawnSync(binPath, packageBinArgs, { stdio: 'inherit', cwd: process.cwd(), - env: process.env + env: Object.assign({}, process.env, { PATH: [binFolderPath, process.env.PATH].join(path.delimiter) }) }); if (result.status !== null) { return result.status; @@ -403,7 +404,7 @@ function runWithErrorAndStatusCode(fn) { } exports.runWithErrorAndStatusCode = runWithErrorAndStatusCode; function _run() { - const [nodePath, /* Ex: /bin/node */ scriptPath, /* /repo/common/scripts/install-run-rush.js */ rawPackageSpecifier, /* qrcode@^1.2.0 */ packageBinName, /* qrcode */ ...packageBinArgs /* [-f, myproject/lib] */] = process.argv; + const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, rawPackageSpecifier /* qrcode@^1.2.0 */, packageBinName /* qrcode */, ...packageBinArgs /* [-f, myproject/lib] */] = process.argv; if (!nodePath) { throw new Error('Unexpected exception: could not detect node path'); } diff --git a/common/smoke-test/smoke-tests.yml b/common/smoke-test/smoke-tests.yml index 50e42e1de688..7fe63e08e038 100644 --- a/common/smoke-test/smoke-tests.yml +++ b/common/smoke-test/smoke-tests.yml @@ -46,10 +46,7 @@ jobs: value: "@{ storageEndpointSuffix = 'core.chinacloudapi.cn'; azureCloud = 'AzureChinaCloud'; }" steps: - - task: NodeTool@0 - displayName: Use Node $(NodeVersion) - inputs: - versionSpec: $(NodeVersion) + - template: ../../eng/pipelines/templates/steps/common.yml - task: Npm@1 inputs: diff --git a/common/tools/eslint-plugin-azure-sdk/package.json b/common/tools/eslint-plugin-azure-sdk/package.json index 719389d4edb2..deb770959051 100644 --- a/common/tools/eslint-plugin-azure-sdk/package.json +++ b/common/tools/eslint-plugin-azure-sdk/package.json @@ -66,8 +66,8 @@ "dependencies": { "eslint-config-prettier": "^6.0.0", "glob": "^7.1.2", - "typescript": "~3.8.3", - "tslib": "^1.10.0" + "typescript": "~3.9.3", + "tslib": "^2.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.27", diff --git a/dataplane.code-workspace b/dataplane.code-workspace index 3117700bd7ca..be77b25efbb7 100644 --- a/dataplane.code-workspace +++ b/dataplane.code-workspace @@ -157,6 +157,7 @@ "**/*.d.ts": true, "**/test-browser/*": true }, + "typescript.tsdk": "core-http\\node_modules\\typescript\\lib", }, "extensions": { diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index a47e6500833c..8a2ccb0819af 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -7,6 +7,7 @@ omitted_paths: - sdk/identity/identity/test/manual-integration/* - sdk/test-utils/perfstress/README.md - sdk/keyvault/*/test/README.md + - sdk/keyvault/keyvault-common/* - sdk/appconfiguration/*/test/README.md - sdk/eventhub/*/test/README.md - sdk/search/*/test/README.md diff --git a/eng/common/TestResources/New-TestResources.ps1.md b/eng/common/TestResources/New-TestResources.ps1.md index 39efc1446258..c9a462aae3a8 100644 --- a/eng/common/TestResources/New-TestResources.ps1.md +++ b/eng/common/TestResources/New-TestResources.ps1.md @@ -412,6 +412,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -OutFile +save test environment settings into a test-resources.json.env file next to test-resources.json. +The file is protected via DPAPI. The environment file would be scoped to the current repository directory. +Note: Supported only on Windows. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index 89e61a4cb07d..3c0cd7c2207e 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -35,6 +35,12 @@ eng\common\TestResources\New-TestResources.ps1 ` -TestApplicationSecret (ConvertFrom-SecureString $sp.Secret -AsPlainText) ``` +If you are running this for a .NET project on Windows, the recommended method is to +add the `-OutFile` switch to the above command. This will save test environment settings +into a test-resources.json.env file next to test-resources.json. The file is protected via DPAPI. +The environment file would be scoped to the current repository directory and avoids the need to +set environment variables or restart your IDE to recognize them. + Along with some log messages, this will output environment variables based on your current shell like in the following example: diff --git a/eng/common/pipelines/templates/steps/create-pull-request.yml b/eng/common/pipelines/templates/steps/create-pull-request.yml index 46ff5a8f62f8..790de92bcbe5 100644 --- a/eng/common/pipelines/templates/steps/create-pull-request.yml +++ b/eng/common/pipelines/templates/steps/create-pull-request.yml @@ -35,27 +35,31 @@ steps: workingDirectory: ${{ parameters.WorkingDirectory }} ignoreLASTEXITCODE: true -- pwsh: | - ${{ parameters.ScriptDirectory }}/git-branch-push.ps1 ` - -PRBranchName "${{ parameters.PRBranchName }}" ` - -CommitMsg "${{ parameters.CommitMsg }}" ` - -GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/${{ parameters.RepoName }}.git" ` - -PushArgs "${{ parameters.PushArgs }}" - +- task: PowerShell@2 displayName: Push changes - workingDirectory: ${{ parameters.WorkingDirectory }} condition: and(succeeded(), eq(variables['HasChanges'], 'true')) + inputs: + pwsh: true + workingDirectory: ${{ parameters.WorkingDirectory }} + filePath: ${{ parameters.ScriptDirectory }}/git-branch-push.ps1 + arguments: > + -PRBranchName "${{ parameters.PRBranchName }}" + -CommitMsg "${{ parameters.CommitMsg }}" + -GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/${{ parameters.RepoName }}.git" + -PushArgs "${{ parameters.PushArgs }}" -- pwsh: | - ${{ parameters.ScriptDirectory }}/Submit-PullRequest.ps1 ` - -RepoOwner "${{ parameters.RepoOwner }}" ` - -RepoName "${{ parameters.RepoName }}" ` - -BaseBranch "${{ parameters.BaseBranchName }}" ` - -PROwner "${{ parameters.PROwner }}" ` - -PRBranch "${{ parameters.PRBranchName }}" ` - -AuthToken "$(azuresdk-github-pat)" ` - -PRTitle "${{ parameters.PRTitle }}" - +- task: PowerShell@2 displayName: Create pull request - workingDirectory: ${{ parameters.WorkingDirectory }} - condition: and(succeeded(), eq(variables['HasChanges'], 'true')) \ No newline at end of file + condition: and(succeeded(), eq(variables['HasChanges'], 'true')) + inputs: + pwsh: true + workingDirectory: ${{ parameters.WorkingDirectory }} + filePath: ${{ parameters.ScriptDirectory }}/Submit-PullRequest.ps1 + arguments: > + -RepoOwner "${{ parameters.RepoOwner }}" + -RepoName "${{ parameters.RepoName }}" + -BaseBranch "${{ parameters.BaseBranchName }}" + -PROwner "${{ parameters.PROwner }}" + -PRBranch "${{ parameters.PRBranchName }}" + -AuthToken "$(azuresdk-github-pat)" + -PRTitle "${{ parameters.PRTitle }}" diff --git a/eng/common/pipelines/templates/steps/create-tags-and-git-release.yml b/eng/common/pipelines/templates/steps/create-tags-and-git-release.yml index a1fa15069dbe..8fb57243b0fd 100644 --- a/eng/common/pipelines/templates/steps/create-tags-and-git-release.yml +++ b/eng/common/pipelines/templates/steps/create-tags-and-git-release.yml @@ -10,9 +10,13 @@ steps: - task: PowerShell@2 displayName: 'Verify Package Tags and Create Git Releases' inputs: - targetType: filePath filePath: ${{ parameters.ScriptDirectory }}/create-tags-and-git-release.ps1 - arguments: -artifactLocation ${{parameters.ArtifactLocation}} -packageRepository ${{parameters.PackageRepository}} -releaseSha ${{parameters.ReleaseSha}} -repoId ${{parameters.RepoId}} -workingDirectory '${{parameters.WorkingDirectory}}' + arguments: > + -artifactLocation ${{ parameters.ArtifactLocation }} + -packageRepository ${{ parameters.PackageRepository }} + -releaseSha ${{ parameters.ReleaseSha }} + -repoId ${{ parameters.RepoId }} + -workingDirectory '${{ parameters.WorkingDirectory }}' pwsh: true timeoutInMinutes: 5 env: diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 89d12d4ac1d1..6ff9f84ff3ee 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -16,10 +16,10 @@ parameters: steps: - pwsh: | git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo - + try { Push-Location ${{ parameters.WorkingDirectory }}/repo - + Write-Host "git checkout smoke-test" git checkout smoke-test } finally { @@ -33,14 +33,14 @@ steps: inputs: targetType: filePath filePath: ${{ parameters.ScriptDirectory }}/update-docs-metadata.ps1 - arguments: > - -ArtifactLocation ${{parameters.ArtifactLocation}} - -Repository ${{parameters.PackageRepository}} - -ReleaseSHA ${{parameters.ReleaseSha}} - -RepoId ${{parameters.RepoId}} - -WorkDirectory '${{parameters.WorkingDirectory}}' - -DocRepoLocation "${{parameters.WorkingDirectory}}/repo" - -Language "${{parameters.Language}}" + arguments: > + -ArtifactLocation ${{ parameters.ArtifactLocation }} + -Repository ${{ parameters.PackageRepository }} + -ReleaseSHA ${{ parameters.ReleaseSha }} + -RepoId ${{ parameters.RepoId }} + -WorkDirectory "${{ parameters.WorkingDirectory }}" + -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" + -Language "${{parameters.Language}}" -DocRepoContentLocation ${{ parameters.DocRepoDestinationPath }} pwsh: true env: @@ -54,5 +54,5 @@ steps: CommitMsg: "Update readme content for ${{ parameters.ArtifactName }}" PRTitle: "Docs.MS Readme Update." BaseBranchName: smoke-test - WorkingDirectory: ${{parameters.WorkingDirectory}}/repo - ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}} + WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo + ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }} diff --git a/eng/common/pipelines/templates/steps/mashup-doc-index.yml b/eng/common/pipelines/templates/steps/mashup-doc-index.yml new file mode 100644 index 000000000000..7185297b6122 --- /dev/null +++ b/eng/common/pipelines/templates/steps/mashup-doc-index.yml @@ -0,0 +1,81 @@ +parameters: + TargetFolder: '' + +steps: + - task: PythonScript@0 + displayName: MashUp Generated Index Site so its served from default site location + inputs: + scriptSource: inline + script: | + import argparse + import os + import logging + import re + import shutil + from io import open + + SITE_INDEX = r'${{ parameters.SourceDirectory }}\docfx_project\_site' + TOC_HTML_REGEX = r"\.\./toc.html" + NAV_TOC_HTML_REGEX = r"api/" + PREV_DIR_REGEX = r"\.\./" + + def locate_htmlfiles(directory): + html_set = [] + for root, dirs, files in os.walk(directory): + for file in files: + html_set.append(os.path.join(root, file)) + return html_set + + def process_html(content): + content = re.sub(TOC_HTML_REGEX, 'navtoc.html', content) + content = re.sub(PREV_DIR_REGEX, '', content) + return content + + def process_navtoc(content): + content = re.sub(NAV_TOC_HTML_REGEX, '', content) + return content + + if __name__ == "__main__": + html_files = locate_htmlfiles(os.path.join(SITE_INDEX, 'api')) + navtoc_location = os.path.join(SITE_INDEX, 'toc.html') + + # Process the main toc.html and rename it to navtoc.html + try: + logging.info( + "Process {}.".format(navtoc_location) + ) + with open(navtoc_location, "r", encoding="utf8") as navtoc_stream: + navtoc_content = navtoc_stream.read() + new_navtoc_content = process_navtoc(navtoc_content) + logging.info("Process {}.".format(navtoc_content)) + with open(navtoc_location, "w", encoding="utf8") as html_stream: + html_stream.write(new_navtoc_content) + except Exception as e: + logging.error(e) + exit(1) + + # Rename main toc.html to navtoc.html + os.rename(navtoc_location, os.path.join(SITE_INDEX, 'navtoc.html')) + + # Process all html in api directory + for html_location in html_files: + try: + logging.info( + "Process {}.".format(html_location) + ) + with open(html_location, "r", encoding="utf8") as html_stream: + html_content = html_stream.read() + new_content = process_html(html_content) + logging.info("Process {}.".format(html_location)) + with open(html_location, "w", encoding="utf8") as html_stream: + html_stream.write(new_content) + except Exception as e: + logging.error(e) + exit(1) + + # Move all files from api to main site home directory + for html_location in html_files: + shutil.copy(html_location, SITE_INDEX) + + # Delete API Directory + shutil.rmtree(os.path.join(SITE_INDEX, 'api')) \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/publish-blobs.yml b/eng/common/pipelines/templates/steps/publish-blobs.yml index ce0d9f708cca..682cc4d4f7c8 100644 --- a/eng/common/pipelines/templates/steps/publish-blobs.yml +++ b/eng/common/pipelines/templates/steps/publish-blobs.yml @@ -7,16 +7,20 @@ parameters: steps: - pwsh: | - Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" ` - -OutFile "azcopy.zip" | Wait-Process; Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/" + Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process; + Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/" workingDirectory: $(Build.BinariesDirectory) displayName: Download and Extract azcopy Zip - task: Powershell@2 inputs: - targetType: 'filePath' filePath: ${{ parameters.ScriptPath }} - arguments: -AzCopy $(Resolve-Path "$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe")[0] -DocLocation "${{ parameters.FolderForUpload }}" -SASKey "${{ parameters.BlobSASKey }}" -Language "${{ parameters.TargetLanguage }}" -BlobName "${{ parameters.BlobName }}" + arguments: > + -AzCopy $(Resolve-Path "$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe")[0] + -DocLocation "${{ parameters.FolderForUpload }}" + -SASKey "${{ parameters.BlobSASKey }}" + -Language "${{ parameters.TargetLanguage }}" + -BlobName "${{ parameters.BlobName }}" pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Copy Docs to Blob diff --git a/eng/common/pipelines/templates/steps/replace-relative-links.yml b/eng/common/pipelines/templates/steps/replace-relative-links.yml new file mode 100644 index 000000000000..7ab2d76bc3f6 --- /dev/null +++ b/eng/common/pipelines/templates/steps/replace-relative-links.yml @@ -0,0 +1,217 @@ +parameters: + TargetFolder: '' + RootFolder: '' + BuildSHA: '' + RepoId: '' + +steps: + - task: PythonScript@0 + displayName: Replace Relative Readme Links with Absolute References + inputs: + scriptSource: inline + script: | + import argparse + import sys + import os + import logging + import glob + import re + import fnmatch + from io import open + try: + from pathlib import Path + except: + from pathlib2 import Path + + # This script is intended to be run against a single folder. All readme.md files (regardless of casing) will have the relative links + # updated with appropriate full reference links. This is a recursive update.. + + logging.getLogger().setLevel(logging.INFO) + + RELATIVE_LINK_REPLACEMENT_SYNTAX = ( + "https://github.com/{repo_id}/tree/{build_sha}/{target_resource_path}" + ) + + LINK_DISCOVERY_REGEX = r"\[([^\]]*)\]\(([^)]+)\)" + PREDEFINED_LINK_DISCOVERY_REGEX = r"(\[[^\]]+]\:)\s*([^\s]+)" + + IMAGE_FILE_EXTENSIONS = ['.jpeg', '.jpg', '.png', '.gif', '.tiff'] + RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE = ( + "https://github.com/{repo_id}/raw/{build_sha}/{target_resource_path}" + ) + + def locate_readmes(directory): + readme_set = [] + + for root, dirs, files in os.walk(directory): + for file in files: + if file.lower() == "readme.md": + readme_set.append(os.path.join(root, file)) + return readme_set + + + def is_relative_link(link_value, readme_location): + link_without_location = link_value + if link_without_location.find('#') > 0: + link_without_location = link_without_location[0:link_without_location.find('#')] + + try: + return os.path.exists( + os.path.abspath(os.path.join(os.path.dirname(readme_location), link_without_location)) + ) + except: + return False + + + def replace_relative_link(match, readme_location, root_folder, build_sha, repo_id): + link_path = match.group(2).strip() + + if is_relative_link(link_path, readme_location): + # if it is a relative reference, we need to find the path from the root of the repository + resource_absolute_path = os.path.abspath( + os.path.join(os.path.dirname(readme_location), link_path) + ) + placement_from_root = os.path.relpath(resource_absolute_path, root_folder) + + suffix = Path(placement_from_root).suffix + if (suffix in IMAGE_FILE_EXTENSIONS): + updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE.format( + repo_id=repo_id, + build_sha=build_sha, + target_resource_path=placement_from_root, + ).replace("\\", "/") + else: + updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX.format( + repo_id=repo_id, + build_sha=build_sha, + target_resource_path=placement_from_root, + ).replace("\\", "/") + + return "[{}]({})".format(match.group(1), updated_link) + else: + return match.group(0) + + def replace_prefined_relative_links(match, readme_location, root_folder, build_sha, repo_id): + link_path = match.group(2).strip() + + if is_relative_link(link_path, readme_location): + # if it is a relative reference, we need to find the path from the root of the repository + resource_absolute_path = os.path.abspath( + os.path.join(os.path.dirname(readme_location), link_path) + ) + placement_from_root = os.path.relpath(resource_absolute_path, root_folder) + + suffix = Path(placement_from_root).suffix + if (suffix in IMAGE_FILE_EXTENSIONS): + updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE.format( + repo_id=repo_id, + build_sha=build_sha, + target_resource_path=placement_from_root, + ).replace("\\", "/") + else: + updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX.format( + repo_id=repo_id, + build_sha=build_sha, + target_resource_path=placement_from_root, + ).replace("\\", "/") + + return "{} {}".format(match.group(1), updated_link) + else: + return match.group(0) + + + def transfer_content_to_absolute_references( + root_folder, build_sha, repo_id, readme_location, content + ): + content = re.sub( + LINK_DISCOVERY_REGEX, + lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_relative_link( + match, readme_location, root_folder, build_sha, repo_id + ), + content, + ) + + content = re.sub( + PREDEFINED_LINK_DISCOVERY_REGEX, + lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_prefined_relative_links( + match, readme_location, root_folder, build_sha, repo_id + ), + content, + ) + + return content + + + if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Replaces relative links for any README.md under the target folder. Given any discovered relative link, will replace with the provided repoId and SHA. Case insensitive" + ) + + parser.add_argument( + "-t", + "--target", + dest="target_folder", + help="The target folder that contains a README ", + default="${{ parameters.TargetFolder }}", + ) + + parser.add_argument( + "-i", + "--repoid", + dest="repo_id", + help='The target repository used as the base for the path replacement. Full Id, example: "Azure/azure-sdk-for-net"', + default="${{ parameters.RepoId }}", + ) + + parser.add_argument( + "-r", + "--root", + dest="root_folder", + help="The root directory of the repository. This gives us the ability to rationalize links in situations where a relative link traverses UPWARDS from the readme.", + default="${{ parameters.RootFolder }}", + ) + + parser.add_argument( + "-s", + "--sha", + dest="build_sha", + help="The commit hash associated with this change. Using this will mean that links will never be broken.", + default="${{ parameters.BuildSHA }}", + ) + + args = parser.parse_args() + + logging.info("Root Folder: {}".format(args.root_folder)) + logging.info("Target Folder: {}".format(args.target_folder)) + logging.info("Repository Id: {}".format(args.repo_id)) + logging.info("Build SHA: {}".format(args.build_sha)) + + readme_files = locate_readmes(args.target_folder) + + for readme_location in readme_files: + try: + logging.info( + "Running Relative Link Replacement on {}.".format(readme_location) + ) + + with open(readme_location, "r", encoding="utf-8") as readme_stream: + readme_content = readme_stream.read() + + new_content = transfer_content_to_absolute_references( + args.root_folder, + args.build_sha, + args.repo_id, + readme_location, + readme_content, + ) + + with open(readme_location, "w", encoding="utf-8") as readme_stream: + readme_stream.write(new_content) + + except Exception as e: + logging.error(e) + exit(1) + + - script: | + git diff -U0 + displayName: Highlight Readme Updates \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/verify-path-length.yml b/eng/common/pipelines/templates/steps/verify-path-length.yml new file mode 100644 index 000000000000..79c598035e31 --- /dev/null +++ b/eng/common/pipelines/templates/steps/verify-path-length.yml @@ -0,0 +1,59 @@ +# Template for all Python Scripts in this repository +parameters: + SourceDirectory: '' + BasePathLength: 49 + +steps: + - task: PythonScript@0 + displayName: Analyze Path Lengths + inputs: + scriptSource: inline + script: | + # Verifies Length of file path for all files in the SourceDirectory. + # File paths and directory paths must be less than 260 and 248 characters respectively on windows OS + # Repo users get a limited number of characters for the repo clone path. As Specified by the BasePathLength parameter. + # Script makes sure that paths in the repo are less than 260 and 248 for files and directories respectively after adding the BasePathLength. + import os + import sys + + source_directory = r'${{ parameters.SourceDirectory }}' + longest_file_path = '' + longest_file_path_length = 0 + longest_dir_path = '' + longest_dir_path_length = 0 + break_switch = False + long_file_paths = [] + long_dir_paths = [] + + def pluralize(string, plural_string, count): + return plural_string if count > 1 else string + + print('Analyzing length of paths...') + for root, dirs, files in os.walk('{0}'.format(source_directory)): + for file in files: + file_path = os.path.relpath(os.path.join(root, file), source_directory) + if ((len(file_path) + ${{ parameters.BasePathLength }}) > longest_file_path_length): + longest_file_path_length = len(file_path) + ${{ parameters.BasePathLength }} + longest_file_path = file_path + if (longest_file_path_length >= 260): + long_file_paths.append(longest_file_path) + dir_path = os.path.relpath(root, source_directory) + if ((len(dir_path) + ${{ parameters.BasePathLength }}) > longest_dir_path_length): + longest_dir_path_length = len(dir_path) + ${{ parameters.BasePathLength }} + longest_dir_path = dir_path + if (longest_dir_path_length >= 248): + long_dir_paths.append(longest_dir_path) + + if (len(long_file_paths) > 0): + print('With a base path length of {0} the following file path{1} exceed the allow path length of 260 characters'.format(${{ parameters.BasePathLength }}, pluralize('', 's', len(long_file_paths)))) + print(*long_file_paths, sep = "\n") + break_switch = True + + if (len(long_dir_paths) > 0): + print('With a base path length of {0} the following directory path{1} exceed the allow path length of 248 characters'.format(${{ parameters.BasePathLength }}, pluralize('', 's', len(long_dir_paths)))) + print(*long_dir_paths, sep = "\n") + break_switch = True + + if break_switch == True: + print("Some file paths are too long. Please reduce path lengths") + exit(1) diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index 2313a83c9f9a..ef2a6f545061 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -41,21 +41,25 @@ param( $PRBody = $PRTitle ) -Write-Host "> $PSCommandPath $args" +$headers = @{ + Authorization = "bearer $AuthToken" +} $query = "state=open&head=${PROwner}:${PRBranch}&base=${BaseBranch}" -$resp = Invoke-RestMethod "https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query" +try { + $resp = Invoke-RestMethod -Headers $headers "https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query" +} +catch { + Write-Error "Invoke-RestMethod [https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query] failed with exception:`n$_" + exit 1 +} $resp | Write-Verbose if ($resp.Count -gt 0) { Write-Host -f green "Pull request already exists $($resp[0].html_url)" } else { - $headers = @{ - Authorization = "bearer $AuthToken" - } - $data = @{ title = $PRTitle head = "${PROwner}:${PRBranch}" @@ -64,9 +68,16 @@ else { maintainer_can_modify = $true } - $resp = Invoke-RestMethod -Method POST -Headers $headers ` - https://api.github.com/repos/$RepoOwner/$RepoName/pulls ` - -Body ($data | ConvertTo-Json) + try { + $resp = Invoke-RestMethod -Method POST -Headers $headers ` + "https://api.github.com/repos/$RepoOwner/$RepoName/pulls" ` + -Body ($data | ConvertTo-Json) + } + catch { + Write-Error "Invoke-RestMethod [https://api.github.com/repos/$RepoOwner/$RepoName/pulls] failed with exception:`n$_" + exit 1 + } + $resp | Write-Verbose Write-Host -f green "Pull request created https://github.com/$RepoOwner/$RepoName/pull/$($resp.number)" } diff --git a/eng/common/scripts/artifact-metadata-parsing.ps1 b/eng/common/scripts/artifact-metadata-parsing.ps1 index 66e090ed6f6d..2d2362f0d0d9 100644 --- a/eng/common/scripts/artifact-metadata-parsing.ps1 +++ b/eng/common/scripts/artifact-metadata-parsing.ps1 @@ -86,16 +86,21 @@ function ParseMavenPackage($pkg, $workingDirectory) { $pkgId = $contentXML.project.artifactId $pkgVersion = $contentXML.project.version $groupId = if ($contentXML.project.groupId -eq $null) { $contentXML.project.parent.groupId } else { $contentXML.project.groupId } + $releaseNotes = "" + $readmeContent = "" # if it's a snapshot. return $null (as we don't want to create tags for this, but we also don't want to fail) if ($pkgVersion.Contains("SNAPSHOT")) { return $null } - $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-changelog.md")[0] + $changeLogLoc = @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-changelog.md")[0] + if ($changeLogLoc) { + $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc + } $readmeContentLoc = @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-readme.md")[0] - if (Test-Path -Path $readmeContentLoc) { + if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc } @@ -155,15 +160,23 @@ function ResolvePkgJson($workFolder) { function ParseNPMPackage($pkg, $workingDirectory) { $workFolder = "$workingDirectory$($pkg.Basename)" $origFolder = Get-Location + $releaseNotes = "" + $readmeContent = "" + New-Item -ItemType Directory -Force -Path $workFolder cd $workFolder tar -xzf $pkg $packageJSON = ResolvePkgJson -workFolder $workFolder | Get-Content | ConvertFrom-Json - $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + + $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + if ($changeLogLoc) { + $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc + } + $readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0] - if (Test-Path -Path $readmeContentLoc) { + if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc } @@ -208,15 +221,22 @@ function ParseNugetPackage($pkg, $workingDirectory) { $workFolder = "$workingDirectory$($pkg.Basename)" $origFolder = Get-Location $zipFileLocation = "$workFolder/$($pkg.Basename).zip" + $releaseNotes = "" + $readmeContent = "" + New-Item -ItemType Directory -Force -Path $workFolder Copy-Item -Path $pkg -Destination $zipFileLocation Expand-Archive -Path $zipFileLocation -DestinationPath $workFolder [xml] $packageXML = Get-ChildItem -Path "$workFolder/*.nuspec" | Get-Content - $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + + $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + if ($changeLogLoc) { + $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc + } $readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0] - if (Test-Path -Path $readmeContentLoc) { + if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc } @@ -269,12 +289,19 @@ function ParsePyPIPackage($pkg, $workingDirectory) { $workFolder = "$workingDirectory$($pkg.Basename)" $origFolder = Get-Location - New-Item -ItemType Directory -Force -Path $workFolder + $releaseNotes = "" + $readmeContent = "" + New-Item -ItemType Directory -Force -Path $workFolder Expand-Archive -Path $pkg -DestinationPath $workFolder - $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + + $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] + if ($changeLogLoc) { + $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc + } + $readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0] - if (Test-Path -Path $readmeContentLoc) { + if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc } Remove-Item $workFolder -Force -Recurse -ErrorAction SilentlyContinue @@ -291,23 +318,28 @@ function ParsePyPIPackage($pkg, $workingDirectory) { function ParseCArtifact($pkg, $workingDirectory) { $packageInfo = Get-Content -Raw -Path $pkg | ConvertFrom-JSON $packageArtifactLocation = (Get-ItemProperty $pkg).Directory.FullName + $releaseNotes = "" + $readmeContent = "" - $releaseNotes = ExtractReleaseNotes -changeLogLocation @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "CHANGELOG.md")[0] - + $changeLogLoc = @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "CHANGELOG.md")[0] + if ($changeLogLoc) + { + $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc + } + $readmeContentLoc = @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "README.md")[0] - if (Test-Path -Path $readmeContentLoc) { + if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc } return New-Object PSObject -Property @{ - PackageId = $packageInfo.name + PackageId = '' PackageVersion = $packageInfo.version # Artifact info is always considered deployable for C becasue it is not # deployed anywhere. Dealing with duplicate tags happens downstream in # CheckArtifactShaAgainstTagsList Deployable = $true ReleaseNotes = $releaseNotes - ReadmeContent = $readmeContent } } @@ -410,10 +442,16 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a exit(1) } + $tag = if ($parsedPackage.packageId) { + "$($parsedPackage.packageId)_$($parsedPackage.PackageVersion)" + } else { + $parsedPackage.PackageVersion + } + $pkgList += New-Object PSObject -Property @{ PackageId = $parsedPackage.PackageId PackageVersion = $parsedPackage.PackageVersion - Tag = ($parsedPackage.PackageId + "_" + $parsedPackage.PackageVersion) + Tag = $tag ReleaseNotes = $parsedPackage.ReleaseNotes ReadmeContent = $parsedPackage.ReadmeContent } diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1 index 920bc392fa24..0093c38e7f57 100644 --- a/eng/common/scripts/copy-docs-to-blobstorage.ps1 +++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1 @@ -10,8 +10,6 @@ param ( $UploadLatest=1 ) -Write-Host "> $PSCommandPath $args" - $Language = $Language.ToLower() # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string @@ -345,14 +343,11 @@ if ($Language -eq "java") if ($Language -eq "c") { # The documentation publishing process for C differs from the other - # langauges in this file because this script is invoked once per library + # langauges in this file because this script is invoked for the whole SDK # publishing. It is not, for example, invoked once per service publishing. - # This is also the case for other langauge publishing steps above... Those - # loops are left over from previous versions of this script which were used - # to publish multiple docs packages in a single invocation. + # There is a similar situation for other langauge publishing steps above... + # Those loops are left over from previous versions of this script which were + # used to publish multiple docs packages in a single invocation. $pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json - $pkgName = $pkgInfo.name - $pkgVersion = $pkgInfo.version - - Upload-Blobs -DocDir $DocLocation -PkgName $pkgName -DocVersion $pkgVersion + Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version } \ No newline at end of file diff --git a/eng/common/scripts/create-tags-and-git-release.ps1 b/eng/common/scripts/create-tags-and-git-release.ps1 index f87c90997839..1667cddd7e22 100644 --- a/eng/common/scripts/create-tags-and-git-release.ps1 +++ b/eng/common/scripts/create-tags-and-git-release.ps1 @@ -18,8 +18,6 @@ param ( [switch]$continueOnError = $false ) -Write-Host "> $PSCommandPath $args" - . (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) $apiUrl = "https://api.github.com/repos/$repoId" diff --git a/eng/common/scripts/git-branch-push.ps1 b/eng/common/scripts/git-branch-push.ps1 index b5a7ec8ba221..cd28582efeda 100644 --- a/eng/common/scripts/git-branch-push.ps1 +++ b/eng/common/scripts/git-branch-push.ps1 @@ -28,8 +28,6 @@ param( [string] $PushArgs = "" ) -Write-Host "> $PSCommandPath $args" - # This is necessay because of the janky git command output writing to stderr. # Without explicitly setting the ErrorActionPreference to continue the script # would fail the first time git wrote command output. @@ -121,8 +119,16 @@ do continue } - Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`"" - git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)" + Write-Host "git add -A" + git add -A + if ($LASTEXITCODE -ne 0) + { + Write-Error "Unable to git add LASTEXITCODE=$($LASTEXITCODE), see command output above." + continue + } + + Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -m `"$($CommitMsg)`"" + git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -m "$($CommitMsg)" if ($LASTEXITCODE -ne 0) { Write-Error "Unable to commit LASTEXITCODE=$($LASTEXITCODE), see command output above." diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1 index b4cc2ac7849e..9eba32ae35ec 100644 --- a/eng/common/scripts/update-docs-metadata.ps1 +++ b/eng/common/scripts/update-docs-metadata.ps1 @@ -14,8 +14,6 @@ param ( $DocRepoContentLocation = "docs-ref-services/" # within the doc repo, where does our readme go? ) -Write-Host "> $PSCommandPath $args" - # import artifact parsing and semver handling . (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) @@ -24,19 +22,19 @@ Write-Host "> $PSCommandPath $args" function GetMetaData($lang){ switch ($lang) { "java" { - $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/java-packages.csv" + $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/java-packages.csv" break } ".net" { - $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/dotnet-packages.csv" + $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/dotnet-packages.csv" break } "python" { - $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv" + $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/python-packages.csv" break } "javascript" { - $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/js-packages.csv" + $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/js-packages.csv" break } default { @@ -46,6 +44,8 @@ function GetMetaData($lang){ } $metadataResponse = Invoke-WebRequest-WithHandling -url $metadataUri -method "GET" | ConvertFrom-Csv + + return $metadataResponse } function GetAdjustedReadmeContent($pkgInfo, $lang){ @@ -56,11 +56,12 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){ $pkgId = $pkgInfo.PackageId.Replace("@azure/", "") try { - $metadata = GetMetaData -lang $lang + $metadata = GetMetaData -lang $lang + $service = $metadata | ? { $_.Package -eq $pkgId } if ($service) { - $service = "$service," + $service = "$($service.Service)" } } catch { @@ -68,12 +69,18 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){ Write-Host "Unable to retrieve service metadata for packageId $($pkgInfo.PackageId)" } - $headerContentMatch = (Select-String -InputObject $pkgInfo.ReadmeContent -Pattern 'Azure .+? (client|plugin|shared) library for (JavaScript|Java|Python|\.NET|C)').Matches[0] + $fileContent = $pkgInfo.ReadmeContent - if ($headerContentMatch){ - $header = "---`r`ntitle: $headerContentMatch`r`nkeywords: Azure, $lang, SDK, API, $service $($pkgInfo.PackageId)`r`nauthor: maggiepint`r`nms.author: magpint`r`nms.date: $date`r`nms.topic: article`r`nms.prod: azure`r`nms.technology: azure`r`nms.devlang: $lang`r`nms.service: $service`r`n---`r`n" - $fileContent = $pkgInfo.ReadmeContent -replace $headerContentMatch, "$headerContentMatch - Version $($pkgInfo.PackageVersion) `r`n" - return "$header $fileContent" + # only replace the version if the formatted header can be found + $headerContentMatches = (Select-String -InputObject $pkgInfo.ReadmeContent -Pattern 'Azure .+? (client|plugin|shared) library for (JavaScript|Java|Python|\.NET|C)') + if ($headerContentMatches) { + $headerContentMatch = $headerContentMatches.Matches[0] + $header = "---`ntitle: $headerContentMatch`nkeywords: Azure, $lang, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $lang`nms.service: $service`n---`n" + $fileContent = $pkgInfo.ReadmeContent -replace $headerContentMatch, "$headerContentMatch - Version $($pkgInfo.PackageVersion) `n" + } + + if ($fileContent) { + return "$header`n$fileContent" } else { return "" @@ -90,7 +97,7 @@ $pkgs = VerifyPackages -pkgRepository $Repository ` if ($pkgs) { Write-Host "Given the visible artifacts, readmes will be copied for the following packages" - Write-Host ($pkgs | % { $_.PackageId }) + Write-Host ($pkgs | % { $_.PackageId }) foreach ($packageInfo in $pkgs) { # sync the doc repo @@ -102,7 +109,10 @@ if ($pkgs) { $readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme$rdSuffix.md" $readmeLocation = Join-Path $DocRepoLocation $DocRepoContentLocation $readmeName - $adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo -lang $Language + + if ($packageInfo.ReadmeContent) { + $adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo -lang $Language + } if ($adjustedContent) { try { diff --git a/eng/pipelines/doc-index.yml b/eng/pipelines/doc-index.yml index bd946416cb84..ff6351512f1c 100644 --- a/eng/pipelines/doc-index.yml +++ b/eng/pipelines/doc-index.yml @@ -1,11 +1,3 @@ -resources: - repositories: - - repository: azure-sdk-tools - type: github - name: azure/azure-sdk-tools - ref: refs/heads/master - endpoint: azure - jobs: - job: "Build" variables: @@ -18,7 +10,7 @@ jobs: inputs: versionSpec: "3.6" - - template: eng/pipelines/templates/scripts/replace-relative-links.yml@azure-sdk-tools + - template: /eng/common/pipelines/templates/steps/replace-relative-links.yml parameters: TargetFolder: . RootFolder: . @@ -35,7 +27,7 @@ jobs: $(Build.SourcesDirectory)/eng/tools/generate-static-index/Generate-DocIndex.ps1 -RepoRoot $(Build.SourcesDirectory) -verbose displayName: 'Generate Doc Index' - - template: eng/pipelines/templates/scripts/mashup-doc-index.yml@azure-sdk-tools + - template: /eng/common/pipelines/templates/steps/mashup-doc-index.yml parameters: SourceDirectory: $(Build.SourcesDirectory) diff --git a/eng/pipelines/docs.yml b/eng/pipelines/docs.yml deleted file mode 100644 index 2400bb3a2483..000000000000 --- a/eng/pipelines/docs.yml +++ /dev/null @@ -1,50 +0,0 @@ -#Pipeline variables: -# $(additionalArgs) eg : -i "exc" --exc advisor apimanagement OR -i "inc" --inc advisor apimanagement storage OR -i "inc" --inc eventhub --clientOnly - -trigger: - - master - -variables: - NodeVersion: "10.x" - -jobs: - - job: "DocGen" - variables: - skipComponentGovernanceDetection: true - timeoutInMinutes: 120 - pool: - vmImage: "windows-2019" - - steps: - - task: NodeTool@0 - inputs: - versionSpec: "$(NodeVersion)" - displayName: "Install Node.js $(NodeVersion)" - - - script: | - npm install -g npm@6.9.0 - displayName: "Install npm version 6.9.0" - - - script: | - node common/scripts/install-run-rush.js install - displayName: "Install dependencies" - - - script: | - npm i -g typedoc - displayName: "Install typedoc" - - - script: | - npm install - workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc - displayName: "Install tool dependencies" - - - pwsh: | - cd $(Build.SourcesDirectory) - node .\eng\tools\generate-doc\index.js --dgOp "dg" $(additionalArgs) - Copy-Item -Path $(Build.SourcesDirectory)/docGen/* -Destination $(Build.ArtifactStagingDirectory) -Recurse -Force - displayName: "Generate Typedoc Docs" - - - upload: $(Build.ArtifactStagingDirectory) - artifact: docfolder - condition: succeededOrFailed() - displayName: "Publish Artifacts" diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 1b6fdbac3111..07953ac5536f 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -55,7 +55,7 @@ jobs: condition: and(succeeded(),ne(variables['SetDevVersion'],'true')) displayName: "Install dependencies" - - template: eng/pipelines/templates/scripts/replace-relative-links.yml@azure-sdk-tools + - template: /eng/common/pipelines/templates/steps/replace-relative-links.yml parameters: TargetFolder: $(Build.SourcesDirectory)/sdk/$(folder) RootFolder: $(Build.SourcesDirectory) @@ -136,7 +136,7 @@ jobs: ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml displayName: "Verify Readmes" - - template: eng/pipelines/templates/scripts/verify-path-length.yml@azure-sdk-tools + - template: /eng/common/pipelines/templates/steps/verify-path-length.yml parameters: SourceDirectory: $(Build.SourcesDirectory) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml index 33717a631714..8f5340e1fe27 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml @@ -1,15 +1,43 @@ parameters: - PackageName: "" - PreIntegrationSteps: "" - PostIntegrationSteps: "" - ResourceServiceDirectory: "" - EnvVars: {} - MaxParallel: 0 - TimeoutInMinutes: 60 - PublishCodeCoverage: false - TestBrowser: true - TestSamples: true - Matrix: +- name: PackageName + type: string + default: "" +- name: PreIntegrationSteps + type: string + default: "" +- name: PostIntegrationSteps + type: string + default: "" +- name: ResourceServiceDirectory + type: string + default: "" +- name: EnvVars + type: object + default: {} +- name: MaxParallel + type: number + default: 0 +- name: TimeoutInMinutes + type: number + default: 0 +- name: PublishCodeCoverage + type: boolean + default: false +- name: TestBrowser + type: boolean + default: true +- name: TestSamples + type: boolean + default: true +- name: TestMinMax + type: boolean + default: false +- name: TestSame + type: boolean + default: false +- name: Matrix + type: object + default: Linux Node 8: OSVmImage: "ubuntu-18.04" TestType: "node" @@ -43,9 +71,11 @@ jobs: TestResultsFiles: "**/test-results.browser.xml" ${{ if eq(matrixEntry.value.TestType, 'node') }}: TestResultsFiles: "**/test-results.xml" - # Remaining entries from the matrix object ${{ insert }}: ${{ matrixEntry.value }} + # Include these entries in all test matrices. Note that TestResultsFile + # is specified because the template logic above is not running in this + # context. # Add matrix entry for browser testing ${{ if eq(parameters.TestBrowser, 'true') }}: @@ -63,7 +93,33 @@ jobs: TestType: "sample" NodeTestVersion: "10.x" SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + + # Add matrix entry for min-max testing + ${{ if eq(parameters.TestMinMax, 'true') }}: + MaxVersion_Node: + OSVmImage: "ubuntu-18.04" + TestType: "node" + DependencyVersion: max + NodeTestVersion: "12.x" + TestResultsFiles: "**/test-results.xml" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + MinVersion_Node: + OSVmImage: "ubuntu-18.04" + TestType: "node" + DependencyVersion: min + NodeTestVersion: "12.x" + TestResultsFiles: "**/test-results.xml" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + # Add matrix entry for same dep testing + ${{ if eq(parameters.TestSame, 'true') }}: + SameVersion_Node: + OSVmImage: "ubuntu-18.04" + TestType: "node" + DependencyVersion: same + NodeTestVersion: "12.x" + TestResultsFiles: "**/test-results.xml" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) pool: vmImage: "$(OSVmImage)" @@ -93,6 +149,26 @@ jobs: - script: | node common/scripts/install-run-rush.js build:test -t "${{parameters.PackageName}}" --verbose -p max displayName: "Build test assets" + condition: and(succeededOrFailed(),eq(variables['DependencyVersion'],'')) + + - script: | + npm install + node index.js --artifact-name "${{parameters.PackageName}}" --version-type $(DependencyVersion) --source-dir "$(Build.SourcesDirectory)" --test-folder "test/public" + displayName: "Convert tests to run against package references" + workingDirectory: $(Build.SourcesDirectory)/eng/tools/dependency-testing + condition: and(succeededOrFailed(),ne(variables['DependencyVersion'],'')) + + - script: | + node common/scripts/install-run-rush.js update + displayName: "Rush update" + workingDirectory: $(Build.SourcesDirectory) + condition: and(succeededOrFailed(),ne(variables['DependencyVersion'],'')) + + - script: | + node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js build + displayName: "Build test package" + workingDirectory: $(PackageTestPath) + condition: and(succeededOrFailed(),ne(variables['DependencyVersion'],'')) - ${{if ne(parameters.PreIntegrationSteps, '')}}: - template: ../steps/${{parameters.PreIntegrationSteps}}.yml @@ -111,10 +187,19 @@ jobs: node ../../../common/scripts/install-run-rushx.js integration-test:$(TestType) --verbose -p max displayName: "Integration test libraries" workingDirectory: $(PackagePath) + condition: and(succeededOrFailed(),ne(variables['TestType'],'sample'),eq(variables['DependencyVersion'],'')) + env: + TEST_MODE: "live" + ${{ insert }}: ${{ parameters.EnvVars }} + + - script: | + node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js integration-test:$(TestType) --verbose -p max + displayName: "Integration test libraries" + workingDirectory: $(PackageTestPath) + condition: and(succeeded(),ne(variables['TestType'],'sample'),ne(variables['DependencyVersion'],'')) env: TEST_MODE: "live" ${{ insert }}: ${{ parameters.EnvVars }} - condition: and(succeeded(),ne(variables['TestType'],'sample')) - ${{if ne(parameters.PostIntegrationSteps, '')}}: - template: ../steps/${{parameters.PostIntegrationSteps}}.yml diff --git a/eng/pipelines/templates/stages/archetype-js-release.yml b/eng/pipelines/templates/stages/archetype-js-release.yml index 9651f1983370..216b66a8bb0a 100644 --- a/eng/pipelines/templates/stages/archetype-js-release.yml +++ b/eng/pipelines/templates/stages/archetype-js-release.yml @@ -3,6 +3,7 @@ parameters: ArtifactName: 'not-specified' DependsOn: Build Registry: 'https://registry.npmjs.org/' + PrivateRegistry: 'https://pkgs.dev.azure.com/azure-sdk/internal/_packaging/azure-sdk-for-js-pr/npm/registry/' DocArtifact: 'documentation' TargetDocRepoOwner: '' TargetDocRepoName: '' @@ -193,14 +194,28 @@ stages: artifact: ${{parameters.ArtifactName}} timeoutInMinutes: 5 - ${{ each artifact in parameters.Artifacts }}: - - script: | - export DETECTED_PACKAGE_NAME=`ls $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-*-dev*.tgz` - echo "##vso[task.setvariable variable=Package.Archive]$DETECTED_PACKAGE_NAME" + - pwsh: | + $detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-*-dev*.tgz + echo "##vso[task.setvariable variable=Package.Archive]$detectedPackageName" + $devopsPublish=$false + if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-js') { + $npmToken="$(azure-sdk-npm-token)" + $registry="${{parameters.Registry}}" + $devopsPublish=$false + } + else { + $npmToken="$(azure-sdk-devops-npm-token)" + $registry="${{parameters.PrivateRegistry}}" + $devopsPublish=$true + } + echo "##vso[task.setvariable variable=NpmToken]$npmToken" + echo "##vso[task.setvariable variable=Registry]$registry" + echo "##vso[task.setvariable variable=DevopsPublish]$devopsPublish" displayName: Detecting package archive_${{artifact.safeName}} - task: PowerShell@2 - displayName: "Publish_${{artifact.safeName}} to npmjs.org" + displayName: "Publish_${{artifact.safeName}} to dev feed" inputs: targetType: filePath filePath: "eng/tools/publish-to-npm.ps1" - arguments: '-pathToArtifacts $(Package.Archive) -accessLevel "public" -tag "dev" -additionalTag "$(AdditionalTag)" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token)' + arguments: '-pathToArtifacts $(Package.Archive) -accessLevel "public" -tag "dev" -registry "$(Registry)" -npmToken "$(NpmToken)" -devopsFeed $(DevopsPublish)' diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index fe49590ed402..c36a75a3c632 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -1,10 +1,35 @@ +resources: + repositories: + - repository: azure-sdk-tools + type: github + name: azure/azure-sdk-tools + endpoint: azure + ref: refs/tags/azure-sdk-tools_20200618.1 + - repository: azure-sdk-build-tools + type: git + name: internal/azure-sdk-build-tools + ref: refs/tags/azure-sdk-build-tools_20200618.4 + parameters: - Artifacts: [] - ServiceDirectory: not-specified - IncludeRelease: true - TargetDocRepoOwner: 'MicrosoftDocs' - TargetDocRepoName: 'azure-docs-sdk-node' - +- name: Artifacts + type: object + default: [] +- name: ServiceDirectory + type: string + default: not-specified +- name: IncludeRelease + type: boolean + default: true +- name: TargetDocRepoOwner + type: string + default: MicrosoftDocs +- name: TargetDocRepoName + type: string + default: azure-docs-sdk-node +- name: RunUnitTests + type: boolean + default: true + stages: - stage: Build jobs: @@ -23,4 +48,3 @@ stages: ArtifactName: packages TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} TargetDocRepoName: ${{ parameters.TargetDocRepoName }} - \ No newline at end of file diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index c8e1edbb2b48..4acbd8d62caf 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -1,7 +1,25 @@ +resources: + repositories: + - repository: azure-sdk-tools + type: github + name: azure/azure-sdk-tools + endpoint: azure + ref: refs/tags/azure-sdk-tools_20200618.1 + - repository: azure-sdk-build-tools + type: git + name: internal/azure-sdk-build-tools + ref: refs/tags/azure-sdk-build-tools_20200618.4 + parameters: - Artifacts: [] - ServiceDirectory: not-specified - RunUnitTests: false +- name: Artifacts + type: object + default: [] +- name: ServiceDirectory + type: string + default: not-specified +- name: RunUnitTests + type: boolean + default: false stages: - stage: Build @@ -13,7 +31,6 @@ stages: - template: ../jobs/archetype-sdk-integration.yml parameters: - PackagePath: "sdk/cosmosdb/cosmos/" PackageName: "@azure/cosmos" TestBrowser: false TestSamples: false diff --git a/eng/pipelines/templates/steps/common.yml b/eng/pipelines/templates/steps/common.yml index 585af6538e16..e2026fe3fccb 100644 --- a/eng/pipelines/templates/steps/common.yml +++ b/eng/pipelines/templates/steps/common.yml @@ -8,11 +8,4 @@ steps: - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml - - task: NodeTool@0 - inputs: - versionSpec: "$(NodeVersion)" - displayName: "Use NodeJS $(NodeVersion)" - - - script: | - node --version && npm --version - displayName: Node versions + - template: use-node-version.yml diff --git a/eng/pipelines/templates/steps/use-node-test-version.yml b/eng/pipelines/templates/steps/use-node-test-version.yml index 088408fcef26..990513e21e23 100644 --- a/eng/pipelines/templates/steps/use-node-test-version.yml +++ b/eng/pipelines/templates/steps/use-node-test-version.yml @@ -1,37 +1,29 @@ -steps: - - task: NodeTool@0 - inputs: - versionSpec: $(NodeTestVersion) - displayName: "Use NodeJS $(NodeTestVersion)" +parameters: + NodeTestVersion: $(NodeTestVersion) - - script: | - node --version && npm --version - displayName: Node versions +steps: + - template: use-node-version.yml + parameters: + NodeVersion: $(NodeTestVersion) # Packages with native dependencies must be reinstalled after changing Node versions - pwsh: | $KeytarSymlinkPath = "common/temp/node_modules/.pnpm/node_modules/keytar" # Map from the symlink path to the target path (npm has issues installing into symlink dirs) - # Example: common/temp/node_modules/.pnpm/registry.npmjs.org/keytar/5.4.0/node_modules/keytar + # Example: common/temp/node_modules/.pnpm/keytar@5.6.0/node_modules/keytar $KeytarTargetPath = (Get-Item $KeytarSymlinkPath).Target # Need to run "npm install" at path containing "node_modules" folder - # Example: common/temp/node_modules/.pnpm/registry.npmjs.org/keytar/5.4.0 + # Example: common/temp/node_modules/.pnpm/keytar@5.6.0 $KeytarInstallPath = Join-Path $KeytarTargetPath "../.." - # The version is the leaf node of the path - # Example: 5.4.0 - $KeytarVersion = Split-Path -Leaf $KeytarInstallPath + # @ is the leaf node of the path + # Example: keytar@5.6.0 + $KeytarPackageAtVersion = Split-Path -Leaf $KeytarInstallPath Set-Location $KeytarInstallPath # Install matching version of package - npm install --no-package-lock keytar@$KeytarVersion + npm install --no-package-lock $KeytarPackageAtVersion displayName: Reinstall native dependencies - - # After changing Node versions, Rush will attempt to reinstall itself, but will be blocked on - # Windows due to issue microsoft/rushstack#1878. A workaround is to manually delete the Rush - # install folder. - - pwsh: Remove-Item -Recurse -Force common/temp/install-run - displayName: Delete Rush install folder diff --git a/eng/pipelines/templates/steps/use-node-version.yml b/eng/pipelines/templates/steps/use-node-version.yml new file mode 100644 index 000000000000..e740b7a62b50 --- /dev/null +++ b/eng/pipelines/templates/steps/use-node-version.yml @@ -0,0 +1,24 @@ +parameters: + NodeVersion: $(NodeVersion) + +steps: + - task: NodeTool@0 + inputs: + versionSpec: ${{ parameters.NodeVersion }} + displayName: "Use Node ${{ parameters.NodeVersion }}" + + - pwsh: | + $expectedVersion = "${{ parameters.NodeVersion }}" + Write-Host "Expected Node Version: $expectedVersion" + + $actualVersion = (node --version).Substring(1) + Write-Host "Actual Node Version: $actualVersion" + Write-Host "Actual NPM Version: $(npm --version)" + + $expectedMajorVersion = $expectedVersion.Split(".")[0] + $actualMajorVersion = $actualVersion.Split(".")[0] + if ($expectedMajorVersion -ne $actualMajorVersion) { + Write-Host "Error: Expected node version does not match actual node version" + exit 1 + } + displayName: "Verify Node Version" diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index e65448d2d27a..3223ede4869c 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -1,6 +1,6 @@ variables: DocWardenVersion: '0.5.0' - NodeVersion: "10.x" + NodeVersion: "12.x" OSVmImage: "ubuntu-18.04" Agent.Source.Git.ShallowFetchDepth: 20 skipComponentGovernanceDetection: true diff --git a/eng/tools/dependency-testing/index.js b/eng/tools/dependency-testing/index.js new file mode 100644 index 000000000000..136d70b03213 --- /dev/null +++ b/eng/tools/dependency-testing/index.js @@ -0,0 +1,356 @@ +let argv = require("yargs") + .options({ + "artifact-name": { + type: "string", + describe: + "name of the artifact to be incremented (e.g. azure-keyvault-secrets), will be translated to @azure/(package) format", + demandOption: true + }, + "repo-root": { + type: "string", + default: "../../../", + describe: "root of the repository (e.g. ../../../)", + demandOption: true + }, + "version-type": { + type: "string", + describe: "whether you want to test max or min or same version of dependencies", + demandOption: true + }, + "source-dir": { + type: "string", + describe: "complete local path of the directory of the repo", + demandOption: true + }, + "test-folder": { + type: "string", + default: "test", + describe: "whether to point at test or test/public", + demandOption: false + }, + "dry-run": { + type: "boolean" + } + }) + .help().argv; + +const fs = require("fs"); +const path = require("path"); +const semver = require("semver"); +const packageUtils = require("eng-package-utils"); +// crossSpawn is used because of its ability to better handle corner cases that break when using spawn in Windows environments. +// For more details see - https://www.npmjs.com/package/cross-spawn +var crossSpawn = require("cross-spawn"); + +function outputTestPath(projectFolderPath, sourceDir, testFolder) { + const projectPath = path.join(sourceDir, projectFolderPath); + const testPath = path.join(projectPath, testFolder); + console.log(`##vso[task.setvariable variable=PackageTestPath]${testPath}`) + console.log(`Emitted variable "PackageTestPath" with content: ${testPath}`) +} + +async function insertPackageJson(repoRoot, packageJsonContents, targetPackagePath, targetPackageName, versionType, testFolder) { + const testPath = path.join(targetPackagePath, testFolder); + var templateJson = await packageUtils.readFileJson("./templates/package.json"); + var testPackageJson = templateJson; + testPackageJson.name = packageJsonContents.name.replace("@azure/", "azure-") + "-test"; + testPackageJson.devDependencies = {}; + depList = {}; + var projectFolder = path.basename(targetPackagePath); + var projectDir = path.basename(path.dirname(targetPackagePath)); + var allowedVersionList = {}; + depList[targetPackageName] = packageJsonContents.version;//works + allowedVersionList[targetPackageName] = depList[targetPackageName]; + for (const package of Object.keys(packageJsonContents.dependencies)) { + depList[package] = packageJsonContents.dependencies[package]; + if (package.startsWith("@azure/")) { + depList[package] = await findAppropriateVersion(package, packageJsonContents.dependencies[package], repoRoot, versionType); + if (packageJsonContents.dependencies[package] !== depList[package]) { + console.log(package); + allowedVersionList[package] = depList[package]; + console.log(allowedVersionList[package]); + } + } + } + testPackageJson.dependencies = depList; + + for (const package of Object.keys(packageJsonContents.devDependencies)) { + testPackageJson.devDependencies[package] = packageJsonContents.devDependencies[package]; + if (package.startsWith("@azure/")) { + console.log("packagejson version before func call = " + packageJsonContents.devDependencies[package]); + var packageVersion = packageJsonContents.devDependencies[package]; + testPackageJson.devDependencies[package] = await findAppropriateVersion(package, packageVersion, repoRoot, versionType); + console.log("packagejson version = " + packageJsonContents.devDependencies[package]); + if (packageJsonContents.devDependencies[package] !== testPackageJson.devDependencies[package]) { + console.log(package); + allowedVersionList[package] = testPackageJson.devDependencies[package]; + console.log(allowedVersionList[package]); + } + } + } + console.log(testPackageJson); + const testPackageJsonPath = path.join(testPath, "package.json"); + await packageUtils.writePackageJson(testPackageJsonPath, testPackageJson); + console.log(allowedVersionList); + return allowedVersionList; +} + + +async function isPackageAUtility(package, repoRoot) { + var thisPackage = await getPackageFromRush(repoRoot, package); + if (thisPackage.versionPolicyName === "utility") { + console.log(thisPackage.packageName + " utility"); + return true; + } + return false; +} + +async function findAppropriateVersion(package, packageJsonDepVersion, repoRoot, versionType) { + console.log("checking " + package + " = " + packageJsonDepVersion); + var isUtility = await isPackageAUtility(package, repoRoot); + if (isUtility) { + return packageJsonDepVersion; + } + else { + var allNPMVersions = await getVersions(package); + if (allNPMVersions) { + console.log(versionType); + if (versionType === "min") { + var minVersion = await semver.minSatisfying(JSON.parse(allNPMVersions), packageJsonDepVersion); + if (minVersion) { + return minVersion; + } + else { + //issue a warning + console.warn(`No matching semver min version found on npm for package ${package} with version ${packageJsonDepVersion}. Replacing with local version`); + var version = await getPackageVersion(repoRoot, package); + console.log(version); + return version; + } + } + else if (versionType === "max") { + console.log("calling semver max satisfying"); + var maxVersion = await semver.maxSatisfying(JSON.parse(allNPMVersions), packageJsonDepVersion); + if (maxVersion) { + return maxVersion; + } + else { + //issue a warning + console.warn(`No matching semver max version found on npm for package ${package} with version ${packageJsonDepVersion}. Replacing with local version`); + var version = await getPackageVersion(repoRoot, package); + console.log(version); + return version; + } + } + else if (versionType === "same") { + return packageJsonDepVersion; + } + } + } +} + +async function getPackageVersion(repoRoot, package) { + var thisPackage = await getPackageFromRush(repoRoot, package); + console.log(thisPackage); + var thisPackagePath = path.join(repoRoot, thisPackage.projectFolder); + var thisPackageJsonPath = path.join(thisPackagePath, "package.json"); + var thisPackageJsonContents = await packageUtils.readFileJson(thisPackageJsonPath); + console.log(thisPackageJsonContents); + return thisPackageJsonContents.version; +} + +function fromDir(startPath, filter, resList) { + if (!fs.existsSync(startPath)) { + console.log("no dir ", startPath); + return resList; + } + + var files = fs.readdirSync(startPath); + for (var i = 0; i < files.length; i++) { + var filename = path.join(startPath, files[i]); + var stat = fs.lstatSync(filename); + if (stat.isDirectory()) { + resList = fromDir(filename, filter, resList); //recurse + } + else if (filename.indexOf(filter) >= 0) { + console.log('-- found: ', filename); + resList.push(filename); + }; + }; + return resList; +}; + +async function insertMochaReporter(targetPackagePath, repoRoot, testFolder) { + const testPath = path.join(targetPackagePath, testFolder); + const mochaPath = path.join(repoRoot, "./common/tools/mocha-multi-reporter.js"); + const mochaDestPath = path.join(testPath, "./mocha-multi-reporter.js"); + var mochaReporter = await packageUtils.readFile(mochaPath); + await packageUtils.writeFile(mochaDestPath, mochaReporter); +} + +async function insertTsConfigJson(targetPackagePath, testFolder) { + const testPath = path.join(targetPackagePath, testFolder); + var tsConfigJson = await packageUtils.readFileJson("./templates/tsconfig.json"); + var tsConfigTestsJson = await packageUtils.readFileJson("./templates/tsconfig.tests.json"); + + const originalTsConfigPath = path.join(targetPackagePath, "tsconfig.json"); + var originalTsConfig = await packageUtils.readFileJson(originalTsConfigPath); + tsConfigTestsJson.extends = originalTsConfig.extends; + tsConfigTestsJson.compilerOptions = originalTsConfig.compilerOptions; + + const tsConfigPath = path.join(testPath, "tsconfig.json"); + const tsConfigTestsPath = path.join(targetPackagePath, "tsconfig.tests.json"); + console.log(tsConfigTestsJson); + await packageUtils.writePackageJson(tsConfigPath, tsConfigJson); + await packageUtils.writePackageJson(tsConfigTestsPath, tsConfigTestsJson); +} + +async function readAndReplaceSourceReferences(filePath, packageName) { + var fileContent = await packageUtils.readFile(filePath); + console.log("Reading filePath = " + filePath); + // Regex for internal references = /* ["']+[../]*src[/a-z]+["'] */ + var internalrefs = fileContent.match(/[\"\']+[..//]*src[//a-zA-Z]+[\"\']+/g); + var writeContent = ""; + if (internalrefs) { + console.log("internal refs = "); + console.log(internalrefs); + console.log("This file has internal references will be replaced by empty content"); + } + else { + var replaceText = "\"" + packageName + "\""; + //Regex for public api references to be replaced by package name + writeContent = fileContent.replace(/[\"\']+[..//]*src[\"\']+/g, replaceText); + } + await packageUtils.writeFile(filePath, writeContent); +} + +async function replaceSourceReferences(targetPackagePath, packageName, testFolder) { + const testPath = path.join(targetPackagePath, testFolder); + var resList = []; + resList = fromDir(testPath, '.ts', resList); + console.dir(resList); + var resPromises = []; + for (var eachFile of resList) { + resPromises.push(readAndReplaceSourceReferences(eachFile, packageName)); + } + await Promise.all(resPromises); +} + +async function getVersions(packageName) { + const promise = new Promise(async (res, rej) => { + let npmProcess = crossSpawn('npm', ['view', packageName, 'versions', '--json'], { stdout: 'inherit' }); + let stdOut = ""; + let stdErr = ""; + npmProcess.stdout.on( + "data", + data => (stdOut = stdOut + data.toString()) + ); + npmProcess.stderr.on( + "data", + data => (stdErr = stdErr + data.toString()) + ); + npmProcess.on("close", code => { + console.log("`npm view " + packageName + " versions` process exit code:" + code); + if (code !== 0) { + rej("Process exits with code " + code); + return; + } + res({ code, stdOut, stdErr }); + }); + }); + try { + const res = await promise; + if (res["stdErr"]) { + console.error(res["stdErr"]); + return false; + } + if (res["stdOut"]) { + return (res["stdOut"]); + } + } + catch (ex) { + console.error("Error:", ex); + } +} + +async function updateRushConfig(repoRoot, targetPackage, testFolder) { + var rushSpec = await packageUtils.getRushSpec(repoRoot); + const targetPackagePath = path.join(repoRoot, targetPackage.projectFolder); + const testPath = path.join(targetPackagePath, testFolder); + const testPackageJsonPath = path.join(testPath, "package.json"); + var testPackageJson = await packageUtils.readFileJson(testPackageJsonPath); + var testProjectFolder = targetPackage.projectFolder + "/" + testFolder; + const testPackageEntry = { + "packageName": testPackageJson.name, + "projectFolder": testProjectFolder, + "versionPolicyName": "client" + }; + rushSpec.projects.push(testPackageEntry); + rushSpec.projectFolderMaxDepth = 5; + const rushPath = path.resolve(path.join(repoRoot, "rush.json")); + await packageUtils.writePackageJson(rushPath, rushSpec); + console.log("rush spec -"); + console.log(rushSpec); +} + +async function updateCommonVersions(repoRoot, allowedVersionList) { + const commonVersionsConfig = await packageUtils.getRushCommonVersions(repoRoot); + var allowedAlternativeVersions = commonVersionsConfig["allowedAlternativeVersions"]; + console.dir(allowedVersionList); + console.dir(allowedAlternativeVersions); + for (const package in allowedVersionList) { + console.log(package); + console.log(allowedVersionList[package]); + if (allowedVersionList[package] && !allowedAlternativeVersions[package]) { + allowedAlternativeVersions[package] = [allowedVersionList[package]]; + } + else if (allowedVersionList[package] && allowedAlternativeVersions[package].includes(allowedVersionList[package])) { + allowedAlternativeVersions[package].push(allowedVersionList[package]); + } + } + console.dir(allowedAlternativeVersions); + var newConfig = commonVersionsConfig; + newConfig["allowedAlternativeVersions"] = allowedAlternativeVersions; + const commonVersionsPath = path.resolve(path.join(repoRoot, "/common/config/rush/common-versions.json")); + console.log(newConfig); + await packageUtils.writePackageJson(commonVersionsPath, newConfig); +} + +async function getPackageFromRush(repoRoot, packageName) { + const rushSpec = await packageUtils.getRushSpec(repoRoot); + const targetPackage = rushSpec.projects.find( + packageSpec => packageSpec.packageName == packageName + ); + return targetPackage; +} + +async function main(argv) { + const artifactName = argv["artifact-name"]; + const repoRoot = argv["repo-root"]; + const versionType = argv["version-type"]; + const sourceDir = argv["source-dir"]; + const testFolder = argv["test-folder"]; + const dryRun = argv["dry-run"]; + + const packageName = artifactName.replace("azure-", "@azure/"); + const targetPackage = await getPackageFromRush(repoRoot, packageName); + const targetPackagePath = path.join(repoRoot, targetPackage.projectFolder); + + const packageJsonLocation = path.join(targetPackagePath, "package.json"); + + const packageJsonContents = await packageUtils.readFileJson( + packageJsonLocation + ); + const allowedVersionList = await insertPackageJson(repoRoot, packageJsonContents, targetPackagePath, targetPackage.packageName, versionType, testFolder); + await insertTsConfigJson(targetPackagePath, testFolder); + if (dryRun) { + console.log("Dry run only, no changes"); + return; + } + await replaceSourceReferences(targetPackagePath, targetPackage.packageName, testFolder); + await insertMochaReporter(targetPackagePath, repoRoot, testFolder); + await updateRushConfig(repoRoot, targetPackage, testFolder); + await updateCommonVersions(repoRoot, allowedVersionList); + outputTestPath(targetPackage.projectFolder, sourceDir, testFolder); +} +main(argv); diff --git a/eng/tools/dependency-testing/package.json b/eng/tools/dependency-testing/package.json new file mode 100644 index 000000000000..1b83d52fd9db --- /dev/null +++ b/eng/tools/dependency-testing/package.json @@ -0,0 +1,24 @@ +{ + "name": "dependency-testing", + "version": "1.0.0", + "description": "Utilities for min/max dependency testing", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", + "dependencies": { + "cross-spawn": "^7.0.2", + "semver": "^7.3.2", + "yargs": "^14.2.0", + "eng-package-utils": "file:../eng-package-utils" + } +} diff --git a/eng/tools/dependency-testing/templates/package.json b/eng/tools/dependency-testing/templates/package.json new file mode 100644 index 000000000000..3317602807d2 --- /dev/null +++ b/eng/tools/dependency-testing/templates/package.json @@ -0,0 +1,28 @@ +{ + "name": "azure-package-name-test", + "private": true, + "version": "0.1.0", + "description": "Azure client library tests for TypeScript", + "engine": { + "node": ">=8.0.0" + }, + "scripts": { + "build": "tsc -p .", + "integration-test:browser": "karma start --single-run", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ./mocha-multi-reporter.js --timeout 180000 --full-trace 'dist/**/*.js' --exit", + "integration-test": "npm run integration-test:node && npm run integration-test:browser" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", + "sideEffects": false, + "dependencies": {}, + "devDependencies": {} +} diff --git a/eng/tools/dependency-testing/templates/tsconfig.json b/eng/tools/dependency-testing/templates/tsconfig.json new file mode 100644 index 000000000000..d07d62eae9dd --- /dev/null +++ b/eng/tools/dependency-testing/templates/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.tests.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": [ + "./**/*.ts" + ], + "exclude": [ + "*.json", + "**/node_modules/", + "../node_modules", + "../typings" + ] +} diff --git a/eng/tools/dependency-testing/templates/tsconfig.tests.json b/eng/tools/dependency-testing/templates/tsconfig.tests.json new file mode 100644 index 000000000000..373707a8c103 --- /dev/null +++ b/eng/tools/dependency-testing/templates/tsconfig.tests.json @@ -0,0 +1,32 @@ +{ + "extends": "../../tsconfig.package", + "compilerOptions": { + "alwaysStrict": true, + "noImplicitAny": true, + "preserveConstEnums": true, + "sourceMap": true, + "newLine": "LF", + "target": "es5", + "moduleResolution": "node", + "strict": true, + "module": "esNext", + "outDir": "./dist", + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "declarationDir": "./types", + "lib": [ + "dom", + "es5", + "es6", + "es7", + "esnext" + ], + "esModuleInterop": true, + "resolveJsonModule": true + }, + "compileOnSave": true, + "include": [ + "./test/**/*.ts" + ] +} diff --git a/eng/tools/eng-package-utils/index.js b/eng/tools/eng-package-utils/index.js index 5bef4d5a412d..b316caa74b6f 100644 --- a/eng/tools/eng-package-utils/index.js +++ b/eng/tools/eng-package-utils/index.js @@ -60,7 +60,10 @@ async function getRushSpec(repoRoot) { return await readFileJson(rushPath); } - +async function getRushCommonVersions(repoRoot) { + const commonVersionsPath = path.resolve(path.join(repoRoot, "/common/config/rush/common-versions.json")); + return await readFileJson(commonVersionsPath); +} // This regex is taken from # https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string // and adapted to exclude beginning of line (^) and end of line ($) anchors. @@ -72,3 +75,4 @@ module.exports.writeFile = writeFile; module.exports.writePackageJson = writePackageJson; module.exports.getRushSpec = getRushSpec; module.exports.getRushPackageJsons = getRushPackageJsons; +module.exports.getRushCommonVersions = getRushCommonVersions; diff --git a/eng/tools/publish-to-npm.ps1 b/eng/tools/publish-to-npm.ps1 index 53c6ff104699..3bee99535f0b 100644 --- a/eng/tools/publish-to-npm.ps1 +++ b/eng/tools/publish-to-npm.ps1 @@ -6,7 +6,8 @@ param ( $registry, $npmToken, $filterArg="", - $basicDeployment=$false + $basicDeployment=$false, + $devopsFeed=$false ) function replaceText($oldText,$newText,$filePath){ @@ -96,9 +97,22 @@ try { } if(!$basicDeployment) { + if(!$devopsFeed){ Write-Host "Choosing AuthToken Deployment" $env:NPM_TOKEN=$npmToken npm config set $regAuth`:_authToken=`$`{NPM_TOKEN`} + } + else{ + Write-Host "Choosing Private Devops Feed Deployment" + $npmReg = $regAuth.replace("registry/",""); + $env:NPM_TOKEN=$npmToken + npm config set $regAuth`:username=azure-sdk + npm config set $regAuth`:_password=`$`{NPM_TOKEN`} + npm config set $regAuth`:email=not_set + npm config set $npmReg`:username=azure-sdk + npm config set $npmReg`:_password=`$`{NPM_TOKEN`} + npm config set $npmReg`:email=not_set + } } else { Write-Host "Choosing BasicAuth Deployment" diff --git a/rush.json b/rush.json index a7aff345bfdd..7edfb8faf6d3 100644 --- a/rush.json +++ b/rush.json @@ -15,7 +15,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.23.3", + "rushVersion": "5.26.0", /** * The next field selects which package manager should be installed and determines its version. * Rush installs its own local copy of the package manager to ensure that your build process @@ -24,7 +24,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "4.14.2", + "pnpmVersion": "5.1.8", // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4", /** @@ -422,6 +422,11 @@ "projectFolder": "sdk/identity/identity", "versionPolicyName": "client" }, + { + "packageName": "@azure/keyvault-common", + "projectFolder": "sdk/keyvault/keyvault-common", + "versionPolicyName": "utility" + }, { "packageName": "@azure/keyvault-certificates", "projectFolder": "sdk/keyvault/keyvault-certificates", @@ -470,7 +475,7 @@ { "packageName": "@azure/template", "projectFolder": "sdk/template/template", - "versionPolicyName": "utility" + "versionPolicyName": "client" }, { "packageName": "@azure/eslint-plugin-azure-sdk", diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index ba7f9e7f63a7..ee2acab52f37 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -78,7 +78,7 @@ "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.8", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/identity": "^1.1.0-preview", @@ -86,12 +86,12 @@ "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "assert": "^1.4.1", "chai": "^4.2.0", "dotenv": "^8.2.0", @@ -103,16 +103,16 @@ "esm": "^3.2.18", "mocha": "^7.1.1", "mocha-junit-reporter": "^1.18.0", - "nock": "^11.7.0", + "nock": "^12.0.3", "nyc": "^14.0.0", "prettier": "^1.16.4", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "sinon": "^7.1.0", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9", "@rollup/plugin-json": "^4.0.0" } diff --git a/sdk/appconfiguration/app-configuration/samples/javascript/optimisticConcurrencyViaEtag.js b/sdk/appconfiguration/app-configuration/samples/javascript/optimisticConcurrencyViaEtag.js index bb44d2ba5386..ccd8083073b7 100644 --- a/sdk/appconfiguration/app-configuration/samples/javascript/optimisticConcurrencyViaEtag.js +++ b/sdk/appconfiguration/app-configuration/samples/javascript/optimisticConcurrencyViaEtag.js @@ -44,18 +44,14 @@ async function main() { // Since both of Alpha and Beta will attempt to update at the same time // they'll have to coordinate this. This is when they use the etag. + // For our example we'll have Beta update first - const betaUpdatedSetting = await client.setConfigurationSetting( - { - key: key, - value: "Beta has updated the value" - }, - { - // onlyIfUnchanged allows Beta to say "only update the setting if the _current_ etag matches my etag" - // which is true for Beta since nobody has modified it since Beta got it. - onlyIfUnchanged: true - } - ); + betaSetting.value = "Beta has updated the value"; + const betaUpdatedSetting = await client.setConfigurationSetting(betaSetting, { + // onlyIfUnchanged allows Beta to say "only update the setting if the _current_ etag matches my etag" + // which is true for Beta since nobody has modified it since Beta got it. + onlyIfUnchanged: true + }); console.log(`Beta has updated the setting. The setting's etag is now ${betaUpdatedSetting.etag}`); @@ -66,21 +62,16 @@ async function main() { ); try { - await client.setConfigurationSetting( - { - key: key, - value: "Alpha is attempting to update the value but will fail" - }, - { - // in this case Alpha's etag is out of date - there's no way to update it - // without retrieving the setting again. This allows Alpha a chance to - // potentially incorporate Beta's update into their own _or_ to just overwrite - // it. - // - // the 'catch' below will now incorporate the update - onlyIfUnchanged: true - } - ); + alphaSetting.value = "Alpha is attempting to update the value but will fail"; + await client.setConfigurationSetting(alphaSetting, { + // in this case Alpha's etag is out of date - there's no way to update it + // without retrieving the setting again. This allows Alpha a chance to + // potentially incorporate Beta's update into their own _or_ to just overwrite + // it. + // + // the 'catch' below will now incorporate the update + onlyIfUnchanged: true + }); } catch (err) { if (err.statusCode === 412) { // precondition failed @@ -106,6 +97,12 @@ async function main() { const finalSetting = await client.getConfigurationSetting({ key: key }); console.log(`Final value with Alpha and Beta's updates: ${finalSetting.value}`); + if ( + finalSetting.value !== "Beta has updated the value and Alpha has updated the setting as well" + ) { + throw new Error("SAMPLE FAILURE: Setting was not properly updated"); + } + await cleanupSampleValues([key], client); } diff --git a/sdk/appconfiguration/app-configuration/samples/javascript/package.json b/sdk/appconfiguration/app-configuration/samples/javascript/package.json index d24dfe25ea7f..bd0faf7c9d36 100644 --- a/sdk/appconfiguration/app-configuration/samples/javascript/package.json +++ b/sdk/appconfiguration/app-configuration/samples/javascript/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", "sideEffects": false, "dependencies": { - "@azure/app-configuration": "next", + "@azure/app-configuration": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/appconfiguration/app-configuration/samples/typescript/src/optimisticConcurrencyViaEtag.ts b/sdk/appconfiguration/app-configuration/samples/typescript/src/optimisticConcurrencyViaEtag.ts index 43b9184406f5..e843ede1fdf6 100644 --- a/sdk/appconfiguration/app-configuration/samples/typescript/src/optimisticConcurrencyViaEtag.ts +++ b/sdk/appconfiguration/app-configuration/samples/typescript/src/optimisticConcurrencyViaEtag.ts @@ -47,17 +47,12 @@ export async function main() { // they'll have to coordinate this. This is when they use the etag. // For our example we'll have Beta update first - const betaUpdatedSetting = await client.setConfigurationSetting( - { - key: key, - value: "Beta has updated the value" - }, - { - // onlyIfUnchanged allows Beta to say "only update the setting if the _current_ etag matches my etag" - // which is true for Beta since nobody has modified it since Beta got it. - onlyIfUnchanged: true - } - ); + betaSetting.value = "Beta has updated the value"; + const betaUpdatedSetting = await client.setConfigurationSetting(betaSetting, { + // onlyIfUnchanged allows Beta to say "only update the setting if the _current_ etag matches my etag" + // which is true for Beta since nobody has modified it since Beta got it. + onlyIfUnchanged: true + }); console.log(`Beta has updated the setting. The setting's etag is now ${betaUpdatedSetting.etag}`); @@ -68,21 +63,16 @@ export async function main() { ); try { - await client.setConfigurationSetting( - { - key: key, - value: "Alpha is attempting to update the value but will fail" - }, - { - // in this case Alpha's etag is out of date - there's no way to update it - // without retrieving the setting again. This allows Alpha a chance to - // potentially incorporate Beta's update into their own _or_ to just overwrite - // it. - // - // the 'catch' below will now incorporate the update - onlyIfUnchanged: true - } - ); + alphaSetting.value = "Alpha is attempting to update the value but will fail"; + await client.setConfigurationSetting(alphaSetting, { + // in this case Alpha's etag is out of date - there's no way to update it + // without retrieving the setting again. This allows Alpha a chance to + // potentially incorporate Beta's update into their own _or_ to just overwrite + // it. + // + // the 'catch' below will now incorporate the update + onlyIfUnchanged: true + }); } catch (err) { if (err.statusCode === 412) { // precondition failed @@ -108,6 +98,12 @@ export async function main() { const finalSetting = await client.getConfigurationSetting({ key: key }); console.log(`Final value with Alpha and Beta's updates: ${finalSetting.value}`); + if ( + finalSetting.value !== "Beta has updated the value and Alpha has updated the setting as well" + ) { + throw new Error("SAMPLE FAILURE: Setting was not properly updated"); + } + await cleanupSampleValues([key], client); } diff --git a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts index 4358d6c689a2..ba1807ce3112 100644 --- a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts +++ b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts @@ -177,7 +177,7 @@ export class AppConfigurationClient { getGeneratedClientOptions(appConfigEndpoint, syncTokens, appConfigOptions) ); - this.spanner = new Spanner("Azure.Data.AppConfiguration", "appconfig"); + this.spanner = new Spanner("Azure.Data.AppConfiguration"); } /** diff --git a/sdk/appconfiguration/app-configuration/src/internal/tracingHelpers.ts b/sdk/appconfiguration/app-configuration/src/internal/tracingHelpers.ts index 30d8dad82d11..30217e284f45 100644 --- a/sdk/appconfiguration/app-configuration/src/internal/tracingHelpers.ts +++ b/sdk/appconfiguration/app-configuration/src/internal/tracingHelpers.ts @@ -20,7 +20,7 @@ export interface Spannable { * @ignore */ export class Spanner { - constructor(private baseOperationName: string, private componentName: string) {} + constructor(private baseOperationName: string) {} /** * Traces an operation and properly handles reporting start, end and errors for a given span diff --git a/sdk/appconfiguration/app-configuration/test/auth.spec.ts b/sdk/appconfiguration/app-configuration/test/auth.spec.ts index 13d9ff6edd72..d70b275cebb2 100644 --- a/sdk/appconfiguration/app-configuration/test/auth.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/auth.spec.ts @@ -4,16 +4,14 @@ import { AppConfigurationClient } from "../src"; import { startRecorder, getTokenAuthenticationCredential, CredsAndEndpoint } from "./testHelpers"; import * as assert from "assert"; -import { Recorder, env, isPlaybackMode } from "@azure/test-utils-recorder"; +import { Recorder, isPlaybackMode } from "@azure/test-utils-recorder"; describe("Authentication", () => { let credsAndEndpoint: CredsAndEndpoint; let recorder: Recorder; - let uniqueId: string; beforeEach(function() { recorder = startRecorder(this); - uniqueId = recorder.getUniqueName(""); credsAndEndpoint = getTokenAuthenticationCredential() || this.skip(); }); diff --git a/sdk/appconfiguration/app-configuration/test/etags.spec.ts b/sdk/appconfiguration/app-configuration/test/etags.spec.ts index 8b365d3ca974..2f903741f4cb 100644 --- a/sdk/appconfiguration/app-configuration/test/etags.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/etags.spec.ts @@ -9,7 +9,7 @@ import { assertThrowsRestError } from "./testHelpers"; import * as assert from "assert"; -import { Recorder, isRecordMode, isPlaybackMode } from "@azure/test-utils-recorder"; +import { Recorder } from "@azure/test-utils-recorder"; describe("etags", () => { let client: AppConfigurationClient; diff --git a/sdk/appconfiguration/app-configuration/test/helpers.spec.ts b/sdk/appconfiguration/app-configuration/test/helpers.spec.ts index 2e1ca7e7b5cd..f3660d731014 100644 --- a/sdk/appconfiguration/app-configuration/test/helpers.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/helpers.spec.ts @@ -260,7 +260,7 @@ describe("helper methods", () => { return this; }, validateRequestProperties: () => {}, - prepare: function(options) { + prepare: function() { return this; } }, diff --git a/sdk/appconfiguration/app-configuration/test/index.readonlytests.spec.ts b/sdk/appconfiguration/app-configuration/test/index.readonlytests.spec.ts index 8aa2516e654f..9500c3a455e7 100644 --- a/sdk/appconfiguration/app-configuration/test/index.readonlytests.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/index.readonlytests.spec.ts @@ -7,7 +7,7 @@ import { } from "./testHelpers"; import { AppConfigurationClient } from "../src"; import * as assert from "assert"; -import { Recorder, isPlaybackMode } from "@azure/test-utils-recorder"; +import { Recorder } from "@azure/test-utils-recorder"; describe("AppConfigurationClient (set|clear)ReadOnly", () => { let client: AppConfigurationClient; @@ -64,7 +64,7 @@ describe("AppConfigurationClient (set|clear)ReadOnly", () => { }); it("accepts operation options", async function() { - let storedSetting = await client.getConfigurationSetting({ + await client.getConfigurationSetting({ key: testConfigSetting.key, label: testConfigSetting.label }); diff --git a/sdk/appconfiguration/app-configuration/test/index.spec.ts b/sdk/appconfiguration/app-configuration/test/index.spec.ts index 42109457106c..48dea835b1df 100644 --- a/sdk/appconfiguration/app-configuration/test/index.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/index.spec.ts @@ -13,7 +13,7 @@ import { } from "./testHelpers"; import { AppConfigurationClient, ConfigurationSetting } from "../src"; import { delay } from "@azure/core-http"; -import { Recorder, isPlaybackMode } from "@azure/test-utils-recorder"; +import { Recorder } from "@azure/test-utils-recorder"; describe("AppConfigurationClient", () => { let client: AppConfigurationClient; @@ -210,7 +210,7 @@ describe("AppConfigurationClient", () => { ); // delete configuration - const deletedSetting = await client.deleteConfigurationSetting( + await client.deleteConfigurationSetting( { key, label @@ -401,7 +401,7 @@ describe("AppConfigurationClient", () => { car: "caz" }; const contentType = "application/json"; - const result = await client.addConfigurationSetting({ key, label, value, contentType, tags }); + await client.addConfigurationSetting({ key, label, value, contentType, tags }); await assertThrowsAbortError(async () => { await client.getConfigurationSetting({ key, label }, { requestOptions: { timeout: 1 } }); }); @@ -1054,8 +1054,8 @@ describe("AppConfigurationClient", () => { const label = "test"; const value = "foo"; await assertThrowsAbortError(async () => { - const result = await client.setConfigurationSetting( - { key, label, value: "foo" }, + await client.setConfigurationSetting( + { key, label, value: value }, { requestOptions: { timeout: 1 diff --git a/sdk/appconfiguration/app-configuration/test/testHelpers.ts b/sdk/appconfiguration/app-configuration/test/testHelpers.ts index d7c633dd02fe..212f2eecd671 100644 --- a/sdk/appconfiguration/app-configuration/test/testHelpers.ts +++ b/sdk/appconfiguration/app-configuration/test/testHelpers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AppConfigurationClient, AppConfigurationClientOptions } from "../src"; +import { AppConfigurationClient } from "../src"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { ConfigurationSetting, ListConfigurationSettingPage, ListRevisionsPage } from "../src"; import { env, isPlaybackMode, RecorderEnvironmentSetup, record } from "@azure/test-utils-recorder"; diff --git a/sdk/appconfiguration/app-configuration/tests.yml b/sdk/appconfiguration/app-configuration/tests.yml index 3edccaed60c1..05592d751807 100644 --- a/sdk/appconfiguration/app-configuration/tests.yml +++ b/sdk/appconfiguration/app-configuration/tests.yml @@ -1,21 +1,13 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/app-configuration" - ResourceServiceDirectory: appconfiguration - TestBrowser: false - TestSamples: false - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/app-configuration" + ResourceServiceDirectory: appconfiguration + TestBrowser: false + TestSamples: false + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/appconfiguration/app-configuration/tsconfig.json b/sdk/appconfiguration/app-configuration/tsconfig.json index 1c1e32a4803d..efaf33325bf0 100644 --- a/sdk/appconfiguration/app-configuration/tsconfig.json +++ b/sdk/appconfiguration/app-configuration/tsconfig.json @@ -1,21 +1,10 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "target": "es6", - "module": "es6", - "moduleResolution": "node", - "strict": true, - "sourceMap": true, - "inlineSources": true, - "declarationMap": true, - "declaration": true, "declarationDir": "./types", - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, "outDir": "./dist-esm", - "importHelpers": true, - "newLine": "LF" + "downlevelIteration": true }, - "exclude": ["node_modules", "types/**", "./samples/**/*.ts"], + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/appconfiguration/ci.yml b/sdk/appconfiguration/ci.yml index 7766789c335f..ee3933e89339 100644 --- a/sdk/appconfiguration/ci.yml +++ b/sdk/appconfiguration/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/appconfiguration/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: appconfiguration - Artifacts: - - name: azure-app-configuration - safeName: azureappconfiguration +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: appconfiguration + Artifacts: + - name: azure-app-configuration + safeName: azureappconfiguration diff --git a/sdk/applicationinsights/ci.yml b/sdk/applicationinsights/ci.yml deleted file mode 100644 index a4a528709b6b..000000000000 --- a/sdk/applicationinsights/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/applicationinsights/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/applicationinsights/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: applicationinsights - Artifacts: - - name: azure-applicationinsights-query - safeName: azureapplicationinsightsquery diff --git a/sdk/avs/arm-avs/LICENSE.txt b/sdk/avs/arm-avs/LICENSE.txt new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/avs/arm-avs/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 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. diff --git a/sdk/avs/arm-avs/README.md b/sdk/avs/arm-avs/README.md new file mode 100644 index 000000000000..73c2aae29485 --- /dev/null +++ b/sdk/avs/arm-avs/README.md @@ -0,0 +1,99 @@ +## Azure AvsClient SDK for JavaScript + +This package contains an isomorphic SDK for AvsClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-avs +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### 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 { AvsClient, AvsModels, AvsMappers } from "@azure/arm-avs"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new AvsClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### 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-avs sample + + + + + + + + +``` + +## Related projects + +- [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/sdk/avs/arm-avs/README.png) diff --git a/sdk/avs/arm-avs/package.json b/sdk/avs/arm-avs/package.json new file mode 100644 index 000000000000..71d853760c69 --- /dev/null +++ b/sdk/avs/arm-avs/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-avs", + "author": "Microsoft Corporation", + "description": "AvsClient Library with typescript type definitions for node.js and browser.", + "version": "0.1.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-avs.js", + "module": "./esm/avsClient.js", + "types": "./esm/avsClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/avs/arm-avs", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-avs.js.map'\" -o ./dist/arm-avs.min.js ./dist/arm-avs.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/avs/arm-avs/rollup.config.js b/sdk/avs/arm-avs/rollup.config.js new file mode 100644 index 000000000000..f2cc59bca8c9 --- /dev/null +++ b/sdk/avs/arm-avs/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/avsClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-avs.js", + format: "umd", + name: "Azure.ArmAvs", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + 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() + ] +}; + +export default config; diff --git a/sdk/avs/arm-avs/src/avsClient.ts b/sdk/avs/arm-avs/src/avsClient.ts new file mode 100644 index 000000000000..bf4837286853 --- /dev/null +++ b/sdk/avs/arm-avs/src/avsClient.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +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 { AvsClientContext } from "./avsClientContext"; + + +class AvsClient extends AvsClientContext { + // Operation groups + operations: operations.Operations; + locations: operations.Locations; + privateClouds: operations.PrivateClouds; + clusters: operations.Clusters; + + /** + * Initializes a new instance of the AvsClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Unique identifier for the Azure subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AvsClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.locations = new operations.Locations(this); + this.privateClouds = new operations.PrivateClouds(this); + this.clusters = new operations.Clusters(this); + } +} + +// Operation Specifications + +export { + AvsClient, + AvsClientContext, + Models as AvsModels, + Mappers as AvsMappers +}; +export * from "./operations"; diff --git a/sdk/avs/arm-avs/src/avsClientContext.ts b/sdk/avs/arm-avs/src/avsClientContext.ts new file mode 100644 index 000000000000..a17ce9fad890 --- /dev/null +++ b/sdk/avs/arm-avs/src/avsClientContext.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-avs"; +const packageVersion = "0.1.0"; + +export class AvsClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the AvsClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Unique identifier for the Azure subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AvsClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2019-08-09-preview'; + 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; + 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; + } + } +} diff --git a/sdk/avs/arm-avs/src/models/clustersMappers.ts b/sdk/avs/arm-avs/src/models/clustersMappers.ts new file mode 100644 index 000000000000..730bdd10cdc7 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/clustersMappers.ts @@ -0,0 +1,26 @@ +/* + * 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 { + ApiError, + ApiErrorBase, + BaseResource, + Circuit, + Cluster, + ClusterList, + ClusterProperties, + DefaultClusterProperties, + Endpoints, + ExpressRouteAuthorization, + IdentitySource, + PrivateCloud, + PrivateCloudProperties, + Resource, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/index.ts b/sdk/avs/arm-avs/src/models/index.ts new file mode 100644 index 000000000000..0cd5281f0e3c --- /dev/null +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -0,0 +1,983 @@ +/* + * 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. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * Subscription trial availability + */ +export interface Trial { + /** + * Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * Number of trial hosts available + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly availableHosts?: number; +} + +/** + * Subscription quotas + */ +export interface Quota { + /** + * Remaining hosts quota by sku type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hostsRemaining?: { [propertyName: string]: number }; + /** + * Host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled' + */ + quotaEnabled?: QuotaEnabled; +} + +/** + * The core properties of ARM resources + */ +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; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource location + */ + location?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Api error. + */ +export interface ApiErrorBase { + /** + * Error code + */ + code?: string; + /** + * Error message + */ + message?: string; +} + +/** + * API error response + */ +export interface ApiError { + /** + * An error returned by the API + */ + error?: ApiErrorBase; +} + +/** + * Contains the localized display information for this operation + */ +export interface OperationDisplay { + /** + * Localized friendly form of the resource provider name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Localized friendly form of the resource type related to this operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Localized friendly name for the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * Localized friendly description for the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * A REST API operation + */ +export interface Operation { + /** + * Name of the operation being performed on this object + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Contains the localized display information for this operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly display?: OperationDisplay; +} + +/** + * Authorization for an ExpressRoute + */ +export interface ExpressRouteAuthorization { + /** + * The name of the ExpressRoute + */ + name?: string; + /** + * The ID of the ExpressRoute + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The key of the ExpressRoute + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly key?: string; +} + +/** + * An ExpressRoute Circuit + */ +export interface Circuit { + /** + * CIDR of primary subnet + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly primarySubnet?: string; + /** + * CIDR of secondary subnet + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secondarySubnet?: string; + /** + * Identifier of the ExpressRoute (Microsoft Colo only) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expressRouteID?: string; + /** + * Authorizations for the ExpressRoute (Microsoft Colo only) + */ + authorizations?: ExpressRouteAuthorization[]; + /** + * ExpressRoute private peering identifier + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expressRoutePrivatePeeringID?: string; +} + +/** + * Endpoint addresses + */ +export interface Endpoints { + /** + * Endpoint for the NSX-T Data Center manager + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nsxtManager?: string; + /** + * Endpoint for Virtual Center Server Appliance + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vcsa?: string; +} + +/** + * vCenter Single Sign On Identity Source + */ +export interface IdentitySource { + /** + * The name of the identity source + */ + name?: string; + /** + * The domain's NetBIOS name + */ + alias?: string; + /** + * The domain's dns name + */ + domain?: string; + /** + * The base distinguished name for users + */ + baseUserDN?: string; + /** + * The base distinguished name for groups + */ + baseGroupDN?: string; + /** + * Primary server URL + */ + primaryServer?: string; + /** + * Secondary server URL + */ + secondaryServer?: string; + /** + * Protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', + * 'Disabled' + */ + ssl?: SslEnum; + /** + * The ID of an Active Directory user with a minimum of read-only access to Base DN for users and + * group + */ + username?: string; + /** + * The password of the Active Directory user with a minimum of read-only access to Base DN for + * users and groups. + */ + password?: string; +} + +/** + * The resource model definition representing SKU + */ +export interface Sku { + /** + * The name of the SKU. + */ + name: string; +} + +/** + * The properties of a default cluster + */ +export interface DefaultClusterProperties { + /** + * The identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: number; + /** + * The cluster size + */ + clusterSize?: number; + /** + * The hosts + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hosts?: string[]; +} + +/** + * The properties of a private cloud resource + */ +export interface PrivateCloudProperties { + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', + * 'Pending', 'Building', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PrivateCloudProvisioningState; + /** + * An ExpressRoute Circuit + */ + circuit?: Circuit; + /** + * The default cluster used for management + */ + cluster?: DefaultClusterProperties; + /** + * The clusters + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusters?: string[]; + /** + * The endpoints + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endpoints?: Endpoints; + /** + * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' + */ + internet?: InternetEnum; + /** + * vCenter Single Sign On Identity Sources + */ + identitySources?: IdentitySource[]; + /** + * The block of addresses should be unique across VNet in your subscription as well as + * on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 + * and 255, and X is between 0 and 22 + */ + networkBlock?: string; + /** + * Network used to access vCenter Server and NSX-T Manager + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly managementNetwork?: string; + /** + * Used for virtual machine cold migration, cloning, and snapshot migration + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningNetwork?: string; + /** + * Used for live migration of virtual machines + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmotionNetwork?: string; + /** + * Optionally, set the vCenter admin password when the private cloud is created + */ + vcenterPassword?: string; + /** + * Optionally, set the NSX-T Manager password when the private cloud is created + */ + nsxtPassword?: string; + /** + * Thumbprint of the vCenter Server SSL certificate + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vcenterCertificateThumbprint?: string; + /** + * Thumbprint of the NSX-T Manager SSL certificate + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nsxtCertificateThumbprint?: string; +} + +/** + * A private cloud resource + */ +export interface PrivateCloud extends TrackedResource { + /** + * The private cloud SKU + */ + sku?: Sku; + /** + * The properties of a private cloud resource + */ + properties?: PrivateCloudProperties; +} + +/** + * The properties of a cluster + */ +export interface ClusterProperties extends DefaultClusterProperties { + /** + * The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ClusterProvisioningState; +} + +/** + * A cluster resource + */ +export interface Cluster extends Resource { + /** + * The properties of a cluster resource + */ + properties?: ClusterProperties; +} + +/** + * Administrative credentials for accessing vCenter and NSX-T + */ +export interface AdminCredentials { + /** + * NSX-T Manager username + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nsxtUsername?: string; + /** + * NSX-T Manager password + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nsxtPassword?: string; + /** + * vCenter admin username + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vcenterUsername?: string; + /** + * vCenter admin password + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vcenterPassword?: string; +} + +/** + * Optional Parameters. + */ +export interface ClustersCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of a cluster resource + */ + properties?: ClusterProperties; +} + +/** + * Optional Parameters. + */ +export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of a cluster resource + */ + properties?: ClusterProperties; +} + +/** + * Optional Parameters. + */ +export interface ClustersBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of a cluster resource + */ + properties?: ClusterProperties; +} + +/** + * Optional Parameters. + */ +export interface ClustersBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties of a cluster resource + */ + properties?: ClusterProperties; +} + +/** + * An interface representing AvsClientOptions. + */ +export interface AvsClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Pageable list of operations + * @extends Array + */ +export interface OperationList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of private clouds + * @extends Array + */ +export interface PrivateCloudList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of clusters + * @extends Array + */ +export interface ClusterList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for QuotaEnabled. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type QuotaEnabled = 'Enabled' | 'Disabled'; + +/** + * Defines values for SslEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SslEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for PrivateCloudProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' + * @readonly + * @enum {string} + */ +export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Updating'; + +/** + * Defines values for InternetEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type InternetEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for ClusterProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' + * @readonly + * @enum {string} + */ +export type ClusterProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Updating'; + +/** + * Defines values for Status. + * Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' + * @readonly + * @enum {string} + */ +export type Status = 'TrialAvailable' | 'TrialUsed' | 'TrialDisabled'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * 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: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * 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: OperationList; + }; +}; + +/** + * Contains response data for the checkTrialAvailability operation. + */ +export type LocationsCheckTrialAvailabilityResponse = Trial & { + /** + * 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: Trial; + }; +}; + +/** + * Contains response data for the checkQuotaAvailability operation. + */ +export type LocationsCheckQuotaAvailabilityResponse = Quota & { + /** + * 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: Quota; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PrivateCloudsListResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the listInSubscription operation. + */ +export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateCloudsGetResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PrivateCloudsUpdateResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the listAdminCredentials operation. + */ +export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials & { + /** + * 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: AdminCredentials; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateCloudsBeginCreateOrUpdateResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type PrivateCloudsBeginUpdateResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateCloudsListNextResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the listInSubscriptionNext operation. + */ +export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ClustersListResponse = ClusterList & { + /** + * 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: ClusterList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ClustersGetResponse = Cluster & { + /** + * 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: Cluster; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ClustersCreateOrUpdateResponse = Cluster & { + /** + * 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: Cluster; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ClustersUpdateResponse = Cluster & { + /** + * 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: Cluster; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ClustersBeginCreateOrUpdateResponse = Cluster & { + /** + * 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: Cluster; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ClustersBeginUpdateResponse = Cluster & { + /** + * 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: Cluster; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ClustersListNextResponse = ClusterList & { + /** + * 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: ClusterList; + }; +}; diff --git a/sdk/avs/arm-avs/src/models/locationsMappers.ts b/sdk/avs/arm-avs/src/models/locationsMappers.ts new file mode 100644 index 000000000000..f5e242fadc39 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/locationsMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + ApiError, + ApiErrorBase, + Quota, + Trial +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/mappers.ts b/sdk/avs/arm-avs/src/models/mappers.ts new file mode 100644 index 000000000000..3951f30781e9 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/mappers.ts @@ -0,0 +1,763 @@ +/* + * 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. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Trial: msRest.CompositeMapper = { + serializedName: "Trial", + type: { + name: "Composite", + className: "Trial", + modelProperties: { + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + availableHosts: { + readOnly: true, + serializedName: "availableHosts", + type: { + name: "Number" + } + } + } + } +}; + +export const Quota: msRest.CompositeMapper = { + serializedName: "Quota", + type: { + name: "Composite", + className: "Quota", + modelProperties: { + hostsRemaining: { + readOnly: true, + serializedName: "hostsRemaining", + type: { + name: "Dictionary", + value: { + type: { + name: "Number" + } + } + } + }, + quotaEnabled: { + serializedName: "quotaEnabled", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ApiErrorBase: msRest.CompositeMapper = { + serializedName: "ApiErrorBase", + type: { + name: "Composite", + className: "ApiErrorBase", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ApiError: msRest.CompositeMapper = { + serializedName: "ApiError", + type: { + name: "Composite", + className: "ApiError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ApiErrorBase" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + readOnly: true, + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const ExpressRouteAuthorization: msRest.CompositeMapper = { + serializedName: "ExpressRouteAuthorization", + type: { + name: "Composite", + className: "ExpressRouteAuthorization", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + key: { + readOnly: true, + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const Circuit: msRest.CompositeMapper = { + serializedName: "Circuit", + type: { + name: "Composite", + className: "Circuit", + modelProperties: { + primarySubnet: { + readOnly: true, + serializedName: "primarySubnet", + type: { + name: "String" + } + }, + secondarySubnet: { + readOnly: true, + serializedName: "secondarySubnet", + type: { + name: "String" + } + }, + expressRouteID: { + readOnly: true, + serializedName: "expressRouteID", + type: { + name: "String" + } + }, + authorizations: { + serializedName: "authorizations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteAuthorization" + } + } + } + }, + expressRoutePrivatePeeringID: { + readOnly: true, + serializedName: "expressRoutePrivatePeeringID", + type: { + name: "String" + } + } + } + } +}; + +export const Endpoints: msRest.CompositeMapper = { + serializedName: "Endpoints", + type: { + name: "Composite", + className: "Endpoints", + modelProperties: { + nsxtManager: { + readOnly: true, + serializedName: "nsxtManager", + type: { + name: "String" + } + }, + vcsa: { + readOnly: true, + serializedName: "vcsa", + type: { + name: "String" + } + } + } + } +}; + +export const IdentitySource: msRest.CompositeMapper = { + serializedName: "IdentitySource", + type: { + name: "Composite", + className: "IdentitySource", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + alias: { + serializedName: "alias", + type: { + name: "String" + } + }, + domain: { + serializedName: "domain", + type: { + name: "String" + } + }, + baseUserDN: { + serializedName: "baseUserDN", + type: { + name: "String" + } + }, + baseGroupDN: { + serializedName: "baseGroupDN", + type: { + name: "String" + } + }, + primaryServer: { + serializedName: "primaryServer", + type: { + name: "String" + } + }, + secondaryServer: { + serializedName: "secondaryServer", + type: { + name: "String" + } + }, + ssl: { + serializedName: "ssl", + type: { + name: "String" + } + }, + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const DefaultClusterProperties: msRest.CompositeMapper = { + serializedName: "DefaultClusterProperties", + type: { + name: "Composite", + className: "DefaultClusterProperties", + modelProperties: { + clusterId: { + readOnly: true, + serializedName: "clusterId", + type: { + name: "Number" + } + }, + clusterSize: { + serializedName: "clusterSize", + type: { + name: "Number" + } + }, + hosts: { + readOnly: true, + serializedName: "hosts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateCloudProperties: msRest.CompositeMapper = { + serializedName: "PrivateCloudProperties", + type: { + name: "Composite", + className: "PrivateCloudProperties", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + circuit: { + serializedName: "circuit", + type: { + name: "Composite", + className: "Circuit" + } + }, + cluster: { + serializedName: "cluster", + type: { + name: "Composite", + className: "DefaultClusterProperties" + } + }, + clusters: { + readOnly: true, + serializedName: "clusters", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + endpoints: { + readOnly: true, + serializedName: "endpoints", + type: { + name: "Composite", + className: "Endpoints" + } + }, + internet: { + serializedName: "internet", + type: { + name: "String" + } + }, + identitySources: { + serializedName: "identitySources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentitySource" + } + } + } + }, + networkBlock: { + serializedName: "networkBlock", + type: { + name: "String" + } + }, + managementNetwork: { + readOnly: true, + serializedName: "managementNetwork", + type: { + name: "String" + } + }, + provisioningNetwork: { + readOnly: true, + serializedName: "provisioningNetwork", + type: { + name: "String" + } + }, + vmotionNetwork: { + readOnly: true, + serializedName: "vmotionNetwork", + type: { + name: "String" + } + }, + vcenterPassword: { + serializedName: "vcenterPassword", + type: { + name: "String" + } + }, + nsxtPassword: { + serializedName: "nsxtPassword", + type: { + name: "String" + } + }, + vcenterCertificateThumbprint: { + readOnly: true, + serializedName: "vcenterCertificateThumbprint", + type: { + name: "String" + } + }, + nsxtCertificateThumbprint: { + readOnly: true, + serializedName: "nsxtCertificateThumbprint", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateCloud: msRest.CompositeMapper = { + serializedName: "PrivateCloud", + type: { + name: "Composite", + className: "PrivateCloud", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateCloudProperties" + } + } + } + } +}; + +export const ClusterProperties: msRest.CompositeMapper = { + serializedName: "ClusterProperties", + type: { + name: "Composite", + className: "ClusterProperties", + modelProperties: { + ...DefaultClusterProperties.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterProperties" + } + } + } + } +}; + +export const AdminCredentials: msRest.CompositeMapper = { + serializedName: "AdminCredentials", + type: { + name: "Composite", + className: "AdminCredentials", + modelProperties: { + nsxtUsername: { + readOnly: true, + serializedName: "nsxtUsername", + type: { + name: "String" + } + }, + nsxtPassword: { + readOnly: true, + serializedName: "nsxtPassword", + type: { + name: "String" + } + }, + vcenterUsername: { + readOnly: true, + serializedName: "vcenterUsername", + type: { + name: "String" + } + }, + vcenterPassword: { + readOnly: true, + serializedName: "vcenterPassword", + type: { + name: "String" + } + } + } + } +}; + +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateCloudList: msRest.CompositeMapper = { + serializedName: "PrivateCloudList", + type: { + name: "Composite", + className: "PrivateCloudList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateCloud" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterList: msRest.CompositeMapper = { + serializedName: "ClusterList", + type: { + name: "Composite", + className: "ClusterList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/avs/arm-avs/src/models/operationsMappers.ts b/sdk/avs/arm-avs/src/models/operationsMappers.ts new file mode 100644 index 000000000000..b694633c9b26 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/operationsMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + ApiError, + ApiErrorBase, + Operation, + OperationDisplay, + OperationList +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/parameters.ts b/sdk/avs/arm-avs/src/models/parameters.ts new file mode 100644 index 000000000000..7e139c882955 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/parameters.ts @@ -0,0 +1,93 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const clusterName: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const privateCloudName: msRest.OperationURLParameter = { + parameterPath: "privateCloudName", + mapper: { + required: true, + serializedName: "privateCloudName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts new file mode 100644 index 000000000000..cfaee30705e1 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts @@ -0,0 +1,27 @@ +/* + * 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 { + AdminCredentials, + ApiError, + ApiErrorBase, + BaseResource, + Circuit, + Cluster, + ClusterProperties, + DefaultClusterProperties, + Endpoints, + ExpressRouteAuthorization, + IdentitySource, + PrivateCloud, + PrivateCloudList, + PrivateCloudProperties, + Resource, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/operations/clusters.ts b/sdk/avs/arm-avs/src/operations/clusters.ts new file mode 100644 index 000000000000..55d15ba781df --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/clusters.ts @@ -0,0 +1,406 @@ +/* + * 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. + */ + +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/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: AvsClientContext; + + /** + * Create a Clusters. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List clusters in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a cluster by name in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Update a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,privateCloudName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Update a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * @summary Delete a cluster in a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + clusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List clusters in a private cloud + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/index.ts b/sdk/avs/arm-avs/src/operations/index.ts new file mode 100644 index 000000000000..71fd92df1663 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/index.ts @@ -0,0 +1,14 @@ +/* + * 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 * from "./operations"; +export * from "./locations"; +export * from "./privateClouds"; +export * from "./clusters"; diff --git a/sdk/avs/arm-avs/src/operations/locations.ts b/sdk/avs/arm-avs/src/operations/locations.ts new file mode 100644 index 000000000000..f9ba99a45921 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/locations.ts @@ -0,0 +1,134 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Locations. */ +export class Locations { + private readonly client: AvsClientContext; + + /** + * Create a Locations. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * Return trial status for subscription by region + * @param location Azure region + * @param [options] The optional parameters + * @returns Promise + */ + checkTrialAvailability(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location Azure region + * @param callback The callback + */ + checkTrialAvailability(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location Azure region + * @param options The optional parameters + * @param callback The callback + */ + checkTrialAvailability(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkTrialAvailability(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + checkTrialAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Return quota for subscription by region + * @param location Azure region + * @param [options] The optional parameters + * @returns Promise + */ + checkQuotaAvailability(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location Azure region + * @param callback The callback + */ + checkQuotaAvailability(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location Azure region + * @param options The optional parameters + * @param callback The callback + */ + checkQuotaAvailability(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkQuotaAvailability(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + checkQuotaAvailabilityOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkTrialAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Trial + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const checkQuotaAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Quota + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/operations.ts b/sdk/avs/arm-avs/src/operations/operations.ts new file mode 100644 index 000000000000..44d5e10114eb --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AvsClientContext; + + /** + * Create a Operations. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * Lists all of the available operations + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available operations + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AVS/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/privateClouds.ts b/sdk/avs/arm-avs/src/operations/privateClouds.ts new file mode 100644 index 000000000000..2d7f1b92ca09 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/privateClouds.ts @@ -0,0 +1,533 @@ +/* + * 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. + */ + +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/privateCloudsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a PrivateClouds. */ +export class PrivateClouds { + private readonly client: AvsClientContext; + + /** + * Create a PrivateClouds. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List private clouds in a resource group + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param callback The callback + */ + list(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary List private clouds in a subscription + * @param [options] The optional parameters + * @returns Promise + */ + listInSubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listInSubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listInSubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInSubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listInSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,privateCloud,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Update a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,privateCloudName,privateCloud,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary List the admin credentials for the private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + listAdminCredentials(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + listAdminCredentials(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listAdminCredentialsOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + privateCloud, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Update a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + privateCloud, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * @summary Delete a private cloud + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List private clouds in a resource group + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List private clouds in a subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listInSubscriptionNext(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 + */ + listInSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listInSubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloud + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listAdminCredentialsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdminCredentials + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateCloud", + mapper: { + ...Mappers.PrivateCloud, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateCloud + }, + 201: { + bodyMapper: Mappers.PrivateCloud + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateCloud", + mapper: { + ...Mappers.PrivateCloud, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateCloud + }, + 201: { + bodyMapper: Mappers.PrivateCloud + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listInSubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/tsconfig.json b/sdk/avs/arm-avs/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/avs/arm-avs/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/sdk/batch/ci.yml b/sdk/batch/ci.yml deleted file mode 100644 index af6f19cb18f8..000000000000 --- a/sdk/batch/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/batch/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/batch/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: batch - Artifacts: - - name: azure-batch - safeName: azurebatch diff --git a/sdk/cognitiveservices/arm-cognitiveservices/package.json b/sdk/cognitiveservices/arm-cognitiveservices/package.json index 415bda043a90..b8255180a9b5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/package.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-cognitiveservices", "author": "Microsoft Corporation", "description": "CognitiveServicesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.1.0", + "version": "5.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts index 8afd112e353b..7822fa149d26 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts @@ -21,11 +21,13 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien accounts: operations.Accounts; resourceSkus: operations.ResourceSkus; operations: operations.Operations; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; /** * Initializes a new instance of the CognitiveServicesManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CognitiveServicesManagementClientOptions) { @@ -33,6 +35,8 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien this.accounts = new operations.Accounts(this); this.resourceSkus = new operations.ResourceSkus(this); this.operations = new operations.Operations(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); } /** diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts index 828cb43f0e0e..8c84330f67a7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-cognitiveservices"; -const packageVersion = "5.1.0"; +const packageVersion = "5.2.0"; export class CognitiveServicesManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -23,7 +23,7 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS /** * Initializes a new instance of the CognitiveServicesManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CognitiveServicesManagementClientOptions) { @@ -37,7 +37,7 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +52,10 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts index ac1c9768b282..3967c44a4a82 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts @@ -7,6 +7,7 @@ */ export { + AzureEntityResource, BaseResource, CognitiveServicesAccount, CognitiveServicesAccountApiProperties, @@ -23,8 +24,18 @@ export { KeyVaultProperties, MetricName, NetworkRuleSet, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionState, + ProxyResource, RegenerateKeyParameters, + Resource, Sku, + SkuCapability, + TrackedResource, Usage, UsagesResult, UserAssignedIdentity, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts index 150f51cd9164..83037b1bc0fb 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts @@ -27,6 +27,20 @@ export interface Sku { readonly tier?: SkuTier; } +/** + * SkuCapability indicates the capability of a certain feature. + */ +export interface SkuCapability { + /** + * The name of the SkuCapability. + */ + name?: string; + /** + * The value of the SkuCapability. + */ + value?: string; +} + /** * A rule governing the accessibility from a specific ip address or ip range. */ @@ -119,6 +133,89 @@ export interface UserOwnedStorage { resourceId?: string; } +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * 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. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + 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. + */ + actionRequired?: string; +} + +/** + * Properties of the PrivateEndpointConnectProperties. + */ +export interface PrivateEndpointConnectionProperties { + /** + * 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; + /** + * The private link resource group ids. + */ + groupIds?: string[]; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { + /** + * 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.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * Resource properties. + */ + properties?: PrivateEndpointConnectionProperties; +} + /** * The api properties for special APIs. */ @@ -162,6 +259,12 @@ export interface CognitiveServicesAccountProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly internalId?: string; + /** + * Gets the capabilities of the cognitive services account. Each item indicates the capability of + * a specific feature. The values are read-only and for reference only. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capabilities?: SkuCapability[]; /** * Optional subdomain name used for token-based authentication. */ @@ -178,6 +281,15 @@ export interface CognitiveServicesAccountProperties { * The storage accounts for this resource. */ userOwnedStorage?: UserOwnedStorage[]; + /** + * The private endpoint connection associated with the Cognitive Services account. + */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Whether or not public endpoint access is allowed for this account. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; /** * The api properties for special APIs. */ @@ -638,6 +750,83 @@ export interface ResourceSku { readonly restrictions?: ResourceSkuRestrictions[]; } +/** + * Properties of a private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * Resource properties. + */ + properties?: PrivateLinkResourceProperties; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + /** * Optional Parameters. */ @@ -724,6 +913,22 @@ export type NetworkRuleAction = 'Allow' | 'Deny'; */ export type KeySource = 'Microsoft.CognitiveServices' | 'Microsoft.KeyVault'; +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + /** * Defines values for IdentityType. * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' @@ -1112,3 +1317,63 @@ export type CheckDomainAvailabilityResponse = CheckDomainAvailabilityResult & { parsedBody: CheckDomainAvailabilityResult; }; }; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PrivateLinkResourcesListResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts index 5e26890f3fca..9971f695d414 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts @@ -41,6 +41,28 @@ export const Sku: msRest.CompositeMapper = { } }; +export const SkuCapability: msRest.CompositeMapper = { + serializedName: "SkuCapability", + type: { + name: "Composite", + className: "SkuCapability", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + export const IpRule: msRest.CompositeMapper = { serializedName: "IpRule", type: { @@ -195,6 +217,136 @@ export const UserOwnedStorage: msRest.CompositeMapper = { } }; +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionRequired: { + serializedName: "actionRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + groupIds: { + serializedName: "groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + export const CognitiveServicesAccountApiProperties: msRest.CompositeMapper = { serializedName: "CognitiveServicesAccountApiProperties", type: { @@ -264,6 +416,19 @@ export const CognitiveServicesAccountProperties: msRest.CompositeMapper = { name: "String" } }, + capabilities: { + readOnly: true, + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCapability" + } + } + } + }, customSubDomainName: { serializedName: "customSubDomainName", type: { @@ -296,6 +461,24 @@ export const CognitiveServicesAccountProperties: msRest.CompositeMapper = { } } }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, apiProperties: { serializedName: "apiProperties", type: { @@ -1069,6 +1252,151 @@ export const ResourceSku: msRest.CompositeMapper = { } }; +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const CognitiveServicesAccountListResult: msRest.CompositeMapper = { serializedName: "CognitiveServicesAccountListResult", type: { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts index 6d8020a2396a..7865e981bfd7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts @@ -40,6 +40,9 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -78,11 +81,26 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, type: { name: "String" } @@ -93,6 +111,9 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..a7458b249d23 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,35 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + CognitiveServicesAccount, + CognitiveServicesAccountApiProperties, + CognitiveServicesAccountProperties, + Encryption, + Identity, + IpRule, + KeyVaultProperties, + NetworkRuleSet, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + Sku, + SkuCapability, + TrackedResource, + UserAssignedIdentity, + UserOwnedStorage, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..9c23d80a285a --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,36 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + CognitiveServicesAccount, + CognitiveServicesAccountApiProperties, + CognitiveServicesAccountProperties, + Encryption, + Identity, + IpRule, + KeyVaultProperties, + NetworkRuleSet, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + Sku, + SkuCapability, + TrackedResource, + UserAssignedIdentity, + UserOwnedStorage, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts index ecc6be333591..a0b41d594d5e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts @@ -29,7 +29,7 @@ export class Accounts { /** * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the * keys for developer to access intelligent APIs. It's also the resource type for billing. - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param [options] The optional parameters @@ -37,14 +37,14 @@ export class Accounts { */ create(resourceGroupName: string, accountName: string, account: Models.CognitiveServicesAccount, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param callback The callback */ create(resourceGroupName: string, accountName: string, account: Models.CognitiveServicesAccount, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param options The optional parameters @@ -65,7 +65,7 @@ export class Accounts { /** * Updates a Cognitive Services account - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param [options] The optional parameters @@ -73,14 +73,14 @@ export class Accounts { */ update(resourceGroupName: string, accountName: string, account: Models.CognitiveServicesAccount, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param callback The callback */ update(resourceGroupName: string, accountName: string, account: Models.CognitiveServicesAccount, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param account The parameters to provide for the created account. * @param options The optional parameters @@ -101,20 +101,20 @@ export class Accounts { /** * Deletes a Cognitive Services account from the resource group. - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param callback The callback */ deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param options The optional parameters * @param callback The callback @@ -133,20 +133,20 @@ export class Accounts { /** * Returns a Cognitive Services account specified by the parameters. - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param [options] The optional parameters * @returns Promise */ getProperties(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param callback The callback */ getProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param options The optional parameters * @param callback The callback @@ -165,18 +165,18 @@ export class Accounts { /** * Returns all the resources of a particular type belonging to a resource group - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -217,20 +217,20 @@ export class Accounts { /** * Lists the account keys for the specified Cognitive Services account. - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param [options] The optional parameters * @returns Promise */ listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param callback The callback */ listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param options The optional parameters * @param callback The callback @@ -249,7 +249,7 @@ export class Accounts { /** * Regenerates the specified account key for the specified Cognitive Services account. - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' * @param [options] The optional parameters @@ -257,14 +257,14 @@ export class Accounts { */ regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.KeyName, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' * @param callback The callback */ regenerateKey(resourceGroupName: string, accountName: string, keyName: Models.KeyName, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' * @param options The optional parameters @@ -285,20 +285,20 @@ export class Accounts { /** * List available SKUs for the requested Cognitive Services account - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param [options] The optional parameters * @returns Promise */ listSkus(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param callback The callback */ listSkus(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param options The optional parameters * @param callback The callback @@ -317,20 +317,20 @@ export class Accounts { /** * Get usages for the requested Cognitive Services account - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param [options] The optional parameters * @returns Promise */ getUsages(resourceGroupName: string, accountName: string, options?: Models.AccountsGetUsagesOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param callback The callback */ getUsages(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param options The optional parameters * @param callback The callback diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts index ab8ff4425b47..a463035550cd 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts @@ -11,3 +11,5 @@ export * from "./accounts"; export * from "./resourceSkus"; export * from "./operations"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..c6e04ad142eb --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts @@ -0,0 +1,237 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClientContext } from "../cognitiveServicesManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: CognitiveServicesManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {CognitiveServicesManagementClientContext} client Reference to the service client. + */ + constructor(client: CognitiveServicesManagementClientContext) { + this.client = client; + } + + /** + * Gets the specified private endpoint connection associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the Cognitive Services + * account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param properties The private endpoint connection properties. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param properties The private endpoint connection properties. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + privateEndpointConnectionName, + properties, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the Cognitive Services + * account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Cognitive Services Account + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + privateEndpointConnectionName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..7c3043b2d1d7 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { CognitiveServicesManagementClientContext } from "../cognitiveServicesManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: CognitiveServicesManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {CognitiveServicesManagementClientContext} client Reference to the service client. + */ + constructor(client: CognitiveServicesManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cognitiveservices/ci.yml b/sdk/cognitiveservices/ci.yml deleted file mode 100644 index 5ab97024c7f1..000000000000 --- a/sdk/cognitiveservices/ci.yml +++ /dev/null @@ -1,87 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/cognitiveservices/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/cognitiveservices/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: cognitiveservices - Artifacts: - - name: azure-cognitiveservices-anomalydetector - safeName: azurecognitiveservicesanomalydetector - - name: azure-cognitiveservices-autosuggest - safeName: azurecognitiveservicesautosuggest - - name: azure-cognitiveservices-computervision - safeName: azurecognitiveservicescomputervision - - name: azure-cognitiveservices-contentmoderator - safeName: azurecognitiveservicescontentmoderator - - name: azure-cognitiveservices-customimagesearch - safeName: azurecognitiveservicescustomimagesearch - - name: azure-cognitiveservices-customsearch - safeName: azurecognitiveservicescustomsearch - - name: azure-cognitiveservices-customvision-prediction - safeName: azurecognitiveservicescustomvisionprediction - - name: azure-cognitiveservices-customvision-training - safeName: azurecognitiveservicescustomvisiontraining - - name: azure-cognitiveservices-entitysearch - safeName: azurecognitiveservicesentitysearch - - name: azure-cognitiveservices-face - safeName: azurecognitiveservicesface - - name: azure-cognitiveservices-formrecognizer - safeName: azurecognitiveservicesformrecognizer - - name: azure-cognitiveservices-imagesearch - safeName: azurecognitiveservicesimagesearch - - name: azure-cognitiveservices-localsearch - safeName: azurecognitiveserviceslocalsearch - - name: azure-cognitiveservices-luis-authoring - safeName: azurecognitiveservicesluisauthoring - - name: azure-cognitiveservices-luis-runtime - safeName: azurecognitiveservicesluisruntime - - name: azure-cognitiveservices-newssearch - safeName: azurecognitiveservicesnewssearch - - name: azure-cognitiveservices-personalizer - safeName: azurecognitiveservicespersonalizer - - name: azure-cognitiveservices-qnamaker - safeName: azurecognitiveservicesqnamaker - - name: azure-cognitiveservices-spellcheck - safeName: azurecognitiveservicesspellcheck - - name: azure-cognitiveservices-textanalytics - safeName: azurecognitiveservicestextanalytics - - name: azure-cognitiveservices-translatortext - safeName: azurecognitiveservicestranslatortext - - name: azure-cognitiveservices-videosearch - safeName: azurecognitiveservicesvideosearch - - name: azure-cognitiveservices-visualsearch - safeName: azurecognitiveservicesvisualsearch - - name: azure-cognitiveservices-websearch - safeName: azurecognitiveserviceswebsearch diff --git a/sdk/containerregistry/arm-containerregistry/LICENSE.txt b/sdk/containerregistry/arm-containerregistry/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/containerregistry/arm-containerregistry/LICENSE.txt +++ b/sdk/containerregistry/arm-containerregistry/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/containerregistry/arm-containerregistry/README.md b/sdk/containerregistry/arm-containerregistry/README.md index fb3e085086d8..2afe51005264 100644 --- a/sdk/containerregistry/arm-containerregistry/README.md +++ b/sdk/containerregistry/arm-containerregistry/README.md @@ -15,12 +15,13 @@ npm install @azure/arm-containerregistry ### How to use -#### nodejs - Authentication, client creation and get registries as an example written in TypeScript. +#### nodejs - Authentication, client creation and get exportPipelines as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -36,7 +37,8 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const client = new ContainerRegistryManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const registryName = "testregistryName"; - client.registries.get(resourceGroupName, registryName).then((result) => { + const exportPipelineName = "testexportPipelineName"; + client.exportPipelines.get(resourceGroupName, registryName, exportPipelineName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -45,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get registries as an example written in JavaScript. +#### browser - Authentication, client creation and get exportPipelines as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -81,7 +83,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const client = new Azure.ArmContainerregistry.ContainerRegistryManagementClient(res.creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const registryName = "testregistryName"; - client.registries.get(resourceGroupName, registryName).then((result) => { + const exportPipelineName = "testexportPipelineName"; + client.exportPipelines.get(resourceGroupName, registryName, exportPipelineName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -99,4 +102,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fcontainerregistry%2Farm-containerregistry%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/containerregistry/arm-containerregistry/README.png) diff --git a/sdk/containerregistry/arm-containerregistry/package.json b/sdk/containerregistry/arm-containerregistry/package.json index ac283ac248ae..f97ea35d7d71 100644 --- a/sdk/containerregistry/arm-containerregistry/package.json +++ b/sdk/containerregistry/arm-containerregistry/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-containerregistry", "author": "Microsoft Corporation", "description": "ContainerRegistryManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "8.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/containerRegistryManagementClient.js", "types": "./esm/containerRegistryManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/containerregistry/arm-containerregistry", "repository": { diff --git a/sdk/containerregistry/arm-containerregistry/rollup.config.js b/sdk/containerregistry/arm-containerregistry/rollup.config.js index 75df723c2ed4..66c48646cb11 100644 --- a/sdk/containerregistry/arm-containerregistry/rollup.config.js +++ b/sdk/containerregistry/arm-containerregistry/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts index 9458327f3697..19afb901c50b 100644 --- a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts +++ b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts @@ -17,11 +17,17 @@ import { ContainerRegistryManagementClientContext } from "./containerRegistryMan class ContainerRegistryManagementClient extends ContainerRegistryManagementClientContext { // Operation groups + exportPipelines: operations.ExportPipelines; registries: operations.Registries; + importPipelines: operations.ImportPipelines; operations: operations.Operations; + pipelineRuns: operations.PipelineRuns; + privateEndpointConnections: operations.PrivateEndpointConnections; replications: operations.Replications; webhooks: operations.Webhooks; + agentPools: operations.AgentPools; runs: operations.Runs; + taskRuns: operations.TaskRuns; tasks: operations.Tasks; scopeMaps: operations.ScopeMaps; tokens: operations.Tokens; @@ -34,11 +40,17 @@ class ContainerRegistryManagementClient extends ContainerRegistryManagementClien */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ContainerRegistryManagementClientOptions) { super(credentials, subscriptionId, options); + this.exportPipelines = new operations.ExportPipelines(this); this.registries = new operations.Registries(this); + this.importPipelines = new operations.ImportPipelines(this); this.operations = new operations.Operations(this); + this.pipelineRuns = new operations.PipelineRuns(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.replications = new operations.Replications(this); this.webhooks = new operations.Webhooks(this); + this.agentPools = new operations.AgentPools(this); this.runs = new operations.Runs(this); + this.taskRuns = new operations.TaskRuns(this); this.tasks = new operations.Tasks(this); this.scopeMaps = new operations.ScopeMaps(this); this.tokens = new operations.Tokens(this); diff --git a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClientContext.ts b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClientContext.ts index ba2c7a009239..a0016e0583e5 100644 --- a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClientContext.ts +++ b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-containerregistry"; -const packageVersion = "7.0.0"; +const packageVersion = "8.0.0"; export class ContainerRegistryManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/agentPoolsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/agentPoolsMappers.ts new file mode 100644 index 000000000000..154994c867f0 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/agentPoolsMappers.ts @@ -0,0 +1,93 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentPoolListResult, + AgentPoolQueueStatus, + AgentPoolUpdateParameters, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ErrorResponse, + ErrorResponseBody, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + InnerErrorDescription, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunRequest, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/exportPipelinesMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/exportPipelinesMappers.ts new file mode 100644 index 000000000000..6ce33478909a --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/exportPipelinesMappers.ts @@ -0,0 +1,89 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + CloudError, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineListResult, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunRequest, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/importPipelinesMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/importPipelinesMappers.ts new file mode 100644 index 000000000000..06141ad4dce9 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/importPipelinesMappers.ts @@ -0,0 +1,89 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + CloudError, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineListResult, + ImportPipelineSourceProperties, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunRequest, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/index.ts b/sdk/containerregistry/arm-containerregistry/src/models/index.ts index 749b2633cab0..596438e9d934 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/index.ts @@ -11,6 +11,112 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * An interface representing UserIdentityProperties. + */ +export interface UserIdentityProperties { + /** + * The principal id of user assigned identity. + */ + principalId?: string; + /** + * The client id of user assigned identity. + */ + clientId?: string; +} + +/** + * Managed identity for the resource. + */ +export interface IdentityProperties { + /** + * The principal ID of resource identity. + */ + principalId?: string; + /** + * The tenant ID of resource. + */ + tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + */ + type?: ResourceIdentityType; + /** + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; +} + +/** + * The properties of the export pipeline target. + */ +export interface ExportPipelineTargetProperties { + /** + * The type of target for the export pipeline. + */ + type?: string; + /** + * The target uri of the export pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + uri?: string; + /** + * They key vault secret uri to obtain the target storage SAS token. + */ + keyVaultUri: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags. + */ +export interface ProxyResource extends BaseResource { + /** + * The resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * An object that represents an export pipeline for a container registry. + */ +export interface ExportPipeline extends ProxyResource { + /** + * The identity of the export pipeline. + */ + identity?: IdentityProperties; + /** + * The target properties of the export pipeline. + */ + target: ExportPipelineTargetProperties; + /** + * The list of all options configured for the pipeline. + */ + options?: PipelineOptions[]; + /** + * The provisioning state of the pipeline at the time the operation was called. Possible values + * include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + /** * An interface representing ImportSourceCredentials. */ @@ -75,6 +181,76 @@ export interface ImportImageParameters { mode?: ImportMode; } +/** + * The properties of the import pipeline source. + */ +export interface ImportPipelineSourceProperties { + /** + * The type of source for the import pipeline. Possible values include: + * 'AzureStorageBlobContainer'. Default value: 'AzureStorageBlobContainer'. + */ + type?: PipelineSourceType; + /** + * The source uri of the import pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + uri?: string; + /** + * They key vault secret uri to obtain the source storage SAS token. + */ + keyVaultUri: string; +} + +/** + * An interface representing PipelineSourceTriggerProperties. + */ +export interface PipelineSourceTriggerProperties { + /** + * The current status of the source trigger. Possible values include: 'Enabled', 'Disabled'. + * Default value: 'Enabled'. + */ + status: TriggerStatus; +} + +/** + * An interface representing PipelineTriggerProperties. + */ +export interface PipelineTriggerProperties { + /** + * The source trigger properties of the pipeline. + */ + sourceTrigger?: PipelineSourceTriggerProperties; +} + +/** + * An object that represents an import pipeline for a container registry. + */ +export interface ImportPipeline extends ProxyResource { + /** + * The identity of the import pipeline. + */ + identity?: IdentityProperties; + /** + * The source properties of the import pipeline. + */ + source: ImportPipelineSourceProperties; + /** + * The properties that describe the trigger of the import pipeline. + */ + trigger?: PipelineTriggerProperties; + /** + * The list of all options configured for the pipeline. + */ + options?: PipelineOptions[]; + /** + * The provisioning state of the pipeline at the time the operation was called. Possible values + * include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + /** * A request to check whether a container registry name is available. */ @@ -157,7 +333,7 @@ export interface OperationMetricSpecificationDefinition { } /** - * The definition of Azure Monitoring metrics list. + * The definition of Azure Monitoring list. */ export interface OperationServiceSpecificationDefinition { /** @@ -188,6 +364,219 @@ export interface OperationDefinition { serviceSpecification?: OperationServiceSpecificationDefinition; } +/** + * An interface representing PipelineRunSourceProperties. + */ +export interface PipelineRunSourceProperties { + /** + * The type of the source. Possible values include: 'AzureStorageBlob'. Default value: + * 'AzureStorageBlob'. + */ + type?: PipelineRunSourceType; + /** + * The name of the source. + */ + name?: string; +} + +/** + * An interface representing PipelineRunTargetProperties. + */ +export interface PipelineRunTargetProperties { + /** + * The type of the target. Possible values include: 'AzureStorageBlob'. Default value: + * 'AzureStorageBlob'. + */ + type?: PipelineRunTargetType; + /** + * The name of the target. + */ + name?: string; +} + +/** + * The request properties provided for a pipeline run. + */ +export interface PipelineRunRequest { + /** + * The resource ID of the pipeline to run. + */ + pipelineResourceId?: string; + /** + * List of source artifacts to be transferred by the pipeline. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + */ + artifacts?: string[]; + /** + * The source properties of the pipeline run. + */ + source?: PipelineRunSourceProperties; + /** + * The target properties of the pipeline run. + */ + target?: PipelineRunTargetProperties; + /** + * The digest of the tar used to transfer the artifacts. + */ + catalogDigest?: string; +} + +/** + * An interface representing ProgressProperties. + */ +export interface ProgressProperties { + /** + * The percentage complete of the copy operation. + */ + percentage?: string; +} + +/** + * An interface representing PipelineSourceTriggerDescriptor. + */ +export interface PipelineSourceTriggerDescriptor { + /** + * The timestamp when the source update happened. + */ + timestamp?: Date; +} + +/** + * An interface representing PipelineTriggerDescriptor. + */ +export interface PipelineTriggerDescriptor { + /** + * The source trigger that caused the pipeline run. + */ + sourceTrigger?: PipelineSourceTriggerDescriptor; +} + +/** + * The response properties returned for a pipeline run. + */ +export interface PipelineRunResponse { + /** + * The current status of the pipeline run. + */ + status?: string; + /** + * The artifacts imported in the pipeline run. + */ + importedArtifacts?: string[]; + /** + * The current progress of the copy operation. + */ + progress?: ProgressProperties; + /** + * The time the pipeline run started. + */ + startTime?: Date; + /** + * The time the pipeline run finished. + */ + finishTime?: Date; + /** + * The source of the pipeline run. + */ + source?: ImportPipelineSourceProperties; + /** + * The target of the pipeline run. + */ + target?: ExportPipelineTargetProperties; + /** + * The digest of the tar used to transfer the artifacts. + */ + catalogDigest?: string; + /** + * The trigger that caused the pipeline run. + */ + trigger?: PipelineTriggerDescriptor; + /** + * The detailed error message for the pipeline run in the case of failure. + */ + pipelineRunErrorMessage?: string; +} + +/** + * An object that represents a pipeline run for a container registry. + */ +export interface PipelineRun extends ProxyResource { + /** + * The provisioning state of a pipeline run. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The request parameters for a pipeline run. + */ + request?: PipelineRunRequest; + /** + * The response of a pipeline run. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly response?: PipelineRunResponse; + /** + * How the pipeline run should be forced to recreate even if the pipeline run configuration has + * not changed. + */ + forceUpdateTag?: string; +} + +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * This is private endpoint resource created with Microsoft.Network resource provider. + */ + id?: string; +} + +/** + * The state of a private link service connection. + */ +export interface PrivateLinkServiceConnectionState { + /** + * The private link service connection status. Possible values include: 'Approved', 'Pending', + * 'Rejected', 'Disconnected' + */ + status?: ConnectionStatus; + /** + * The description for connection status. For example if connection is rejected it can indicate + * reason for rejection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + * Possible values include: 'None', 'Recreate' + */ + actionsRequired?: ActionsRequired; +} + +/** + * An object that represents a private endpoint connection for a container registry. + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * The resource of private endpoint. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of private endpoint connection resource. Possible values include: + * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + /** * The SKU of a container registry. */ @@ -208,7 +597,7 @@ export interface Sku { /** * The status of an Azure resource at the time the operation was called. */ -export interface Status1 { +export interface Status { /** * The short label for the status. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -290,7 +679,7 @@ export interface NetworkRuleSet { export interface QuarantinePolicy { /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -300,12 +689,12 @@ export interface QuarantinePolicy { */ export interface TrustPolicy { /** - * The type of trust policy. Possible values include: 'Notary' + * The type of trust policy. Possible values include: 'Notary'. Default value: 'Notary'. */ type?: TrustPolicyType; /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -315,7 +704,8 @@ export interface TrustPolicy { */ export interface RetentionPolicy { /** - * The number of days to retain manifest before it expires. + * The number of days to retain an untagged manifest after which it gets purged. Default value: + * 7. */ days?: number; /** @@ -325,7 +715,7 @@ export interface RetentionPolicy { readonly lastUpdatedTime?: Date; /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -348,6 +738,41 @@ export interface Policies { retentionPolicy?: RetentionPolicy; } +/** + * An interface representing KeyVaultProperties. + */ +export interface KeyVaultProperties { + /** + * Key vault uri to access the encryption key. + */ + keyIdentifier?: string; + /** + * The fully qualified key identifier that includes the version of the key that is actually used + * for encryption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly versionedKeyIdentifier?: string; + /** + * The client id of the identity which will be used to access key vault. + */ + identity?: string; +} + +/** + * An interface representing EncryptionProperty. + */ +export interface EncryptionProperty { + /** + * Indicates whether or not the encryption is enabled for container registry. Possible values + * include: 'enabled', 'disabled' + */ + status?: EncryptionStatus; + /** + * Key vault properties. + */ + keyVaultProperties?: KeyVaultProperties; +} + /** * An Azure resource. */ @@ -385,6 +810,10 @@ export interface Registry extends Resource { * The SKU of the container registry. */ sku: Sku; + /** + * The identity of the container registry. + */ + identity?: IdentityProperties; /** * The URL that can be used to log into the container registry. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -405,7 +834,7 @@ export interface Registry extends Resource { * The status of the container registry at the time the operation was called. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: Status1; + readonly status?: Status; /** * The value that indicates whether the admin user is enabled. Default value: false. */ @@ -423,6 +852,29 @@ export interface Registry extends Resource { * The policies for a container registry. */ policies?: Policies; + /** + * The encryption settings of container registry. + */ + encryption?: EncryptionProperty; + /** + * Enable a single data endpoint per region for serving data. + */ + dataEndpointEnabled?: boolean; + /** + * List of host names that will serve data when dataEndpointEnabled is true. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataEndpointHostNames?: string[]; + /** + * List of private endpoint connections for a container registry. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Whether or not public network access is allowed for the container registry. Possible values + * include: 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccess?: PublicNetworkAccess; } /** @@ -437,6 +889,10 @@ export interface RegistryUpdateParameters { * The SKU of the container registry. */ sku?: Sku; + /** + * The identity of the container registry. + */ + identity?: IdentityProperties; /** * The value that indicates whether the admin user is enabled. */ @@ -449,6 +905,19 @@ export interface RegistryUpdateParameters { * The policies for a container registry. */ policies?: Policies; + /** + * The encryption settings of container registry. + */ + encryption?: EncryptionProperty; + /** + * Enable a single data endpoint per region for serving data. + */ + dataEndpointEnabled?: boolean; + /** + * Whether or not public network access is allowed for the container registry. Possible values + * include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; } /** @@ -522,6 +991,37 @@ export interface RegistryUsageListResult { value?: RegistryUsage[]; } +/** + * A resource that supports private link capabilities. + */ +export interface PrivateLinkResource { + /** + * The resource type is private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The resource ID. + */ + id?: string; + /** + * The name of the resource. + */ + name?: string; + /** + * The private link resource group id. + */ + groupId?: string; + /** + * The private link resource required member names. + */ + requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + /** * An object that represents a replication for a container registry. */ @@ -536,7 +1036,13 @@ export interface Replication extends Resource { * The status of the replication at the time the operation was called. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: Status1; + readonly status?: Status; + /** + * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed + * to a replication whose regional endpoint is disabled, however its data will continue to be + * synced with other replications. Default value: true. + */ + regionEndpointEnabled?: boolean; } /** @@ -547,6 +1053,12 @@ export interface ReplicationUpdateParameters { * The tags for the replication. */ tags?: { [propertyName: string]: string }; + /** + * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed + * to a replication whose regional endpoint is disabled, however its data will continue to be + * synced with other replications. + */ + regionEndpointEnabled?: boolean; } /** @@ -869,6 +1381,59 @@ export interface Event extends EventInfo { eventResponseMessage?: EventResponseMessage; } +/** + * The agentpool that has the ARM resource and properties. + * The agentpool will have all information to create an agent pool. + */ +export interface AgentPool extends Resource { + /** + * The count of agent machine + */ + count?: number; + /** + * The Tier of agent machine + */ + tier?: string; + /** + * The OS of agent machine. Possible values include: 'Windows', 'Linux' + */ + os?: OS; + /** + * The Virtual Network Subnet Resource Id of the agent machine + */ + virtualNetworkSubnetResourceId?: string; + /** + * The provisioning state of this agent pool. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + +/** + * The parameters for updating an agent pool. + */ +export interface AgentPoolUpdateParameters { + /** + * The count of agent machine + */ + count?: number; + /** + * The ARM resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * The QueueStatus of Agent Pool + */ +export interface AgentPoolQueueStatus { + /** + * The number of pending runs in the queue + */ + count?: number; +} + /** * Contains the possible cases for RunRequest. */ @@ -887,6 +1452,10 @@ export interface RunRequest { * false. */ isArchiveEnabled?: boolean; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; } /** @@ -1005,28 +1574,6 @@ export interface AgentProperties { cpu?: number; } -/** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags. - */ -export interface ProxyResource extends BaseResource { - /** - * The resource ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - /** * Run resource properties */ @@ -1048,6 +1595,10 @@ export interface Run extends ProxyResource { * The type of run. Possible values include: 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' */ runType?: RunType; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; /** * The time the run was scheduled. */ @@ -1171,6 +1722,10 @@ export interface RunFilter { * The name of the task that the run corresponds to. */ taskName?: string; + /** + * The name of the agent pool that the run corresponds to. + */ + agentPoolName?: string; } /** @@ -1194,43 +1749,55 @@ export interface RunGetLogResult { } /** - * An interface representing UserIdentityProperties. + * The task run that has the ARM resource and properties. + * The task run will have the information of request and result of a run. */ -export interface UserIdentityProperties { +export interface TaskRun extends Resource { /** - * The principal id of user assigned identity. + * Identity for the resource. */ - principalId?: string; + identity?: IdentityProperties; /** - * The client id of user assigned identity. + * The provisioning state of this task run. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - clientId?: string; + readonly provisioningState?: ProvisioningState; + /** + * The request (parameters) for the run + */ + runRequest?: RunRequestUnion; + /** + * The result of this task run + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly runResult?: Run; + /** + * How the run should be forced to rerun even if the run request configuration has not changed + */ + forceUpdateTag?: string; } /** - * Managed identity for the resource. + * The parameters for updating a task run. */ -export interface IdentityProperties { +export interface TaskRunUpdateParameters { /** - * The principal ID of resource identity. + * Identity for the resource. */ - principalId?: string; + identity?: IdentityProperties; /** - * The tenant ID of resource. + * The request (parameters) for the new run */ - tenantId?: string; + runRequest?: RunRequestUnion; /** - * The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - * UserAssigned', 'None' + * How the run should be forced to rerun even if the run request configuration has not changed */ - type?: ResourceIdentityType; + forceUpdateTag?: string; /** - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * The ARM resource tags. */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; + tags?: { [propertyName: string]: string }; } /** @@ -1297,7 +1864,7 @@ export interface TimerTrigger { */ schedule: string; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1370,7 +1937,7 @@ export interface SourceTrigger { */ sourceTriggerEvents: SourceTriggerEvent[]; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1399,7 +1966,7 @@ export interface BaseImageTrigger { */ updateTriggerPayloadType?: UpdateTriggerPayloadType; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1529,6 +2096,10 @@ export interface Task extends Resource { * The machine configuration of the run agent. */ agentConfiguration?: AgentProperties; + /** + * The dedicated agent pool for the task. + */ + agentPoolName?: string; /** * Run timeout in seconds. Default value: 3600. */ @@ -1598,7 +2169,7 @@ export interface TimerTriggerUpdateParameters { */ schedule?: string; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1671,7 +2242,7 @@ export interface SourceTriggerUpdateParameters { */ sourceTriggerEvents?: SourceTriggerEvent[]; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1700,7 +2271,7 @@ export interface BaseImageTriggerUpdateParameters { */ updateTriggerPayloadType?: UpdateTriggerPayloadType; /** - * The current status of trigger. Possible values include: 'Disabled', 'Enabled'. Default value: + * The current status of trigger. Possible values include: 'Enabled', 'Disabled'. Default value: * 'Enabled'. */ status?: TriggerStatus; @@ -1748,6 +2319,10 @@ export interface TaskUpdateParameters { * The machine configuration of the run agent. */ agentConfiguration?: AgentProperties; + /** + * The dedicated agent pool for the task. + */ + agentPoolName?: string; /** * Run timeout in seconds. */ @@ -1770,6 +2345,56 @@ export interface TaskUpdateParameters { tags?: { [propertyName: string]: string }; } +/** + * inner error. + */ +export interface InnerErrorDescription { + /** + * error code. + */ + code: string; + /** + * error message. + */ + message: string; + /** + * target of the particular error. + */ + target?: string; +} + +/** + * An error response from the Azure Container Registry service. + */ +export interface ErrorResponseBody { + /** + * error code. + */ + code: string; + /** + * error message. + */ + message: string; + /** + * target of the particular error. + */ + target?: string; + /** + * an array of additional nested error response info objects, as described by this contract. + */ + details?: InnerErrorDescription; +} + +/** + * An error response from the Azure Container Registry service. + */ +export interface ErrorResponse { + /** + * Azure container registry build API error body. + */ + error?: ErrorResponseBody; +} + /** * The properties of a run argument. */ @@ -1802,6 +2427,10 @@ export interface DockerBuildRequest { * false. */ isArchiveEnabled?: boolean; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; /** * The fully qualified image names including the repository and tag. */ @@ -1884,6 +2513,10 @@ export interface FileTaskRunRequest { * false. */ isArchiveEnabled?: boolean; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; /** * The template/definition file path relative to the source. */ @@ -1965,6 +2598,10 @@ export interface TaskRunRequest { * false. */ isArchiveEnabled?: boolean; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; /** * The resource ID of task against which run has to be queued. */ @@ -1988,6 +2625,10 @@ export interface EncodedTaskRunRequest { * false. */ isArchiveEnabled?: boolean; + /** + * The dedicated agent pool for the run. + */ + agentPoolName?: string; /** * Base64 encoded value of the template/definition file content. */ @@ -2279,8 +2920,8 @@ export interface ScopeMap extends ProxyResource { readonly provisioningState?: ProvisioningState; /** * The list of scoped permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete + * E.g. repositories/repository-name/content/read, + * repositories/repository-name/metadata/write */ actions: string[]; } @@ -2301,6 +2942,23 @@ export interface ScopeMapUpdateParameters { actions?: string[]; } +/** + * The Active Directory Object that will be used for authenticating the token of a container + * registry. + */ +export interface ActiveDirectoryObject { + /** + * The user/group/application object ID for Active Directory Object that will be used for + * authenticating the token of a container registry. + */ + objectId?: string; + /** + * The tenant ID of user/group/application object Active Directory Object that will be used for + * authenticating the token of a container registry. + */ + tenantId?: string; +} + /** * The properties of a certificate used for authenticating a token. */ @@ -2329,7 +2987,7 @@ export interface TokenCertificate { */ export interface TokenPassword { /** - * The password created datetime of the password. + * The creation datetime of the password. */ creationTime?: Date; /** @@ -2337,7 +2995,8 @@ export interface TokenPassword { */ expiry?: Date; /** - * The password name "password" or "password2". Possible values include: 'password1', 'password2' + * The password name "password1" or "password2". Possible values include: 'password1', + * 'password2' */ name?: TokenPasswordName; /** @@ -2351,6 +3010,7 @@ export interface TokenPassword { * The properties of the credentials that can be used for authenticating the token. */ export interface TokenCredentialsProperties { + activeDirectoryObject?: ActiveDirectoryObject; certificates?: TokenCertificate[]; passwords?: TokenPassword[]; } @@ -2374,10 +3034,6 @@ export interface Token extends ProxyResource { * The resource ID of the scope map to which the token will be associated with. */ scopeMapId?: string; - /** - * The user/group/application object ID for which the token has to be created. - */ - objectId?: string; /** * The credentials that can be used for authenticating the token. */ @@ -2386,7 +3042,7 @@ export interface Token extends ProxyResource { * The status of the token example enabled or disabled. Possible values include: 'enabled', * 'disabled' */ - status?: Status; + status?: TokenStatus; } /** @@ -2401,7 +3057,7 @@ export interface TokenUpdateParameters { * The status of the token example enabled or disabled. Possible values include: 'enabled', * 'disabled' */ - status?: Status; + status?: TokenStatus; /** * The credentials that can be used for authenticating the token. */ @@ -2419,11 +3075,10 @@ export interface GenerateCredentialsParameters { tokenId?: string; /** * The expiry date of the generated credentials after which the credentials become invalid. - * Default value: new Date('9999-12-31T15:59:59.9999999-08:00'). */ expiry?: Date; /** - * Specifies name of the password which should be regenerated if any -- password or password2. + * Specifies name of the password which should be regenerated if any -- password1 or password2. * Possible values include: 'password1', 'password2' */ name?: TokenPasswordName; @@ -2465,6 +3120,18 @@ export interface ContainerRegistryManagementClientOptions extends AzureServiceCl baseUri?: string; } +/** + * @interface + * The result of a request to list export pipelines for a container registry. + * @extends Array + */ +export interface ExportPipelineListResult extends Array { + /** + * The URI that can be used to request the next list of pipeline runs. + */ + nextLink?: string; +} + /** * @interface * The result of a request to list container registries. @@ -2479,55 +3146,115 @@ export interface RegistryListResult extends Array { /** * @interface - * The result of a request to list container registry operations. - * @extends Array + * The result of a request to list private link resources for a container registry. + * @extends Array */ -export interface OperationListResult extends Array { +export interface PrivateLinkResourceListResult extends Array { /** - * The URI that can be used to request the next list of container registry operations. + * The URI that can be used to request the next list of private link resources. */ nextLink?: string; } /** * @interface - * The result of a request to list replications for a container registry. - * @extends Array + * The result of a request to list import pipelines for a container registry. + * @extends Array */ -export interface ReplicationListResult extends Array { +export interface ImportPipelineListResult extends Array { /** - * The URI that can be used to request the next list of replications. + * The URI that can be used to request the next list of pipeline runs. */ nextLink?: string; } /** * @interface - * The result of a request to list webhooks for a container registry. - * @extends Array + * The result of a request to list container registry operations. + * @extends Array */ -export interface WebhookListResult extends Array { +export interface OperationListResult extends Array { /** - * The URI that can be used to request the next list of webhooks. + * The URI that can be used to request the next list of container registry operations. */ nextLink?: string; } /** * @interface - * The result of a request to list events for a webhook. - * @extends Array + * The result of a request to list pipeline runs for a container registry. + * @extends Array */ -export interface EventListResult extends Array { +export interface PipelineRunListResult extends Array { /** - * The URI that can be used to request the next list of events. + * The URI that can be used to request the next list of pipeline runs. */ nextLink?: string; } /** * @interface - * Collection of runs. + * The result of a request to list private endpoint connections for a container registry. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * The URI that can be used to request the next list of private endpoint connections. + */ + nextLink?: string; +} + +/** + * @interface + * The result of a request to list replications for a container registry. + * @extends Array + */ +export interface ReplicationListResult extends Array { + /** + * The URI that can be used to request the next list of replications. + */ + nextLink?: string; +} + +/** + * @interface + * The result of a request to list webhooks for a container registry. + * @extends Array + */ +export interface WebhookListResult extends Array { + /** + * The URI that can be used to request the next list of webhooks. + */ + nextLink?: string; +} + +/** + * @interface + * The result of a request to list events for a webhook. + * @extends Array + */ +export interface EventListResult extends Array { + /** + * The URI that can be used to request the next list of events. + */ + nextLink?: string; +} + +/** + * @interface + * The collection of agent pools. + * @extends Array + */ +export interface AgentPoolListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ + nextLink?: string; +} + +/** + * @interface + * Collection of runs. * @extends Array */ export interface RunListResult extends Array { @@ -2537,6 +3264,18 @@ export interface RunListResult extends Array { nextLink?: string; } +/** + * @interface + * The collection of task runs. + * @extends Array + */ +export interface TaskRunListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ + nextLink?: string; +} + /** * @interface * The collection of tasks. @@ -2573,6 +3312,32 @@ export interface TokenListResult extends Array { nextLink?: string; } +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; + +/** + * Defines values for PipelineOptions. + * Possible values include: 'OverwriteTags', 'OverwriteBlobs', 'DeleteSourceBlobOnSuccess', + * 'ContinueOnErrors' + * @readonly + * @enum {string} + */ +export type PipelineOptions = 'OverwriteTags' | 'OverwriteBlobs' | 'DeleteSourceBlobOnSuccess' | 'ContinueOnErrors'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Canceled'; + /** * Defines values for ImportMode. * Possible values include: 'NoForce', 'Force' @@ -2582,28 +3347,68 @@ export interface TokenListResult extends Array { export type ImportMode = 'NoForce' | 'Force'; /** - * Defines values for SkuName. - * Possible values include: 'Classic', 'Basic', 'Standard', 'Premium' + * Defines values for PipelineSourceType. + * Possible values include: 'AzureStorageBlobContainer' * @readonly * @enum {string} */ -export type SkuName = 'Classic' | 'Basic' | 'Standard' | 'Premium'; +export type PipelineSourceType = 'AzureStorageBlobContainer'; /** - * Defines values for SkuTier. + * Defines values for TriggerStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type TriggerStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for PipelineRunSourceType. + * Possible values include: 'AzureStorageBlob' + * @readonly + * @enum {string} + */ +export type PipelineRunSourceType = 'AzureStorageBlob'; + +/** + * Defines values for PipelineRunTargetType. + * Possible values include: 'AzureStorageBlob' + * @readonly + * @enum {string} + */ +export type PipelineRunTargetType = 'AzureStorageBlob'; + +/** + * Defines values for ConnectionStatus. + * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type ConnectionStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for ActionsRequired. + * Possible values include: 'None', 'Recreate' + * @readonly + * @enum {string} + */ +export type ActionsRequired = 'None' | 'Recreate'; + +/** + * Defines values for SkuName. * Possible values include: 'Classic', 'Basic', 'Standard', 'Premium' * @readonly * @enum {string} */ -export type SkuTier = 'Classic' | 'Basic' | 'Standard' | 'Premium'; +export type SkuName = 'Classic' | 'Basic' | 'Standard' | 'Premium'; /** - * Defines values for ProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * Defines values for SkuTier. + * Possible values include: 'Classic', 'Basic', 'Standard', 'Premium' * @readonly * @enum {string} */ -export type ProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Canceled'; +export type SkuTier = 'Classic' | 'Basic' | 'Standard' | 'Premium'; /** * Defines values for DefaultAction. @@ -2637,6 +3442,22 @@ export type PolicyStatus = 'enabled' | 'disabled'; */ export type TrustPolicyType = 'Notary'; +/** + * Defines values for EncryptionStatus. + * Possible values include: 'enabled', 'disabled' + * @readonly + * @enum {string} + */ +export type EncryptionStatus = 'enabled' | 'disabled'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + /** * Defines values for PasswordName. * Possible values include: 'password', 'password2' @@ -2669,6 +3490,14 @@ export type WebhookStatus = 'enabled' | 'disabled'; */ export type WebhookAction = 'push' | 'delete' | 'quarantine' | 'chart_push' | 'chart_delete'; +/** + * Defines values for OS. + * Possible values include: 'Windows', 'Linux' + * @readonly + * @enum {string} + */ +export type OS = 'Windows' | 'Linux'; + /** * Defines values for RunStatus. * Possible values include: 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', @@ -2686,14 +3515,6 @@ export type RunStatus = 'Queued' | 'Started' | 'Running' | 'Succeeded' | 'Failed */ export type RunType = 'QuickBuild' | 'QuickRun' | 'AutoBuild' | 'AutoRun'; -/** - * Defines values for OS. - * Possible values include: 'Windows', 'Linux' - * @readonly - * @enum {string} - */ -export type OS = 'Windows' | 'Linux'; - /** * Defines values for Architecture. * Possible values include: 'amd64', 'x86', '386', 'arm', 'arm64' @@ -2710,15 +3531,6 @@ export type Architecture = 'amd64' | 'x86' | '386' | 'arm' | 'arm64'; */ export type Variant = 'v6' | 'v7' | 'v8'; -/** - * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' - * @readonly - * @enum {string} - */ -export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; - /** * Defines values for TaskStatus. * Possible values include: 'Disabled', 'Enabled' @@ -2735,14 +3547,6 @@ export type TaskStatus = 'Disabled' | 'Enabled'; */ export type BaseImageDependencyType = 'BuildTime' | 'RunTime'; -/** - * Defines values for TriggerStatus. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} - */ -export type TriggerStatus = 'Disabled' | 'Enabled'; - /** * Defines values for SourceControlType. * Possible values include: 'Github', 'VisualStudioTeamService' @@ -2808,25 +3612,785 @@ export type SecretObjectType = 'Opaque' | 'Vaultsecret'; export type TokenCertificateName = 'certificate1' | 'certificate2'; /** - * Defines values for TokenPasswordName. - * Possible values include: 'password1', 'password2' - * @readonly - * @enum {string} + * Defines values for TokenPasswordName. + * Possible values include: 'password1', 'password2' + * @readonly + * @enum {string} + */ +export type TokenPasswordName = 'password1' | 'password2'; + +/** + * Defines values for TokenStatus. + * Possible values include: 'enabled', 'disabled' + * @readonly + * @enum {string} + */ +export type TokenStatus = 'enabled' | 'disabled'; + +/** + * Contains response data for the get operation. + */ +export type ExportPipelinesGetResponse = ExportPipeline & { + /** + * 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: ExportPipeline; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type ExportPipelinesCreateResponse = ExportPipeline & { + /** + * 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: ExportPipeline; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ExportPipelinesListResponse = ExportPipelineListResult & { + /** + * 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: ExportPipelineListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type ExportPipelinesBeginCreateResponse = ExportPipeline & { + /** + * 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: ExportPipeline; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ExportPipelinesListNextResponse = ExportPipelineListResult & { + /** + * 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: ExportPipelineListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type RegistriesCheckNameAvailabilityResponse = RegistryNameStatus & { + /** + * 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: RegistryNameStatus; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RegistriesGetResponse = Registry & { + /** + * 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: Registry; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type RegistriesCreateResponse = Registry & { + /** + * 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: Registry; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type RegistriesUpdateResponse = Registry & { + /** + * 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: Registry; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type RegistriesListByResourceGroupResponse = RegistryListResult & { + /** + * 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: RegistryListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RegistriesListResponse = RegistryListResult & { + /** + * 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: RegistryListResult; + }; +}; + +/** + * Contains response data for the listCredentials operation. + */ +export type RegistriesListCredentialsResponse = RegistryListCredentialsResult & { + /** + * 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: RegistryListCredentialsResult; + }; +}; + +/** + * Contains response data for the regenerateCredential operation. + */ +export type RegistriesRegenerateCredentialResponse = RegistryListCredentialsResult & { + /** + * 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: RegistryListCredentialsResult; + }; +}; + +/** + * Contains response data for the listUsages operation. + */ +export type RegistriesListUsagesResponse = RegistryUsageListResult & { + /** + * 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: RegistryUsageListResult; + }; +}; + +/** + * Contains response data for the listPrivateLinkResources operation. + */ +export type RegistriesListPrivateLinkResourcesResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the scheduleRun operation. + */ +export type RegistriesScheduleRunResponse = Run & { + /** + * 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: Run; + }; +}; + +/** + * Contains response data for the getBuildSourceUploadUrl operation. + */ +export type RegistriesGetBuildSourceUploadUrlResponse = SourceUploadDefinition & { + /** + * 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: SourceUploadDefinition; + }; +}; + +/** + * Contains response data for the generateCredentials operation. + */ +export type RegistriesGenerateCredentialsResponse = GenerateCredentialsResult & { + /** + * 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: GenerateCredentialsResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type RegistriesBeginCreateResponse = Registry & { + /** + * 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: Registry; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type RegistriesBeginUpdateResponse = Registry & { + /** + * 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: Registry; + }; +}; + +/** + * Contains response data for the beginScheduleRun operation. + */ +export type RegistriesBeginScheduleRunResponse = Run & { + /** + * 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: Run; + }; +}; + +/** + * Contains response data for the beginGenerateCredentials operation. + */ +export type RegistriesBeginGenerateCredentialsResponse = GenerateCredentialsResult & { + /** + * 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: GenerateCredentialsResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type RegistriesListByResourceGroupNextResponse = RegistryListResult & { + /** + * 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: RegistryListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RegistriesListNextResponse = RegistryListResult & { + /** + * 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: RegistryListResult; + }; +}; + +/** + * Contains response data for the listPrivateLinkResourcesNext operation. + */ +export type RegistriesListPrivateLinkResourcesNextResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ImportPipelinesGetResponse = ImportPipeline & { + /** + * 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: ImportPipeline; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type ImportPipelinesCreateResponse = ImportPipeline & { + /** + * 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: ImportPipeline; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ImportPipelinesListResponse = ImportPipelineListResult & { + /** + * 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: ImportPipelineListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type ImportPipelinesBeginCreateResponse = ImportPipeline & { + /** + * 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: ImportPipeline; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ImportPipelinesListNextResponse = ImportPipelineListResult & { + /** + * 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: ImportPipelineListResult; + }; +}; + +/** + * 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; + }; +}; + +/** + * 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; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PipelineRunsGetResponse = PipelineRun & { + /** + * 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: PipelineRun; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type PipelineRunsCreateResponse = PipelineRun & { + /** + * 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: PipelineRun; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PipelineRunsListResponse = PipelineRunListResult & { + /** + * 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: PipelineRunListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type PipelineRunsBeginCreateResponse = PipelineRun & { + /** + * 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: PipelineRun; + }; +}; + +/** + * Contains response data for the listNext operation. */ -export type TokenPasswordName = 'password1' | 'password2'; +export type PipelineRunsListNextResponse = PipelineRunListResult & { + /** + * 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: PipelineRunListResult; + }; +}; /** - * Defines values for Status. - * Possible values include: 'enabled', 'disabled' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type Status = 'enabled' | 'disabled'; +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the createOrUpdate operation. */ -export type RegistriesCheckNameAvailabilityResponse = RegistryNameStatus & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2839,14 +4403,14 @@ export type RegistriesCheckNameAvailabilityResponse = RegistryNameStatus & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryNameStatus; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type RegistriesGetResponse = Registry & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -2859,14 +4423,14 @@ export type RegistriesGetResponse = Registry & { /** * The response body as parsed JSON or XML */ - parsedBody: Registry; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type RegistriesCreateResponse = Registry & { +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2879,14 +4443,14 @@ export type RegistriesCreateResponse = Registry & { /** * The response body as parsed JSON or XML */ - parsedBody: Registry; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listNext operation. */ -export type RegistriesUpdateResponse = Registry & { +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -2899,14 +4463,14 @@ export type RegistriesUpdateResponse = Registry & { /** * The response body as parsed JSON or XML */ - parsedBody: Registry; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type RegistriesListByResourceGroupResponse = RegistryListResult & { +export type ReplicationsGetResponse = Replication & { /** * The underlying HTTP response. */ @@ -2919,14 +4483,14 @@ export type RegistriesListByResourceGroupResponse = RegistryListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListResult; + parsedBody: Replication; }; }; /** - * Contains response data for the list operation. + * Contains response data for the create operation. */ -export type RegistriesListResponse = RegistryListResult & { +export type ReplicationsCreateResponse = Replication & { /** * The underlying HTTP response. */ @@ -2939,14 +4503,14 @@ export type RegistriesListResponse = RegistryListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListResult; + parsedBody: Replication; }; }; /** - * Contains response data for the listCredentials operation. + * Contains response data for the update operation. */ -export type RegistriesListCredentialsResponse = RegistryListCredentialsResult & { +export type ReplicationsUpdateResponse = Replication & { /** * The underlying HTTP response. */ @@ -2959,14 +4523,14 @@ export type RegistriesListCredentialsResponse = RegistryListCredentialsResult & /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListCredentialsResult; + parsedBody: Replication; }; }; /** - * Contains response data for the regenerateCredential operation. + * Contains response data for the list operation. */ -export type RegistriesRegenerateCredentialResponse = RegistryListCredentialsResult & { +export type ReplicationsListResponse = ReplicationListResult & { /** * The underlying HTTP response. */ @@ -2979,14 +4543,14 @@ export type RegistriesRegenerateCredentialResponse = RegistryListCredentialsResu /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListCredentialsResult; + parsedBody: ReplicationListResult; }; }; /** - * Contains response data for the listUsages operation. + * Contains response data for the beginCreate operation. */ -export type RegistriesListUsagesResponse = RegistryUsageListResult & { +export type ReplicationsBeginCreateResponse = Replication & { /** * The underlying HTTP response. */ @@ -2999,14 +4563,14 @@ export type RegistriesListUsagesResponse = RegistryUsageListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryUsageListResult; + parsedBody: Replication; }; }; /** - * Contains response data for the scheduleRun operation. + * Contains response data for the beginUpdate operation. */ -export type RegistriesScheduleRunResponse = Run & { +export type ReplicationsBeginUpdateResponse = Replication & { /** * The underlying HTTP response. */ @@ -3019,14 +4583,14 @@ export type RegistriesScheduleRunResponse = Run & { /** * The response body as parsed JSON or XML */ - parsedBody: Run; + parsedBody: Replication; }; }; /** - * Contains response data for the getBuildSourceUploadUrl operation. + * Contains response data for the listNext operation. */ -export type RegistriesGetBuildSourceUploadUrlResponse = SourceUploadDefinition & { +export type ReplicationsListNextResponse = ReplicationListResult & { /** * The underlying HTTP response. */ @@ -3039,14 +4603,14 @@ export type RegistriesGetBuildSourceUploadUrlResponse = SourceUploadDefinition & /** * The response body as parsed JSON or XML */ - parsedBody: SourceUploadDefinition; + parsedBody: ReplicationListResult; }; }; /** - * Contains response data for the generateCredentials operation. + * Contains response data for the get operation. */ -export type RegistriesGenerateCredentialsResponse = GenerateCredentialsResult & { +export type WebhooksGetResponse = Webhook & { /** * The underlying HTTP response. */ @@ -3059,14 +4623,14 @@ export type RegistriesGenerateCredentialsResponse = GenerateCredentialsResult & /** * The response body as parsed JSON or XML */ - parsedBody: GenerateCredentialsResult; + parsedBody: Webhook; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the create operation. */ -export type RegistriesBeginCreateResponse = Registry & { +export type WebhooksCreateResponse = Webhook & { /** * The underlying HTTP response. */ @@ -3079,14 +4643,14 @@ export type RegistriesBeginCreateResponse = Registry & { /** * The response body as parsed JSON or XML */ - parsedBody: Registry; + parsedBody: Webhook; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the update operation. */ -export type RegistriesBeginUpdateResponse = Registry & { +export type WebhooksUpdateResponse = Webhook & { /** * The underlying HTTP response. */ @@ -3099,14 +4663,14 @@ export type RegistriesBeginUpdateResponse = Registry & { /** * The response body as parsed JSON or XML */ - parsedBody: Registry; + parsedBody: Webhook; }; }; /** - * Contains response data for the beginScheduleRun operation. + * Contains response data for the list operation. */ -export type RegistriesBeginScheduleRunResponse = Run & { +export type WebhooksListResponse = WebhookListResult & { /** * The underlying HTTP response. */ @@ -3119,14 +4683,14 @@ export type RegistriesBeginScheduleRunResponse = Run & { /** * The response body as parsed JSON or XML */ - parsedBody: Run; + parsedBody: WebhookListResult; }; }; /** - * Contains response data for the beginGenerateCredentials operation. + * Contains response data for the ping operation. */ -export type RegistriesBeginGenerateCredentialsResponse = GenerateCredentialsResult & { +export type WebhooksPingResponse = EventInfo & { /** * The underlying HTTP response. */ @@ -3139,14 +4703,14 @@ export type RegistriesBeginGenerateCredentialsResponse = GenerateCredentialsResu /** * The response body as parsed JSON or XML */ - parsedBody: GenerateCredentialsResult; + parsedBody: EventInfo; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the getCallbackConfig operation. */ -export type RegistriesListByResourceGroupNextResponse = RegistryListResult & { +export type WebhooksGetCallbackConfigResponse = CallbackConfig & { /** * The underlying HTTP response. */ @@ -3159,14 +4723,14 @@ export type RegistriesListByResourceGroupNextResponse = RegistryListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListResult; + parsedBody: CallbackConfig; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listEvents operation. */ -export type RegistriesListNextResponse = RegistryListResult & { +export type WebhooksListEventsResponse = EventListResult & { /** * The underlying HTTP response. */ @@ -3179,14 +4743,14 @@ export type RegistriesListNextResponse = RegistryListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RegistryListResult; + parsedBody: EventListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginCreate operation. */ -export type OperationsListResponse = OperationListResult & { +export type WebhooksBeginCreateResponse = Webhook & { /** * The underlying HTTP response. */ @@ -3199,14 +4763,14 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: Webhook; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the beginUpdate operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type WebhooksBeginUpdateResponse = Webhook & { /** * The underlying HTTP response. */ @@ -3219,14 +4783,14 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: Webhook; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type ReplicationsGetResponse = Replication & { +export type WebhooksListNextResponse = WebhookListResult & { /** * The underlying HTTP response. */ @@ -3239,14 +4803,14 @@ export type ReplicationsGetResponse = Replication & { /** * The response body as parsed JSON or XML */ - parsedBody: Replication; + parsedBody: WebhookListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listEventsNext operation. */ -export type ReplicationsCreateResponse = Replication & { +export type WebhooksListEventsNextResponse = EventListResult & { /** * The underlying HTTP response. */ @@ -3259,14 +4823,14 @@ export type ReplicationsCreateResponse = Replication & { /** * The response body as parsed JSON or XML */ - parsedBody: Replication; + parsedBody: EventListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type ReplicationsUpdateResponse = Replication & { +export type AgentPoolsGetResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -3279,14 +4843,14 @@ export type ReplicationsUpdateResponse = Replication & { /** * The response body as parsed JSON or XML */ - parsedBody: Replication; + parsedBody: AgentPool; }; }; /** - * Contains response data for the list operation. + * Contains response data for the create operation. */ -export type ReplicationsListResponse = ReplicationListResult & { +export type AgentPoolsCreateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -3299,14 +4863,14 @@ export type ReplicationsListResponse = ReplicationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ReplicationListResult; + parsedBody: AgentPool; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the update operation. */ -export type ReplicationsBeginCreateResponse = Replication & { +export type AgentPoolsUpdateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -3319,14 +4883,14 @@ export type ReplicationsBeginCreateResponse = Replication & { /** * The response body as parsed JSON or XML */ - parsedBody: Replication; + parsedBody: AgentPool; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the list operation. */ -export type ReplicationsBeginUpdateResponse = Replication & { +export type AgentPoolsListResponse = AgentPoolListResult & { /** * The underlying HTTP response. */ @@ -3339,14 +4903,14 @@ export type ReplicationsBeginUpdateResponse = Replication & { /** * The response body as parsed JSON or XML */ - parsedBody: Replication; + parsedBody: AgentPoolListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getQueueStatus operation. */ -export type ReplicationsListNextResponse = ReplicationListResult & { +export type AgentPoolsGetQueueStatusResponse = AgentPoolQueueStatus & { /** * The underlying HTTP response. */ @@ -3359,14 +4923,14 @@ export type ReplicationsListNextResponse = ReplicationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ReplicationListResult; + parsedBody: AgentPoolQueueStatus; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginCreate operation. */ -export type WebhooksGetResponse = Webhook & { +export type AgentPoolsBeginCreateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -3379,14 +4943,14 @@ export type WebhooksGetResponse = Webhook & { /** * The response body as parsed JSON or XML */ - parsedBody: Webhook; + parsedBody: AgentPool; }; }; /** - * Contains response data for the create operation. + * Contains response data for the beginUpdate operation. */ -export type WebhooksCreateResponse = Webhook & { +export type AgentPoolsBeginUpdateResponse = AgentPool & { /** * The underlying HTTP response. */ @@ -3399,14 +4963,14 @@ export type WebhooksCreateResponse = Webhook & { /** * The response body as parsed JSON or XML */ - parsedBody: Webhook; + parsedBody: AgentPool; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listNext operation. */ -export type WebhooksUpdateResponse = Webhook & { +export type AgentPoolsListNextResponse = AgentPoolListResult & { /** * The underlying HTTP response. */ @@ -3419,14 +4983,14 @@ export type WebhooksUpdateResponse = Webhook & { /** * The response body as parsed JSON or XML */ - parsedBody: Webhook; + parsedBody: AgentPoolListResult; }; }; /** * Contains response data for the list operation. */ -export type WebhooksListResponse = WebhookListResult & { +export type RunsListResponse = RunListResult & { /** * The underlying HTTP response. */ @@ -3439,14 +5003,14 @@ export type WebhooksListResponse = WebhookListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: WebhookListResult; + parsedBody: RunListResult; }; }; /** - * Contains response data for the ping operation. + * Contains response data for the get operation. */ -export type WebhooksPingResponse = EventInfo & { +export type RunsGetResponse = Run & { /** * The underlying HTTP response. */ @@ -3459,14 +5023,14 @@ export type WebhooksPingResponse = EventInfo & { /** * The response body as parsed JSON or XML */ - parsedBody: EventInfo; + parsedBody: Run; }; }; /** - * Contains response data for the getCallbackConfig operation. + * Contains response data for the update operation. */ -export type WebhooksGetCallbackConfigResponse = CallbackConfig & { +export type RunsUpdateResponse = Run & { /** * The underlying HTTP response. */ @@ -3479,14 +5043,14 @@ export type WebhooksGetCallbackConfigResponse = CallbackConfig & { /** * The response body as parsed JSON or XML */ - parsedBody: CallbackConfig; + parsedBody: Run; }; }; /** - * Contains response data for the listEvents operation. + * Contains response data for the getLogSasUrl operation. */ -export type WebhooksListEventsResponse = EventListResult & { +export type RunsGetLogSasUrlResponse = RunGetLogResult & { /** * The underlying HTTP response. */ @@ -3499,14 +5063,14 @@ export type WebhooksListEventsResponse = EventListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventListResult; + parsedBody: RunGetLogResult; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the beginUpdate operation. */ -export type WebhooksBeginCreateResponse = Webhook & { +export type RunsBeginUpdateResponse = Run & { /** * The underlying HTTP response. */ @@ -3519,14 +5083,14 @@ export type WebhooksBeginCreateResponse = Webhook & { /** * The response body as parsed JSON or XML */ - parsedBody: Webhook; + parsedBody: Run; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listNext operation. */ -export type WebhooksBeginUpdateResponse = Webhook & { +export type RunsListNextResponse = RunListResult & { /** * The underlying HTTP response. */ @@ -3539,14 +5103,14 @@ export type WebhooksBeginUpdateResponse = Webhook & { /** * The response body as parsed JSON or XML */ - parsedBody: Webhook; + parsedBody: RunListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type WebhooksListNextResponse = WebhookListResult & { +export type TaskRunsGetResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3559,14 +5123,14 @@ export type WebhooksListNextResponse = WebhookListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: WebhookListResult; + parsedBody: TaskRun; }; }; /** - * Contains response data for the listEventsNext operation. + * Contains response data for the create operation. */ -export type WebhooksListEventsNextResponse = EventListResult & { +export type TaskRunsCreateResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3579,14 +5143,14 @@ export type WebhooksListEventsNextResponse = EventListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventListResult; + parsedBody: TaskRun; }; }; /** - * Contains response data for the list operation. + * Contains response data for the update operation. */ -export type RunsListResponse = RunListResult & { +export type TaskRunsUpdateResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3599,14 +5163,14 @@ export type RunsListResponse = RunListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RunListResult; + parsedBody: TaskRun; }; }; /** - * Contains response data for the get operation. + * Contains response data for the getDetails operation. */ -export type RunsGetResponse = Run & { +export type TaskRunsGetDetailsResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3619,14 +5183,14 @@ export type RunsGetResponse = Run & { /** * The response body as parsed JSON or XML */ - parsedBody: Run; + parsedBody: TaskRun; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type RunsUpdateResponse = Run & { +export type TaskRunsListResponse = TaskRunListResult & { /** * The underlying HTTP response. */ @@ -3639,14 +5203,14 @@ export type RunsUpdateResponse = Run & { /** * The response body as parsed JSON or XML */ - parsedBody: Run; + parsedBody: TaskRunListResult; }; }; /** - * Contains response data for the getLogSasUrl operation. + * Contains response data for the beginCreate operation. */ -export type RunsGetLogSasUrlResponse = RunGetLogResult & { +export type TaskRunsBeginCreateResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3659,14 +5223,14 @@ export type RunsGetLogSasUrlResponse = RunGetLogResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RunGetLogResult; + parsedBody: TaskRun; }; }; /** * Contains response data for the beginUpdate operation. */ -export type RunsBeginUpdateResponse = Run & { +export type TaskRunsBeginUpdateResponse = TaskRun & { /** * The underlying HTTP response. */ @@ -3679,14 +5243,14 @@ export type RunsBeginUpdateResponse = Run & { /** * The response body as parsed JSON or XML */ - parsedBody: Run; + parsedBody: TaskRun; }; }; /** * Contains response data for the listNext operation. */ -export type RunsListNextResponse = RunListResult & { +export type TaskRunsListNextResponse = TaskRunListResult & { /** * The underlying HTTP response. */ @@ -3699,7 +5263,7 @@ export type RunsListNextResponse = RunListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RunListResult; + parsedBody: TaskRunListResult; }; }; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts index 3b7be0863436..6669d495a51b 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts @@ -12,6 +12,178 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const UserIdentityProperties: msRest.CompositeMapper = { + serializedName: "UserIdentityProperties", + type: { + name: "Composite", + className: "UserIdentityProperties", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const IdentityProperties: msRest.CompositeMapper = { + serializedName: "IdentityProperties", + type: { + name: "Composite", + className: "IdentityProperties", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserIdentityProperties" + } + } + } + } + } + } +}; + +export const ExportPipelineTargetProperties: msRest.CompositeMapper = { + serializedName: "ExportPipelineTargetProperties", + type: { + name: "Composite", + className: "ExportPipelineTargetProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + keyVaultUri: { + required: true, + serializedName: "keyVaultUri", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ExportPipeline: msRest.CompositeMapper = { + serializedName: "ExportPipeline", + type: { + name: "Composite", + className: "ExportPipeline", + modelProperties: { + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + target: { + required: true, + serializedName: "properties.target", + type: { + name: "Composite", + className: "ExportPipelineTargetProperties" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const ImportSourceCredentials: msRest.CompositeMapper = { serializedName: "ImportSourceCredentials", type: { @@ -118,6 +290,122 @@ export const ImportImageParameters: msRest.CompositeMapper = { } }; +export const ImportPipelineSourceProperties: msRest.CompositeMapper = { + serializedName: "ImportPipelineSourceProperties", + type: { + name: "Composite", + className: "ImportPipelineSourceProperties", + modelProperties: { + type: { + serializedName: "type", + defaultValue: 'AzureStorageBlobContainer', + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + keyVaultUri: { + required: true, + serializedName: "keyVaultUri", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineSourceTriggerProperties: msRest.CompositeMapper = { + serializedName: "PipelineSourceTriggerProperties", + type: { + name: "Composite", + className: "PipelineSourceTriggerProperties", + modelProperties: { + status: { + required: true, + serializedName: "status", + defaultValue: 'Enabled', + type: { + name: "String" + } + } + } + } +}; + +export const PipelineTriggerProperties: msRest.CompositeMapper = { + serializedName: "PipelineTriggerProperties", + type: { + name: "Composite", + className: "PipelineTriggerProperties", + modelProperties: { + sourceTrigger: { + serializedName: "sourceTrigger", + type: { + name: "Composite", + className: "PipelineSourceTriggerProperties" + } + } + } + } +}; + +export const ImportPipeline: msRest.CompositeMapper = { + serializedName: "ImportPipeline", + type: { + name: "Composite", + className: "ImportPipeline", + modelProperties: { + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + source: { + required: true, + serializedName: "properties.source", + type: { + name: "Composite", + className: "ImportPipelineSourceProperties" + } + }, + trigger: { + serializedName: "properties.trigger", + type: { + name: "Composite", + className: "PipelineTriggerProperties" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const RegistryNameCheckRequest: msRest.CompositeMapper = { serializedName: "RegistryNameCheckRequest", type: { @@ -170,39 +458,364 @@ export const RegistryNameStatus: msRest.CompositeMapper = { message: { serializedName: "message", type: { - name: "String" + name: "String" + } + } + } + } +}; + +export const OperationDisplayDefinition: msRest.CompositeMapper = { + serializedName: "OperationDisplayDefinition", + type: { + name: "Composite", + className: "OperationDisplayDefinition", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationMetricSpecificationDefinition: msRest.CompositeMapper = { + serializedName: "OperationMetricSpecificationDefinition", + type: { + name: "Composite", + className: "OperationMetricSpecificationDefinition", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } + } + } + } +}; + +export const OperationServiceSpecificationDefinition: msRest.CompositeMapper = { + serializedName: "OperationServiceSpecificationDefinition", + type: { + name: "Composite", + className: "OperationServiceSpecificationDefinition", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricSpecificationDefinition" + } + } + } + } + } + } +}; + +export const OperationDefinition: msRest.CompositeMapper = { + serializedName: "OperationDefinition", + type: { + name: "Composite", + className: "OperationDefinition", + modelProperties: { + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplayDefinition" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "OperationServiceSpecificationDefinition" + } + } + } + } +}; + +export const PipelineRunSourceProperties: msRest.CompositeMapper = { + serializedName: "PipelineRunSourceProperties", + type: { + name: "Composite", + className: "PipelineRunSourceProperties", + modelProperties: { + type: { + serializedName: "type", + defaultValue: 'AzureStorageBlob', + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineRunTargetProperties: msRest.CompositeMapper = { + serializedName: "PipelineRunTargetProperties", + type: { + name: "Composite", + className: "PipelineRunTargetProperties", + modelProperties: { + type: { + serializedName: "type", + defaultValue: 'AzureStorageBlob', + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineRunRequest: msRest.CompositeMapper = { + serializedName: "PipelineRunRequest", + type: { + name: "Composite", + className: "PipelineRunRequest", + modelProperties: { + pipelineResourceId: { + serializedName: "pipelineResourceId", + type: { + name: "String" + } + }, + artifacts: { + serializedName: "artifacts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "PipelineRunSourceProperties" + } + }, + target: { + serializedName: "target", + type: { + name: "Composite", + className: "PipelineRunTargetProperties" + } + }, + catalogDigest: { + serializedName: "catalogDigest", + type: { + name: "String" + } + } + } + } +}; + +export const ProgressProperties: msRest.CompositeMapper = { + serializedName: "ProgressProperties", + type: { + name: "Composite", + className: "ProgressProperties", + modelProperties: { + percentage: { + serializedName: "percentage", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineSourceTriggerDescriptor: msRest.CompositeMapper = { + serializedName: "PipelineSourceTriggerDescriptor", + type: { + name: "Composite", + className: "PipelineSourceTriggerDescriptor", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PipelineTriggerDescriptor: msRest.CompositeMapper = { + serializedName: "PipelineTriggerDescriptor", + type: { + name: "Composite", + className: "PipelineTriggerDescriptor", + modelProperties: { + sourceTrigger: { + serializedName: "sourceTrigger", + type: { + name: "Composite", + className: "PipelineSourceTriggerDescriptor" + } + } + } + } +}; + +export const PipelineRunResponse: msRest.CompositeMapper = { + serializedName: "PipelineRunResponse", + type: { + name: "Composite", + className: "PipelineRunResponse", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + importedArtifacts: { + serializedName: "importedArtifacts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + progress: { + serializedName: "progress", + type: { + name: "Composite", + className: "ProgressProperties" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + finishTime: { + serializedName: "finishTime", + type: { + name: "DateTime" + } + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "ImportPipelineSourceProperties" } - } - } - } -}; - -export const OperationDisplayDefinition: msRest.CompositeMapper = { - serializedName: "OperationDisplayDefinition", - type: { - name: "Composite", - className: "OperationDisplayDefinition", - modelProperties: { - provider: { - serializedName: "provider", + }, + target: { + serializedName: "target", type: { - name: "String" + name: "Composite", + className: "ExportPipelineTargetProperties" } }, - resource: { - serializedName: "resource", + catalogDigest: { + serializedName: "catalogDigest", type: { name: "String" } }, - operation: { - serializedName: "operation", + trigger: { + serializedName: "trigger", type: { - name: "String" + name: "Composite", + className: "PipelineTriggerDescriptor" } }, - description: { - serializedName: "description", + pipelineRunErrorMessage: { + serializedName: "pipelineRunErrorMessage", type: { name: "String" } @@ -211,44 +824,37 @@ export const OperationDisplayDefinition: msRest.CompositeMapper = { } }; -export const OperationMetricSpecificationDefinition: msRest.CompositeMapper = { - serializedName: "OperationMetricSpecificationDefinition", +export const PipelineRun: msRest.CompositeMapper = { + serializedName: "PipelineRun", type: { name: "Composite", - className: "OperationMetricSpecificationDefinition", + className: "PipelineRun", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - displayDescription: { - serializedName: "displayDescription", + ...ProxyResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - unit: { - serializedName: "unit", + request: { + serializedName: "properties.request", type: { - name: "String" + name: "Composite", + className: "PipelineRunRequest" } }, - aggregationType: { - serializedName: "aggregationType", + response: { + readOnly: true, + serializedName: "properties.response", type: { - name: "String" + name: "Composite", + className: "PipelineRunResponse" } }, - internalMetricName: { - serializedName: "internalMetricName", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } @@ -257,58 +863,76 @@ export const OperationMetricSpecificationDefinition: msRest.CompositeMapper = { } }; -export const OperationServiceSpecificationDefinition: msRest.CompositeMapper = { - serializedName: "OperationServiceSpecificationDefinition", +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", type: { name: "Composite", - className: "OperationServiceSpecificationDefinition", + className: "PrivateEndpoint", modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationMetricSpecificationDefinition" - } - } + name: "String" } } } } }; -export const OperationDefinition: msRest.CompositeMapper = { - serializedName: "OperationDefinition", +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", type: { name: "Composite", - className: "OperationDefinition", + className: "PrivateLinkServiceConnectionState", modelProperties: { - origin: { - serializedName: "origin", + status: { + serializedName: "status", type: { name: "String" } }, - name: { - serializedName: "name", + description: { + serializedName: "description", type: { name: "String" } }, - display: { - serializedName: "display", + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "OperationDisplayDefinition" + className: "PrivateEndpoint" } }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "OperationServiceSpecificationDefinition" + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" } } } @@ -339,11 +963,11 @@ export const Sku: msRest.CompositeMapper = { } }; -export const Status1: msRest.CompositeMapper = { +export const Status: msRest.CompositeMapper = { serializedName: "Status", type: { name: "Composite", - className: "Status1", + className: "Status", modelProperties: { displayStatus: { readOnly: true, @@ -485,6 +1109,7 @@ export const QuarantinePolicy: msRest.CompositeMapper = { modelProperties: { status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -501,12 +1126,14 @@ export const TrustPolicy: msRest.CompositeMapper = { modelProperties: { type: { serializedName: "type", + defaultValue: 'Notary', type: { name: "String" } }, status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -523,6 +1150,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { modelProperties: { days: { serializedName: "days", + defaultValue: 7, type: { name: "Number" } @@ -536,6 +1164,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { }, status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -575,6 +1204,58 @@ export const Policies: msRest.CompositeMapper = { } }; +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyIdentifier: { + serializedName: "keyIdentifier", + type: { + name: "String" + } + }, + versionedKeyIdentifier: { + readOnly: true, + serializedName: "versionedKeyIdentifier", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionProperty: msRest.CompositeMapper = { + serializedName: "EncryptionProperty", + type: { + name: "Composite", + className: "EncryptionProperty", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -639,6 +1320,13 @@ export const Registry: msRest.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, loginServer: { readOnly: true, serializedName: "properties.loginServer", @@ -665,7 +1353,7 @@ export const Registry: msRest.CompositeMapper = { serializedName: "properties.status", type: { name: "Composite", - className: "Status1" + className: "Status" } }, adminUserEnabled: { @@ -695,6 +1383,51 @@ export const Registry: msRest.CompositeMapper = { name: "Composite", className: "Policies" } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperty" + } + }, + dataEndpointEnabled: { + serializedName: "properties.dataEndpointEnabled", + type: { + name: "Boolean" + } + }, + dataEndpointHostNames: { + readOnly: true, + serializedName: "properties.dataEndpointHostNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Enabled', + type: { + name: "String" + } } } } @@ -724,6 +1457,13 @@ export const RegistryUpdateParameters: msRest.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, adminUserEnabled: { serializedName: "properties.adminUserEnabled", type: { @@ -743,6 +1483,25 @@ export const RegistryUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "Policies" } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperty" + } + }, + dataEndpointEnabled: { + serializedName: "properties.dataEndpointEnabled", + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } } } } @@ -869,8 +1628,65 @@ export const RegistryUsageListResult: msRest.CompositeMapper = { name: "Sequence", element: { type: { - name: "Composite", - className: "RegistryUsage" + name: "Composite", + className: "RegistryUsage" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } @@ -898,7 +1714,14 @@ export const Replication: msRest.CompositeMapper = { serializedName: "properties.status", type: { name: "Composite", - className: "Status1" + className: "Status" + } + }, + regionEndpointEnabled: { + serializedName: "properties.regionEndpointEnabled", + defaultValue: true, + type: { + name: "Boolean" } } } @@ -921,6 +1744,12 @@ export const ReplicationUpdateParameters: msRest.CompositeMapper = { } } } + }, + regionEndpointEnabled: { + serializedName: "properties.regionEndpointEnabled", + type: { + name: "Boolean" + } } } } @@ -1457,6 +2286,91 @@ export const Event: msRest.CompositeMapper = { } }; +export const AgentPool: msRest.CompositeMapper = { + serializedName: "AgentPool", + type: { + name: "Composite", + className: "AgentPool", + modelProperties: { + ...Resource.type.modelProperties, + count: { + serializedName: "properties.count", + type: { + name: "Number" + } + }, + tier: { + serializedName: "properties.tier", + type: { + name: "String" + } + }, + os: { + serializedName: "properties.os", + type: { + name: "String" + } + }, + virtualNetworkSubnetResourceId: { + serializedName: "properties.virtualNetworkSubnetResourceId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const AgentPoolUpdateParameters: msRest.CompositeMapper = { + serializedName: "AgentPoolUpdateParameters", + type: { + name: "Composite", + className: "AgentPoolUpdateParameters", + modelProperties: { + count: { + serializedName: "properties.count", + type: { + name: "Number" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AgentPoolQueueStatus: msRest.CompositeMapper = { + serializedName: "AgentPoolQueueStatus", + type: { + name: "Composite", + className: "AgentPoolQueueStatus", + modelProperties: { + count: { + serializedName: "count", + type: { + name: "Number" + } + } + } + } +}; + export const RunRequest: msRest.CompositeMapper = { serializedName: "RunRequest", type: { @@ -1475,6 +2389,12 @@ export const RunRequest: msRest.CompositeMapper = { name: "Boolean" } }, + agentPoolName: { + serializedName: "agentPoolName", + type: { + name: "String" + } + }, type: { required: true, serializedName: "type", @@ -1673,37 +2593,6 @@ export const AgentProperties: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - export const Run: msRest.CompositeMapper = { serializedName: "Run", type: { @@ -1735,6 +2624,12 @@ export const Run: msRest.CompositeMapper = { name: "String" } }, + agentPoolName: { + serializedName: "properties.agentPoolName", + type: { + name: "String" + } + }, createTime: { serializedName: "properties.createTime", type: { @@ -1928,6 +2823,12 @@ export const RunFilter: msRest.CompositeMapper = { type: { name: "String" } + }, + agentPoolName: { + serializedName: "agentPoolName", + type: { + name: "String" + } } } } @@ -1965,20 +2866,44 @@ export const RunGetLogResult: msRest.CompositeMapper = { } }; -export const UserIdentityProperties: msRest.CompositeMapper = { - serializedName: "UserIdentityProperties", +export const TaskRun: msRest.CompositeMapper = { + serializedName: "TaskRun", type: { name: "Composite", - className: "UserIdentityProperties", + className: "TaskRun", modelProperties: { - principalId: { - serializedName: "principalId", + ...Resource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - clientId: { - serializedName: "clientId", + runRequest: { + serializedName: "properties.runRequest", + type: { + name: "Composite", + className: "RunRequest" + } + }, + runResult: { + readOnly: true, + serializedName: "properties.runResult", + type: { + name: "Composite", + className: "Run" + } + }, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } @@ -1987,44 +2912,39 @@ export const UserIdentityProperties: msRest.CompositeMapper = { } }; -export const IdentityProperties: msRest.CompositeMapper = { - serializedName: "IdentityProperties", +export const TaskRunUpdateParameters: msRest.CompositeMapper = { + serializedName: "TaskRunUpdateParameters", type: { name: "Composite", - className: "IdentityProperties", + className: "TaskRunUpdateParameters", modelProperties: { - principalId: { - serializedName: "principalId", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "IdentityProperties" } }, - tenantId: { - serializedName: "tenantId", + runRequest: { + serializedName: "properties.runRequest", type: { - name: "String" + name: "Composite", + className: "RunRequest" } }, - type: { - serializedName: "type", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ] + name: "String" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + tags: { + serializedName: "tags", type: { name: "Dictionary", value: { type: { - name: "Composite", - className: "UserIdentityProperties" + name: "String" } } } @@ -2504,6 +3424,12 @@ export const Task: msRest.CompositeMapper = { className: "AgentProperties" } }, + agentPoolName: { + serializedName: "properties.agentPoolName", + type: { + name: "String" + } + }, timeout: { serializedName: "properties.timeout", defaultValue: 3600, @@ -2855,53 +3781,143 @@ export const TaskUpdateParameters: msRest.CompositeMapper = { platform: { serializedName: "properties.platform", type: { - name: "Composite", - className: "PlatformUpdateParameters" + name: "Composite", + className: "PlatformUpdateParameters" + } + }, + agentConfiguration: { + serializedName: "properties.agentConfiguration", + type: { + name: "Composite", + className: "AgentProperties" + } + }, + agentPoolName: { + serializedName: "properties.agentPoolName", + type: { + name: "String" + } + }, + timeout: { + serializedName: "properties.timeout", + type: { + name: "Number" + } + }, + step: { + serializedName: "properties.step", + type: { + name: "Composite", + className: "TaskStepUpdateParameters" + } + }, + trigger: { + serializedName: "properties.trigger", + type: { + name: "Composite", + className: "TriggerUpdateParameters" + } + }, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "Credentials" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const InnerErrorDescription: msRest.CompositeMapper = { + serializedName: "InnerErrorDescription", + type: { + name: "Composite", + className: "InnerErrorDescription", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" } }, - agentConfiguration: { - serializedName: "properties.agentConfiguration", + target: { + serializedName: "target", type: { - name: "Composite", - className: "AgentProperties" + name: "String" } - }, - timeout: { - serializedName: "properties.timeout", + } + } + } +}; + +export const ErrorResponseBody: msRest.CompositeMapper = { + serializedName: "ErrorResponseBody", + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + required: true, + serializedName: "code", type: { - name: "Number" + name: "String" } }, - step: { - serializedName: "properties.step", + message: { + required: true, + serializedName: "message", type: { - name: "Composite", - className: "TaskStepUpdateParameters" + name: "String" } }, - trigger: { - serializedName: "properties.trigger", + target: { + serializedName: "target", type: { - name: "Composite", - className: "TriggerUpdateParameters" + name: "String" } }, - credentials: { - serializedName: "properties.credentials", + details: { + serializedName: "details", type: { name: "Composite", - className: "Credentials" + className: "InnerErrorDescription" } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "ErrorResponseBody" } } } @@ -3661,6 +4677,28 @@ export const ScopeMapUpdateParameters: msRest.CompositeMapper = { } }; +export const ActiveDirectoryObject: msRest.CompositeMapper = { + serializedName: "ActiveDirectoryObject", + type: { + name: "Composite", + className: "ActiveDirectoryObject", + modelProperties: { + objectId: { + serializedName: "objectId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + export const TokenCertificate: msRest.CompositeMapper = { serializedName: "TokenCertificate", type: { @@ -3736,6 +4774,13 @@ export const TokenCredentialsProperties: msRest.CompositeMapper = { name: "Composite", className: "TokenCredentialsProperties", modelProperties: { + activeDirectoryObject: { + serializedName: "activeDirectoryObject", + type: { + name: "Composite", + className: "ActiveDirectoryObject" + } + }, certificates: { serializedName: "certificates", type: { @@ -3791,12 +4836,6 @@ export const Token: msRest.CompositeMapper = { name: "String" } }, - objectId: { - serializedName: "properties.objectId", - type: { - name: "String" - } - }, credentials: { serializedName: "properties.credentials", type: { @@ -3857,7 +4896,6 @@ export const GenerateCredentialsParameters: msRest.CompositeMapper = { }, expiry: { serializedName: "expiry", - defaultValue: new Date('9999-12-31T15:59:59.9999999-08:00'), type: { name: "DateTime" } @@ -3900,6 +4938,34 @@ export const GenerateCredentialsResult: msRest.CompositeMapper = { } }; +export const ExportPipelineListResult: msRest.CompositeMapper = { + serializedName: "ExportPipelineListResult", + type: { + name: "Composite", + className: "ExportPipelineListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportPipeline" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const RegistryListResult: msRest.CompositeMapper = { serializedName: "RegistryListResult", type: { @@ -3928,6 +4994,62 @@ export const RegistryListResult: msRest.CompositeMapper = { } }; +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ImportPipelineListResult: msRest.CompositeMapper = { + serializedName: "ImportPipelineListResult", + type: { + name: "Composite", + className: "ImportPipelineListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImportPipeline" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { @@ -3956,6 +5078,62 @@ export const OperationListResult: msRest.CompositeMapper = { } }; +export const PipelineRunListResult: msRest.CompositeMapper = { + serializedName: "PipelineRunListResult", + type: { + name: "Composite", + className: "PipelineRunListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PipelineRun" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ReplicationListResult: msRest.CompositeMapper = { serializedName: "ReplicationListResult", type: { @@ -4040,6 +5218,34 @@ export const EventListResult: msRest.CompositeMapper = { } }; +export const AgentPoolListResult: msRest.CompositeMapper = { + serializedName: "AgentPoolListResult", + type: { + name: "Composite", + className: "AgentPoolListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AgentPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const RunListResult: msRest.CompositeMapper = { serializedName: "RunListResult", type: { @@ -4068,6 +5274,34 @@ export const RunListResult: msRest.CompositeMapper = { } }; +export const TaskRunListResult: msRest.CompositeMapper = { + serializedName: "TaskRunListResult", + type: { + name: "Composite", + className: "TaskRunListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TaskRun" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const TaskListResult: msRest.CompositeMapper = { serializedName: "TaskListResult", type: { diff --git a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts index 28bc5f1e102b..e4868d2a59ba 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts @@ -20,13 +20,28 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +export const agentPoolName: msRest.OperationURLParameter = { + parameterPath: "agentPoolName", + mapper: { + required: true, + serializedName: "agentPoolName", + constraints: { + MaxLength: 20, + MinLength: 3, + Pattern: /^[a-zA-Z0-9-]*$/ + }, + type: { + name: "String" + } + } +}; export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2019-05-01', + defaultValue: '2019-12-01-preview', type: { name: "String" } @@ -56,6 +71,21 @@ export const apiVersion2: msRest.OperationQueryParameter = { } } }; +export const exportPipelineName: msRest.OperationURLParameter = { + parameterPath: "exportPipelineName", + mapper: { + required: true, + serializedName: "exportPipelineName", + constraints: { + MaxLength: 50, + MinLength: 5, + Pattern: /^[a-zA-Z0-9]*$/ + }, + type: { + name: "String" + } + } +}; export const filter: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -68,6 +98,21 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const importPipelineName: msRest.OperationURLParameter = { + parameterPath: "importPipelineName", + mapper: { + required: true, + serializedName: "importPipelineName", + constraints: { + MaxLength: 50, + MinLength: 5, + Pattern: /^[a-zA-Z0-9]*$/ + }, + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -79,6 +124,31 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const pipelineRunName: msRest.OperationURLParameter = { + parameterPath: "pipelineRunName", + mapper: { + required: true, + serializedName: "pipelineRunName", + constraints: { + MaxLength: 50, + MinLength: 5, + Pattern: /^[a-zA-Z0-9]*$/ + }, + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const registryName: msRest.OperationURLParameter = { parameterPath: "registryName", mapper: { @@ -140,7 +210,7 @@ export const scopeMapName: msRest.OperationURLParameter = { constraints: { MaxLength: 50, MinLength: 5, - Pattern: /^[a-zA-Z0-9-]*$/ + Pattern: /^[a-zA-Z0-9-_]*$/ }, type: { name: "String" @@ -172,6 +242,16 @@ export const taskName: msRest.OperationURLParameter = { } } }; +export const taskRunName: msRest.OperationURLParameter = { + parameterPath: "taskRunName", + mapper: { + required: true, + serializedName: "taskRunName", + type: { + name: "String" + } + } +}; export const tokenName: msRest.OperationURLParameter = { parameterPath: "tokenName", mapper: { diff --git a/sdk/containerregistry/arm-containerregistry/src/models/pipelineRunsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/pipelineRunsMappers.ts new file mode 100644 index 000000000000..a6f9593651eb --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/pipelineRunsMappers.ts @@ -0,0 +1,89 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + CloudError, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunListResult, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunRequest, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/privateEndpointConnectionsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..a80e3a458518 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,89 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + CloudError, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunRequest, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts index 6b1fa361e77a..2d41555b3437 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -21,6 +23,11 @@ export { DockerBuildStep, EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, + ErrorResponse, + ErrorResponseBody, + ExportPipeline, + ExportPipelineTargetProperties, FileTaskRunRequest, FileTaskStep, GenerateCredentialsParameters, @@ -29,13 +36,32 @@ export { ImageDescriptor, ImageUpdateTrigger, ImportImageParameters, + ImportPipeline, + ImportPipelineSourceProperties, ImportSource, ImportSourceCredentials, + InnerErrorDescription, IPRule, + KeyVaultProperties, NetworkRuleSet, OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, RegenerateCredentialParameters, @@ -62,9 +88,10 @@ export { SourceTrigger, SourceTriggerDescriptor, SourceUploadDefinition, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, TaskRunRequest, TaskStepProperties, TimerTrigger, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts index db474e0504a4..2971c20b9be4 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -17,16 +19,39 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -36,6 +61,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -44,9 +70,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts index 60c968c59c3a..21a5b72c9e7e 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts @@ -8,25 +8,52 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, BaseImageDependency, BaseImageTrigger, BaseResource, - CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, + ErrorResponse, + ErrorResponseBody, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + InnerErrorDescription, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -36,6 +63,7 @@ export { Run, RunGetLogResult, RunListResult, + RunRequest, RunUpdateParameters, ScopeMap, SecretObject, @@ -45,9 +73,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts index 7acf439888cb..c6811c5044b7 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -17,16 +19,39 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -34,6 +59,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, ScopeMapListResult, ScopeMapUpdateParameters, @@ -44,9 +70,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts new file mode 100644 index 000000000000..9793b8c421b5 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts @@ -0,0 +1,92 @@ +/* + * 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 { + discriminators, + ActiveDirectoryObject, + AgentPool, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + EncryptionProperty, + ErrorResponse, + ErrorResponseBody, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + InnerErrorDescription, + IPRule, + KeyVaultProperties, + NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + PlatformProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunListResult, + TaskRunRequest, + TaskRunUpdateParameters, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts index 3cdb2ace5658..d08d5820c381 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -16,23 +18,48 @@ export { BaseImageTrigger, BaseImageTriggerUpdateParameters, BaseResource, - CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, DockerBuildStepUpdateParameters, + EncodedTaskRunRequest, EncodedTaskStep, EncodedTaskStepUpdateParameters, + EncryptionProperty, + ErrorResponse, + ErrorResponseBody, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, FileTaskStepUpdateParameters, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, + InnerErrorDescription, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, PlatformUpdateParameters, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -40,6 +67,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -50,10 +78,12 @@ export { SourceTriggerDescriptor, SourceTriggerUpdateParameters, SourceUpdateParameters, - Status1, + Status, StorageAccountProperties, Task, TaskListResult, + TaskRun, + TaskRunRequest, TaskStepProperties, TaskStepUpdateParameters, TaskUpdateParameters, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts index 72b11906e68f..ad7360923d51 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + ActiveDirectoryObject, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -17,16 +19,39 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -34,6 +59,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -42,9 +68,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts index ba570b7f3e2f..8da5ba555d8a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts @@ -8,7 +8,9 @@ export { discriminators, + ActiveDirectoryObject, Actor, + AgentPool, AgentProperties, Argument, AuthInfo, @@ -19,22 +21,45 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + EncryptionProperty, Event, EventContent, EventInfo, EventListResult, EventRequestMessage, EventResponseMessage, + ExportPipeline, + ExportPipelineTargetProperties, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, + ImportPipeline, + ImportPipelineSourceProperties, IPRule, + KeyVaultProperties, NetworkRuleSet, + OverrideTaskStepProperties, + PipelineRun, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, PlatformProperties, Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProgressProperties, ProxyResource, QuarantinePolicy, Registry, @@ -43,6 +68,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -52,10 +78,12 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Target, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts new file mode 100644 index 000000000000..8a3c1081509d --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts @@ -0,0 +1,464 @@ +/* + * 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. + */ + +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/agentPoolsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a AgentPools. */ +export class AgentPools { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a AgentPools. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the detailed information for a given agent pool. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, agentPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, agentPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + agentPoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates an agent pool for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param agentPool The parameters of an agent pool that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, agentPoolName: string, agentPool: Models.AgentPool, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,agentPoolName,agentPool,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a specified agent pool resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,agentPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an agent pool with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param updateParameters The parameters for updating an agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, registryName: string, agentPoolName: string, updateParameters: Models.AgentPoolUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,registryName,agentPoolName,updateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists all the agent pools for a specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the count of queued runs for a given agent pool. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + getQueueStatus(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param callback The callback + */ + getQueueStatus(resourceGroupName: string, registryName: string, agentPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param options The optional parameters + * @param callback The callback + */ + getQueueStatus(resourceGroupName: string, registryName: string, agentPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getQueueStatus(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + agentPoolName, + options + }, + getQueueStatusOperationSpec, + callback) as Promise; + } + + /** + * Creates an agent pool for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param agentPool The parameters of an agent pool that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, agentPoolName: string, agentPool: Models.AgentPool, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + agentPoolName, + agentPool, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a specified agent pool resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, agentPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + agentPoolName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an agent pool with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param agentPoolName The name of the agent pool. + * @param updateParameters The parameters for updating an agent pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, registryName: string, agentPoolName: string, updateParameters: Models.AgentPoolUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + agentPoolName, + updateParameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists all the agent pools for a specified container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgentPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgentPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getQueueStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}/listQueueStatus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgentPoolQueueStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "agentPool", + mapper: { + ...Mappers.AgentPool, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AgentPool + }, + 201: { + bodyMapper: Mappers.AgentPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.agentPoolName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateParameters", + mapper: { + ...Mappers.AgentPoolUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AgentPool + }, + 201: { + bodyMapper: Mappers.AgentPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgentPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts new file mode 100644 index 000000000000..c952f9f78504 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts @@ -0,0 +1,330 @@ +/* + * 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. + */ + +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/exportPipelinesMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a ExportPipelines. */ +export class ExportPipelines { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a ExportPipelines. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the properties of the export pipeline. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, exportPipelineName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, exportPipelineName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + exportPipelineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, exportPipelineName: string, exportPipelineCreateParameters: Models.ExportPipeline, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,exportPipelineName,exportPipelineCreateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an export pipeline from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,exportPipelineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists all export pipelines for the specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, exportPipelineName: string, exportPipelineCreateParameters: Models.ExportPipeline, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + exportPipelineName, + exportPipelineCreateParameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes an export pipeline from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + exportPipelineName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all export pipelines for the specified container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExportPipeline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExportPipelineListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "exportPipelineCreateParameters", + mapper: { + ...Mappers.ExportPipeline, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExportPipeline + }, + 201: { + bodyMapper: Mappers.ExportPipeline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExportPipelineListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts new file mode 100644 index 000000000000..0c9b947fbb4f --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts @@ -0,0 +1,330 @@ +/* + * 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. + */ + +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/importPipelinesMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a ImportPipelines. */ +export class ImportPipelines { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a ImportPipelines. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the properties of the import pipeline. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, importPipelineName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, importPipelineName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, importPipelineName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, importPipelineName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + importPipelineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, importPipelineName: string, importPipelineCreateParameters: Models.ImportPipeline, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,importPipelineName,importPipelineCreateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an import pipeline from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, importPipelineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,importPipelineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists all import pipelines for the specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, importPipelineName: string, importPipelineCreateParameters: Models.ImportPipeline, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + importPipelineName, + importPipelineCreateParameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes an import pipeline from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, importPipelineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + importPipelineName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all import pipelines for the specified container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ImportPipeline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ImportPipelineListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "importPipelineCreateParameters", + mapper: { + ...Mappers.ImportPipeline, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ImportPipeline + }, + 201: { + bodyMapper: Mappers.ImportPipeline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ImportPipelineListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts index 1e3175a05f2c..3ddd95ccd214 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts @@ -8,11 +8,17 @@ * regenerated. */ +export * from "./exportPipelines"; export * from "./registries"; +export * from "./importPipelines"; export * from "./operations"; +export * from "./pipelineRuns"; +export * from "./privateEndpointConnections"; export * from "./replications"; export * from "./webhooks"; +export * from "./agentPools"; export * from "./runs"; +export * from "./taskRuns"; export * from "./tasks"; export * from "./scopeMaps"; export * from "./tokens"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts new file mode 100644 index 000000000000..5802c113fb40 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts @@ -0,0 +1,330 @@ +/* + * 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. + */ + +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/pipelineRunsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a PipelineRuns. */ +export class PipelineRuns { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a PipelineRuns. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the detailed information for a given pipeline run. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, pipelineRunName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, pipelineRunName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + pipelineRunName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a pipeline run for a container registry with the specified parameters + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, pipelineRunName: string, pipelineRunCreateParameters: Models.PipelineRun, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,pipelineRunName,pipelineRunCreateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a pipeline run from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,pipelineRunName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists all the pipeline runs for the specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates a pipeline run for a container registry with the specified parameters + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, pipelineRunName: string, pipelineRunCreateParameters: Models.PipelineRun, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + pipelineRunName, + pipelineRunCreateParameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a pipeline run from a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + pipelineRunName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all the pipeline runs for the specified container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PipelineRun + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PipelineRunListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "pipelineRunCreateParameters", + mapper: { + ...Mappers.PipelineRun, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PipelineRun + }, + 201: { + bodyMapper: Mappers.PipelineRun + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PipelineRunListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..e38c5f5c96f9 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts @@ -0,0 +1,332 @@ +/* + * 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. + */ + +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/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the container + * registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,registryName,privateEndpointConnectionName,privateEndpointConnection,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * List all private endpoint connections in a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the container + * registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + privateEndpointConnectionName, + privateEndpointConnection, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List all private endpoint connections in a container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts index 6e7146247bff..d924ab5b4c41 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts @@ -294,6 +294,38 @@ export class Registries { callback) as Promise; } + /** + * Lists the private link resources for a container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + listPrivateLinkResources(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + listPrivateLinkResources(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + listPrivateLinkResources(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPrivateLinkResources(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listPrivateLinkResourcesOperationSpec, + callback) as Promise; + } + /** * Schedules a new run based on the request parameters and add it to the run queue. * @param resourceGroupName The name of the resource group to which the container registry belongs. @@ -525,6 +557,34 @@ export class Registries { listNextOperationSpec, callback) as Promise; } + + /** + * Lists the private link resources for a container registry. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listPrivateLinkResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listPrivateLinkResourcesNext(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 + */ + listPrivateLinkResourcesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPrivateLinkResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listPrivateLinkResourcesNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -713,6 +773,31 @@ const listUsagesOperationSpec: msRest.OperationSpec = { serializer }; +const listPrivateLinkResourcesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const getBuildSourceUploadUrlOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl", @@ -732,7 +817,7 @@ const getBuildSourceUploadUrlOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SourceUploadDefinition }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -891,7 +976,7 @@ const beginScheduleRunOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -971,3 +1056,24 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listPrivateLinkResourcesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts index 8ce3e9f5e7ed..c0da70dd209a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts @@ -252,7 +252,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -278,7 +278,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Run }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -304,7 +304,7 @@ const getLogSasUrlOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunGetLogResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -340,7 +340,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Run }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -365,7 +365,7 @@ const beginCancelOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -386,7 +386,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts new file mode 100644 index 000000000000..91eb0fb2a635 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts @@ -0,0 +1,464 @@ +/* + * 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. + */ + +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/taskRunsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a TaskRuns. */ +export class TaskRuns { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a TaskRuns. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the detailed information for a given task run. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + taskRunName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a task run for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The name of task run. + * @param taskRun The parameters of a run that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, taskRunName: string, taskRun: Models.TaskRun, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,taskRunName,taskRun,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a specified task run resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,taskRunName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a task run with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param updateParameters The parameters for updating a task run. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, registryName: string, taskRunName: string, updateParameters: Models.TaskRunUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,registryName,taskRunName,updateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets the detailed information for a given task run that includes all secrets. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param [options] The optional parameters + * @returns Promise + */ + getDetails(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param callback The callback + */ + getDetails(resourceGroupName: string, registryName: string, taskRunName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param options The optional parameters + * @param callback The callback + */ + getDetails(resourceGroupName: string, registryName: string, taskRunName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDetails(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + taskRunName, + options + }, + getDetailsOperationSpec, + callback) as Promise; + } + + /** + * Lists all the task runs for a specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates a task run for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The name of task run. + * @param taskRun The parameters of a run that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, taskRunName: string, taskRun: Models.TaskRun, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + taskRun, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a specified task run resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a task run with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param updateParameters The parameters for updating a task run. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, registryName: string, taskRunName: string, updateParameters: Models.TaskRunUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + updateParameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists all the task runs for a specified container registry. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getDetailsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}/listDetails", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRunListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "taskRun", + mapper: { + ...Mappers.TaskRun, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + 201: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateParameters", + mapper: { + ...Mappers.TaskRunUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + 201: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRunListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts index 1d473f71bbc9..b4e7ac93d557 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts @@ -286,7 +286,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TaskListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -312,7 +312,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -338,7 +338,7 @@ const getDetailsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -374,7 +374,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -400,7 +400,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -436,7 +436,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -457,7 +457,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TaskListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/containerregistry/arm-containerregistry/tsconfig.json b/sdk/containerregistry/arm-containerregistry/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/containerregistry/arm-containerregistry/tsconfig.json +++ b/sdk/containerregistry/arm-containerregistry/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/core/abort-controller/package.json b/sdk/core/abort-controller/package.json index 7b97207ebb3b..ea4e895b4337 100644 --- a/sdk/core/abort-controller/package.json +++ b/sdk/core/abort-controller/package.json @@ -64,20 +64,20 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/abort-controller", "sideEffects": false, "dependencies": { - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "delay": "^4.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -104,6 +104,6 @@ "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", "ts-node": "^8.3.0", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/core/abort-controller/tsconfig.json b/sdk/core/abort-controller/tsconfig.json index 6f18f95de133..0b029a0ccf3a 100644 --- a/sdk/core/abort-controller/tsconfig.json +++ b/sdk/core/abort-controller/tsconfig.json @@ -5,7 +5,6 @@ "declarationDir": "./types", "outDir": "./dist-esm" }, - "compileOnSave": true, "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index a084f44cd2c6..be98fa226ac5 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -38,30 +28,28 @@ pr: - common/config/rush/ - rush.json -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: core - Artifacts: - - name: azure-abort-controller - safeName: azureabortcontroller - - name: azure-core-amqp - safeName: azurecoreamqp - - name: azure-core-arm - safeName: azurecorearm - - name: azure-core-asynciterator-polyfill - safeName: azurecoreasynciteratorpolyfill - - name: azure-core-auth - safeName: azurecoreauth - - name: azure-core-http - safeName: azurecorehttp - - name: azure-core-https - safeName: azurecorehttps - - name: azure-core-lro - safeName: azurecorelro - - name: azure-core-paging - safeName: azurecorepaging - - name: azure-core-tracing - safeName: azurecoretracing - - name: azure-logger - safeName: azurelogger +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: core + Artifacts: + - name: azure-abort-controller + safeName: azureabortcontroller + - name: azure-core-amqp + safeName: azurecoreamqp + - name: azure-core-arm + safeName: azurecorearm + - name: azure-core-asynciterator-polyfill + safeName: azurecoreasynciteratorpolyfill + - name: azure-core-auth + safeName: azurecoreauth + - name: azure-core-http + safeName: azurecorehttp + - name: azure-core-lro + safeName: azurecorelro + - name: azure-core-paging + safeName: azurecorepaging + - name: azure-core-tracing + safeName: azurecoretracing + - name: azure-logger + safeName: azurelogger diff --git a/sdk/core/core-amqp/CHANGELOG.md b/sdk/core/core-amqp/CHANGELOG.md index 38b37f010425..e6b5b38e97d0 100644 --- a/sdk/core/core-amqp/CHANGELOG.md +++ b/sdk/core/core-amqp/CHANGELOG.md @@ -1,7 +1,17 @@ # Release History -## 1.1.3 (Unreleased) +## 1.1.4 (Unreleased) +- Fixes issue [9287](https://github.com/Azure/azure-sdk-for-js/issues/9287) + where operations that used the `RequestResponseLink` and encountered an error + would fail to cleanup their internal timer. + This caused exiting the process to be delayed until the timer reached its timeout. + +## 1.1.3 (2020-06-02) + +- Updated to use the latest version of the `rhea` package. + This update fixes an issue where an uncaught exception could be thrown some time after a connection was disconnected. + [PR 8758](https://github.com/Azure/azure-sdk-for-js/pull/8758) ## 1.1.2 (2020-04-28) diff --git a/sdk/core/core-amqp/package.json b/sdk/core/core-amqp/package.json index 4f7281e6e0e6..8da492084dc8 100644 --- a/sdk/core/core-amqp/package.json +++ b/sdk/core/core-amqp/package.json @@ -1,7 +1,7 @@ { "name": "@azure/core-amqp", "sdk-type": "client", - "version": "1.1.3", + "version": "1.1.4", "description": "Common library for amqp based azure sdks like @azure/event-hubs.", "author": "Microsoft Corporation", "license": "MIT", @@ -78,15 +78,14 @@ "@types/is-buffer": "^2.0.0", "async-lock": "^1.1.3", "buffer": "^5.2.1", - "debug": "^4.1.1", "events": "^3.0.0", "is-buffer": "^2.0.3", - "jssha": "^2.3.1", + "jssha": "^3.1.0", "process": "^0.11.10", "rhea": "^1.0.21", "rhea-promise": "^1.0.0", - "stream-browserify": "^2.0.2", - "tslib": "^1.10.0", + "stream-browserify": "^3.0.0", + "tslib": "^2.0.0", "url": "^0.11.0", "util": "^0.12.1" }, @@ -98,21 +97,21 @@ "@rollup/plugin-inject": "^4.0.0", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", "@types/debug": "^4.1.4", - "@types/jssha": "^2.0.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", + "debug": "^4.1.1", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "eslint": "^6.1.0", @@ -127,15 +126,15 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "sinon": "^7.1.0", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "ws": "^7.1.1" } } diff --git a/sdk/core/core-amqp/src/ConnectionContextBase.ts b/sdk/core/core-amqp/src/ConnectionContextBase.ts index 622e8f9ad508..454cae3d93aa 100644 --- a/sdk/core/core-amqp/src/ConnectionContextBase.ts +++ b/sdk/core/core-amqp/src/ConnectionContextBase.ts @@ -9,7 +9,7 @@ import { ConnectionConfig } from "./connectionConfig/connectionConfig"; import { SharedKeyCredential } from "./auth/sas"; import { Constants } from "./util/constants"; -import { getPlatformInfo, getFrameworkInfo } from "./util/runtimeInfo"; +import { getFrameworkInfo, getPlatformInfo } from "./util/runtimeInfo"; import { isNode } from "./util/utils"; /** diff --git a/sdk/core/core-amqp/src/auth/sas.ts b/sdk/core/core-amqp/src/auth/sas.ts index 3971b7b11e41..432b234b3b70 100644 --- a/sdk/core/core-amqp/src/auth/sas.ts +++ b/sdk/core/core-amqp/src/auth/sas.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { parseConnectionString, ServiceBusConnectionStringModel } from "../util/utils"; +import { ServiceBusConnectionStringModel, parseConnectionString } from "../util/utils"; import { AccessToken } from "@azure/core-auth"; import { Buffer } from "buffer"; import isBuffer from "is-buffer"; diff --git a/sdk/core/core-amqp/src/cbs.ts b/sdk/core/core-amqp/src/cbs.ts index d743c80cb8bf..6ff4a80b60cc 100644 --- a/sdk/core/core-amqp/src/cbs.ts +++ b/sdk/core/core-amqp/src/cbs.ts @@ -4,17 +4,17 @@ import { TokenType } from "./auth/token"; import { AccessToken } from "@azure/core-auth"; import { + Message as AmqpMessage, + Connection, EventContext, + ReceiverEvents, ReceiverOptions, - Message as AmqpMessage, SenderEvents, - ReceiverEvents, - Connection, SenderOptions, generate_uuid } from "rhea-promise"; import { Constants } from "./util/constants"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { translate } from "./errors"; import { defaultLock } from "./util/utils"; import { RequestResponseLink } from "./requestResponseLink"; diff --git a/sdk/core/core-amqp/src/connectionConfig/connectionConfig.ts b/sdk/core/core-amqp/src/connectionConfig/connectionConfig.ts index 6eed3b610626..0164c620a5c9 100644 --- a/sdk/core/core-amqp/src/connectionConfig/connectionConfig.ts +++ b/sdk/core/core-amqp/src/connectionConfig/connectionConfig.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { parseConnectionString, ServiceBusConnectionStringModel } from "../util/utils"; +import { ServiceBusConnectionStringModel, parseConnectionString } from "../util/utils"; import { WebSocketImpl } from "rhea-promise"; /** diff --git a/sdk/core/core-amqp/src/connectionConfig/iothubConnectionConfig.ts b/sdk/core/core-amqp/src/connectionConfig/iothubConnectionConfig.ts index aaf92f542690..1462ed66a5f4 100644 --- a/sdk/core/core-amqp/src/connectionConfig/iothubConnectionConfig.ts +++ b/sdk/core/core-amqp/src/connectionConfig/iothubConnectionConfig.ts @@ -3,7 +3,7 @@ import { ConnectionConfig } from "./connectionConfig"; import { EventHubConnectionConfig } from "./eventhubConnectionConfig"; -import { parseConnectionString, IotHubConnectionStringModel } from "../util/utils"; +import { IotHubConnectionStringModel, parseConnectionString } from "../util/utils"; /** * @ignore diff --git a/sdk/core/core-amqp/src/dataTransformer.ts b/sdk/core/core-amqp/src/dataTransformer.ts index 45841dade847..03580d8d96e1 100644 --- a/sdk/core/core-amqp/src/dataTransformer.ts +++ b/sdk/core/core-amqp/src/dataTransformer.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { message } from "rhea-promise"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import isBuffer from "is-buffer"; import { Buffer } from "buffer"; diff --git a/sdk/core/core-amqp/src/errors.ts b/sdk/core/core-amqp/src/errors.ts index b2e8680cc48b..ccccbe0f14a3 100644 --- a/sdk/core/core-amqp/src/errors.ts +++ b/sdk/core/core-amqp/src/errors.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. /* eslint-disable eqeqeq */ -import { AmqpResponseStatusCode, isAmqpError as rheaIsAmqpError, AmqpError } from "rhea-promise"; -import { isNode, isString, isNumber } from "../src/util/utils"; +import { AmqpError, AmqpResponseStatusCode, isAmqpError as rheaIsAmqpError } from "rhea-promise"; +import { isNode, isNumber, isString } from "../src/util/utils"; /** * Maps the conditions to the numeric AMQP Response status codes. diff --git a/sdk/core/core-amqp/src/requestResponseLink.ts b/sdk/core/core-amqp/src/requestResponseLink.ts index 17f11289817b..96b1d1be420a 100644 --- a/sdk/core/core-amqp/src/requestResponseLink.ts +++ b/sdk/core/core-amqp/src/requestResponseLink.ts @@ -1,23 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; import { Constants } from "./util/constants"; import { - Session, - Connection, - Sender, - Receiver, + AmqpError, Message as AmqpMessage, + Connection, EventContext, - AmqpError, - SenderOptions, - ReceiverOptions, + Receiver, ReceiverEvents, - ReqResLink + ReceiverOptions, + ReqResLink, + Sender, + SenderOptions, + Session } from "rhea-promise"; -import { translate, ConditionStatusMapper } from "./errors"; -import { logger, logErrorStackTrace } from "./log"; +import { ConditionStatusMapper, translate } from "./errors"; +import { logErrorStackTrace, logger } from "./log"; /** * Describes the options that can be specified while sending a request. @@ -171,10 +171,10 @@ export class RequestResponseLink implements ReqResLink { // remove the event listeners as they will be registered next time when someone makes a request. this.receiver.removeListener(ReceiverEvents.message, messageCallback); + if (!timeOver) { + clearTimeout(waitTimer); + } if (info.statusCode > 199 && info.statusCode < 300) { - if (!timeOver) { - clearTimeout(waitTimer); - } logger.verbose( "[%s] request-messageId | '%s' == '%s' | response-correlationId.", this.connection.id, diff --git a/sdk/core/core-amqp/src/retry.ts b/sdk/core/core-amqp/src/retry.ts index dd8ed1a6e6b7..427352176efa 100644 --- a/sdk/core/core-amqp/src/retry.ts +++ b/sdk/core/core-amqp/src/retry.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. /* eslint-disable eqeqeq */ -import { translate, MessagingError } from "./errors"; +import { MessagingError, translate } from "./errors"; import { delay } from "./util/utils"; import { logger } from "./log"; import { Constants } from "./util/constants"; diff --git a/sdk/core/core-amqp/src/util/checkNetworkConnection.ts b/sdk/core/core-amqp/src/util/checkNetworkConnection.ts index f6776ed8cac8..cb67b28f4c97 100644 --- a/sdk/core/core-amqp/src/util/checkNetworkConnection.ts +++ b/sdk/core/core-amqp/src/util/checkNetworkConnection.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { resolve as dnsResolve, CONNREFUSED, TIMEOUT } from "dns"; +import { CONNREFUSED, TIMEOUT, resolve as dnsResolve } from "dns"; import { logger } from "../log"; /** diff --git a/sdk/core/core-amqp/src/util/utils.ts b/sdk/core/core-amqp/src/util/utils.ts index 76562fe38936..526b5e869f18 100644 --- a/sdk/core/core-amqp/src/util/utils.ts +++ b/sdk/core/core-amqp/src/util/utils.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import AsyncLock from "async-lock"; -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; import { WebSocketImpl } from "rhea-promise"; export { AsyncLock }; diff --git a/sdk/core/core-amqp/test/context.spec.ts b/sdk/core/core-amqp/test/context.spec.ts index a69c54c2dc85..f0fc3c18c626 100644 --- a/sdk/core/core-amqp/test/context.spec.ts +++ b/sdk/core/core-amqp/test/context.spec.ts @@ -4,11 +4,11 @@ import * as chai from "chai"; const should = chai.should(); import { + CbsClient, ConnectionConfig, ConnectionContextBase, - SharedKeyCredential, DefaultDataTransformer, - CbsClient + SharedKeyCredential } from "../src"; import { Connection } from "rhea-promise"; import { isNode } from "../src/util/utils"; diff --git a/sdk/core/core-amqp/test/message.spec.ts b/sdk/core/core-amqp/test/message.spec.ts index ad34dff109c5..1bc11a582594 100644 --- a/sdk/core/core-amqp/test/message.spec.ts +++ b/sdk/core/core-amqp/test/message.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { MessageHeader, AmqpMessageHeader, MessageProperties, AmqpMessageProperties } from "../src"; +import { AmqpMessageHeader, AmqpMessageProperties, MessageHeader, MessageProperties } from "../src"; import * as chai from "chai"; chai.should(); diff --git a/sdk/core/core-amqp/test/requestResponse.spec.ts b/sdk/core/core-amqp/test/requestResponse.spec.ts index 83a32abf99e6..aedd6f9d0bac 100644 --- a/sdk/core/core-amqp/test/requestResponse.spec.ts +++ b/sdk/core/core-amqp/test/requestResponse.spec.ts @@ -3,9 +3,9 @@ import { assert } from "chai"; import { - RequestResponseLink, AmqpMessage, ErrorNameConditionMapper, + RequestResponseLink, RetryConfig, RetryOperationType, retry @@ -14,6 +14,16 @@ import { Connection, Message } from "rhea-promise"; import { stub } from "sinon"; import EventEmitter from "events"; import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +interface Window {} +declare let self: Window & typeof globalThis; + +function getGlobal() { + if (typeof global !== "undefined") { + return global; + } else { + return self; + } +} describe("RequestResponseLink", function() { it("should send a request and receive a response correctly", async function() { @@ -399,4 +409,117 @@ describe("RequestResponseLink", function() { ); } }); + + describe("sendRequest clears timeout", () => { + const _global = getGlobal(); + const originalClearTimeout = clearTimeout; + let clearTimeoutCalledCount = 0; + + beforeEach(() => { + clearTimeoutCalledCount = 0; + _global.clearTimeout = (tid) => { + clearTimeoutCalledCount++; + return originalClearTimeout(tid); + }; + }); + + afterEach(() => { + _global.clearTimeout = originalClearTimeout; + }); + + it("sendRequest clears timeout after error message", async function() { + const connectionStub = stub(new Connection()); + const rcvr = new EventEmitter(); + let req: any = {}; + connectionStub.createSession.resolves({ + connection: { + id: "connection-1" + }, + createSender: () => { + return Promise.resolve({ + send: (request: any) => { + req = request; + } + }); + }, + createReceiver: () => { + return Promise.resolve(rcvr); + } + } as any); + const sessionStub = await connectionStub.createSession(); + const senderStub = await sessionStub.createSender(); + const receiverStub = await sessionStub.createReceiver(); + const link = new RequestResponseLink(sessionStub as any, senderStub, receiverStub); + const request: AmqpMessage = { + body: "Hello World!!" + }; + const testFailureMessage = "Test failure"; + setTimeout(() => { + rcvr.emit("message", { + message: { + correlation_id: req.message_id, + application_properties: { + statusCode: 400, + errorCondition: null, + statusDescription: null, + "com.microsoft:tracking-id": null + }, + body: "I should throw an error!" + } + }); + }, 0); + try { + await link.sendRequest(request, { timeoutInMs: 120000, requestName: "foo" }); + throw new Error(testFailureMessage); + } catch (err) { + assert.notEqual(err.message, testFailureMessage); + } + assert.equal(clearTimeoutCalledCount, 1, "Expected clearTimeout to be called once."); + }); + + it("sendRequest clears timeout after successful message", async function() { + const connectionStub = stub(new Connection()); + const rcvr = new EventEmitter(); + let req: any = {}; + connectionStub.createSession.resolves({ + connection: { + id: "connection-1" + }, + createSender: () => { + return Promise.resolve({ + send: (request: any) => { + req = request; + } + }); + }, + createReceiver: () => { + return Promise.resolve(rcvr); + } + } as any); + const sessionStub = await connectionStub.createSession(); + const senderStub = await sessionStub.createSender(); + const receiverStub = await sessionStub.createReceiver(); + const link = new RequestResponseLink(sessionStub as any, senderStub, receiverStub); + const request: AmqpMessage = { + body: "Hello World!!" + }; + setTimeout(() => { + rcvr.emit("message", { + message: { + correlation_id: req.message_id, + application_properties: { + statusCode: 200, + errorCondition: null, + statusDescription: null, + "com.microsoft:tracking-id": null + }, + body: "I work!" + } + }); + }, 0); + + await link.sendRequest(request, { timeoutInMs: 120000, requestName: "foo" }); + assert.equal(clearTimeoutCalledCount, 1, "Expected clearTimeout to be called once."); + }); + }); }); diff --git a/sdk/core/core-amqp/test/retry.spec.ts b/sdk/core/core-amqp/test/retry.spec.ts index 289e66cd586e..26d9adfde0ce 100644 --- a/sdk/core/core-amqp/test/retry.spec.ts +++ b/sdk/core/core-amqp/test/retry.spec.ts @@ -2,14 +2,14 @@ // Licensed under the MIT license. import { - retry, - translate, + Constants, + MessagingError, RetryConfig, + RetryMode, RetryOperationType, - Constants, delay, - MessagingError, - RetryMode + retry, + translate } from "../src"; import * as chai from "chai"; import debugModule from "debug"; diff --git a/sdk/core/core-amqp/test/tokenProvider.spec.ts b/sdk/core/core-amqp/test/tokenProvider.spec.ts index b9248bdb1591..46d5aa5d404b 100644 --- a/sdk/core/core-amqp/test/tokenProvider.spec.ts +++ b/sdk/core/core-amqp/test/tokenProvider.spec.ts @@ -5,7 +5,7 @@ import * as chai from "chai"; chai.should(); import debugModule from "debug"; const debug = debugModule("azure:core-amqp:token-spec"); -import { SharedKeyCredential, IotSharedKeyCredential } from "../src"; +import { IotSharedKeyCredential, SharedKeyCredential } from "../src"; describe("SharedKeyCredential", function(): void { it("should work as expected with required parameters", async function(): Promise { diff --git a/sdk/core/core-amqp/tsconfig.json b/sdk/core/core-amqp/tsconfig.json index 06106075dd7c..d592c1e85767 100644 --- a/sdk/core/core-amqp/tsconfig.json +++ b/sdk/core/core-amqp/tsconfig.json @@ -6,7 +6,6 @@ "declarationDir": "./types", "resolveJsonModule": true }, - "compileOnSave": true, "exclude": ["node_modules", "types/**", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/core/core-arm/package.json b/sdk/core/core-arm/package.json index d2628e6d7527..ac9664ec10a5 100644 --- a/sdk/core/core-arm/package.json +++ b/sdk/core/core-arm/package.json @@ -100,10 +100,10 @@ }, "dependencies": { "@azure/core-http": "^1.1.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", @@ -122,10 +122,10 @@ "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "shx": "^0.3.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9" } } diff --git a/sdk/core/core-arm/tsconfig.json b/sdk/core/core-arm/tsconfig.json index fe115c95ad1d..052c2bcd77ac 100644 --- a/sdk/core/core-arm/tsconfig.json +++ b/sdk/core/core-arm/tsconfig.json @@ -6,7 +6,6 @@ "target": "es5", "outDir": "es" }, - "compileOnSave": true, "exclude": ["node_modules"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/core/core-asynciterator-polyfill/package.json b/sdk/core/core-asynciterator-polyfill/package.json index 254871d06b74..2eb268f0a9a4 100644 --- a/sdk/core/core-asynciterator-polyfill/package.json +++ b/sdk/core/core-asynciterator-polyfill/package.json @@ -65,6 +65,6 @@ "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", "prettier": "^1.16.4", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/core/core-asynciterator-polyfill/tsconfig.json b/sdk/core/core-asynciterator-polyfill/tsconfig.json index 6cae3f95806a..7381af10178a 100644 --- a/sdk/core/core-asynciterator-polyfill/tsconfig.json +++ b/sdk/core/core-asynciterator-polyfill/tsconfig.json @@ -5,7 +5,6 @@ "target": "es5", "outDir": "./dist-esm" }, - "compileOnSave": true, "exclude": ["node_modules"], "include": ["./src/**/*.ts"] } diff --git a/sdk/core/core-auth/package.json b/sdk/core/core-auth/package.json index 322f46ecac1b..34aa49f2594e 100644 --- a/sdk/core/core-auth/package.json +++ b/sdk/core/core-auth/package.json @@ -69,7 +69,7 @@ "@azure/abort-controller": "^1.0.0", "@azure/core-tracing": "1.0.0-preview.8", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -77,14 +77,14 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "downlevel-dts": "~0.4.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -99,8 +99,8 @@ "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/core/core-http/CHANGELOG.md b/sdk/core/core-http/CHANGELOG.md index ebf23983a817..2e6f356403d4 100644 --- a/sdk/core/core-http/CHANGELOG.md +++ b/sdk/core/core-http/CHANGELOG.md @@ -1,8 +1,13 @@ # Release History -## 1.1.3 (Unreleased) +## 1.1.4 (Unreleased) +- Fix issue with flattened model serialization, where constant properties are being dropped [PR#8658](https://github.com/Azure/azure-sdk-for-js/pull/8658) + +## 1.1.3 (2020-06-03) - Fix issue of `SystemErrorRetryPolicy` didn't retry on errors [PR #8803](https://github.com/Azure/azure-sdk-for-js/pull/8803) +- Add support for serialization of text media type. [PR #8977](https://github.com/Azure/azure-sdk-for-js/pull/8977) +- Fix issue with URLBuilder incorrectly handling full URL in path. [PR #9245](https://github.com/Azure/azure-sdk-for-js/pull/9245) ## 1.1.2 (2020-05-07) diff --git a/sdk/core/core-http/package.json b/sdk/core/core-http/package.json index 93e7f2d3bb86..c312e29f63f6 100644 --- a/sdk/core/core-http/package.json +++ b/sdk/core/core-http/package.json @@ -6,7 +6,7 @@ "email": "azsdkteam@microsoft.com", "url": "https://github.com/Azure/azure-sdk-for-js" }, - "version": "1.1.3", + "version": "1.1.4", "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", "tags": [ "isomorphic", @@ -133,14 +133,15 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "cross-env": "^6.0.3", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.1", "form-data": "^3.0.0", "node-fetch": "^2.6.0", "process": "^0.11.10", - "tough-cookie": "^3.0.1", - "tslib": "^1.10.0", + "tough-cookie": "^4.0.0", + "tslib": "^2.0.0", "tunnel": "^0.0.6", - "uuid": "^3.3.2", + "uuid": "^8.1.0", "xml2js": "^0.4.19" }, "devDependencies": { @@ -150,23 +151,21 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@types/chai": "^4.1.6", "@types/express": "^4.16.0", "@types/glob": "^7.1.1", - "@types/karma": "^3.0.0", "@types/mocha": "^7.0.2", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.1", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", - "@types/tough-cookie": "^2.3.5", - "@types/uuid": "^3.4.3", + "@types/sinon": "^9.0.4", + "@types/tough-cookie": "^4.0.0", + "@types/uuid": "^8.0.0", "@types/xml2js": "^0.4.3", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "babel-runtime": "^6.26.0", "chai": "^4.2.0", + "cross-env": "^7.0.2", "downlevel-dts": "~0.4.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -174,7 +173,7 @@ "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", "express": "^4.16.3", - "fetch-mock": "^8.0.0", + "fetch-mock": "^9.10.1", "glob": "^7.1.2", "karma": "^4.0.1", "karma-chai": "^0.1.0", @@ -189,17 +188,16 @@ "npm-run-all": "^4.1.5", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "regenerator-runtime": "^0.13.3", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "shx": "^0.3.2", - "sinon": "^7.1.0", - "ts-loader": "^6.0.4", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9", "xhr-mock": "^2.4.1" } diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index fb2e1d4cbeb8..ee9253675c77 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -572,10 +572,8 @@ export function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory // @public export interface ProxySettings { - // (undocumented) host: string; password?: string; - // (undocumented) port: number; username?: string; } diff --git a/sdk/core/core-http/src/serializer.ts b/sdk/core/core-http/src/serializer.ts index 0f8d9f94f8a2..46d265d3b1bd 100644 --- a/sdk/core/core-http/src/serializer.ts +++ b/sdk/core/core-http/src/serializer.ts @@ -573,7 +573,10 @@ function serializeCompositeType( for (const pathName of paths) { const childObject = parentObject[pathName]; - if (childObject == undefined && object[key] != undefined) { + if ( + childObject == undefined && + (object[key] != undefined || propertyMapper.defaultValue !== undefined) + ) { parentObject[pathName] = {}; } parentObject = parentObject[pathName]; diff --git a/sdk/core/core-http/src/serviceClient.ts b/sdk/core/core-http/src/serviceClient.ts index 162d4841854e..94c628ba09f7 100644 --- a/sdk/core/core-http/src/serviceClient.ts +++ b/sdk/core/core-http/src/serviceClient.ts @@ -64,12 +64,12 @@ import { disableResponseDecompressionPolicy } from "./policies/disableResponseDe * Options to configure a proxy for outgoing requests (Node.js only). */ export interface ProxySettings { - /* + /** * The proxy's host address. */ host: string; - /* + /** * The proxy host's port. */ port: number; diff --git a/sdk/core/core-http/src/url.ts b/sdk/core/core-http/src/url.ts index bf889dd8bc70..ba56acb899ff 100644 --- a/sdk/core/core-http/src/url.ts +++ b/sdk/core/core-http/src/url.ts @@ -222,8 +222,12 @@ export class URLBuilder { if (!path) { this._path = undefined; } else { - if (path.indexOf("://") !== -1) { - this.set(path, "SCHEME"); + const schemeIndex = path.indexOf("://"); + if (schemeIndex !== -1) { + const schemeStart = path.lastIndexOf("/", schemeIndex); + // Make sure to only grab the URL part of the path before setting the state back to SCHEME + // this will handle cases such as "/a/b/c/https://microsoft.com" => "https://microsoft.com" + this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), "SCHEME"); } else { this.set(path, "PATH"); } diff --git a/sdk/core/core-http/src/util/constants.ts b/sdk/core/core-http/src/util/constants.ts index b53bc9f5b80f..1f03591267b7 100644 --- a/sdk/core/core-http/src/util/constants.ts +++ b/sdk/core/core-http/src/util/constants.ts @@ -7,7 +7,7 @@ export const Constants = { * @const * @type {string} */ - coreHttpVersion: "1.1.3", + coreHttpVersion: "1.1.4", /** * Specifies HTTP. diff --git a/sdk/core/core-http/src/util/utils.ts b/sdk/core/core-http/src/util/utils.ts index e25c5e87b5d4..2749afb066a2 100644 --- a/sdk/core/core-http/src/util/utils.ts +++ b/sdk/core/core-http/src/util/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import uuidv4 from "uuid/v4"; +import { v4 as uuidv4 } from "uuid"; import { HttpOperationResponse } from "../httpOperationResponse"; import { RestError } from "../restError"; import { WebResourceLike } from "../webResource"; diff --git a/sdk/core/core-http/test/data/TestClient/src/models/mappers.ts b/sdk/core/core-http/test/data/TestClient/src/models/mappers.ts index 71cf2b69acb8..1f1e75ce3c19 100644 --- a/sdk/core/core-http/test/data/TestClient/src/models/mappers.ts +++ b/sdk/core/core-http/test/data/TestClient/src/models/mappers.ts @@ -5,6 +5,82 @@ */ const internalMappers: any = {}; +internalMappers.SimpleProduct = { + type: { + name: "Composite", + className: "SimpleProduct", + modelProperties: { + id: { + serializedName: "id", + constraints: {}, + required: true, + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + maxProductDisplayName: { + serializedName: "details.max_product_display_name", + type: { + name: "String" + } + }, + capacity: { + defaultValue: "Large", + isConstant: true, + serializedName: "details.max_product_capacity", + type: { + name: "String" + } + } + } + } +}; + +internalMappers.SimpleProductConstFirst = { + type: { + name: "Composite", + className: "SimpleProduct", + modelProperties: { + id: { + serializedName: "id", + constraints: {}, + required: true, + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + capacity: { + defaultValue: "Large", + isConstant: true, + serializedName: "details.max_product_capacity", + type: { + name: "String" + } + }, + maxProductDisplayName: { + serializedName: "details.max_product_display_name", + type: { + name: "String" + } + } + } + } +}; + internalMappers.Cat = { required: false, serializedName: "cat", diff --git a/sdk/core/core-http/test/msRestUserAgentPolicyTests.browser.ts b/sdk/core/core-http/test/msRestUserAgentPolicyTests.browser.ts index 706a034ef654..8380f61504d2 100644 --- a/sdk/core/core-http/test/msRestUserAgentPolicyTests.browser.ts +++ b/sdk/core/core-http/test/msRestUserAgentPolicyTests.browser.ts @@ -60,10 +60,10 @@ describe("MsRestUserAgentPolicy (browser)", () => { userAgentHeader.should.be.equal(customUserAgent); }); - it("should be space delimited and contain two fields", async () => { + it("should be space delimited and contain at least two fields", async () => { const userAgent = await getUserAgent(); const userAgentParts = userAgent.split(" "); - userAgentParts.length.should.be.equal(2); + userAgentParts.length.should.be.greaterThan(1); }); it("should contain runtime information", async () => { diff --git a/sdk/core/core-http/test/serializationTests.ts b/sdk/core/core-http/test/serializationTests.ts index edc8244a2ad6..09b283f75fca 100644 --- a/sdk/core/core-http/test/serializationTests.ts +++ b/sdk/core/core-http/test/serializationTests.ts @@ -21,6 +21,54 @@ function stringToByteArray(str: string): Uint8Array { describe("msrest", function() { describe("serializeObject", function() { + it("should correctly serialize flattened properties", (done) => { + const expected = { + id: 1, + name: "testProduct", + details: { + max_product_capacity: "Large", + max_product_display_name: "MaxDisplayName" + } + }; + + const serialized = Serializer.serialize( + Mappers.SimpleProduct, + { + id: 1, + name: "testProduct", + maxProductDisplayName: "MaxDisplayName" + }, + "SimpleProduct" + ); + + assert.deepEqual(serialized, expected); + done(); + }); + + it("should correctly serialize flattened properties when flattened constant is defined first", (done) => { + const expected = { + id: 1, + name: "testProduct", + details: { + max_product_capacity: "Large", + max_product_display_name: "MaxDisplayName" + } + }; + + const serialized = Serializer.serialize( + Mappers.SimpleProductConstFirst, + { + id: 1, + name: "testProduct", + maxProductDisplayName: "MaxDisplayName" + }, + "SimpleProduct" + ); + + assert.deepEqual(serialized, expected); + done(); + }); + it("should correctly serialize a Date Object", function(done) { const dateObj = new Date("2015-01-01"); const dateISO = "2015-01-01T00:00:00.000Z"; @@ -286,9 +334,9 @@ describe("msrest", function() { required: false, serializedName: "DateTimeRfc1123" }; - const rfc = new Date("Mon, 01 Jan 0001 00:00:00 GMT"); + const rfc = new Date("Wed, 01 Jan 2020 00:00:00 GMT"); const serializedDateString = Serializer.serialize(mapper, rfc, "dateTimeObj"); - serializedDateString.should.equal("Mon, 01 Jan 2001 00:00:00 GMT"); + serializedDateString.should.equal("Wed, 01 Jan 2020 00:00:00 GMT"); done(); }); diff --git a/sdk/core/core-http/test/urlTests.ts b/sdk/core/core-http/test/urlTests.ts index 95582f7d5763..133e2d6a3e51 100644 --- a/sdk/core/core-http/test/urlTests.ts +++ b/sdk/core/core-http/test/urlTests.ts @@ -963,6 +963,28 @@ describe("URLBuilder", () => { }); describe("replaceAll()", () => { + it("should handle parametrized path containing a full url", () => { + const url = URLBuilder.parse("http://localhost"); + url.appendPath("{nextLink}"); + url.replaceAll("{nextLink}", "http://localhost:80/paging/multiple/page/2"); + + assert.strictEqual(url.toString(), "http://localhost:80/paging/multiple/page/2"); + }); + + it("should handle parametrized path containing a full url, when path contains parts", () => { + const url = URLBuilder.parse("https://localhost/formrecognizer/v2.0-preview"); + url.appendPath("{nextLink}"); + url.replaceAll( + "{nextLink}", + "https://localhost/formrecognizer/v2.0-preview/custom/models?nextLink=1" + ); + + assert.strictEqual( + url.toString(), + "https://localhost/formrecognizer/v2.0-preview/custom/models?nextLink=1" + ); + }); + it(`with undefined path, "{arg}" searchValue, and "cats" replaceValue`, () => { const urlBuilder = new URLBuilder(); urlBuilder.setPath(undefined); diff --git a/sdk/core/core-http/test/xmlTests.ts b/sdk/core/core-http/test/xmlTests.ts index 15a664787b0d..e024cbe01e03 100644 --- a/sdk/core/core-http/test/xmlTests.ts +++ b/sdk/core/core-http/test/xmlTests.ts @@ -9,20 +9,22 @@ describe("XML serializer", function() { describe("parseXML(string)", function() { it("with undefined", async function() { const error: Error = await msAssert.throwsAsync(parseXML(undefined as any)); - assert.notStrictEqual( - error.message.indexOf("Document is empty"), - -1, - `error.message ("${error.message}") should have contained "Document is empty"` + assert.ok( + error.message.indexOf("Document is empty") !== -1 || // Chrome + (error.message.startsWith("XML Parsing Error: syntax error") && + error.message.indexOf("undefined") !== -1), // Firefox + `error.message ("${error.message}") should have contained "Document is empty" or "undefined"` ); }); it("with null", async function() { // tslint:disable-next-line:no-null-keyword const error: Error = await msAssert.throwsAsync(parseXML(null as any)); - assert.notStrictEqual( - error.message.indexOf("Document is empty"), - -1, - `error.message ("${error.message}") should have contained "Document is empty"` + assert.ok( + error.message.indexOf("Document is empty") !== -1 || // Chrome + (error.message.startsWith("XML Parsing Error: syntax error") && + error.message.indexOf("null") !== -1), // Firefox + `error.message ("${error.message}") should have contained "Document is empty" or "null"` ); }); diff --git a/sdk/core/core-http/tsconfig.json b/sdk/core/core-http/tsconfig.json index 2f7c4e43e69b..d5ab61006897 100644 --- a/sdk/core/core-http/tsconfig.json +++ b/sdk/core/core-http/tsconfig.json @@ -6,7 +6,6 @@ "target": "es5", "declarationDir": "./types/latest" }, - "compileOnSave": true, "exclude": ["node_modules"], "include": ["./src/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/core/core-https/api-extractor.json b/sdk/core/core-https/api-extractor.json index 1bf74e54ef08..79e4607f8f86 100644 --- a/sdk/core/core-https/api-extractor.json +++ b/sdk/core/core-https/api-extractor.json @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/latest/coreHttps.d.ts" + "publicTrimmedFilePath": "./types/latest/core-https.d.ts" }, "messages": { "tsdocMessageReporting": { diff --git a/sdk/core/core-https/package.json b/sdk/core/core-https/package.json index e5582ead3a4b..77c485e50df5 100644 --- a/sdk/core/core-https/package.json +++ b/sdk/core/core-https/package.json @@ -1,16 +1,21 @@ { "name": "@azure/core-https", - "version": "1.0.0", + "version": "1.0.0-preview.1", "private": true, "description": "Isomorphic client library for making HTTPS requests in node.js and browser.", "sdk-type": "client", "main": "dist/index.js", "module": "dist-esm/src/index.js", "browser": { - "stream": "./node_modules/stream-browserify/index.js", - "./dist-esm/src/print.js": "./dist-esm/src/print.browser.js" + "./dist-esm/src/defaultHttpsClient.js": "./dist-esm/src/defaultHttpsClient.browser.js", + "./dist-esm/src/policies/disableResponseDecompressionPolicy.js": "./dist-esm/src/policies/disableResponseDecompressionPolicy.browser.js", + "./dist-esm/src/policies/formDataPolicy.js": "./dist-esm/src/policies/formDataPolicy.browser.js", + "./dist-esm/src/policies/proxyPolicy.js": "./dist-esm/src/policies/proxyPolicy.browser.js", + "./dist-esm/src/util/inspect.js": "./dist-esm/src/util/inspect.browser.js", + "./dist-esm/src/util/url.js": "./dist-esm/src/util/url.browser.js", + "./dist-esm/src/util/userAgentPlatform.js": "./dist-esm/src/util/userAgentPlatform.browser.js" }, - "types": "types/latest/coreHttps.d.ts", + "types": "types/latest/core-https.d.ts", "typesVersions": { "<3.6": { "types/latest/src/*": [ @@ -20,16 +25,22 @@ }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", - "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:browser": "npm run build:ts && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "npm run build:ts && cross-env ONLY_NODE=true rollup -c 2>&1", "build:samples": "cd samples && tsc -p .", - "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "build:test": "npm run build:ts && npm run bundle:test", + "build:test:browser": "npm run build:ts && npm run bundle:test:browser", + "build:test:node": "npm run build:ts && npm run bundle:test:node", + "build:ts": "tsc -p .", "build:types": "downlevel-dts types/latest/ types/3.1/", - "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types", + "build": "npm run build:ts && rollup -c 2>&1 && api-extractor run --local && npm run build:types", + "bundle:test": "rollup -c rollup.test.config.js 2>&1", + "bundle:test:browser": "cross-env ONLY_BROWSER=true rollup -c rollup.test.config.js 2>&1", + "bundle:test:node": "cross-env ONLY_NODE=true rollup -c rollup.test.config.js 2>&1", "check-format": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-* types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", + "extract-api": "npm run build:ts && api-extractor run --local", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", @@ -38,11 +49,11 @@ "lint": "eslint package.json tsconfig.json api-extractor.json src test --ext .ts -f html -o coreHttps-lintReport.html || exit 0", "pack": "npm pack 2>&1", "prebuild": "npm run clean", - "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", - "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test:browser && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test:node && npm run unit-test:node && npm run integration-test:node", + "test": "npm run clean && npm run build:ts && npm run bundle:test:node && npm run unit-test:node && npm run bundle:test:browser && npm run unit-test:browser && npm run integration-test:node && npm run integration-test:browser", "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/index.node.js", + "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/index.node.js", "unit-test": "npm run unit-test:node && npm run unit-test:browser" }, "files": [ @@ -69,26 +80,42 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-https/", "sideEffects": false, "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/constants.ts", + "prefix": "SDK_VERSION" + } + ] + }, "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.8", + "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "form-data": "^3.0.0", + "tslib": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "uuid": "^8.1.0" }, "devDependencies": { "@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": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", + "@types/sinon": "^9.0.4", + "@types/uuid": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "chai": "^4.2.0", "downlevel-dts": "~0.4.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-no-null": "^1.0.2", @@ -113,8 +140,10 @@ "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", + "source-map-support": "^0.5.9", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/core/core-https/review/core-https.api.md b/sdk/core/core-https/review/core-https.api.md index cdb2048a8cd4..c3afb248a7e4 100644 --- a/sdk/core/core-https/review/core-https.api.md +++ b/sdk/core/core-https/review/core-https.api.md @@ -4,6 +4,10 @@ ```ts +import { AbortSignalLike } from '@azure/abort-controller'; +import { Debugger } from '@azure/logger'; +import { SpanOptions } from '@azure/core-tracing'; + // @public export interface AddPipelineOptions { afterPhase?: PipelinePhase; @@ -12,11 +16,107 @@ export interface AddPipelineOptions { phase?: PipelinePhase; } +// @public +export function createEmptyPipeline(): Pipeline; + +// @public +export function createHttpHeaders(rawHeaders?: RawHttpHeaders): HttpHeaders; + +// @public +export function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline; + +// @public +export function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest; + +// @public +export class DefaultHttpsClient implements HttpsClient { + sendRequest(request: PipelineRequest): Promise; +} + +// @public +export function disableResponseDecompressionPolicy(): PipelinePolicy; + +// @public +export const disableResponseDecompressionPolicyName = "disableResponseDecompressionPolicy"; + +// @public +export function exponentialRetryPolicy(options?: ExponentialRetryPolicyOptions): PipelinePolicy; + +// @public +export interface ExponentialRetryPolicyOptions { + maxRetries?: number; + maxRetryDelayInMs?: number; + retryDelayInMs?: number; +} + +// @public +export const expontentialRetryPolicyName = "exponentialRetryPolicy"; + +// @public +export type FormDataMap = { + [key: string]: FormDataValue | FormDataValue[]; +}; + +// @public +export function formDataPolicy(): PipelinePolicy; + +// @public +export const formDataPolicyName = "formDataPolicy"; + +// @public +export type FormDataValue = string | Blob; + +// @public +export function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; + +// @public +export interface HttpHeaders extends Iterable<[string, string]> { + clone(): HttpHeaders; + delete(name: string): void; + get(name: string): string | undefined; + has(name: string): boolean; + set(name: string, value: string | number): void; + toJSON(): RawHttpHeaders; +} + +// @public +export type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; + // @public export interface HttpsClient { sendRequest: SendRequest; } +// @public +export interface InternalPipelineOptions extends PipelineOptions { + decompressResponse?: boolean; + loggingOptions?: LogPolicyOptions; +} + +// @public +export function keepAlivePolicy(options?: KeepAlivePolicyOptions): PipelinePolicy; + +// @public +export const keepAlivePolicyName = "keepAlivePolicy"; + +// @public +export interface KeepAlivePolicyOptions { + enable?: boolean; +} + +// @public +export function logPolicy(options?: LogPolicyOptions): PipelinePolicy; + +// @public +export const logPolicyName = "logPolicy"; + +// @public +export interface LogPolicyOptions { + additionalAllowedHeaderNames?: string[]; + additionalAllowedQueryParameters?: string[]; + logger?: Debugger; +} + // @public export interface Pipeline { addPolicy(policy: PipelinePolicy, options?: AddPipelineOptions): void; @@ -29,6 +129,16 @@ export interface Pipeline { sendRequest(httpsClient: HttpsClient, request: PipelineRequest): Promise; } +// @public +export interface PipelineOptions { + httpsClient?: HttpsClient; + keepAliveOptions?: KeepAlivePolicyOptions; + proxyOptions?: ProxySettings; + redirectOptions?: PipelineRedirectOptions; + retryOptions?: ExponentialRetryPolicyOptions; + userAgentOptions?: UserAgentPolicyOptions; +} + // @public export type PipelinePhase = "Serialize" | "Retry"; @@ -38,20 +148,170 @@ export interface PipelinePolicy { sendRequest(request: PipelineRequest, next: SendRequest): Promise; } +// @public +export interface PipelineRedirectOptions extends RedirectPolicyOptions { + disable?: boolean; +} + // @public export interface PipelineRequest { + abortSignal?: AbortSignalLike; + body?: RequestBodyType; + clone(): PipelineRequest; + formData?: FormDataMap; + headers: HttpHeaders; + keepAlive?: boolean; + method: HttpMethods; + onDownloadProgress?: (progress: TransferProgressEvent) => void; + onUploadProgress?: (progress: TransferProgressEvent) => void; + proxySettings?: ProxySettings; + requestId: string; + skipDecompressResponse?: boolean; + spanOptions?: SpanOptions; + streamResponseBody?: boolean; + timeout: number; + url: string; + withCredentials: boolean; +} + +// @public +export interface PipelineRequestOptions { + abortSignal?: AbortSignalLike; + body?: RequestBodyType; + formData?: FormDataMap; + headers?: HttpHeaders; + keepAlive?: boolean; + method?: HttpMethods; + onDownloadProgress?: (progress: TransferProgressEvent) => void; + onUploadProgress?: (progress: TransferProgressEvent) => void; + proxySettings?: ProxySettings; + requestId?: string; + skipDecompressResponse?: boolean; + spanOptions?: SpanOptions; + streamResponseBody?: boolean; + timeout?: number; url: string; + withCredentials?: boolean; } // @public export interface PipelineResponse { + blobBody?: Promise; + bodyAsText?: string | null; + headers: HttpHeaders; + readableStreamBody?: NodeJS.ReadableStream; request: PipelineRequest; status: number; } +// @public +export function proxyPolicy(proxySettings?: ProxySettings | undefined): PipelinePolicy; + +// @public +export const proxyPolicyName = "proxyPolicy"; + +// @public +export interface ProxySettings { + host: string; + password?: string; + port: number; + username?: string; +} + +// @public +export type RawHttpHeaders = { + [headerName: string]: string; +}; + +// @public +export function redirectPolicy(options?: RedirectPolicyOptions): PipelinePolicy; + +// @public +export const redirectPolicyName = "redirectPolicy"; + +// @public +export interface RedirectPolicyOptions { + maxRetries?: number; +} + +// @public +export type RequestBodyType = NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView | FormData | string | null; + +// @public +export class RestError extends Error { + constructor(message: string, options?: RestErrorOptions); + code?: string; + details?: unknown; + static readonly PARSE_ERROR: string; + request?: PipelineRequest; + static readonly REQUEST_SEND_ERROR: string; + response?: PipelineResponse; + statusCode?: number; +} + +// @public +export interface RestErrorOptions { + code?: string; + request?: PipelineRequest; + response?: PipelineResponse; + statusCode?: number; +} + // @public export type SendRequest = (request: PipelineRequest) => Promise; +// @public +export function setClientRequestIdPolicy(requestIdHeaderName?: string): PipelinePolicy; + +// @public +export const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; + +// @public +export function systemErrorRetryPolicy(options?: SystemErrorRetryPolicyOptions): PipelinePolicy; + +// @public +export const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + +// @public +export interface SystemErrorRetryPolicyOptions { + maxRetries?: number; + maxRetryDelayInMs?: number; + retryDelayInMs?: number; +} + +// @public +export function throttlingRetryPolicy(): PipelinePolicy; + +// @public +export const throttlingRetryPolicyName = "throttlingRetryPolicy"; + +// @public +export function tracingPolicy(options?: TracingPolicyOptions): PipelinePolicy; + +// @public +export const tracingPolicyName = "tracingPolicy"; + +// @public +export interface TracingPolicyOptions { + userAgentPrefix?: string; +} + +// @public +export type TransferProgressEvent = { + loadedBytes: number; +}; + +// @public +export function userAgentPolicy(options?: UserAgentPolicyOptions): PipelinePolicy; + +// @public +export const userAgentPolicyName = "userAgentPolicy"; + +// @public +export interface UserAgentPolicyOptions { + userAgentPrefix?: string; +} + // (No @packageDocumentation comment for this package) diff --git a/sdk/core/core-https/rollup.base.config.js b/sdk/core/core-https/rollup.base.config.js index 269ae487c9cf..55b837e72948 100644 --- a/sdk/core/core-https/rollup.base.config.js +++ b/sdk/core/core-https/rollup.base.config.js @@ -14,7 +14,7 @@ const input = "dist-esm/src/index.js"; const production = process.env.NODE_ENV === "production"; export function nodeConfig(test = false) { - const externalNodeBuiltins = []; + const externalNodeBuiltins = ["os", "stream", "https", "zlib", "url", "util"]; const baseConfig = { input: input, external: depNames.concat(externalNodeBuiltins), diff --git a/sdk/core/core-https/rollup.test.config.js b/sdk/core/core-https/rollup.test.config.js index 925a4421a53e..fc843df2b5a3 100644 --- a/sdk/core/core-https/rollup.test.config.js +++ b/sdk/core/core-https/rollup.test.config.js @@ -1,3 +1,13 @@ import * as base from "./rollup.base.config"; -export default [base.nodeConfig(true), base.browserConfig(true)]; +const inputs = []; + +if (!process.env.ONLY_BROWSER) { + inputs.push(base.nodeConfig(true)); +} + +if (!process.env.ONLY_NODE) { + inputs.push(base.browserConfig(true)); +} + +export default inputs; diff --git a/sdk/core/core-https/src/constants.ts b/sdk/core/core-https/src/constants.ts new file mode 100644 index 000000000000..a0bd9767181a --- /dev/null +++ b/sdk/core/core-https/src/constants.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export const SDK_VERSION: string = "1.0.0-preview.1"; diff --git a/sdk/core/core-https/src/defaultHttpsClient.browser.ts b/sdk/core/core-https/src/defaultHttpsClient.browser.ts new file mode 100644 index 000000000000..e4c1bf53ba89 --- /dev/null +++ b/sdk/core/core-https/src/defaultHttpsClient.browser.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export { XhrHttpsClient as DefaultHttpsClient } from "./xhrHttpsClient"; diff --git a/sdk/core/core-https/src/defaultHttpsClient.ts b/sdk/core/core-https/src/defaultHttpsClient.ts new file mode 100644 index 000000000000..f1229f262198 --- /dev/null +++ b/sdk/core/core-https/src/defaultHttpsClient.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export { NodeHttpsClient as DefaultHttpsClient } from "./nodeHttpsClient"; diff --git a/sdk/core/core-https/src/httpHeaders.ts b/sdk/core/core-https/src/httpHeaders.ts new file mode 100644 index 000000000000..2738a530641e --- /dev/null +++ b/sdk/core/core-https/src/httpHeaders.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpHeaders, RawHttpHeaders } from "./interfaces"; + +function normalizeName(name: string): string { + return name.toLowerCase(); +} + +class HttpHeadersImpl implements HttpHeaders { + private readonly _headersMap: Map; + + constructor(rawHeaders?: RawHttpHeaders) { + this._headersMap = new Map(); + if (rawHeaders) { + for (const headerName of Object.keys(rawHeaders)) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name The name of the header to set. This value is case-insensitive. + * @param value The value of the header to set. + */ + public set(name: string, value: string | number): void { + this._headersMap.set(normalizeName(name), String(value)); + } + + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param name The name of the header. This value is case-insensitive. + */ + public get(name: string): string | undefined { + return this._headersMap.get(normalizeName(name)); + } + + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name The name of the header to set. This value is case-insensitive. + */ + public has(name: string): boolean { + return this._headersMap.has(normalizeName(name)); + } + + /** + * Remove the header with the provided headerName. + * @param name The name of the header to remove. + */ + public delete(name: string): void { + this._headersMap.delete(normalizeName(name)); + } + + /** + * Get the JSON object representation of this HTTP header collection. + */ + public toJSON(): RawHttpHeaders { + const result: RawHttpHeaders = {}; + for (const [key, value] of this._headersMap) { + result[key] = value; + } + return result; + } + + /** + * Get the string representation of this HTTP header collection. + */ + public toString(): string { + return JSON.stringify(this.toJSON()); + } + + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + public clone(): HttpHeaders { + return new HttpHeadersImpl(this.toJSON()); + } + + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator](): Iterator<[string, string]> { + return this._headersMap.entries(); + } +} + +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders A simple object representing initial headers + */ +export function createHttpHeaders(rawHeaders?: RawHttpHeaders): HttpHeaders { + return new HttpHeadersImpl(rawHeaders); +} diff --git a/sdk/core/core-https/src/index.ts b/sdk/core/core-https/src/index.ts index 05191371afae..be4f2520d08b 100644 --- a/sdk/core/core-https/src/index.ts +++ b/sdk/core/core-https/src/index.ts @@ -1,10 +1,70 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { HttpsClient, PipelineRequest, PipelineResponse, SendRequest } from "./interfaces"; +export { + HttpsClient, + PipelineRequest, + PipelineResponse, + SendRequest, + FormDataMap, + FormDataValue, + HttpHeaders, + HttpMethods, + ProxySettings, + RawHttpHeaders, + TransferProgressEvent, + RequestBodyType +} from "./interfaces"; export { AddPolicyOptions as AddPipelineOptions, PipelinePhase, PipelinePolicy, - Pipeline + Pipeline, + createEmptyPipeline, + InternalPipelineOptions, + PipelineOptions, + PipelineRedirectOptions, + createPipelineFromOptions } from "./pipeline"; +export { DefaultHttpsClient } from "./defaultHttpsClient"; +export { createHttpHeaders } from "./httpHeaders"; +export { createPipelineRequest, PipelineRequestOptions } from "./pipelineRequest"; +export { RestError, RestErrorOptions } from "./restError"; +export { + disableResponseDecompressionPolicy, + disableResponseDecompressionPolicyName +} from "./policies/disableResponseDecompressionPolicy"; +export { + exponentialRetryPolicy, + ExponentialRetryPolicyOptions, + expontentialRetryPolicyName +} from "./policies/exponentialRetryPolicy"; +export { + setClientRequestIdPolicy, + setClientRequestIdPolicyName +} from "./policies/setClientRequestIdPolicy"; +export { + keepAlivePolicy, + keepAlivePolicyName, + KeepAlivePolicyOptions +} from "./policies/keepAlivePolicy"; +export { logPolicy, logPolicyName, LogPolicyOptions } from "./policies/logPolicy"; +export { proxyPolicy, proxyPolicyName, getDefaultProxySettings } from "./policies/proxyPolicy"; +export { + redirectPolicy, + redirectPolicyName, + RedirectPolicyOptions +} from "./policies/redirectPolicy"; +export { + systemErrorRetryPolicy, + SystemErrorRetryPolicyOptions, + systemErrorRetryPolicyName +} from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy, throttlingRetryPolicyName } from "./policies/throttlingRetryPolicy"; +export { tracingPolicy, tracingPolicyName, TracingPolicyOptions } from "./policies/tracingPolicy"; +export { + userAgentPolicy, + userAgentPolicyName, + UserAgentPolicyOptions +} from "./policies/userAgentPolicy"; +export { formDataPolicy, formDataPolicyName } from "./policies/formDataPolicy"; diff --git a/sdk/core/core-https/src/interfaces.ts b/sdk/core/core-https/src/interfaces.ts index ed0d6f5eadb3..f114b8aabdee 100644 --- a/sdk/core/core-https/src/interfaces.ts +++ b/sdk/core/core-https/src/interfaces.ts @@ -1,20 +1,183 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { AbortSignalLike } from "@azure/abort-controller"; +import { SpanOptions } from "@azure/core-tracing"; + +// eslint-disable-next-line @azure/azure-sdk/ts-no-namespaces +declare global { + /** + * Stub declaration of the browser-only Blob type. + * Full type information can be obtained by including "lib": ["dom"] in tsconfig.json. + */ + interface Blob {} + + interface File extends Blob {} + + /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */ + interface FormData { + append(name: string, value: string | Blob, fileName?: string): void; + delete(name: string): void; + get(name: string): string | File | null; + getAll(name: string): Array; + has(name: string): boolean; + set(name: string, value: string | Blob, fileName?: string): void; + forEach( + callbackfn: (value: string | File, key: string, parent: FormData) => void, + thisArg?: any + ): void; + } +} + +/** + * A HttpHeaders collection represented as a simple JSON object. + */ +export type RawHttpHeaders = { [headerName: string]: string }; + +/** + * Represents a set of HTTP headers on a request/response. + * Header names are treated as case insensitive. + */ +export interface HttpHeaders extends Iterable<[string, string]> { + /** + * Returns the value of a specific header or undefined if not set. + * @param name The name of the header to retrieve. + */ + get(name: string): string | undefined; + /** + * Returns true if the specified header exists. + * @param name The name of the header to check. + */ + has(name: string): boolean; + /** + * Sets a specific header with a given value. + * @param name The name of the header to set. + * @param value The value to use for the header. + */ + set(name: string, value: string | number): void; + /** + * Removes a specific header from the collection. + * @param name The name of the header to delete. + */ + delete(name: string): void; + /** + * Duplicates this collection. + */ + clone(): HttpHeaders; + /** + * Accesses a raw JS object that acts as a simple map + * of header names to values. + */ + toJSON(): RawHttpHeaders; +} + +/** + * Types of bodies supported on the request. + * NodeJS.ReadableStream is Node only. + * Blob is browser only. + */ +export type RequestBodyType = + | NodeJS.ReadableStream + | Blob + | ArrayBuffer + | ArrayBufferView + | FormData + | string + | null; + /** * Metadata about a request being made by the pipeline. - * TODO: this interface isn't complete, it is just a placeholder. */ export interface PipelineRequest { /** * The URL to make the request to. */ url: string; + + /** + * The HTTP method to use when making the request. + */ + method: HttpMethods; + + /** + * The HTTP headers to use when making the request. + */ + headers: HttpHeaders; + + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + * Defaults to 0, which disables the timeout. + */ + timeout: number; + + /** + * If credentials (cookies) should be sent along during an XHR. + * Defaults to false. + */ + withCredentials: boolean; + + /** + * A unique identifier for the request. Used for logging and tracing. + */ + requestId: string; + + /** + * The HTTP body content (if any) + */ + body?: RequestBodyType; + + /** + * To simulate a browser form post + */ + formData?: FormDataMap; + + /** + * Whether or not the body of the PipelineResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + + /** + * If the connection should be reused. + */ + keepAlive?: boolean; + + /** + * Disable automatic decompression based on Accept-Encoding header (Node only) + */ + skipDecompressResponse?: boolean; + + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + + /** + * Clone this request object. + */ + clone(): PipelineRequest; + + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; } /** * Metadata about a response received by the pipeline. - * TODO: this interface isn't complete, it is just a placeholder. */ export interface PipelineResponse { /** @@ -25,6 +188,31 @@ export interface PipelineResponse { * The HTTP status code of the response. */ status: number; + /** + * The HTTP response headers. + */ + headers: HttpHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText?: string | null; + + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; } /** @@ -38,7 +226,65 @@ export type SendRequest = (request: PipelineRequest) => Promise void; + _transform(chunk: string | Buffer, _encoding: string, callback: Function): void { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + + constructor(progressCallback: (progress: TransferProgressEvent) => void) { + super(); + this.progressCallback = progressCallback; + } +} + +/** + * A HttpsClient implementation that uses Node's "https" module to send HTTPS requests. + */ +export class NodeHttpsClient implements HttpsClient { + private keepAliveAgent?: https.Agent; + private proxyAgent?: https.Agent; + + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request The request to be made. + */ + public async sendRequest(request: PipelineRequest): Promise { + const abortController = new AbortController(); + let abortListener: ((event: any) => void) | undefined; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError("The operation was aborted."); + } + + abortListener = (event: Event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + + if (request.timeout > 0) { + setTimeout(() => { + abortController.abort(); + }, request.timeout); + } + + if (!request.skipDecompressResponse) { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + + let body = request.body; + + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + + body = uploadReportStream; + } + + try { + const result = await new Promise((resolve, reject) => { + const options = this.getRequestOptions(request); + const req = https.request(options, async (res) => { + const headers = getResponseHeaders(res); + + const status = res.statusCode ?? 0; + const response: PipelineResponse = { + status, + headers, + request + }; + + let responseStream = getResponseStream(res, headers, request.skipDecompressResponse); + + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + + if (request.streamResponseBody) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + + resolve(response); + }); + req.on("error", (err) => { + reject(new RestError(err.message, { code: RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + if (!req.finished) { + req.abort(); + reject(new AbortError("The operation was aborted.")); + } + }); + if (body) { + if (isReadableStream(body)) { + body.pipe(req); + } else { + req.write(body); + } + } + req.end(); + }); + return result; + } finally { + // clean up event listener + if (request.abortSignal && abortListener) { + request.abortSignal.removeEventListener("abort", abortListener); + } + } + } + + private getOrCreateAgent(request: PipelineRequest): https.Agent { + // At the moment, proxy settings and keepAlive are mutually + // exclusive because the proxy library currently lacks the + // ability to create a proxy with keepAlive turned on. + const proxySettings = request.proxySettings; + if (proxySettings) { + if (!this.proxyAgent) { + const proxyAgentOptions: HttpsProxyAgentOptions = { + host: proxySettings.host, + port: proxySettings.port, + headers: request.headers.toJSON() + }; + if (proxySettings.username && proxySettings.password) { + proxyAgentOptions.auth = `${proxySettings.username}:${proxySettings.password}`; + } + this.proxyAgent = (new HttpsProxyAgent(proxyAgentOptions) as unknown) as https.Agent; + } + return this.proxyAgent; + } else if (request.keepAlive) { + if (!this.keepAliveAgent) { + this.keepAliveAgent = new https.Agent({ + keepAlive: true + }); + } + + return this.keepAliveAgent; + } else { + return https.globalAgent; + } + } + + private getRequestOptions(request: PipelineRequest): https.RequestOptions { + const agent = this.getOrCreateAgent(request); + const url = new URL(request.url); + const options: https.RequestOptions = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON() + }; + return options; + } +} + +function getResponseHeaders(res: IncomingMessage): HttpHeaders { + const headers = createHttpHeaders(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; +} + +function getResponseStream( + stream: IncomingMessage, + headers: HttpHeaders, + skipDecompressResponse = false +): NodeJS.ReadableStream { + if (skipDecompressResponse) { + return stream; + } + + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = zlib.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = zlib.createInflate(); + stream.pipe(inflate); + return inflate; + } + + return stream; +} + +function streamToText(stream: NodeJS.ReadableStream): Promise { + return new Promise((resolve, reject) => { + const buffer: string[] = []; + + stream.on("data", (chunk) => { + if (typeof chunk === "string") { + buffer.push(chunk); + } else { + buffer.push(chunk.toString()); + } + }); + stream.on("end", () => { + resolve(buffer.join("")); + }); + stream.on("error", (e) => { + reject( + new RestError(`Error reading response as text: ${e.message}`, { + code: RestError.PARSE_ERROR + }) + ); + }); + }); +} + +function getBodyLength(body: RequestBodyType): number | null { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else { + return null; + } +} diff --git a/sdk/core/core-https/src/pipeline.ts b/sdk/core/core-https/src/pipeline.ts index 7b6b6a705efa..4b66e7c6be3d 100644 --- a/sdk/core/core-https/src/pipeline.ts +++ b/sdk/core/core-https/src/pipeline.ts @@ -1,7 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PipelineRequest, PipelineResponse, HttpsClient, SendRequest } from "./interfaces"; +import { + PipelineRequest, + PipelineResponse, + HttpsClient, + SendRequest, + ProxySettings +} from "./interfaces"; +import { LogPolicyOptions, logPolicy } from "./policies/logPolicy"; +import { UserAgentPolicyOptions, userAgentPolicy } from "./policies/userAgentPolicy"; +import { RedirectPolicyOptions, redirectPolicy } from "./policies/redirectPolicy"; +import { KeepAlivePolicyOptions, keepAlivePolicy } from "./policies/keepAlivePolicy"; +import { + ExponentialRetryPolicyOptions, + exponentialRetryPolicy +} from "./policies/exponentialRetryPolicy"; +import { tracingPolicy } from "./policies/tracingPolicy"; +import { setClientRequestIdPolicy } from "./policies/setClientRequestIdPolicy"; +import { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +import { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +import { disableResponseDecompressionPolicy } from "./policies/disableResponseDecompressionPolicy"; +import { proxyPolicy } from "./policies/proxyPolicy"; +import { isNode } from "./util/helpers"; +import { formDataPolicy } from "./policies/formDataPolicy"; /** * Policies are executed in phases. @@ -108,7 +130,7 @@ interface PolicyGraphNode { * Do not export this class from the package. * @internal */ -export class HttpsPipeline implements Pipeline { +class HttpsPipeline implements Pipeline { private _policies: PipelineDescriptor[] = []; private _orderedPolicies?: PipelinePolicy[]; @@ -335,3 +357,108 @@ export class HttpsPipeline implements Pipeline { return result; } } + +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +export function createEmptyPipeline(): Pipeline { + return HttpsPipeline.create(); +} + +/** + * Options that allow configuring redirect behavior. + */ +export interface PipelineRedirectOptions extends RedirectPolicyOptions { + /** + * If true, disables automatic following of redirects. + */ + disable?: boolean; +} + +/** + * Defines options that are used to configure the HTTP pipeline for + * an SDK client. + */ +export interface PipelineOptions { + /** + * The HttpsClient implementation to use for outgoing HTTP requests. + * Defaults to DefaultHttpsClient. + */ + httpsClient?: HttpsClient; + + /** + * Options that control how to retry failed requests. + */ + retryOptions?: ExponentialRetryPolicyOptions; + + /** + * Options to configure a proxy for outgoing requests. + */ + proxyOptions?: ProxySettings; + + /** + * Options for how HTTP connections should be maintained for future + * requests. + */ + keepAliveOptions?: KeepAlivePolicyOptions; + + /** + * Options for how redirect responses are handled. + */ + redirectOptions?: PipelineRedirectOptions; + + /** + * Options for adding user agent details to outgoing requests. + */ + userAgentOptions?: UserAgentPolicyOptions; +} + +/** + * Defines options that are used to configure internal options of + * the HTTP pipeline for an SDK client. + */ +export interface InternalPipelineOptions extends PipelineOptions { + /** + * Options to configure request/response logging. + */ + loggingOptions?: LogPolicyOptions; + + /** + * Configure whether to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; +} + +/** + * Create a new pipeline with a default set of customizable policies. + * @param options Options to configure a custom pipeline. + */ +export function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline { + const pipeline = HttpsPipeline.create(); + + if (isNode) { + pipeline.addPolicy(proxyPolicy(options.proxyOptions)); + + if (options.decompressResponse === false) { + pipeline.addPolicy(disableResponseDecompressionPolicy()); + } + } + + pipeline.addPolicy(formDataPolicy()); + pipeline.addPolicy(tracingPolicy(options.userAgentOptions)); + pipeline.addPolicy(keepAlivePolicy(options.keepAliveOptions)); + pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); + pipeline.addPolicy(setClientRequestIdPolicy()); + pipeline.addPolicy(throttlingRetryPolicy(), { phase: "Retry" }); + pipeline.addPolicy(systemErrorRetryPolicy(options.retryOptions), { phase: "Retry" }); + pipeline.addPolicy(exponentialRetryPolicy(options.retryOptions), { phase: "Retry" }); + + if (!options.redirectOptions?.disable) { + pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" }); + } + + pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: "Retry" }); + + return pipeline; +} diff --git a/sdk/core/core-https/src/pipelineRequest.ts b/sdk/core/core-https/src/pipelineRequest.ts new file mode 100644 index 000000000000..f89fd3d27b62 --- /dev/null +++ b/sdk/core/core-https/src/pipelineRequest.ts @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + PipelineRequest, + TransferProgressEvent, + RequestBodyType, + HttpMethods, + HttpHeaders, + FormDataMap, + ProxySettings +} from "./interfaces"; +import { createHttpHeaders } from "./httpHeaders"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { generateUuid } from "./util/uuid"; +import { SpanOptions } from "@azure/core-tracing"; + +/** + * Settings to initialize a request. + * Almost equivalent to Partial, but url is mandatory. + */ +export interface PipelineRequestOptions { + /** + * The URL to make the request to. + */ + url: string; + + /** + * The HTTP method to use when making the request. + */ + method?: HttpMethods; + + /** + * The HTTP headers to use when making the request. + */ + headers?: HttpHeaders; + + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + * Defaults to 0, which disables the timeout. + */ + timeout?: number; + + /** + * If credentials (cookies) should be sent along during an XHR. + * Defaults to false. + */ + withCredentials?: boolean; + + /** + * A unique identifier for the request. Used for logging and tracing. + */ + requestId?: string; + + /** + * The HTTP body content (if any) + */ + body?: RequestBodyType; + + /** + * To simulate a browser form post + */ + formData?: FormDataMap; + + /** + * Whether or not the body of the PipelineResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + + /** + * If the connection should be reused. Defaults to true. + */ + keepAlive?: boolean; + + /** + * Disable automatic decompression based on Accept-Encoding header (Node only) + */ + skipDecompressResponse?: boolean; + + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; +} + +class PipelineRequestImpl implements PipelineRequest { + public url: string; + public method: HttpMethods; + public headers: HttpHeaders; + public timeout: number; + public withCredentials: boolean; + public body?: RequestBodyType; + public formData?: FormDataMap; + public streamResponseBody: boolean; + public proxySettings?: ProxySettings; + public keepAlive: boolean; + public skipDecompressResponse: boolean; + public abortSignal?: AbortSignalLike; + public requestId: string; + public spanOptions?: SpanOptions; + public onUploadProgress?: (progress: TransferProgressEvent) => void; + public onDownloadProgress?: (progress: TransferProgressEvent) => void; + + constructor(options: PipelineRequestOptions) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? createHttpHeaders(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.formData = options.formData; + this.keepAlive = options.keepAlive ?? true; + this.proxySettings = options.proxySettings; + this.skipDecompressResponse = options.skipDecompressResponse ?? false; + this.streamResponseBody = options.streamResponseBody ?? false; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.spanOptions = options.spanOptions; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || generateUuid(); + } + + public clone(): PipelineRequest { + return new PipelineRequestImpl({ + url: this.url, + abortSignal: this.abortSignal, + body: this.body, + formData: this.formData, + headers: this.headers.clone(), + keepAlive: this.keepAlive, + method: this.method, + onDownloadProgress: this.onDownloadProgress, + onUploadProgress: this.onUploadProgress, + proxySettings: this.proxySettings, + skipDecompressResponse: this.skipDecompressResponse, + streamResponseBody: this.streamResponseBody, + timeout: this.timeout, + withCredentials: this.withCredentials, + spanOptions: this.spanOptions, + requestId: this.requestId + }); + } +} + +/** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options The options to create the request with. + */ +export function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest { + return new PipelineRequestImpl(options); +} diff --git a/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.browser.ts b/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.browser.ts new file mode 100644 index 000000000000..ad48e10807fb --- /dev/null +++ b/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.browser.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/* + * NOTE: When moving this file, please update "browser" section in package.json + */ + +const NotSupported = new Error( + "disableResponseDecompressionPolicy is not supported in browser environment" +); + +export const disableResponseDecompressionPolicyName = "disableResponseDecompressionPolicy"; + +/** + * disableResponseDecompressionPolicy is not supported in browser and attempting + * to use it will results in error being thrown. + */ +export function disableResponseDecompressionPolicy(): never { + throw NotSupported; +} diff --git a/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.ts b/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.ts new file mode 100644 index 000000000000..7943cdd4e2b2 --- /dev/null +++ b/sdk/core/core-https/src/policies/disableResponseDecompressionPolicy.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; + +/** + * The programmatic identifier of the disableResponseDecompressionPolicy. + */ +export const disableResponseDecompressionPolicyName = "disableResponseDecompressionPolicy"; + +/** + * A policy to disable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +export function disableResponseDecompressionPolicy(): PipelinePolicy { + return { + name: disableResponseDecompressionPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + request.skipDecompressResponse = true; + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/policies/exponentialRetryPolicy.ts b/sdk/core/core-https/src/policies/exponentialRetryPolicy.ts new file mode 100644 index 000000000000..13869fc9ba98 --- /dev/null +++ b/sdk/core/core-https/src/policies/exponentialRetryPolicy.ts @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { logger } from "../log"; +import { delay, getRandomIntegerInclusive } from "../util/helpers"; +import { RestError } from "../restError"; + +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +export const expontentialRetryPolicyName = "exponentialRetryPolicy"; + +const DEFAULT_CLIENT_RETRY_COUNT = 10; +// intervals are in ms +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; + +interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} + +interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} + +/** + * Options that control how to retry failed requests. + */ +export interface ExponentialRetryPolicyOptions { + /** + * The maximum number of retry attempts. Defaults to 10. + */ + maxRetries?: number; + + /** + * The amount of delay in milliseconds between retry attempts. Defaults to 1000 + * (1 second.) The delay increases exponentially with each retry up to a maximum + * specified by maxRetryDelayInMs. + */ + retryDelayInMs?: number; + + /** + * The maximum delay in milliseconds allowed before retrying an operation. Defaults + * to 64000 (64 seconds). + */ + maxRetryDelayInMs?: number; +} + +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options Options that configure retry logic. + */ +export function exponentialRetryPolicy( + options: ExponentialRetryPolicyOptions = {} +): PipelinePolicy { + const retryCount = options.maxRetries ?? DEFAULT_CLIENT_RETRY_COUNT; + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + + /** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param statusCode The HTTP status code. + * @param retryData The retry data. + * @return True if the operation qualifies for a retry; false otherwise. + */ + function shouldRetry(statusCode: number | undefined, retryData: RetryData): boolean { + if ( + statusCode === undefined || + (statusCode < 500 && statusCode !== 408) || + statusCode === 501 || + statusCode === 505 + ) { + return false; + } + + const currentCount = retryData && retryData.retryCount; + + return currentCount < retryCount; + } + + /** + * Updates the retry data for the next attempt. + * + * @param retryData The retry data. + * @param err The operation's error, if any. + */ + function updateRetryData(retryData: RetryData, err?: RetryError): RetryData { + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + + retryData.error = err; + } + + // Adjust retry count + retryData.retryCount++; + + // Exponentially increase the delay each time + const exponentialDelay = retryInterval * Math.pow(2, retryData.retryCount); + // Don't let the delay exceed the maximum + const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const delayWithJitter = + clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2); + + retryData.retryInterval = delayWithJitter; + + return retryData; + } + + async function retry( + next: SendRequest, + retryData: RetryData, + request: PipelineRequest, + response?: PipelineResponse, + requestError?: RetryError + ): Promise { + retryData = updateRetryData(retryData, requestError); + const isAborted = request.abortSignal?.aborted; + if (!isAborted && shouldRetry(response?.status, retryData)) { + logger.info(`Retrying request in ${retryData.retryInterval}`); + try { + await delay(retryData.retryInterval); + const res = await next(request.clone()); + return retry(next, retryData, request, res); + } catch (e) { + return retry(next, retryData, request, response, e); + } + } else if (isAborted || requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + const err = + retryData.error || + new RestError("Failed to send the request.", { + code: RestError.REQUEST_SEND_ERROR, + statusCode: response?.status, + request: response?.request, + response + }); + throw err; + } else { + return response; + } + } + + return { + name: expontentialRetryPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + const retryData = { + retryCount: 0, + retryInterval: 0 + }; + try { + const response = await next(request); + return retry(next, retryData, request, response); + } catch (e) { + const error: RestError = e; + return retry(next, retryData, request, error.response, error); + } + } + }; +} diff --git a/sdk/core/core-https/src/policies/formDataPolicy.browser.ts b/sdk/core/core-https/src/policies/formDataPolicy.browser.ts new file mode 100644 index 000000000000..7b75c2f6f8b6 --- /dev/null +++ b/sdk/core/core-https/src/policies/formDataPolicy.browser.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; + +/** + * The programmatic identifier of the formDataPolicy. + */ +export const formDataPolicyName = "formDataPolicy"; + +/** + * A policy that encodes FormData on the request into the body. + */ +export function formDataPolicy(): PipelinePolicy { + return { + name: formDataPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (request.formData) { + const formData = request.formData; + const requestForm = new FormData(); + for (const formKey of Object.keys(formData)) { + const formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (const subValue of formValue) { + requestForm.append(formKey, subValue); + } + } else { + requestForm.append(formKey, formValue); + } + } + + request.body = requestForm; + request.formData = undefined; + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + // browser will automatically apply a suitable content-type header + request.headers.delete("Content-Type"); + } + } + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/policies/formDataPolicy.ts b/sdk/core/core-https/src/policies/formDataPolicy.ts new file mode 100644 index 000000000000..ca67860eb255 --- /dev/null +++ b/sdk/core/core-https/src/policies/formDataPolicy.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import FormData from "form-data"; +import { PipelineResponse, PipelineRequest, SendRequest, FormDataMap } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; + +/** + * The programmatic identifier of the formDataPolicy. + */ +export const formDataPolicyName = "formDataPolicy"; + +/** + * A policy that encodes FormData on the request into the body. + */ +export function formDataPolicy(): PipelinePolicy { + return { + name: formDataPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (request.formData) { + prepareFormData(request.formData, request); + } + return next(request); + } + }; +} + +async function prepareFormData(formData: FormDataMap, request: PipelineRequest): Promise { + const requestForm = new FormData(); + for (const formKey of Object.keys(formData)) { + const formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (const subValue of formValue) { + requestForm.append(formKey, subValue); + } + } else { + requestForm.append(formKey, formValue); + } + } + + request.body = requestForm; + request.formData = undefined; + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + request.headers.set( + "Content-Type", + `multipart/form-data; boundary=${requestForm.getBoundary()}` + ); + } + try { + const contentLength = await new Promise((resolve, reject) => { + requestForm.getLength((err, length) => { + if (err) { + reject(err); + } else { + resolve(length); + } + }); + }); + request.headers.set("Content-Length", contentLength); + } catch (e) { + // ignore setting the length if this fails + } +} diff --git a/sdk/core/core-https/src/policies/keepAlivePolicy.ts b/sdk/core/core-https/src/policies/keepAlivePolicy.ts new file mode 100644 index 000000000000..761bab90c2c4 --- /dev/null +++ b/sdk/core/core-https/src/policies/keepAlivePolicy.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; + +/** + * The programmatic identifier of the keepAlivePolicy. + */ +export const keepAlivePolicyName = "keepAlivePolicy"; + +/** + * Options for how HTTP connections should be maintained for future + * requests. + */ +export interface KeepAlivePolicyOptions { + /** + * When true, connections will be kept alive for multiple requests. + * Defaults to true. + */ + enable?: boolean; +} + +/** + * KeepAlivePolicy is a policy used to control keep alive settings for every request. + */ +export function keepAlivePolicy( + options: KeepAlivePolicyOptions = { enable: true } +): PipelinePolicy { + return { + name: keepAlivePolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + request.keepAlive = options.enable; + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/policies/logPolicy.ts b/sdk/core/core-https/src/policies/logPolicy.ts new file mode 100644 index 000000000000..d201dec6d16d --- /dev/null +++ b/sdk/core/core-https/src/policies/logPolicy.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Debugger } from "@azure/logger"; +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { logger as coreLogger } from "../log"; +import { Sanitizer } from "../util/sanitizer"; + +/** + * The programmatic identifier of the logPolicy. + */ +export const logPolicyName = "logPolicy"; + +/** + * Options to configure the logPolicy. + */ +export interface LogPolicyOptions { + /** + * Header names whose values will be logged when logging is enabled. + * Defaults include a list of well-known safe headers. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + additionalAllowedHeaderNames?: string[]; + + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + additionalAllowedQueryParameters?: string[]; + + /** + * The log function to use for writing pipeline logs. + * Defaults to core-http's built-in logger. + * Compatible with the `debug` library. + */ + logger?: Debugger; +} + +/** + * A policy that logs all requests and responses. + * @param options Options to configure logPolicy. + */ +export function logPolicy(options: LogPolicyOptions = {}): PipelinePolicy { + const logger = options.logger ?? coreLogger.info; + const sanitizer = new Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: logPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (!logger.enabled) { + return next(request); + } + + logger(`Request: ${sanitizer.sanitize(request)}`); + + const response = await next(request); + + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + + return response; + } + }; +} diff --git a/sdk/core/core-https/src/policies/proxyPolicy.browser.ts b/sdk/core/core-https/src/policies/proxyPolicy.browser.ts new file mode 100644 index 000000000000..d4aee1036c24 --- /dev/null +++ b/sdk/core/core-https/src/policies/proxyPolicy.browser.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/* + * NOTE: When moving this file, please update "browser" section in package.json + */ + +const NotSupported = new Error("proxyPolicy is not supported in browser environment"); + +export const proxyPolicyName = "proxyPolicy"; + +export function getDefaultProxySettings(): never { + throw NotSupported; +} + +/** + * proxyPolicy is not supported in browser and attempting + * to use it will results in error being thrown. + */ +export function proxyPolicy(): never { + throw NotSupported; +} diff --git a/sdk/core/core-https/src/policies/proxyPolicy.ts b/sdk/core/core-https/src/policies/proxyPolicy.ts new file mode 100644 index 000000000000..3f041b29a30e --- /dev/null +++ b/sdk/core/core-https/src/policies/proxyPolicy.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest, ProxySettings } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { URL } from "../util/url"; + +const HTTPS_PROXY = "HTTPS_PROXY"; +const HTTP_PROXY = "HTTP_PROXY"; + +/** + * The programmatic identifier of the proxyPolicy. + */ +export const proxyPolicyName = "proxyPolicy"; + +function loadEnvironmentProxyValue(): string | undefined { + if (!process) { + return undefined; + } + + if (process.env[HTTPS_PROXY]) { + return process.env[HTTPS_PROXY]; + } else if (process.env[HTTPS_PROXY.toLowerCase()]) { + return process.env[HTTPS_PROXY.toLowerCase()]; + } else if (process.env[HTTP_PROXY]) { + return process.env[HTTP_PROXY]; + } else if (process.env[HTTP_PROXY.toLowerCase()]) { + return process.env[HTTP_PROXY.toLowerCase()]; + } + + return undefined; +} + +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl The url of the proxy to use. May contain authentication information. + */ +export function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password + }; +} + +/** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings ProxySettings to use on each request. + */ +export function proxyPolicy(proxySettings = getDefaultProxySettings()): PipelinePolicy { + return { + name: proxyPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (!request.proxySettings) { + request.proxySettings = proxySettings; + } + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/policies/redirectPolicy.ts b/sdk/core/core-https/src/policies/redirectPolicy.ts new file mode 100644 index 000000000000..57ee89ede6e8 --- /dev/null +++ b/sdk/core/core-https/src/policies/redirectPolicy.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { URL } from "../util/url"; + +/** + * The programmatic identifier of the redirectPolicy. + */ +export const redirectPolicyName = "redirectPolicy"; + +/** + * Options for how redirect responses are handled. + */ +export interface RedirectPolicyOptions { + /** + * The maximum number of times the redirect URL will be tried before + * failing. Defaults to 20. + */ + maxRetries?: number; +} + +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * @param options Options to control policy behavior. + */ +export function redirectPolicy(options: RedirectPolicyOptions = {}): PipelinePolicy { + const { maxRetries = 20 } = options; + return { + name: redirectPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; +} + +async function handleRedirect( + next: SendRequest, + response: PipelineResponse, + maxRetries: number, + currentRetries: number = 0 +): Promise { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if ( + locationHeader && + (status === 300 || status === 307 || (status === 303 && request.method === "POST")) && + currentRetries < maxRetries + ) { + const url = new URL(locationHeader, request.url); + const req = request.clone(); + req.url = url.toString(); + + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + req.method = "GET"; + } + + const res = await next(req); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + + return response; +} diff --git a/sdk/core/core-https/src/policies/setClientRequestIdPolicy.ts b/sdk/core/core-https/src/policies/setClientRequestIdPolicy.ts new file mode 100644 index 000000000000..225fda5da193 --- /dev/null +++ b/sdk/core/core-https/src/policies/setClientRequestIdPolicy.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; + +/** + * The programmatic identifier of the setClientRequestIdPolicy. + */ +export const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; + +/** + * Each PipelineRequest gets a unique id upon creation. + * This policy passes that unique id along via an HTTP header to enable better + * telemetry and tracing. + * @param requestIdHeaderName The name of the header to pass the request ID to. + */ +export function setClientRequestIdPolicy( + requestIdHeaderName = "x-ms-client-request-id" +): PipelinePolicy { + return { + name: setClientRequestIdPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (!request.headers.has(requestIdHeaderName)) { + request.headers.set(requestIdHeaderName, request.requestId); + } + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/policies/systemErrorRetryPolicy.ts b/sdk/core/core-https/src/policies/systemErrorRetryPolicy.ts new file mode 100644 index 000000000000..bfd92f69ed61 --- /dev/null +++ b/sdk/core/core-https/src/policies/systemErrorRetryPolicy.ts @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { logger } from "../log"; +import { RestError } from "../restError"; +import { delay, getRandomIntegerInclusive } from "../util/helpers"; + +const DEFAULT_CLIENT_RETRY_COUNT = 10; +// intervals are in ms +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; + +/** + * The programmatic identifier of the systemErrorRetryPolicy. + */ +export const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + +interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} + +interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} + +/** + * Options that control how to retry failed requests. + */ +export interface SystemErrorRetryPolicyOptions { + /** + * The maximum number of retry attempts. Defaults to 10. + */ + maxRetries?: number; + + /** + * The amount of delay in milliseconds between retry attempts. Defaults to 1000 + * (1 second.) The delay increases exponentially with each retry up to a maximum + * specified by maxRetryDelayInMs. + */ + retryDelayInMs?: number; + + /** + * The maximum delay in milliseconds allowed before retrying an operation. Defaults + * to 64000 (64 seconds). + */ + maxRetryDelayInMs?: number; +} + +/** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options Options that customize the policy. + */ +export function systemErrorRetryPolicy( + options: SystemErrorRetryPolicyOptions = {} +): PipelinePolicy { + const retryCount = options.maxRetries ?? DEFAULT_CLIENT_RETRY_COUNT; + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + + function shouldRetry(retryData: RetryData, err?: RetryError): boolean { + if (!isSystemError(err)) { + return false; + } + const currentCount = retryData.retryCount; + return currentCount <= retryCount; + } + + function updateRetryData(retryData: RetryData, err?: RetryError): RetryData { + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + + retryData.error = err; + } + + // Adjust retry count + retryData.retryCount++; + + // Exponentially increase the delay each time + const exponentialDelay = retryInterval * Math.pow(2, retryData.retryCount); + // Don't let the delay exceed the maximum + const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const delayWithJitter = + clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2); + + retryData.retryInterval = delayWithJitter; + + return retryData; + } + + async function retry( + next: SendRequest, + retryData: RetryData, + request: PipelineRequest, + response?: PipelineResponse, + requestError?: RetryError + ): Promise { + retryData = updateRetryData(retryData, requestError); + if (shouldRetry(retryData, requestError)) { + try { + logger.info(`Retrying request in ${retryData.retryInterval}`); + await delay(retryData.retryInterval); + const res = await next(request.clone()); + return retry(next, retryData, request, res); + } catch (e) { + return retry(next, retryData, request, response, e); + } + } else if (requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + const err = + retryData.error || + new RestError("Failed to send the request.", { + code: RestError.REQUEST_SEND_ERROR, + statusCode: response?.status, + request: response?.request, + response + }); + throw err; + } else { + return response; + } + } + + return { + name: systemErrorRetryPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + const retryData = { + retryCount: 0, + retryInterval: 0 + }; + try { + const response = await next(request); + return retry(next, retryData, request, response); + } catch (e) { + const error: RestError = e; + return retry(next, retryData, request, error.response, error); + } + } + }; +} + +function isSystemError(err?: RestError): boolean { + if (!err) { + return false; + } + return ( + err.code === "ETIMEDOUT" || + err.code === "ESOCKETTIMEDOUT" || + err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || + err.code === "ENOENT" + ); +} diff --git a/sdk/core/core-https/src/policies/throttlingRetryPolicy.ts b/sdk/core/core-https/src/policies/throttlingRetryPolicy.ts new file mode 100644 index 000000000000..a1fca1a4af62 --- /dev/null +++ b/sdk/core/core-https/src/policies/throttlingRetryPolicy.ts @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { delay } from "../util/helpers"; + +/** + * The programmatic identifier of the throttlingRetryPolicy. + */ +export const throttlingRetryPolicyName = "throttlingRetryPolicy"; + +/** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +export function throttlingRetryPolicy(): PipelinePolicy { + return { + name: throttlingRetryPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + const response = await next(request); + if (response.status !== 429) { + return response; + } + + const retryAfterHeader = response.headers.get("Retry-After"); + + if (retryAfterHeader) { + const delayInMs = parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + await delay(delayInMs); + return next(request.clone()); + } + } + + return response; + } + }; +} + +/** + * Returns the number of milliseconds to wait based on a Retry-After header value. + * Returns undefined if there is no valid value. + * @param headerValue An HTTP Retry-After header value. + */ +function parseRetryAfterHeader(headerValue: string): number | undefined { + try { + const retryAfterInSeconds = Number(headerValue); + if (!Number.isNaN(retryAfterInSeconds)) { + return retryAfterInSeconds * 1000; + } else { + // It might be formatted as a date instead of a number of seconds + + const now: number = Date.now(); + const date: number = Date.parse(headerValue); + const diff = date - now; + + return Number.isNaN(diff) ? undefined : diff; + } + } catch (e) { + return undefined; + } +} diff --git a/sdk/core/core-https/src/policies/tracingPolicy.ts b/sdk/core/core-https/src/policies/tracingPolicy.ts new file mode 100644 index 000000000000..5696291e0fb2 --- /dev/null +++ b/sdk/core/core-https/src/policies/tracingPolicy.ts @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { getTracer, getTraceParentHeader } from "@azure/core-tracing"; +import { SpanOptions, SpanKind } from "@opentelemetry/api"; +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { URL } from "../util/url"; +import { getUserAgentValue } from "../util/userAgent"; + +/** + * The programmatic identifier of the tracingPolicy. + */ +export const tracingPolicyName = "tracingPolicy"; + +/** + * Options to configure the tracing policy. + */ +export interface TracingPolicyOptions { + /** + * String prefix to add to the user agent logged as metadata + * on the generated Span. + * Defaults to an empty string. + */ + userAgentPrefix?: string; +} + +/** + * A simple policy to create OpenTelemetry Spans for each request made by the pipeline + * that has SpanOptions with a parent. + * Requests made without a parent Span will not be recorded. + * @param options Options to configure the telemetry logged by the tracing policy. + */ +export function tracingPolicy(options: TracingPolicyOptions = {}): PipelinePolicy { + const userAgent = getUserAgentValue(options.userAgentPrefix); + + return { + name: tracingPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (!request.spanOptions || !request.spanOptions.parent) { + return next(request); + } + + // create a new span + const tracer = getTracer(); + const spanOptions: SpanOptions = { + ...request.spanOptions, + kind: SpanKind.CLIENT + }; + const url = new URL(request.url); + const path = url.pathname || "/"; + const span = tracer.startSpan(path, spanOptions); + span.setAttributes({ + "http.method": request.method, + "http.url": request.url, + requestId: request.requestId + }); + + if (userAgent) { + span.setAttribute("http.user_agent", userAgent); + } + + try { + // set headers + const spanContext = span.context(); + const traceParentHeader = getTraceParentHeader(spanContext); + if (traceParentHeader) { + request.headers.set("traceparent", traceParentHeader); + const traceState = spanContext.traceState && spanContext.traceState.serialize(); + // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent + if (traceState) { + request.headers.set("tracestate", traceState); + } + } + + const response = await next(request); + span.setAttribute("http.status_code", response.status); + const serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); + } + span.end(); + return response; + } catch (err) { + span.end(); + throw err; + } + } + }; +} diff --git a/sdk/core/core-https/src/policies/userAgentPolicy.ts b/sdk/core/core-https/src/policies/userAgentPolicy.ts new file mode 100644 index 000000000000..c352184989ee --- /dev/null +++ b/sdk/core/core-https/src/policies/userAgentPolicy.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest, SendRequest } from "../interfaces"; +import { PipelinePolicy } from "../pipeline"; +import { getUserAgentValue, getUserAgentHeaderName } from "../util/userAgent"; + +const UserAgentHeaderName = getUserAgentHeaderName(); + +/** + * The programmatic identifier of the userAgentPolicy. + */ +export const userAgentPolicyName = "userAgentPolicy"; + +/** + * Options for adding user agent details to outgoing requests. + */ +export interface UserAgentPolicyOptions { + /** + * String prefix to add to the user agent for outgoing requests. + * Defaults to an empty string. + */ + userAgentPrefix?: string; +} + +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options Options to customize the user agent value. + */ +export function userAgentPolicy(options: UserAgentPolicyOptions = {}): PipelinePolicy { + const userAgentValue = getUserAgentValue(options.userAgentPrefix); + return { + name: userAgentPolicyName, + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, userAgentValue); + } + return next(request); + } + }; +} diff --git a/sdk/core/core-https/src/restError.ts b/sdk/core/core-https/src/restError.ts new file mode 100644 index 000000000000..a73ff39099a2 --- /dev/null +++ b/sdk/core/core-https/src/restError.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PipelineResponse, PipelineRequest } from "./interfaces"; +import { custom } from "./util/inspect"; +import { Sanitizer } from "./util/sanitizer"; + +const errorSanitizer = new Sanitizer(); + +/** + * The options supported by RestError. + */ +export interface RestErrorOptions { + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code?: string; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode?: number; + /** + * The request that was made. + */ + request?: PipelineRequest; + /** + * The response received (if any.) + */ + response?: PipelineResponse; +} + +/** + * A custom error type for failed pipeline requests. + */ +export class RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static readonly REQUEST_SEND_ERROR: string = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static readonly PARSE_ERROR: string = "PARSE_ERROR"; + + /** + * The code of the error itself (use statics on RestError if possible.) + */ + public code?: string; + /** + * The HTTP status code of the request (if applicable.) + */ + public statusCode?: number; + /** + * The request that was made. + */ + public request?: PipelineRequest; + /** + * The response received (if any.) + */ + public response?: PipelineResponse; + /** + * Bonus property set by the throw site. + */ + public details?: unknown; + + constructor(message: string, options: RestErrorOptions = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + this.request = options.request; + this.response = options.response; + + Object.setPrototypeOf(this, RestError.prototype); + } + + /** + * Logging method for util.inspect in Node + */ + [custom](): string { + return `RestError: ${this.message} \n ${errorSanitizer.sanitize(this)}`; + } +} diff --git a/sdk/core/core-https/src/util/helpers.ts b/sdk/core/core-https/src/util/helpers.ts new file mode 100644 index 000000000000..a30afe5c6f48 --- /dev/null +++ b/sdk/core/core-https/src/util/helpers.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +export const isNode = + typeof process !== "undefined" && Boolean(process.version) && Boolean(process.versions?.node); + +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export function delay(t: number, value?: T): Promise { + return new Promise((resolve) => setTimeout(() => resolve(value), t)); +} + +/** + * Returns a random integer value between a lower and upper bound, + * inclusive of both bounds. + * Note that this uses Math.random and isn't secure. If you need to use + * this for any kind of security purpose, find a better source of random. + * @param min The smallest integer value allowed. + * @param max The largest integer value allowed. + * @ignore @internal + */ +export function getRandomIntegerInclusive(min: number, max: number): number { + // Make sure inputs are integers. + min = Math.ceil(min); + max = Math.floor(max); + // Pick a random offset from zero to the size of the range. + // Since Math.random() can never return 1, we have to make the range one larger + // in order to be inclusive of the maximum value after we take the floor. + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; +} diff --git a/sdk/core/core-https/src/util/inspect.browser.ts b/sdk/core/core-https/src/util/inspect.browser.ts new file mode 100644 index 000000000000..c842c708d755 --- /dev/null +++ b/sdk/core/core-https/src/util/inspect.browser.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export const custom = {}; diff --git a/sdk/core/core-https/src/util/inspect.ts b/sdk/core/core-https/src/util/inspect.ts new file mode 100644 index 000000000000..27613c3494f5 --- /dev/null +++ b/sdk/core/core-https/src/util/inspect.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { inspect } from "util"; + +export const custom = inspect.custom; diff --git a/sdk/core/core-https/src/util/sanitizer.ts b/sdk/core/core-https/src/util/sanitizer.ts new file mode 100644 index 000000000000..5684e3aebc51 --- /dev/null +++ b/sdk/core/core-https/src/util/sanitizer.ts @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { URL } from "./url"; + +/** + * @ignore @internal + */ +export interface SanitizerOptions { + /** + * Header names whose values will be logged when logging is enabled. + * Defaults include a list of well-known safe headers. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + additionalAllowedHeaderNames?: string[]; + + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + additionalAllowedQueryParameters?: string[]; +} + +/** + * @ignore @internal + */ +export type UnknownObject = { [s: string]: unknown }; + +const RedactedString = "REDACTED"; + +const defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "return-client-request-id", + "traceparent", + + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + + "Accept", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent" +]; + +const defaultAllowedQueryParameters: string[] = ["api-version"]; + +/** + * @ignore @internal + */ +export class Sanitizer { + private allowedHeaderNames: Set; + private allowedQueryParameters: Set; + + constructor({ + additionalAllowedHeaderNames: allowedHeaderNames = [], + additionalAllowedQueryParameters: allowedQueryParameters = [] + }: SanitizerOptions = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + + public sanitize(obj: object): string { + return JSON.stringify(obj, this.replacer.bind(this), 2); + } + + private replacer(key: string, value: unknown): unknown { + // Ensure Errors include their interesting non-enumerable members + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + + if (key === "headers") { + return this.sanitizeHeaders(value as UnknownObject); + } else if (key === "url") { + return this.sanitizeUrl(value as string); + } else if (key === "query") { + return this.sanitizeQuery(value as UnknownObject); + } else if (key === "body") { + // Don't log the request body + return undefined; + } else if (key === "response") { + // Don't log response again + return undefined; + } else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + + return value; + } + + private sanitizeHeaders(obj: UnknownObject): UnknownObject { + const sanitized: UnknownObject = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + + private sanitizeQuery(value: UnknownObject): UnknownObject { + if (typeof value !== "object" || value === null) { + return value; + } + + const sanitized: UnknownObject = {}; + + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + + return sanitized; + } + + private sanitizeUrl(value: string): string { + if (typeof value !== "string" || value === null) { + return value; + } + + const url = new URL(value); + + if (!url.search) { + return value; + } + + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + + return url.toString(); + } +} diff --git a/sdk/core/core-https/src/util/url.browser.ts b/sdk/core/core-https/src/util/url.browser.ts new file mode 100644 index 000000000000..085c11b25cf4 --- /dev/null +++ b/sdk/core/core-https/src/util/url.browser.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +const url = URL; +const urlSearchParams = URLSearchParams; + +export { url as URL, urlSearchParams as URLSearchParams }; diff --git a/sdk/core/core-https/src/util/url.ts b/sdk/core/core-https/src/util/url.ts new file mode 100644 index 000000000000..993e69798f9e --- /dev/null +++ b/sdk/core/core-https/src/util/url.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export { URL, URLSearchParams } from "url"; diff --git a/sdk/core/core-https/src/util/userAgent.ts b/sdk/core/core-https/src/util/userAgent.ts new file mode 100644 index 000000000000..a01a607ed003 --- /dev/null +++ b/sdk/core/core-https/src/util/userAgent.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { setPlatformSpecificData, getHeaderName } from "./userAgentPlatform"; +import { SDK_VERSION } from "../constants"; + +function getUserAgentString(telemetryInfo: Map): string { + const parts: string[] = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); +} + +/** + * @ignore @internal + */ +export function getUserAgentHeaderName(): string { + return getHeaderName(); +} + +/** + * @ignore @internal + */ +export function getUserAgentValue(prefix?: string): string { + const runtimeInfo = new Map(); + runtimeInfo.set("core-https", SDK_VERSION); + setPlatformSpecificData(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} diff --git a/sdk/core/core-https/src/util/userAgentPlatform.browser.ts b/sdk/core/core-https/src/util/userAgentPlatform.browser.ts new file mode 100644 index 000000000000..a20be51814cd --- /dev/null +++ b/sdk/core/core-https/src/util/userAgentPlatform.browser.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/* + * NOTE: When moving this file, please update "browser" section in package.json. + */ + +/** + * @ignore @internal + */ +export function getHeaderName(): string { + return "x-ms-useragent"; +} + +interface NavigatorEx extends Navigator { + // oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2 + readonly oscpu: string; +} + +/** + * @ignore @internal + */ +export function setPlatformSpecificData(map: Map): void { + const navigator = window.navigator as NavigatorEx; + map.set("OS", (navigator.oscpu || navigator.platform).replace(" ", "")); +} diff --git a/sdk/core/core-https/src/util/userAgentPlatform.ts b/sdk/core/core-https/src/util/userAgentPlatform.ts new file mode 100644 index 000000000000..2451fa5af7ed --- /dev/null +++ b/sdk/core/core-https/src/util/userAgentPlatform.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as os from "os"; + +/** + * @ignore @internal + */ +export function getHeaderName(): string { + return "User-Agent"; +} + +/** + * @ignore @internal + */ +export function setPlatformSpecificData(map: Map): void { + map.set("Node", process.version); + map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); +} diff --git a/sdk/core/core-https/src/util/uuid.ts b/sdk/core/core-https/src/util/uuid.ts new file mode 100644 index 000000000000..11784da0900d --- /dev/null +++ b/sdk/core/core-https/src/util/uuid.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { v4 as uuidv4 } from "uuid"; + +/** + * Generated Universally Unique Identifier + * + * @return RFC4122 v4 UUID. + * @ignore @internal + */ +export function generateUuid(): string { + return uuidv4(); +} diff --git a/sdk/core/core-https/src/xhrHttpsClient.ts b/sdk/core/core-https/src/xhrHttpsClient.ts new file mode 100644 index 000000000000..b47868a1d496 --- /dev/null +++ b/sdk/core/core-https/src/xhrHttpsClient.ts @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/// + +import { AbortError } from "@azure/abort-controller"; +import { + HttpsClient, + PipelineRequest, + PipelineResponse, + TransferProgressEvent, + HttpHeaders +} from "./interfaces"; +import { RestError } from "./restError"; +import { createHttpHeaders } from "./httpHeaders"; + +function isReadableStream(body: any): body is NodeJS.ReadableStream { + return body && typeof body.pipe === "function"; +} + +/** + * A HttpsClient implementation that uses XMLHttpRequest to send HTTPS requests. + */ +export class XhrHttpsClient implements HttpsClient { + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request The request to be made. + */ + public async sendRequest(request: PipelineRequest): Promise { + const xhr = new XMLHttpRequest(); + + if (request.proxySettings) { + throw new Error("HTTP proxy is not supported in browser environment"); + } + + const abortSignal = request.abortSignal; + if (abortSignal) { + if (abortSignal.aborted) { + throw new AbortError("The operation was aborted."); + } + + const listener = (): void => { + xhr.abort(); + }; + abortSignal.addEventListener("abort", listener); + xhr.addEventListener("readystatechange", () => { + if (xhr.readyState === XMLHttpRequest.DONE) { + abortSignal.removeEventListener("abort", listener); + } + }); + } + + addProgressListener(xhr.upload, request.onUploadProgress); + addProgressListener(xhr, request.onDownloadProgress); + + xhr.open(request.method, request.url); + xhr.timeout = request.timeout; + xhr.withCredentials = request.withCredentials; + for (const [name, value] of request.headers) { + xhr.setRequestHeader(name, value); + } + xhr.responseType = request.streamResponseBody ? "blob" : "text"; + + if (isReadableStream(request.body)) { + throw new Error("Node streams are not supported in browser environment."); + } + + xhr.send(request.body === undefined ? null : request.body); + + if (request.streamResponseBody) { + return new Promise((resolve, reject) => { + xhr.addEventListener("readystatechange", () => { + // Resolve as soon as headers are loaded + if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { + const blobBody = new Promise((resolve, reject) => { + xhr.addEventListener("load", () => { + resolve(xhr.response); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + resolve({ + request, + status: xhr.status, + headers: parseHeaders(xhr), + blobBody + }); + } + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } else { + return new Promise(function(resolve, reject) { + xhr.addEventListener("load", () => + resolve({ + request, + status: xhr.status, + headers: parseHeaders(xhr), + bodyAsText: xhr.responseText + }) + ); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + } +} + +function addProgressListener( + xhr: XMLHttpRequestEventTarget, + listener?: (progress: TransferProgressEvent) => void +): void { + if (listener) { + xhr.addEventListener("progress", (rawEvent) => + listener({ + loadedBytes: rawEvent.loaded + }) + ); + } +} + +function parseHeaders(xhr: XMLHttpRequest): HttpHeaders { + const responseHeaders = createHttpHeaders(); + const headerLines = xhr + .getAllResponseHeaders() + .trim() + .split(/[\r\n]+/); + for (const line of headerLines) { + const index = line.indexOf(":"); + const headerName = line.slice(0, index); + const headerValue = line.slice(index + 2); + responseHeaders.set(headerName, headerValue); + } + return responseHeaders; +} + +function rejectOnTerminalEvent( + request: PipelineRequest, + xhr: XMLHttpRequest, + reject: (err: any) => void +): void { + xhr.addEventListener("error", () => + reject( + new RestError(`Failed to send request to ${request.url}`, { + code: RestError.REQUEST_SEND_ERROR, + request + }) + ) + ); + const abortError = new AbortError("The operation was aborted."); + xhr.addEventListener("abort", () => reject(abortError)); + xhr.addEventListener("timeout", () => reject(abortError)); +} diff --git a/sdk/core/core-https/test/browser/disableResponseDecompressionPolicy.spec.ts b/sdk/core/core-https/test/browser/disableResponseDecompressionPolicy.spec.ts new file mode 100644 index 000000000000..78ea1eef3ad9 --- /dev/null +++ b/sdk/core/core-https/test/browser/disableResponseDecompressionPolicy.spec.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { disableResponseDecompressionPolicy } from "../../src"; + +describe("disableResponseDecompressionPolicy (browser)", function() { + it("Throws on creation", function() { + assert.throws(() => { + disableResponseDecompressionPolicy(); + }, /disableResponseDecompressionPolicy is not supported in browser environment/); + }); +}); diff --git a/sdk/core/core-https/test/browser/proxyPolicy.spec.ts b/sdk/core/core-https/test/browser/proxyPolicy.spec.ts new file mode 100644 index 000000000000..72a40d9a94de --- /dev/null +++ b/sdk/core/core-https/test/browser/proxyPolicy.spec.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { proxyPolicy } from "../../src"; + +describe("proxyPolicy (browser)", function() { + it("Throws on creation", function() { + assert.throws(() => { + proxyPolicy(); + }, /proxyPolicy is not supported in browser environment/); + }); +}); diff --git a/sdk/core/core-https/test/browser/xhrHttpsClient.spec.ts b/sdk/core/core-https/test/browser/xhrHttpsClient.spec.ts new file mode 100644 index 000000000000..18f804725369 --- /dev/null +++ b/sdk/core/core-https/test/browser/xhrHttpsClient.spec.ts @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { AbortController } from "@azure/abort-controller"; +import { DefaultHttpsClient, createPipelineRequest } from "../../src"; + +describe("XhrHttpsClient", function() { + let xhrMock: sinon.SinonFakeXMLHttpRequestStatic; + let requests: Array; + let clock: sinon.SinonFakeTimers; + + beforeEach(function() { + requests = []; + xhrMock = sinon.useFakeXMLHttpRequest(); + xhrMock.onCreate = (xhr) => { + requests.push(xhr); + }; + clock = sinon.useFakeTimers(); + }); + + afterEach(function() { + xhrMock.restore(); + clock.restore(); + sinon.restore(); + }); + + it("shouldn't throw on 404", async function() { + const client = new DefaultHttpsClient(); + const request = createPipelineRequest({ url: "https://example.com" }); + const promise = client.sendRequest(request); + assert.equal(requests.length, 1); + requests[0].respond(404, {}, ""); + const response = await promise; + assert.strictEqual(response.status, 404); + }); + + it("should allow canceling of requests", async function() { + const client = new DefaultHttpsClient(); + const controller = new AbortController(); + const request = createPipelineRequest({ + url: "https://example.com", + abortSignal: controller.signal + }); + const promise = client.sendRequest(request); + controller.abort(); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); + + it("should allow canceling of requests before the request is made", async function() { + const client = new DefaultHttpsClient(); + const controller = new AbortController(); + controller.abort(); + const request = createPipelineRequest({ + url: "https://example.com", + abortSignal: controller.signal + }); + const promise = client.sendRequest(request); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); + + it("should report upload and download progress", async function() { + const client = new DefaultHttpsClient(); + let downloadCalled = false; + let uploadCalled = false; + const request = createPipelineRequest({ + url: "https://example.com", + body: "Some kinda witty message", + onDownloadProgress: (ev) => { + assert.isNumber(ev.loadedBytes); + downloadCalled = true; + }, + onUploadProgress: (ev) => { + assert.isNumber(ev.loadedBytes); + uploadCalled = true; + } + }); + const promise = client.sendRequest(request); + assert.equal(requests.length, 1); + const responseText = "An appropriate response."; + requests[0].respond(200, {}, responseText); + const response = await promise; + assert.strictEqual(response.bodyAsText, responseText); + assert.isTrue(downloadCalled, "no download progress"); + assert.isTrue(uploadCalled, "no upload progress"); + }); + + it("should honor timeout", async function() { + const client = new DefaultHttpsClient(); + + const timeoutLength = 2000; + const request = createPipelineRequest({ + url: "https://example.com", + timeout: timeoutLength + }); + const promise = client.sendRequest(request); + clock.tick(timeoutLength); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); + + it("parses headers", async function() { + const client = new DefaultHttpsClient(); + const request = createPipelineRequest({ url: "https://example.com" }); + const promise = client.sendRequest(request); + assert.equal(requests.length, 1); + requests[0].respond(200, { "Content-Length": 42, value: "hello" }, ""); + const response = await promise; + const headers = response.headers; + assert.strictEqual(headers.get("content-length"), "42"); + assert.strictEqual(headers.get("value"), "hello"); + }); + + it("parses empty string headers", async function() { + const client = new DefaultHttpsClient(); + const request = createPipelineRequest({ url: "https://example.com" }); + const promise = client.sendRequest(request); + assert.equal(requests.length, 1); + requests[0].respond(200, { "Content-Type": "", value: "" }, ""); + const response = await promise; + const headers = response.headers; + assert.strictEqual(headers.get("content-type"), ""); + assert.strictEqual(headers.get("value"), ""); + }); +}); diff --git a/sdk/core/core-https/test/node/disableResponseDecompressionPolicy.spec.ts b/sdk/core/core-https/test/node/disableResponseDecompressionPolicy.spec.ts new file mode 100644 index 000000000000..9930e4ab25b5 --- /dev/null +++ b/sdk/core/core-https/test/node/disableResponseDecompressionPolicy.spec.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { disableResponseDecompressionPolicy, createPipelineRequest, SendRequest } from "../../src"; + +describe("disableResponseDecompressionPolicy (node)", function() { + it("Sets the expected flag on the request", function() { + const policy = disableResponseDecompressionPolicy(); + + const request = createPipelineRequest({ + url: "https://bing.com" + }); + + assert.isFalse(request.skipDecompressResponse, "skipDecompressResponse is not set."); + + const next = sinon.stub, ReturnType>(); + + policy.sendRequest(request, next); + + assert.isTrue(next.calledOnceWith(request), "next called with request"); + assert.isTrue(request.skipDecompressResponse, "skipDecompressResponse is set."); + }); +}); diff --git a/sdk/core/core-https/test/node/nodeHttpsClient.spec.ts b/sdk/core/core-https/test/node/nodeHttpsClient.spec.ts new file mode 100644 index 000000000000..ada988050812 --- /dev/null +++ b/sdk/core/core-https/test/node/nodeHttpsClient.spec.ts @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { PassThrough } from "stream"; +import { IncomingMessage, ClientRequest, IncomingHttpHeaders } from "http"; +import * as https from "https"; +import { AbortController } from "@azure/abort-controller"; +import { DefaultHttpsClient, createPipelineRequest } from "../../src"; + +class FakeResponse extends PassThrough { + public statusCode?: number; + public headers?: IncomingHttpHeaders; +} + +class FakeRequest extends PassThrough { + public finished?: boolean; + public abort(): void { + this.finished = true; + } +} + +function createResponse(statusCode: number, body = ""): IncomingMessage { + const response = new FakeResponse(); + response.headers = {}; + response.statusCode = statusCode; + response.write(body); + response.end(); + return (response as unknown) as IncomingMessage; +} + +function createRequest(): ClientRequest { + const request = new FakeRequest(); + request.finished = false; + return (request as unknown) as ClientRequest; +} + +describe("NodeHttpsClient", function() { + let stubbedRequest: sinon.SinonStub; + let clock: sinon.SinonFakeTimers; + + beforeEach(function() { + stubbedRequest = sinon.stub(https, "request"); + clock = sinon.useFakeTimers(); + }); + + afterEach(function() { + clock.restore(); + sinon.restore(); + }); + + it("shouldn't throw on 404", async function() { + const client = new DefaultHttpsClient(); + stubbedRequest.returns(createRequest()); + const request = createPipelineRequest({ url: "https://example.com" }); + const promise = client.sendRequest(request); + stubbedRequest.yield(createResponse(404)); + const response = await promise; + assert.strictEqual(response.status, 404); + }); + + it("should allow canceling of requests", async function() { + const client = new DefaultHttpsClient(); + const controller = new AbortController(); + stubbedRequest.returns(createRequest()); + const request = createPipelineRequest({ + url: "https://example.com", + abortSignal: controller.signal + }); + const promise = client.sendRequest(request); + controller.abort(); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); + + it("should allow canceling of requests before the request is made", async function() { + const client = new DefaultHttpsClient(); + const controller = new AbortController(); + controller.abort(); + stubbedRequest.returns(createRequest()); + const request = createPipelineRequest({ + url: "https://example.com", + abortSignal: controller.signal + }); + const promise = client.sendRequest(request); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); + + it("should report upload and download progress", async function() { + const client = new DefaultHttpsClient(); + stubbedRequest.returns(createRequest()); + let downloadCalled = false; + let uploadCalled = false; + const request = createPipelineRequest({ + url: "https://example.com", + body: "Some kinda witty message", + onDownloadProgress: (ev) => { + assert.isNumber(ev.loadedBytes); + downloadCalled = true; + }, + onUploadProgress: (ev) => { + assert.isNumber(ev.loadedBytes); + uploadCalled = true; + } + }); + const promise = client.sendRequest(request); + const responseText = "An appropriate response."; + stubbedRequest.yield(createResponse(200, responseText)); + const response = await promise; + assert.strictEqual(response.bodyAsText, responseText); + assert.isTrue(downloadCalled, "no download progress"); + assert.isTrue(uploadCalled, "no upload progress"); + }); + + it("should fail if progress callbacks throw", async function() { + const client = new DefaultHttpsClient(); + stubbedRequest.returns(createRequest()); + const errorMessage = "it failed horribly!"; + const request = createPipelineRequest({ + url: "https://example.com", + body: "Some kinda witty message", + onUploadProgress: () => { + throw new Error(errorMessage); + } + }); + const promise = client.sendRequest(request); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.message, errorMessage); + } + }); + + it("should honor timeout", async function() { + const client = new DefaultHttpsClient(); + + const timeoutLength = 2000; + stubbedRequest.returns(createRequest()); + const request = createPipelineRequest({ + url: "https://example.com", + timeout: timeoutLength + }); + const promise = client.sendRequest(request); + clock.tick(timeoutLength); + try { + await promise; + assert.fail("Expected await to throw"); + } catch (e) { + assert.strictEqual(e.name, "AbortError"); + } + }); +}); diff --git a/sdk/core/core-https/test/node/proxyPolicy.spec.ts b/sdk/core/core-https/test/node/proxyPolicy.spec.ts new file mode 100644 index 000000000000..8c5b86f0f36a --- /dev/null +++ b/sdk/core/core-https/test/node/proxyPolicy.spec.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { + proxyPolicy, + createPipelineRequest, + SendRequest, + ProxySettings, + getDefaultProxySettings +} from "../../src"; + +describe("proxyPolicy (node)", function() { + it("Sets proxy settings on the request", function() { + const proxySettings: ProxySettings = { + host: "https://proxy.example.com", + port: 8080 + }; + const policy = proxyPolicy(proxySettings); + + const request = createPipelineRequest({ + url: "https://bing.com" + }); + + const next = sinon.stub, ReturnType>(); + + policy.sendRequest(request, next); + + assert.isTrue(next.calledOnceWith(request), "next called with request"); + assert.strictEqual(request.proxySettings, proxySettings); + }); + + it("Doesn't override existing request proxy settings", function() { + const proxySettings: ProxySettings = { + host: "https://proxy.example.com", + port: 8080 + }; + const policy = proxyPolicy(proxySettings); + + const requestProxySettings: ProxySettings = { + host: "https://proxy2.example.com", + port: 8080 + }; + + const request = createPipelineRequest({ + url: "https://bing.com", + proxySettings: requestProxySettings + }); + + const next = sinon.stub, ReturnType>(); + + policy.sendRequest(request, next); + + assert.isTrue(next.calledOnceWith(request), "next called with request"); + assert.strictEqual(request.proxySettings, requestProxySettings); + }); + + describe("getDefaultProxySettings", function() { + it("Parses a url without a port", function() { + const proxyUrl = "https://proxy.example.com"; + const settings = getDefaultProxySettings(proxyUrl); + assert.strictEqual(settings?.host, proxyUrl); + assert.strictEqual(settings?.port, 80); + }); + + it("Parses a url with a port", function() { + const proxyUrl = "https://proxy.example.com"; + const port = 8080; + const proxyUrlWithPort = `${proxyUrl}:${port}`; + const settings = getDefaultProxySettings(proxyUrlWithPort); + assert.strictEqual(settings?.host, proxyUrl); + assert.strictEqual(settings?.port, port); + }); + + it("Parses urls with authentication", function() { + const settings = getDefaultProxySettings("https://user:password@proxy.example.com:8080"); + assert.strictEqual(settings?.host, "https://proxy.example.com"); + assert.strictEqual(settings?.port, 8080); + assert.strictEqual(settings?.username, "user"); + assert.strictEqual(settings?.password, "password"); + }); + + describe("loading from the environment", function() { + const proxyVars = ["HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy"]; + + afterEach(function() { + for (const variable of proxyVars) { + delete process.env[variable]; + } + }); + + it("Prefers HTTPS", function() { + const httpProxy = "http://proxy.example.com"; + const httpsProxy = "https://proxy.example.com"; + process.env["HTTPS_PROXY"] = httpsProxy; + process.env["HTTP_PROXY"] = httpProxy; + const settings = getDefaultProxySettings(); + assert.strictEqual(settings?.host, httpsProxy); + }); + + it("Loads from each variable correctly", function() { + const proxyUrl = "https://proxy.example.com"; + for (const variable of proxyVars) { + process.env[variable] = proxyUrl; + const settings = getDefaultProxySettings(); + assert.strictEqual(settings?.host, proxyUrl); + delete process.env[variable]; + } + }); + }); + }); +}); diff --git a/sdk/core/core-https/test/node/restError.spec.ts b/sdk/core/core-https/test/node/restError.spec.ts new file mode 100644 index 000000000000..251b2de978dd --- /dev/null +++ b/sdk/core/core-https/test/node/restError.spec.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { PipelineResponse, RestError, createHttpHeaders, createPipelineRequest } from "../../src"; +import { inspect } from "util"; + +describe("RestError", function() { + it("serializes properly in node", function() { + const request = createPipelineRequest({ + url: "https://bing.com", + headers: createHttpHeaders({ "X-Api-Auth": "SUPER SECRET" }) + }); + const response: PipelineResponse = { + headers: createHttpHeaders({ "X-Magic-Token": "SUPER DUPER SECRET" }), + request, + status: 42 + }; + + const error = new RestError("Error!", { + code: "TEST", + request, + response, + statusCode: response.status + }); + const result = inspect(error, false, 8); + assert.notInclude(result, "SUPER SECRET"); + assert.notInclude(result, "SUPER DUPER SECRET"); + assert.include(result, "REDACTED"); + }); +}); diff --git a/sdk/core/core-https/test/pipeline.spec.ts b/sdk/core/core-https/test/pipeline.spec.ts index 96a464d5d536..887df2747c85 100644 --- a/sdk/core/core-https/test/pipeline.spec.ts +++ b/sdk/core/core-https/test/pipeline.spec.ts @@ -2,17 +2,23 @@ // Licensed under the MIT license. import { assert } from "chai"; -import { HttpsPipeline, PipelinePolicy } from "../src/pipeline"; -import { HttpsClient } from "../src/interfaces"; +import { + createEmptyPipeline, + PipelinePolicy, + HttpsClient, + createPipelineRequest, + createHttpHeaders, + createPipelineFromOptions +} from "../src"; describe("HttpsPipeline", function() { it("Newly created pipeline has no policies", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); assert.isEmpty(pipeline.getOrderedPolicies()); }); it("addPolicy adds policy to the list", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -24,7 +30,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy adds policies in order", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -42,7 +48,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy honors beforePolicies", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -60,7 +66,7 @@ describe("HttpsPipeline", function() { }); it("getOrderedPolicies honors afterPolicies", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -78,7 +84,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy throws on duplicate policy name", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -95,7 +101,7 @@ describe("HttpsPipeline", function() { }); it("getOrderedPolicies throws on circular reference", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -117,7 +123,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy orders within a phase correctly", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -142,7 +148,7 @@ describe("HttpsPipeline", function() { }); it("phases are ordered correctly", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -167,7 +173,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy throws on both phase and afterPhase specified", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -179,7 +185,7 @@ describe("HttpsPipeline", function() { }); it("addPolicy throws on invalid phase name", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -197,7 +203,7 @@ describe("HttpsPipeline", function() { // bad phase name should throw it("removePolicy removes named policy", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -225,7 +231,7 @@ describe("HttpsPipeline", function() { }); it("removePolicy removes policies in phase", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -253,7 +259,7 @@ describe("HttpsPipeline", function() { }); it("clone creates separate copy of pipeline", function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => next(request), name: "test" @@ -288,7 +294,7 @@ describe("HttpsPipeline", function() { }); it("Send request composes policies in order", async function() { - const pipeline = HttpsPipeline.create(); + const pipeline = createEmptyPipeline(); const testPolicy: PipelinePolicy = { sendRequest: (request, next) => { assert.strictEqual(request.url, "initialUrl"); @@ -320,13 +326,37 @@ describe("HttpsPipeline", function() { assert.strictEqual(request.url, "afterTest3"); return { request, + headers: createHttpHeaders(), status: 200 }; } }; - const response = await pipeline.sendRequest(testHttpsClient, { url: "initialUrl" }); + const response = await pipeline.sendRequest( + testHttpsClient, + createPipelineRequest({ url: "initialUrl" }) + ); assert.strictEqual(response.request.url, "afterTest3"); assert.strictEqual(response.status, 200); }); + + describe("createPipelineFromOptions", function() { + it("can issue successful requests", async function() { + const testHttpsClient: HttpsClient = { + sendRequest: async (request) => { + assert.strictEqual(request.url, "https://example.com"); + return { + request, + headers: createHttpHeaders(), + status: 200 + }; + } + }; + + const pipeline = createPipelineFromOptions({}); + const request = createPipelineRequest({ url: "https://example.com" }); + const response = await pipeline.sendRequest(testHttpsClient, request); + assert.strictEqual(response.status, 200); + }); + }); }); diff --git a/sdk/core/core-https/test/systemErrorRetryPolicy.spec.ts b/sdk/core/core-https/test/systemErrorRetryPolicy.spec.ts new file mode 100644 index 000000000000..31236e19b480 --- /dev/null +++ b/sdk/core/core-https/test/systemErrorRetryPolicy.spec.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { + createPipelineRequest, + SendRequest, + PipelineResponse, + createHttpHeaders, + systemErrorRetryPolicy, + RestError +} from "../src"; + +describe("systemErrorRetryPolicy", function() { + afterEach(function() { + sinon.restore(); + }); + + it("It should retry after a system error", async () => { + const request = createPipelineRequest({ + url: "https://bing.com" + }); + const systemError = new RestError("Test Error!", { code: "ENOENT" }); + const successResponse: PipelineResponse = { + headers: createHttpHeaders(), + request, + status: 200 + }; + + const policy = systemErrorRetryPolicy(); + const next = sinon.stub, ReturnType>(); + next.onFirstCall().rejects(systemError); + next.onSecondCall().resolves(successResponse); + + const clock = sinon.useFakeTimers(); + + const promise = policy.sendRequest(request, next); + assert.isTrue(next.calledOnce); + + // allow the delay to occur + const time = await clock.nextAsync(); + // should be at least the standard delay + assert.isAtLeast(time, 1000); + assert.isTrue(next.calledTwice); + + const result = await promise; + + assert.strictEqual(result, successResponse); + }); + + it("It should give up after the limit is reached", async () => { + const request = createPipelineRequest({ + url: "https://bing.com" + }); + const systemError = new RestError("Test Error!", { code: "ENOENT" }); + + const policy = systemErrorRetryPolicy(); + const next = sinon.stub, ReturnType>(); + next.rejects(systemError); + + const clock = sinon.useFakeTimers(); + + let catchCalled = false; + const promise = policy.sendRequest(request, next); + promise.catch((e) => { + catchCalled = true; + assert.strictEqual(e, systemError); + }); + await clock.runAllAsync(); + // should be one more than the default retry count + assert.strictEqual(next.callCount, 11); + assert.isTrue(catchCalled); + }); +}); diff --git a/sdk/core/core-https/test/throttlingRetryPolicy.spec.ts b/sdk/core/core-https/test/throttlingRetryPolicy.spec.ts new file mode 100644 index 000000000000..d0586a3cfcf5 --- /dev/null +++ b/sdk/core/core-https/test/throttlingRetryPolicy.spec.ts @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { + createPipelineRequest, + SendRequest, + PipelineResponse, + createHttpHeaders, + throttlingRetryPolicy +} from "../src"; + +describe("throttlingRetryPolicy", function() { + afterEach(function() { + sinon.restore(); + }); + + it("It should retry after a given number of seconds", async () => { + const request = createPipelineRequest({ + url: "https://bing.com" + }); + const retryResponse: PipelineResponse = { + headers: createHttpHeaders({ + "Retry-After": "10" + }), + request, + status: 429 + }; + const successResponse: PipelineResponse = { + headers: createHttpHeaders(), + request, + status: 200 + }; + + const policy = throttlingRetryPolicy(); + const next = sinon.stub, ReturnType>(); + next.onFirstCall().resolves(retryResponse); + next.onSecondCall().resolves(successResponse); + + const clock = sinon.useFakeTimers(); + + const promise = policy.sendRequest(request, next); + assert.isTrue(next.calledOnce); + + // allow the delay to occur + const time = await clock.nextAsync(); + assert.strictEqual(time, 10 * 1000); + assert.isTrue(next.calledTwice); + + const result = await promise; + + assert.strictEqual(result, successResponse); + clock.restore(); + }); + + it("It should retry after a given date occurs", async () => { + const request = createPipelineRequest({ + url: "https://bing.com" + }); + const retryResponse: PipelineResponse = { + headers: createHttpHeaders({ + "Retry-After": "Wed, 21 Oct 2015 07:28:00 GMT" + }), + request, + status: 429 + }; + const successResponse: PipelineResponse = { + headers: createHttpHeaders(), + request, + status: 200 + }; + + const policy = throttlingRetryPolicy(); + const next = sinon.stub, ReturnType>(); + next.onFirstCall().resolves(retryResponse); + next.onSecondCall().resolves(successResponse); + + const clock = sinon.useFakeTimers(new Date("Wed, 21 Oct 2015 07:20:00 GMT")); + + const promise = policy.sendRequest(request, next); + assert.isTrue(next.calledOnce); + + // allow the delay to occur + const time = await clock.nextAsync(); + assert.strictEqual( + time, + new Date("Wed, 21 Oct 2015 07:28:00 GMT").getTime(), + "It should now be the time from the header." + ); + assert.isTrue(next.calledTwice); + + const result = await promise; + + assert.strictEqual(result, successResponse); + clock.restore(); + }); +}); diff --git a/sdk/core/core-https/test/tracingPolicy.spec.ts b/sdk/core/core-https/test/tracingPolicy.spec.ts new file mode 100644 index 000000000000..6263489c78c2 --- /dev/null +++ b/sdk/core/core-https/test/tracingPolicy.spec.ts @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import * as sinon from "sinon"; +import { + tracingPolicy, + createPipelineRequest, + SendRequest, + PipelineResponse, + createHttpHeaders +} from "../src"; +import { SpanContext, TraceFlags } from "@opentelemetry/api"; +import { setTracer, NoOpTracer, NoOpSpan } from "@azure/core-tracing"; + +class MockSpan extends NoOpSpan { + private _endCalled = false; + + constructor( + private traceId: string, + private spanId: string, + private flags: TraceFlags, + private state: string + ) { + super(); + } + + didEnd(): boolean { + return this._endCalled; + } + + end(): void { + this._endCalled = true; + } + + context(): SpanContext { + const state = this.state; + return { + traceId: this.traceId, + spanId: this.spanId, + traceFlags: this.flags, + traceState: { + set() { + /* empty */ + }, + unset() { + /* empty */ + }, + get(): string | undefined { + return; + }, + serialize() { + return state; + } + } + }; + } +} + +class MockTracer extends NoOpTracer { + private spans: MockSpan[] = []; + private _startSpanCalled = false; + + constructor( + private traceId = "", + private spanId = "", + private flags = TraceFlags.NONE, + private state = "" + ) { + super(); + } + + getStartedSpans(): MockSpan[] { + return this.spans; + } + + startSpanCalled(): boolean { + return this._startSpanCalled; + } + + startSpan(): MockSpan { + this._startSpanCalled = true; + const span = new MockSpan(this.traceId, this.spanId, this.flags, this.state); + this.spans.push(span); + return span; + } +} + +const ROOT_SPAN = new MockSpan("root", "root", TraceFlags.SAMPLED, ""); + +describe("tracingPolicy", function() { + const TRACE_VERSION = "00"; + + it("will not create a span if spanOptions are missing", async () => { + const mockTracer = new MockTracer(); + setTracer(mockTracer); + const request = createPipelineRequest({ + url: "https://bing.com" + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 200 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.resolves(response); + await policy.sendRequest(request, next); + + assert.isFalse(mockTracer.startSpanCalled()); + }); + + it("will create a span and correctly set trace headers if spanOptions are available", async () => { + const mockTraceId = "11111111111111111111111111111111"; + const mockSpanId = "2222222222222222"; + const mockTracer = new MockTracer(mockTraceId, mockSpanId, TraceFlags.SAMPLED); + setTracer(mockTracer); + + const request = createPipelineRequest({ + url: "https://bing.com", + spanOptions: { + parent: ROOT_SPAN.context() + } + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 200 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.resolves(response); + await policy.sendRequest(request, next); + + assert.isTrue(mockTracer.startSpanCalled()); + assert.lengthOf(mockTracer.getStartedSpans(), 1); + const span = mockTracer.getStartedSpans()[0]; + assert.isTrue(span.didEnd()); + + const expectedFlag = "01"; + + assert.equal( + request.headers.get("traceparent"), + `${TRACE_VERSION}-${mockTraceId}-${mockSpanId}-${expectedFlag}` + ); + assert.notExists(request.headers.get("tracestate")); + }); + + it("will create a span and correctly set trace headers if spanOptions are available (no TraceOptions)", async () => { + const mockTraceId = "11111111111111111111111111111111"; + const mockSpanId = "2222222222222222"; + // leave out the TraceOptions + const mockTracer = new MockTracer(mockTraceId, mockSpanId); + setTracer(mockTracer); + + const request = createPipelineRequest({ + url: "https://bing.com", + spanOptions: { + parent: ROOT_SPAN.context() + } + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 200 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.resolves(response); + await policy.sendRequest(request, next); + + assert.isTrue(mockTracer.startSpanCalled()); + assert.lengthOf(mockTracer.getStartedSpans(), 1); + const span = mockTracer.getStartedSpans()[0]; + assert.isTrue(span.didEnd()); + + const expectedFlag = "00"; + + assert.equal( + request.headers.get("traceparent"), + `${TRACE_VERSION}-${mockTraceId}-${mockSpanId}-${expectedFlag}` + ); + assert.notExists(request.headers.get("tracestate")); + }); + + it("will create a span and correctly set trace headers if spanOptions are available (TraceState)", async () => { + const mockTraceId = "11111111111111111111111111111111"; + const mockSpanId = "2222222222222222"; + const mockTraceState = "foo=bar"; + const mockTracer = new MockTracer(mockTraceId, mockSpanId, TraceFlags.SAMPLED, mockTraceState); + setTracer(mockTracer); + + const request = createPipelineRequest({ + url: "https://bing.com", + spanOptions: { + parent: ROOT_SPAN.context() + } + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 200 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.resolves(response); + await policy.sendRequest(request, next); + + assert.isTrue(mockTracer.startSpanCalled()); + assert.lengthOf(mockTracer.getStartedSpans(), 1); + const span = mockTracer.getStartedSpans()[0]; + assert.isTrue(span.didEnd()); + + const expectedFlag = "01"; + + assert.equal( + request.headers.get("traceparent"), + `${TRACE_VERSION}-${mockTraceId}-${mockSpanId}-${expectedFlag}` + ); + assert.equal(request.headers.get("tracestate"), mockTraceState); + }); + + it("will close a span if an error is encountered", async () => { + const mockTraceId = "11111111111111111111111111111111"; + const mockSpanId = "2222222222222222"; + const mockTraceState = "foo=bar"; + const mockTracer = new MockTracer(mockTraceId, mockSpanId, TraceFlags.SAMPLED, mockTraceState); + setTracer(mockTracer); + + const request = createPipelineRequest({ + url: "https://bing.com", + spanOptions: { + parent: ROOT_SPAN.context() + } + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 404 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.returns(Promise.reject(response)); + + try { + await policy.sendRequest(request, next); + throw new Error("Test Failure"); + } catch (err) { + assert.notEqual(err.message, "Test Failure"); + assert.isTrue(mockTracer.startSpanCalled()); + assert.lengthOf(mockTracer.getStartedSpans(), 1); + const span = mockTracer.getStartedSpans()[0]; + assert.isTrue(span.didEnd()); + + const expectedFlag = "01"; + + assert.equal( + request.headers.get("traceparent"), + `${TRACE_VERSION}-${mockTraceId}-${mockSpanId}-${expectedFlag}` + ); + assert.equal(request.headers.get("tracestate"), mockTraceState); + } + }); + + it("will not set headers if span is a NoOpSpan", async () => { + setTracer(new NoOpTracer()); + + const request = createPipelineRequest({ + url: "https://bing.com", + spanOptions: { + parent: ROOT_SPAN.context() + } + }); + const response: PipelineResponse = { + headers: createHttpHeaders(), + request: request, + status: 200 + }; + const policy = tracingPolicy(); + const next = sinon.stub, ReturnType>(); + next.resolves(response); + await policy.sendRequest(request, next); + + assert.notExists(request.headers.get("traceparent")); + assert.notExists(request.headers.get("tracestate")); + }); +}); diff --git a/sdk/core/core-lro/package.json b/sdk/core/core-lro/package.json index 5a989b25a058..d14f6f3e3e17 100644 --- a/sdk/core/core-lro/package.json +++ b/sdk/core/core-lro/package.json @@ -97,14 +97,14 @@ "@azure/abort-controller": "^1.0.0", "@azure/core-http": "^1.1.1", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@opentelemetry/api": "^0.6.1", "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", @@ -139,9 +139,9 @@ "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9" } } diff --git a/sdk/core/core-lro/tsconfig.json b/sdk/core/core-lro/tsconfig.json index 9e64b126833c..4820f2c7f6fd 100644 --- a/sdk/core/core-lro/tsconfig.json +++ b/sdk/core/core-lro/tsconfig.json @@ -5,7 +5,6 @@ "outDir": "./dist-esm", "declarationDir": "./types" }, - "compileOnSave": true, "exclude": ["node_modules", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/core/core-lro/tsconfig.samples.json b/sdk/core/core-lro/tsconfig.samples.json index 846639b2d955..a0b15abb027d 100644 --- a/sdk/core/core-lro/tsconfig.samples.json +++ b/sdk/core/core-lro/tsconfig.samples.json @@ -19,6 +19,5 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "include": ["./samples/**/*.ts"] } diff --git a/sdk/core/core-paging/package.json b/sdk/core/core-paging/package.json index 3c93080462aa..3d5532a33330 100644 --- a/sdk/core/core-paging/package.json +++ b/sdk/core/core-paging/package.json @@ -70,6 +70,6 @@ "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", "prettier": "^1.16.4", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/core/core-paging/tsconfig.json b/sdk/core/core-paging/tsconfig.json index 82013fe4dbfb..6ec5edb05fd8 100644 --- a/sdk/core/core-paging/tsconfig.json +++ b/sdk/core/core-paging/tsconfig.json @@ -10,7 +10,6 @@ "outDir": "./dist-esm", "resolveJsonModule": true }, - "compileOnSave": true, "exclude": ["node_modules"], "include": ["./src/**/*.ts"] } diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index 2026db874832..546603826544 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -57,7 +57,7 @@ "dependencies": { "@opencensus/web-types": "0.0.7", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -65,14 +65,14 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-no-null": "^1.0.2", @@ -86,8 +86,8 @@ "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/core/logger/package.json b/sdk/core/logger/package.json index 145d1d4ac050..010f72423948 100644 --- a/sdk/core/logger/package.json +++ b/sdk/core/logger/package.json @@ -68,23 +68,23 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger", "sideEffects": false, "dependencies": { - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "delay": "^4.2.0", "dotenv": "^8.2.0", "eslint": "^6.1.0", @@ -107,13 +107,13 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "sinon": "^7.1.0", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/core/logger/tsconfig.json b/sdk/core/logger/tsconfig.json index 902eb6fe955e..41ea2537ceff 100644 --- a/sdk/core/logger/tsconfig.json +++ b/sdk/core/logger/tsconfig.json @@ -6,7 +6,6 @@ "declarationDir": "./types", "downlevelIteration": true }, - "compileOnSave": true, "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 236e48ac3f7e..4e55048796d4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-cosmosdb", "author": "Microsoft Corporation", "description": "CosmosDBManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "9.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index 3540740d74fe..4440e5e7d65d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -42,12 +42,11 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext { /** * Initializes a new instance of the CosmosDBManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure subscription ID. - * @param subscriptionId1 The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.CosmosDBManagementClientOptions) { - super(credentials, subscriptionId, subscriptionId1, options); + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) { + super(credentials, subscriptionId, options); this.databaseAccounts = new operations.DatabaseAccounts(this); this.operations = new operations.Operations(this); this.database = new operations.Database(this); diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts index f2acd2074cf5..3c9c68bdd0d0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts @@ -13,30 +13,25 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-cosmosdb"; -const packageVersion = "7.0.0"; +const packageVersion = "9.0.0"; export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - subscriptionId1: string; /** * Initializes a new instance of the CosmosDBManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure subscription ID. - * @param subscriptionId1 The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.CosmosDBManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } - if (subscriptionId1 == undefined) { - throw new Error('\'subscriptionId1\' cannot be null.'); - } if (!options) { options = {}; @@ -54,7 +49,6 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; this.subscriptionId = subscriptionId; - this.subscriptionId1 = subscriptionId1; if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts index 5db70e00dcbf..8076d88e0ecd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -52,6 +55,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -73,7 +77,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts index 57738ede5857..6e8a41e5a809 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -59,6 +62,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, Metric, MetricAvailability, @@ -90,7 +94,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, RegionForOnlineOffline, Resource, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts index 5e7aa77bb821..dd77c0ca8c2e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -52,6 +55,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -73,7 +77,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 68c7aa4deca5..e5d581ad3955 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -11,6 +11,19 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * IpAddressOrRange object + */ +export interface IpAddressOrRange { + /** + * A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be + * well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, + * 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP + * address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. + */ + ipAddressOrRange?: string; +} + /** * The consistency policy for the Cosmos DB database account. */ @@ -133,15 +146,15 @@ export interface PrivateLinkServiceConnectionStateProperty { * The private link service connection status. */ status?: string; - /** - * The private link service connection description. - */ - description?: string; /** * Any action that is required beyond basic workflow (approve/ reject/ disconnect) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly actionsRequired?: string; + /** + * The private link service connection description. + */ + description?: string; } /** @@ -196,6 +209,16 @@ export interface PrivateEndpointConnection extends ProxyResource { provisioningState?: string; } +/** + * An interface representing ApiProperties. + */ +export interface ApiProperties { + /** + * Describes the ServerVersion of an a MongoDB account. Possible values include: '3.2', '3.6' + */ + serverVersion?: ServerVersion; +} + /** * The core properties of ARM resources. */ @@ -245,11 +268,9 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { */ readonly databaseAccountOfferType?: DatabaseAccountOfferType; /** - * Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges - * in CIDR form to be included as the allowed list of client IPs for a given database account. IP - * addresses/ranges must be comma separated and must not contain any spaces. + * List of IpRules. */ - ipRangeFilter?: string; + ipRules?: IpAddressOrRange[]; /** * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ @@ -294,8 +315,9 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { virtualNetworkRules?: VirtualNetworkRule[]; /** * List of Private Endpoint Connections configured for the Cosmos DB account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - privateEndpointConnections?: PrivateEndpointConnection[]; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** * Enables the account to write in multiple locations */ @@ -323,6 +345,18 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { * 'Disabled' */ publicNetworkAccess?: PublicNetworkAccess; + /** + * Flag to indicate whether Free Tier is enabled. + */ + enableFreeTier?: boolean; + /** + * API specific properties. + */ + apiProperties?: ApiProperties; + /** + * Flag to indicate whether to enable storage analytics. + */ + enableAnalyticalStorage?: boolean; } /** @@ -364,10 +398,14 @@ export interface SqlDatabaseGetPropertiesResource { */ export interface OptionsResource { /** - * Value of the Cosmos DB resource throughput. Use the ThroughputSetting resource when retrieving - * offer details. + * Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting + * resource when retrieving offer details. */ throughput?: number; + /** + * Specifies the Autoscale settings. + */ + autoscaleSettings?: AutoscaleSettings; } /** @@ -829,6 +867,10 @@ export interface MongoDBCollectionGetPropertiesResource { * List of index keys */ indexes?: MongoIndex[]; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; /** * A system generated property. A unique identifier. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1013,6 +1055,10 @@ export interface CassandraTableGetPropertiesResource { * Schema of the Cosmos DB Cassandra table */ schema?: CassandraSchema; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; /** * A system generated property. A unique identifier. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1255,7 +1301,7 @@ export interface AutoUpgradePolicyResource { /** * Cosmos DB provisioned throughput settings object */ -export interface ProvisionedThroughputSettingsResource { +export interface AutoscaleSettingsResource { /** * Represents maximum throughput container can scale up to. */ @@ -1277,15 +1323,15 @@ export interface ProvisionedThroughputSettingsResource { */ export interface ThroughputSettingsGetPropertiesResource { /** - * Value of the Cosmos DB resource throughput. Either throughput is required or - * provisionedThroughputSettings is required, but not both. + * Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings + * is required, but not both. */ throughput?: number; /** - * Cosmos DB resource for provisioned throughput settings. Either throughput is required or - * provisionedThroughputSettings is required, but not both. + * Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings + * is required, but not both. */ - provisionedThroughputSettings?: ProvisionedThroughputSettingsResource; + autoscaleSettings?: AutoscaleSettingsResource; /** * The minimum throughput of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1340,11 +1386,9 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper */ locations: Location[]; /** - * Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges - * in CIDR form to be included as the allowed list of client IPs for a given database account. IP - * addresses/ranges must be comma separated and must not contain any spaces. + * List of IpRules. */ - ipRangeFilter?: string; + ipRules?: IpAddressOrRange[]; /** * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ @@ -1390,6 +1434,18 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper * 'Disabled' */ publicNetworkAccess?: PublicNetworkAccess; + /** + * Flag to indicate whether Free Tier is enabled. + */ + enableFreeTier?: boolean; + /** + * API specific properties. Currently, supported only for MongoDB API. + */ + apiProperties?: ApiProperties; + /** + * Flag to indicate whether to enable storage analytics. + */ + enableAnalyticalStorage?: boolean; } /** @@ -1410,11 +1466,9 @@ export interface DatabaseAccountUpdateParameters { */ locations?: Location[]; /** - * Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges - * in CIDR form to be included as the allowed list of client IPs for a given database account. IP - * addresses/ranges must be comma separated and must not contain any spaces. + * List of IpRules. */ - ipRangeFilter?: string; + ipRules?: IpAddressOrRange[]; /** * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ @@ -1460,6 +1514,18 @@ export interface DatabaseAccountUpdateParameters { * 'Disabled' */ publicNetworkAccess?: PublicNetworkAccess; + /** + * Flag to indicate whether Free Tier is enabled. + */ + enableFreeTier?: boolean; + /** + * API specific properties. Currently, supported only for MongoDB API. + */ + apiProperties?: ApiProperties; + /** + * Flag to indicate whether to enable storage analytics. + */ + enableAnalyticalStorage?: boolean; } /** @@ -1532,20 +1598,20 @@ export interface DatabaseAccountRegenerateKeyParameters { } /** - * Cosmos DB resource throughput object. Either throughput is required or - * provisionedThroughputSettings is required, but not both. + * Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is + * required, but not both. */ export interface ThroughputSettingsResource { /** - * Value of the Cosmos DB resource throughput. Either throughput is required or - * provisionedThroughputSettings is required, but not both. + * Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings + * is required, but not both. */ throughput?: number; /** - * Cosmos DB resource for provisioned throughput settings. Either throughput is required or - * provisionedThroughputSettings is required, but not both. + * Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings + * is required, but not both. */ - provisionedThroughputSettings?: ProvisionedThroughputSettingsResource; + autoscaleSettings?: AutoscaleSettingsResource; /** * The minimum throughput of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1578,20 +1644,29 @@ export interface SqlDatabaseResource { id: string; } +/** + * An interface representing AutoscaleSettings. + */ +export interface AutoscaleSettings { + /** + * Represents maximum throughput, the resource can scale up to. + */ + maxThroughput?: number; +} + /** * CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are * "If-Match", "If-None-Match", "Session-Token" and "Throughput" */ export interface CreateUpdateOptions { /** - * Request Units per second. For example, "throughput": "10000". + * Request Units per second. For example, "throughput": 10000. */ - throughput?: string; + throughput?: number; /** - * Describes unknown properties. The value of an unknown property MUST be of type "string". Due - * to valid TS constraints we have modeled this as a union of `string | any`. + * Specifies the Autoscale settings. */ - [property: string]: string | any; + autoscaleSettings?: AutoscaleSettings; } /** @@ -1794,6 +1869,10 @@ export interface MongoDBCollectionResource { * List of index keys */ indexes?: MongoIndex[]; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; } /** @@ -1877,6 +1956,10 @@ export interface CassandraTableResource { * Schema of the Cosmos DB Cassandra table */ schema?: CassandraSchema; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; } /** @@ -2644,6 +2727,14 @@ export type ConnectorOffer = 'Small'; */ export type PublicNetworkAccess = 'Enabled' | 'Disabled'; +/** + * Defines values for ServerVersion. + * Possible values include: '3.2', '3.6' + * @readonly + * @enum {string} + */ +export type ServerVersion = '3.2' | '3.6'; + /** * Defines values for IndexingMode. * Possible values include: 'Consistent', 'Lazy', 'None' diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index ecbb09985f52..8e51cb8aae25 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -12,6 +12,22 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const IpAddressOrRange: msRest.CompositeMapper = { + serializedName: "IpAddressOrRange", + type: { + name: "Composite", + className: "IpAddressOrRange", + modelProperties: { + ipAddressOrRange: { + serializedName: "ipAddressOrRange", + type: { + name: "String" + } + } + } + } +}; + export const ConsistencyPolicy: msRest.CompositeMapper = { serializedName: "ConsistencyPolicy", type: { @@ -205,15 +221,15 @@ export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = name: "String" } }, - description: { - serializedName: "description", + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", type: { name: "String" } }, - actionsRequired: { - readOnly: true, - serializedName: "actionsRequired", + description: { + serializedName: "description", type: { name: "String" } @@ -301,6 +317,22 @@ export const PrivateEndpointConnection: msRest.CompositeMapper = { } }; +export const ApiProperties: msRest.CompositeMapper = { + serializedName: "ApiProperties", + type: { + name: "Composite", + className: "ApiProperties", + modelProperties: { + serverVersion: { + serializedName: "serverVersion", + type: { + name: "String" + } + } + } + } +}; + export const ARMResourceProperties: msRest.CompositeMapper = { serializedName: "ARMResourceProperties", type: { @@ -386,10 +418,16 @@ export const DatabaseAccountGetResults: msRest.CompositeMapper = { ] } }, - ipRangeFilter: { - serializedName: "properties.ipRangeFilter", + ipRules: { + serializedName: "properties.ipRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddressOrRange" + } + } } }, isVirtualNetworkFilterEnabled: { @@ -488,6 +526,7 @@ export const DatabaseAccountGetResults: msRest.CompositeMapper = { } }, privateEndpointConnections: { + readOnly: true, serializedName: "properties.privateEndpointConnections", type: { name: "Sequence", @@ -534,6 +573,25 @@ export const DatabaseAccountGetResults: msRest.CompositeMapper = { type: { name: "String" } + }, + enableFreeTier: { + serializedName: "properties.enableFreeTier", + type: { + name: "Boolean" + } + }, + apiProperties: { + serializedName: "properties.apiProperties", + type: { + name: "Composite", + className: "ApiProperties" + } + }, + enableAnalyticalStorage: { + serializedName: "properties.enableAnalyticalStorage", + type: { + name: "Boolean" + } } } } @@ -600,6 +658,13 @@ export const OptionsResource: msRest.CompositeMapper = { type: { name: "Number" } + }, + autoscaleSettings: { + serializedName: "autoscaleSettings", + type: { + name: "Composite", + className: "AutoscaleSettings" + } } } } @@ -1433,6 +1498,12 @@ export const MongoDBCollectionGetPropertiesResource: msRest.CompositeMapper = { } } }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } + }, _rid: { readOnly: true, serializedName: "_rid", @@ -1774,6 +1845,12 @@ export const CassandraTableGetPropertiesResource: msRest.CompositeMapper = { className: "CassandraSchema" } }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } + }, _rid: { readOnly: true, serializedName: "_rid", @@ -2180,11 +2257,11 @@ export const AutoUpgradePolicyResource: msRest.CompositeMapper = { } }; -export const ProvisionedThroughputSettingsResource: msRest.CompositeMapper = { - serializedName: "ProvisionedThroughputSettingsResource", +export const AutoscaleSettingsResource: msRest.CompositeMapper = { + serializedName: "AutoscaleSettingsResource", type: { name: "Composite", - className: "ProvisionedThroughputSettingsResource", + className: "AutoscaleSettingsResource", modelProperties: { maxThroughput: { required: true, @@ -2223,11 +2300,11 @@ export const ThroughputSettingsGetPropertiesResource: msRest.CompositeMapper = { name: "Number" } }, - provisionedThroughputSettings: { - serializedName: "provisionedThroughputSettings", + autoscaleSettings: { + serializedName: "autoscaleSettings", type: { name: "Composite", - className: "ProvisionedThroughputSettingsResource" + className: "AutoscaleSettingsResource" } }, minimumThroughput: { @@ -2330,10 +2407,16 @@ export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { name: "String" } }, - ipRangeFilter: { - serializedName: "properties.ipRangeFilter", + ipRules: { + serializedName: "properties.ipRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddressOrRange" + } + } } }, isVirtualNetworkFilterEnabled: { @@ -2407,6 +2490,25 @@ export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { type: { name: "String" } + }, + enableFreeTier: { + serializedName: "properties.enableFreeTier", + type: { + name: "Boolean" + } + }, + apiProperties: { + serializedName: "properties.apiProperties", + type: { + name: "Composite", + className: "ApiProperties" + } + }, + enableAnalyticalStorage: { + serializedName: "properties.enableAnalyticalStorage", + type: { + name: "Boolean" + } } } } @@ -2454,10 +2556,16 @@ export const DatabaseAccountUpdateParameters: msRest.CompositeMapper = { } } }, - ipRangeFilter: { - serializedName: "properties.ipRangeFilter", + ipRules: { + serializedName: "properties.ipRules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddressOrRange" + } + } } }, isVirtualNetworkFilterEnabled: { @@ -2531,6 +2639,25 @@ export const DatabaseAccountUpdateParameters: msRest.CompositeMapper = { type: { name: "String" } + }, + enableFreeTier: { + serializedName: "properties.enableFreeTier", + type: { + name: "Boolean" + } + }, + apiProperties: { + serializedName: "properties.apiProperties", + type: { + name: "Composite", + className: "ApiProperties" + } + }, + enableAnalyticalStorage: { + serializedName: "properties.enableAnalyticalStorage", + type: { + name: "Boolean" + } } } } @@ -2660,11 +2787,11 @@ export const ThroughputSettingsResource: msRest.CompositeMapper = { name: "Number" } }, - provisionedThroughputSettings: { - serializedName: "provisionedThroughputSettings", + autoscaleSettings: { + serializedName: "autoscaleSettings", type: { name: "Composite", - className: "ProvisionedThroughputSettingsResource" + className: "AutoscaleSettingsResource" } }, minimumThroughput: { @@ -2721,6 +2848,22 @@ export const SqlDatabaseResource: msRest.CompositeMapper = { } }; +export const AutoscaleSettings: msRest.CompositeMapper = { + serializedName: "AutoscaleSettings", + type: { + name: "Composite", + className: "AutoscaleSettings", + modelProperties: { + maxThroughput: { + serializedName: "maxThroughput", + type: { + name: "Number" + } + } + } + } +}; + export const CreateUpdateOptions: msRest.CompositeMapper = { serializedName: "CreateUpdateOptions", type: { @@ -2730,13 +2873,15 @@ export const CreateUpdateOptions: msRest.CompositeMapper = { throughput: { serializedName: "throughput", type: { - name: "String" + name: "Number" + } + }, + autoscaleSettings: { + serializedName: "autoscaleSettings", + type: { + name: "Composite", + className: "AutoscaleSettings" } - } - }, - additionalProperties: { - type: { - name: "String" } } } @@ -2762,12 +2907,7 @@ export const SqlDatabaseCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -2845,12 +2985,7 @@ export const SqlContainerCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -2900,12 +3035,7 @@ export const SqlStoredProcedureCreateUpdateParameters: msRest.CompositeMapper = serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -2955,12 +3085,7 @@ export const SqlUserDefinedFunctionCreateUpdateParameters: msRest.CompositeMappe serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3022,12 +3147,7 @@ export const SqlTriggerCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3071,12 +3191,7 @@ export const MongoDBDatabaseCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3118,6 +3233,12 @@ export const MongoDBCollectionResource: msRest.CompositeMapper = { } } } + }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } } } } @@ -3143,12 +3264,7 @@ export const MongoDBCollectionCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3192,12 +3308,7 @@ export const TableCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3241,12 +3352,7 @@ export const CassandraKeyspaceCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3278,6 +3384,12 @@ export const CassandraTableResource: msRest.CompositeMapper = { name: "Composite", className: "CassandraSchema" } + }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } } } } @@ -3303,12 +3415,7 @@ export const CassandraTableCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3352,12 +3459,7 @@ export const GremlinDatabaseCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } @@ -3435,12 +3537,7 @@ export const GremlinGraphCreateUpdateParameters: msRest.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "CreateUpdateOptions", - additionalProperties: { - type: { - name: "String" - } - } + className: "CreateUpdateOptions" } } } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts index bba6e773c163..5a447e578304 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -50,6 +53,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -73,7 +77,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts index c9f13a97f5ea..67b430bb0b35 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -50,6 +53,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -73,7 +77,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index e44b38c8bf9e..cb68a8368400 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -41,37 +41,16 @@ export const apiVersion0: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2020-03-01', + defaultValue: '2020-04-01', + constraints: { + MinLength: 1 + }, type: { name: "String" } } }; export const apiVersion1: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2019-08-01', - type: { - name: "String" - } - } -}; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2019-08-01-preview', - type: { - name: "String" - } - } -}; -export const apiVersion3: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, @@ -276,17 +255,7 @@ export const storedProcedureName: msRest.OperationURLParameter = { } } }; -export const subscriptionId0: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - required: true, - serializedName: "subscriptionId", - type: { - name: "String" - } - } -}; -export const subscriptionId1: msRest.OperationURLParameter = { +export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { required: true, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts index a84dacf828bb..75eadc705194 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -51,6 +54,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -73,7 +77,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts index 25bda1a8333d..982e3c4539fa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -50,6 +53,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -72,7 +76,6 @@ export { PrivateLinkResource, PrivateLinkResourceListResult, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts index d46dd45e455a..c82b56d06e33 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -50,6 +53,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -71,7 +75,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts index 74304432552f..db653215827a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts @@ -7,8 +7,11 @@ */ export { + ApiProperties, ARMProxyResource, ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, BaseResource, @@ -50,6 +53,7 @@ export { IncludedPath, Indexes, IndexingPolicy, + IpAddressOrRange, Location, MongoDBCollectionCreateUpdateParameters, MongoDBCollectionGetPropertiesOptions, @@ -71,7 +75,6 @@ export { PrivateEndpointProperty, PrivateLinkResource, PrivateLinkServiceConnectionStateProperty, - ProvisionedThroughputSettingsResource, ProxyResource, Resource, SpatialSpec, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index 4c765c774911..7ab389e8b87b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -29,20 +29,20 @@ export class CassandraResources { /** * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listCassandraKeyspaces(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -62,7 +62,7 @@ export class CassandraResources { /** * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the * provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param [options] The optional parameters @@ -70,14 +70,14 @@ export class CassandraResources { */ getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param callback The callback */ getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param options The optional parameters @@ -98,7 +98,7 @@ export class CassandraResources { /** * Create or update an Azure Cosmos DB Cassandra keyspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current @@ -113,7 +113,7 @@ export class CassandraResources { /** * Deletes an existing Azure Cosmos DB Cassandra keyspace. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param [options] The optional parameters @@ -127,7 +127,7 @@ export class CassandraResources { /** * Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database * account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param [options] The optional parameters @@ -135,14 +135,14 @@ export class CassandraResources { */ getCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param callback The callback */ getCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param options The optional parameters @@ -163,7 +163,7 @@ export class CassandraResources { /** * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -178,7 +178,7 @@ export class CassandraResources { /** * Lists the Cassandra table under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param [options] The optional parameters @@ -186,14 +186,14 @@ export class CassandraResources { */ listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param callback The callback */ listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param options The optional parameters @@ -214,7 +214,7 @@ export class CassandraResources { /** * Gets the Cassandra table under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -223,7 +223,7 @@ export class CassandraResources { */ getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -231,7 +231,7 @@ export class CassandraResources { */ getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -254,7 +254,7 @@ export class CassandraResources { /** * Create or update an Azure Cosmos DB Cassandra Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -270,7 +270,7 @@ export class CassandraResources { /** * Deletes an existing Azure Cosmos DB Cassandra table. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -285,7 +285,7 @@ export class CassandraResources { /** * Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database * account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -294,7 +294,7 @@ export class CassandraResources { */ getCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -302,7 +302,7 @@ export class CassandraResources { */ getCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -325,7 +325,7 @@ export class CassandraResources { /** * Update RUs per second of an Azure Cosmos DB Cassandra table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -341,7 +341,7 @@ export class CassandraResources { /** * Create or update an Azure Cosmos DB Cassandra keyspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current @@ -364,7 +364,7 @@ export class CassandraResources { /** * Deletes an existing Azure Cosmos DB Cassandra keyspace. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param [options] The optional parameters @@ -384,7 +384,7 @@ export class CassandraResources { /** * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -407,7 +407,7 @@ export class CassandraResources { /** * Create or update an Azure Cosmos DB Cassandra Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -432,7 +432,7 @@ export class CassandraResources { /** * Deletes an existing Azure Cosmos DB Cassandra table. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -454,7 +454,7 @@ export class CassandraResources { /** * Update RUs per second of an Azure Cosmos DB Cassandra table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyspaceName Cosmos DB keyspace name. * @param tableName Cosmos DB table name. @@ -484,7 +484,7 @@ const listCassandraKeyspacesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -509,7 +509,7 @@ const getCassandraKeyspaceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -535,7 +535,7 @@ const getCassandraKeyspaceThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -561,7 +561,7 @@ const listCassandraTablesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -587,7 +587,7 @@ const getCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName, @@ -614,7 +614,7 @@ const getCassandraTableThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName, @@ -641,7 +641,7 @@ const beginCreateUpdateCassandraKeyspaceOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -675,7 +675,7 @@ const beginDeleteCassandraKeyspaceOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -700,7 +700,7 @@ const beginUpdateCassandraKeyspaceThroughputOperationSpec: msRest.OperationSpec httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName @@ -734,7 +734,7 @@ const beginCreateUpdateCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName, @@ -769,7 +769,7 @@ const beginDeleteCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName, @@ -795,7 +795,7 @@ const beginUpdateCassandraTableThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.keyspaceName, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts index 15e10d614fe9..556de099ad8a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts @@ -29,7 +29,7 @@ export class Collection { /** * Retrieves the metrics determined by the given filter for the given database account and * collection. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -41,7 +41,7 @@ export class Collection { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -52,7 +52,7 @@ export class Collection { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -79,7 +79,7 @@ export class Collection { /** * Retrieves the usages (most recent storage data) for the given collection. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -88,7 +88,7 @@ export class Collection { */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionListUsagesOptionalParams): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -96,7 +96,7 @@ export class Collection { */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -119,7 +119,7 @@ export class Collection { /** * Retrieves metric definitions for the given collection. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -128,7 +128,7 @@ export class Collection { */ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -136,7 +136,7 @@ export class Collection { */ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -164,7 +164,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, @@ -192,7 +192,7 @@ const listUsagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, @@ -220,7 +220,7 @@ const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts index 01d92e38e4ea..2afa0fb70e0f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartition.ts @@ -29,7 +29,7 @@ export class CollectionPartition { /** * Retrieves the metrics determined by the given filter for the given collection, split by * partition. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -41,7 +41,7 @@ export class CollectionPartition { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -52,7 +52,7 @@ export class CollectionPartition { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -79,7 +79,7 @@ export class CollectionPartition { /** * Retrieves the usages (most recent storage data) for the given collection, split by partition. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -88,7 +88,7 @@ export class CollectionPartition { */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionPartitionListUsagesOptionalParams): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -96,7 +96,7 @@ export class CollectionPartition { */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -124,7 +124,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, @@ -152,7 +152,7 @@ const listUsagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts index 5cdfa86d5256..a706ba8f74c8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionPartitionRegion.ts @@ -29,7 +29,7 @@ export class CollectionPartitionRegion { /** * Retrieves the metrics determined by the given filter for the given collection and region, split * by partition. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -42,7 +42,7 @@ export class CollectionPartitionRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -54,7 +54,7 @@ export class CollectionPartitionRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -88,7 +88,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.region, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts index 8056f5d004f3..d28c819736a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collectionRegion.ts @@ -29,7 +29,7 @@ export class CollectionRegion { /** * Retrieves the metrics determined by the given filter for the given database account, collection * and region. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -42,7 +42,7 @@ export class CollectionRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -54,7 +54,7 @@ export class CollectionRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -88,7 +88,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.region, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts index f1252e05b0a9..b511c67bf98a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts @@ -29,7 +29,7 @@ export class Database { /** * Retrieves the metrics determined by the given filter for the given database account and * database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -40,7 +40,7 @@ export class Database { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -50,7 +50,7 @@ export class Database { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -75,7 +75,7 @@ export class Database { /** * Retrieves the usages (most recent data) for the given database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param [options] The optional parameters @@ -83,14 +83,14 @@ export class Database { */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, options?: Models.DatabaseListUsagesOptionalParams): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param callback The callback */ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param options The optional parameters @@ -111,7 +111,7 @@ export class Database { /** * Retrieves metric definitions for the given database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param [options] The optional parameters @@ -119,14 +119,14 @@ export class Database { */ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param callback The callback */ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param options The optional parameters @@ -152,7 +152,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid @@ -179,7 +179,7 @@ const listUsagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid @@ -206,7 +206,7 @@ const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts index 5a33ecdca6d3..c08745c91ecb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccountRegion.ts @@ -28,7 +28,7 @@ export class DatabaseAccountRegion { /** * Retrieves the metrics determined by the given filter for the given database account and region. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -39,7 +39,7 @@ export class DatabaseAccountRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -49,7 +49,7 @@ export class DatabaseAccountRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param filter An OData filter expression that describes a subset of metrics to return. The @@ -79,7 +79,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.region diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts index 666dd3e85339..67516cd31809 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts @@ -29,20 +29,20 @@ export class DatabaseAccounts { /** * Retrieves the properties of an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -61,7 +61,7 @@ export class DatabaseAccounts { /** * Updates the properties of an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param updateParameters The parameters to provide for the current database account. * @param [options] The optional parameters @@ -75,7 +75,7 @@ export class DatabaseAccounts { /** * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when * performing updates on an account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param createUpdateParameters The parameters to provide for the current database account. * @param [options] The optional parameters @@ -88,7 +88,7 @@ export class DatabaseAccounts { /** * Deletes an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -103,7 +103,7 @@ export class DatabaseAccounts { * indicates a write region. The maximum value for a failover priority = (total number of regions - * 1). Failover priority values must be unique for each of the regions in which the database * account exists. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param failoverParameters The new failover policies for the database account. * @param [options] The optional parameters @@ -140,18 +140,18 @@ export class DatabaseAccounts { /** * Lists all the Azure Cosmos DB database accounts available under the given resource group. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -168,20 +168,20 @@ export class DatabaseAccounts { /** * Lists the access keys for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -200,20 +200,20 @@ export class DatabaseAccounts { /** * Lists the connection strings for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listConnectionStrings(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listConnectionStrings(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -232,7 +232,7 @@ export class DatabaseAccounts { /** * Offline the specified region for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param regionParameterForOffline Cosmos DB region to offline for the database account. * @param [options] The optional parameters @@ -245,7 +245,7 @@ export class DatabaseAccounts { /** * Online the specified region for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param regionParameterForOnline Cosmos DB region to online for the database account. * @param [options] The optional parameters @@ -258,20 +258,20 @@ export class DatabaseAccounts { /** * Lists the read-only access keys for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ getReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ getReadOnlyKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -290,20 +290,20 @@ export class DatabaseAccounts { /** * Lists the read-only access keys for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listReadOnlyKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -322,7 +322,7 @@ export class DatabaseAccounts { /** * Regenerates an access key for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyToRegenerate The name of the key to regenerate. * @param [options] The optional parameters @@ -364,7 +364,7 @@ export class DatabaseAccounts { /** * Retrieves the metrics determined by the given filter for the given database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -374,7 +374,7 @@ export class DatabaseAccounts { */ listMetrics(resourceGroupName: string, accountName: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -383,7 +383,7 @@ export class DatabaseAccounts { */ listMetrics(resourceGroupName: string, accountName: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -406,20 +406,20 @@ export class DatabaseAccounts { /** * Retrieves the usages (most recent data) for the given database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listUsages(resourceGroupName: string, accountName: string, options?: Models.DatabaseAccountsListUsagesOptionalParams): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listUsages(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -438,20 +438,20 @@ export class DatabaseAccounts { /** * Retrieves metric definitions for the given database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listMetricDefinitions(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listMetricDefinitions(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -470,7 +470,7 @@ export class DatabaseAccounts { /** * Updates the properties of an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param updateParameters The parameters to provide for the current database account. * @param [options] The optional parameters @@ -491,7 +491,7 @@ export class DatabaseAccounts { /** * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when * performing updates on an account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param createUpdateParameters The parameters to provide for the current database account. * @param [options] The optional parameters @@ -511,7 +511,7 @@ export class DatabaseAccounts { /** * Deletes an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -532,7 +532,7 @@ export class DatabaseAccounts { * indicates a write region. The maximum value for a failover priority = (total number of regions - * 1). Failover priority values must be unique for each of the regions in which the database * account exists. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param failoverParameters The new failover policies for the database account. * @param [options] The optional parameters @@ -552,7 +552,7 @@ export class DatabaseAccounts { /** * Offline the specified region for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param regionParameterForOffline Cosmos DB region to offline for the database account. * @param [options] The optional parameters @@ -572,7 +572,7 @@ export class DatabaseAccounts { /** * Online the specified region for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param regionParameterForOnline Cosmos DB region to online for the database account. * @param [options] The optional parameters @@ -592,7 +592,7 @@ export class DatabaseAccounts { /** * Regenerates an access key for the specified Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param keyToRegenerate The name of the key to regenerate. * @param [options] The optional parameters @@ -617,7 +617,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -643,7 +643,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts", urlParameters: [ - Parameters.subscriptionId0 + Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 @@ -667,7 +667,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts", urlParameters: [ Parameters.resourceGroupName, - Parameters.subscriptionId0 + Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 @@ -690,7 +690,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -715,7 +715,7 @@ const listConnectionStringsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -740,7 +740,7 @@ const getReadOnlyKeysOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -765,7 +765,7 @@ const listReadOnlyKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -812,7 +812,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -838,7 +838,7 @@ const listUsagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -864,7 +864,7 @@ const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -889,7 +889,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -921,7 +921,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -953,7 +953,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -977,7 +977,7 @@ const beginFailoverPriorityChangeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -1008,7 +1008,7 @@ const beginOfflineRegionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -1039,7 +1039,7 @@ const beginOnlineRegionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -1070,7 +1070,7 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts index fdd85947114a..7b2f57d67e7a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -29,20 +29,20 @@ export class GremlinResources { /** * Lists the Gremlin databases under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listGremlinDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listGremlinDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -62,7 +62,7 @@ export class GremlinResources { /** * Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided * name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -70,14 +70,14 @@ export class GremlinResources { */ getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -98,7 +98,7 @@ export class GremlinResources { /** * Create or update an Azure Cosmos DB Gremlin database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin @@ -113,7 +113,7 @@ export class GremlinResources { /** * Deletes an existing Azure Cosmos DB Gremlin database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -127,7 +127,7 @@ export class GremlinResources { /** * Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database * account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -135,14 +135,14 @@ export class GremlinResources { */ getGremlinDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getGremlinDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -163,7 +163,7 @@ export class GremlinResources { /** * Update RUs per second of an Azure Cosmos DB Gremlin database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -178,7 +178,7 @@ export class GremlinResources { /** * Lists the Gremlin graph under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -186,14 +186,14 @@ export class GremlinResources { */ listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -214,7 +214,7 @@ export class GremlinResources { /** * Gets the Gremlin graph under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -223,7 +223,7 @@ export class GremlinResources { */ getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -231,7 +231,7 @@ export class GremlinResources { */ getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -254,7 +254,7 @@ export class GremlinResources { /** * Create or update an Azure Cosmos DB Gremlin graph - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -270,7 +270,7 @@ export class GremlinResources { /** * Deletes an existing Azure Cosmos DB Gremlin graph. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -285,7 +285,7 @@ export class GremlinResources { /** * Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the * provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -294,7 +294,7 @@ export class GremlinResources { */ getGremlinGraphThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -302,7 +302,7 @@ export class GremlinResources { */ getGremlinGraphThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -325,7 +325,7 @@ export class GremlinResources { /** * Update RUs per second of an Azure Cosmos DB Gremlin graph - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -341,7 +341,7 @@ export class GremlinResources { /** * Create or update an Azure Cosmos DB Gremlin database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin @@ -364,7 +364,7 @@ export class GremlinResources { /** * Deletes an existing Azure Cosmos DB Gremlin database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -384,7 +384,7 @@ export class GremlinResources { /** * Update RUs per second of an Azure Cosmos DB Gremlin database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -407,7 +407,7 @@ export class GremlinResources { /** * Create or update an Azure Cosmos DB Gremlin graph - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -432,7 +432,7 @@ export class GremlinResources { /** * Deletes an existing Azure Cosmos DB Gremlin graph. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -454,7 +454,7 @@ export class GremlinResources { /** * Update RUs per second of an Azure Cosmos DB Gremlin graph - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param graphName Cosmos DB graph name. @@ -484,7 +484,7 @@ const listGremlinDatabasesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -509,7 +509,7 @@ const getGremlinDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -535,7 +535,7 @@ const getGremlinDatabaseThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -561,7 +561,7 @@ const listGremlinGraphsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -587,7 +587,7 @@ const getGremlinGraphOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -614,7 +614,7 @@ const getGremlinGraphThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -641,7 +641,7 @@ const beginCreateUpdateGremlinDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -675,7 +675,7 @@ const beginDeleteGremlinDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -700,7 +700,7 @@ const beginUpdateGremlinDatabaseThroughputOperationSpec: msRest.OperationSpec = httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -734,7 +734,7 @@ const beginCreateUpdateGremlinGraphOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -769,7 +769,7 @@ const beginDeleteGremlinGraphOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -795,7 +795,7 @@ const beginUpdateGremlinGraphThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index c23c7e91a455..b0ad885dacde 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -29,20 +29,20 @@ export class MongoDBResources { /** * Lists the MongoDB databases under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listMongoDBDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listMongoDBDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -62,7 +62,7 @@ export class MongoDBResources { /** * Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided * name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -70,14 +70,14 @@ export class MongoDBResources { */ getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -98,7 +98,7 @@ export class MongoDBResources { /** * Create or updates Azure Cosmos DB MongoDB database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB @@ -113,7 +113,7 @@ export class MongoDBResources { /** * Deletes an existing Azure Cosmos DB MongoDB database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -127,7 +127,7 @@ export class MongoDBResources { /** * Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database * account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -135,14 +135,14 @@ export class MongoDBResources { */ getMongoDBDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getMongoDBDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -163,7 +163,7 @@ export class MongoDBResources { /** * Update RUs per second of the an Azure Cosmos DB MongoDB database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -178,7 +178,7 @@ export class MongoDBResources { /** * Lists the MongoDB collection under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -186,14 +186,14 @@ export class MongoDBResources { */ listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -214,7 +214,7 @@ export class MongoDBResources { /** * Gets the MongoDB collection under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -223,7 +223,7 @@ export class MongoDBResources { */ getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -231,7 +231,7 @@ export class MongoDBResources { */ getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -254,7 +254,7 @@ export class MongoDBResources { /** * Create or update an Azure Cosmos DB MongoDB Collection - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -270,7 +270,7 @@ export class MongoDBResources { /** * Deletes an existing Azure Cosmos DB MongoDB Collection. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -285,7 +285,7 @@ export class MongoDBResources { /** * Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database * account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -294,7 +294,7 @@ export class MongoDBResources { */ getMongoDBCollectionThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -302,7 +302,7 @@ export class MongoDBResources { */ getMongoDBCollectionThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -325,7 +325,7 @@ export class MongoDBResources { /** * Update the RUs per second of an Azure Cosmos DB MongoDB collection - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -341,7 +341,7 @@ export class MongoDBResources { /** * Create or updates Azure Cosmos DB MongoDB database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB @@ -364,7 +364,7 @@ export class MongoDBResources { /** * Deletes an existing Azure Cosmos DB MongoDB database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -384,7 +384,7 @@ export class MongoDBResources { /** * Update RUs per second of the an Azure Cosmos DB MongoDB database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The RUs per second of the parameters to provide for the @@ -407,7 +407,7 @@ export class MongoDBResources { /** * Create or update an Azure Cosmos DB MongoDB Collection - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -432,7 +432,7 @@ export class MongoDBResources { /** * Deletes an existing Azure Cosmos DB MongoDB Collection. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -454,7 +454,7 @@ export class MongoDBResources { /** * Update the RUs per second of an Azure Cosmos DB MongoDB collection - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. @@ -484,7 +484,7 @@ const listMongoDBDatabasesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -509,7 +509,7 @@ const getMongoDBDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -535,7 +535,7 @@ const getMongoDBDatabaseThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -561,7 +561,7 @@ const listMongoDBCollectionsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -587,7 +587,7 @@ const getMongoDBCollectionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -614,7 +614,7 @@ const getMongoDBCollectionThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -641,7 +641,7 @@ const beginCreateUpdateMongoDBDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -675,7 +675,7 @@ const beginDeleteMongoDBDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -700,7 +700,7 @@ const beginUpdateMongoDBDatabaseThroughputOperationSpec: msRest.OperationSpec = httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -734,7 +734,7 @@ const beginCreateUpdateMongoDBCollectionOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -769,7 +769,7 @@ const beginDeleteMongoDBCollectionOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -795,7 +795,7 @@ const beginUpdateMongoDBCollectionThroughputOperationSpec: msRest.OperationSpec httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts index 76bc3bf8a196..1d22daf2fb67 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/notebookWorkspaces.ts @@ -29,20 +29,20 @@ export class NotebookWorkspaces { /** * Gets the notebook workspace resources of an existing Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listByDatabaseAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listByDatabaseAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -61,20 +61,20 @@ export class NotebookWorkspaces { /** * Gets the notebook workspace for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -93,7 +93,7 @@ export class NotebookWorkspaces { /** * Creates the notebook workspace for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -105,7 +105,7 @@ export class NotebookWorkspaces { /** * Deletes the notebook workspace for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -117,20 +117,20 @@ export class NotebookWorkspaces { /** * Retrieves the connection info for the notebook workspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listConnectionInfo(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listConnectionInfo(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -149,7 +149,7 @@ export class NotebookWorkspaces { /** * Regenerates the auth token for the notebook workspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -161,7 +161,7 @@ export class NotebookWorkspaces { /** * Starts the notebook workspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -173,7 +173,7 @@ export class NotebookWorkspaces { /** * Creates the notebook workspace for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -191,7 +191,7 @@ export class NotebookWorkspaces { /** * Deletes the notebook workspace for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -209,7 +209,7 @@ export class NotebookWorkspaces { /** * Regenerates the auth token for the notebook workspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -227,7 +227,7 @@ export class NotebookWorkspaces { /** * Starts the notebook workspace - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise @@ -250,12 +250,12 @@ const listByDatabaseAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,13 +275,13 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -301,13 +301,13 @@ const listConnectionInfoOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -327,13 +327,13 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -360,13 +360,13 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -385,13 +385,13 @@ const beginRegenerateAuthTokenOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -410,13 +410,13 @@ const beginStartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.notebookWorkspaceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts index 4989ae8af70d..a2bdebdb6cf4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeId.ts @@ -28,7 +28,7 @@ export class PartitionKeyRangeId { /** * Retrieves the metrics determined by the given filter for the given partition key range id. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -41,7 +41,7 @@ export class PartitionKeyRangeId { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, partitionKeyRangeId: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -53,7 +53,7 @@ export class PartitionKeyRangeId { */ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, partitionKeyRangeId: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. * @param collectionRid Cosmos DB collection rid. @@ -87,7 +87,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseRid, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts index 16ffe4885455..662145522e25 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/partitionKeyRangeIdRegion.ts @@ -29,7 +29,7 @@ export class PartitionKeyRangeIdRegion { /** * Retrieves the metrics determined by the given filter for the given partition key range id and * region. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -43,7 +43,7 @@ export class PartitionKeyRangeIdRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, partitionKeyRangeId: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -56,7 +56,7 @@ export class PartitionKeyRangeIdRegion { */ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, partitionKeyRangeId: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param region Cosmos DB region, with spaces between words and each word capitalized. * @param databaseRid Cosmos DB database rid. @@ -92,7 +92,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.region, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts index 00357210dcd2..6c2c22bd6808 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentile.ts @@ -29,7 +29,7 @@ export class Percentile { /** * Retrieves the metrics determined by the given filter for the given database account. This url is * only for PBS and Replication Latency data - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -39,7 +39,7 @@ export class Percentile { */ listMetrics(resourceGroupName: string, accountName: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -48,7 +48,7 @@ export class Percentile { */ listMetrics(resourceGroupName: string, accountName: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param filter An OData filter expression that describes a subset of metrics to return. The * parameters that can be filtered are name.value (name of the metric, can have an or of multiple @@ -76,7 +76,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts index e6df8f914ab8..b4d812787248 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileSourceTarget.ts @@ -29,7 +29,7 @@ export class PercentileSourceTarget { /** * Retrieves the metrics determined by the given filter for the given account, source and target * region. This url is only for PBS and Replication Latency data - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -43,7 +43,7 @@ export class PercentileSourceTarget { */ listMetrics(resourceGroupName: string, accountName: string, sourceRegion: string, targetRegion: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -56,7 +56,7 @@ export class PercentileSourceTarget { */ listMetrics(resourceGroupName: string, accountName: string, sourceRegion: string, targetRegion: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -90,7 +90,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.sourceRegion, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts index 1e8e487e6144..6535d0f90660 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/percentileTarget.ts @@ -29,7 +29,7 @@ export class PercentileTarget { /** * Retrieves the metrics determined by the given filter for the given account target region. This * url is only for PBS and Replication Latency data - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -41,7 +41,7 @@ export class PercentileTarget { */ listMetrics(resourceGroupName: string, accountName: string, targetRegion: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -52,7 +52,7 @@ export class PercentileTarget { */ listMetrics(resourceGroupName: string, accountName: string, targetRegion: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces * between words and each word capitalized. @@ -83,7 +83,7 @@ const listMetricsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.targetRegion diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts index e62a1c6d56f2..89392e52ce95 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts @@ -171,12 +171,12 @@ const listByDatabaseAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections", urlParameters: [ - Parameters.subscriptionId1, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -196,13 +196,13 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ - Parameters.subscriptionId1, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -222,13 +222,13 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ - Parameters.subscriptionId1, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -256,13 +256,13 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ - Parameters.subscriptionId1, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts index 83732e2917a3..76a931a235fa 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateLinkResources.ts @@ -28,20 +28,20 @@ export class PrivateLinkResources { /** * Gets the private link resources that need to be created for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listByDatabaseAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listByDatabaseAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -60,7 +60,7 @@ export class PrivateLinkResources { /** * Gets the private link resources that need to be created for a Cosmos DB account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param groupName The name of the private link resource. * @param [options] The optional parameters @@ -68,14 +68,14 @@ export class PrivateLinkResources { */ get(resourceGroupName: string, accountName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param groupName The name of the private link resource. * @param callback The callback */ get(resourceGroupName: string, accountName: string, groupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param groupName The name of the private link resource. * @param options The optional parameters @@ -101,12 +101,12 @@ const listByDatabaseAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -126,13 +126,13 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.groupName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index 95ef701f8ed4..6f9978440405 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -29,20 +29,20 @@ export class SqlResources { /** * Lists the SQL databases under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listSqlDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listSqlDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -61,7 +61,7 @@ export class SqlResources { /** * Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -69,14 +69,14 @@ export class SqlResources { */ getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -97,7 +97,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateSqlDatabaseParameters The parameters to provide for the current SQL database. @@ -111,7 +111,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -125,7 +125,7 @@ export class SqlResources { /** * Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account * with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -133,14 +133,14 @@ export class SqlResources { */ getSqlDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ getSqlDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -161,7 +161,7 @@ export class SqlResources { /** * Update RUs per second of an Azure Cosmos DB SQL database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The parameters to provide for the RUs per second of the @@ -176,7 +176,7 @@ export class SqlResources { /** * Lists the SQL container under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -184,14 +184,14 @@ export class SqlResources { */ listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param callback The callback */ listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The optional parameters @@ -212,7 +212,7 @@ export class SqlResources { /** * Gets the SQL container under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -221,7 +221,7 @@ export class SqlResources { */ getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -229,7 +229,7 @@ export class SqlResources { */ getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -252,7 +252,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL container - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -268,7 +268,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL container. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -282,7 +282,7 @@ export class SqlResources { /** * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -291,7 +291,7 @@ export class SqlResources { */ getSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -299,7 +299,7 @@ export class SqlResources { */ getSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -322,7 +322,7 @@ export class SqlResources { /** * Update RUs per second of an Azure Cosmos DB SQL container - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -338,7 +338,7 @@ export class SqlResources { /** * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -347,7 +347,7 @@ export class SqlResources { */ listSqlStoredProcedures(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -355,7 +355,7 @@ export class SqlResources { */ listSqlStoredProcedures(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -378,7 +378,7 @@ export class SqlResources { /** * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -388,7 +388,7 @@ export class SqlResources { */ getSqlStoredProcedure(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, storedProcedureName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -397,7 +397,7 @@ export class SqlResources { */ getSqlStoredProcedure(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, storedProcedureName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -422,7 +422,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL storedProcedure - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -439,7 +439,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL storedProcedure. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -454,7 +454,7 @@ export class SqlResources { /** * Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -463,7 +463,7 @@ export class SqlResources { */ listSqlUserDefinedFunctions(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -471,7 +471,7 @@ export class SqlResources { */ listSqlUserDefinedFunctions(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -494,7 +494,7 @@ export class SqlResources { /** * Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -504,7 +504,7 @@ export class SqlResources { */ getSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -513,7 +513,7 @@ export class SqlResources { */ getSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -538,7 +538,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL userDefinedFunction - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -555,7 +555,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -570,7 +570,7 @@ export class SqlResources { /** * Lists the SQL trigger under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -579,7 +579,7 @@ export class SqlResources { */ listSqlTriggers(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -587,7 +587,7 @@ export class SqlResources { */ listSqlTriggers(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -610,7 +610,7 @@ export class SqlResources { /** * Gets the SQL trigger under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -620,7 +620,7 @@ export class SqlResources { */ getSqlTrigger(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -629,7 +629,7 @@ export class SqlResources { */ getSqlTrigger(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -654,7 +654,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL trigger - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -670,7 +670,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL trigger. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -685,7 +685,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateSqlDatabaseParameters The parameters to provide for the current SQL database. @@ -707,7 +707,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL database. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param [options] The optional parameters @@ -727,7 +727,7 @@ export class SqlResources { /** * Update RUs per second of an Azure Cosmos DB SQL database - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param updateThroughputParameters The parameters to provide for the RUs per second of the @@ -750,7 +750,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL container - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -775,7 +775,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL container. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -797,7 +797,7 @@ export class SqlResources { /** * Update RUs per second of an Azure Cosmos DB SQL container - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -822,7 +822,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL storedProcedure - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -849,7 +849,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL storedProcedure. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -873,7 +873,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL userDefinedFunction - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -900,7 +900,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -924,7 +924,7 @@ export class SqlResources { /** * Create or update an Azure Cosmos DB SQL trigger - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -950,7 +950,7 @@ export class SqlResources { /** * Deletes an existing Azure Cosmos DB SQL trigger. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. @@ -979,7 +979,7 @@ const listSqlDatabasesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -1004,7 +1004,7 @@ const getSqlDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1030,7 +1030,7 @@ const getSqlDatabaseThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1056,7 +1056,7 @@ const listSqlContainersOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1082,7 +1082,7 @@ const getSqlContainerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1109,7 +1109,7 @@ const getSqlContainerThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1136,7 +1136,7 @@ const listSqlStoredProceduresOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1163,7 +1163,7 @@ const getSqlStoredProcedureOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1191,7 +1191,7 @@ const listSqlUserDefinedFunctionsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1218,7 +1218,7 @@ const getSqlUserDefinedFunctionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1246,7 +1246,7 @@ const listSqlTriggersOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1273,7 +1273,7 @@ const getSqlTriggerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1301,7 +1301,7 @@ const beginCreateUpdateSqlDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1335,7 +1335,7 @@ const beginDeleteSqlDatabaseOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1360,7 +1360,7 @@ const beginUpdateSqlDatabaseThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName @@ -1394,7 +1394,7 @@ const beginCreateUpdateSqlContainerOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1429,7 +1429,7 @@ const beginDeleteSqlContainerOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1455,7 +1455,7 @@ const beginUpdateSqlContainerThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1490,7 +1490,7 @@ const beginCreateUpdateSqlStoredProcedureOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1526,7 +1526,7 @@ const beginDeleteSqlStoredProcedureOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1553,7 +1553,7 @@ const beginCreateUpdateSqlUserDefinedFunctionOperationSpec: msRest.OperationSpec httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1589,7 +1589,7 @@ const beginDeleteSqlUserDefinedFunctionOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1616,7 +1616,7 @@ const beginCreateUpdateSqlTriggerOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, @@ -1652,7 +1652,7 @@ const beginDeleteSqlTriggerOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts index 1896837847a6..a23fc4eb04ac 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts @@ -29,20 +29,20 @@ export class TableResources { /** * Lists the Tables under an existing Azure Cosmos DB database account. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters * @returns Promise */ listTables(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param callback The callback */ listTables(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param options The optional parameters * @param callback The callback @@ -61,7 +61,7 @@ export class TableResources { /** * Gets the Tables under an existing Azure Cosmos DB database account with the provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param [options] The optional parameters @@ -69,14 +69,14 @@ export class TableResources { */ getTable(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param callback The callback */ getTable(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param options The optional parameters @@ -97,7 +97,7 @@ export class TableResources { /** * Create or update an Azure Cosmos DB Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param createUpdateTableParameters The parameters to provide for the current Table. @@ -111,7 +111,7 @@ export class TableResources { /** * Deletes an existing Azure Cosmos DB Table. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param [options] The optional parameters @@ -125,7 +125,7 @@ export class TableResources { /** * Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the * provided name. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param [options] The optional parameters @@ -133,14 +133,14 @@ export class TableResources { */ getTableThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param callback The callback */ getTableThroughput(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param options The optional parameters @@ -161,7 +161,7 @@ export class TableResources { /** * Update RUs per second of an Azure Cosmos DB Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param updateThroughputParameters The parameters to provide for the RUs per second of the @@ -176,7 +176,7 @@ export class TableResources { /** * Create or update an Azure Cosmos DB Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param createUpdateTableParameters The parameters to provide for the current Table. @@ -198,7 +198,7 @@ export class TableResources { /** * Deletes an existing Azure Cosmos DB Table. - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param [options] The optional parameters @@ -218,7 +218,7 @@ export class TableResources { /** * Update RUs per second of an Azure Cosmos DB Table - * @param resourceGroupName Name of an Azure resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param tableName Cosmos DB table name. * @param updateThroughputParameters The parameters to provide for the RUs per second of the @@ -246,7 +246,7 @@ const listTablesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], @@ -271,7 +271,7 @@ const getTableOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.tableName @@ -297,7 +297,7 @@ const getTableThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.tableName @@ -323,7 +323,7 @@ const beginCreateUpdateTableOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.tableName @@ -357,7 +357,7 @@ const beginDeleteTableOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.tableName @@ -382,7 +382,7 @@ const beginUpdateTableThroughputOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", urlParameters: [ - Parameters.subscriptionId0, + Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.tableName diff --git a/sdk/cosmosdb/ci.yml b/sdk/cosmosdb/ci.yml index c1f03b21ab31..15231b8de89d 100644 --- a/sdk/cosmosdb/ci.yml +++ b/sdk/cosmosdb/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,13 +22,13 @@ pr: include: - sdk/cosmosdb/ -stages: - - template: ../../eng/pipelines/templates/stages/cosmos-sdk-client.yml #NOTE: Non-standard template. - parameters: - ServiceDirectory: cosmosdb - # Disable unit tests because they are no-op. Integration tests from the - # cosmos-specific template handle this testing. - RunUnitTests: false - Artifacts: - - name: azure-cosmos - safeName: azurecosmos +extends: + template: ../../eng/pipelines/templates/stages/cosmos-sdk-client.yml #NOTE: Non-standard template. + parameters: + ServiceDirectory: cosmosdb + # Disable unit tests because they are no-op. Integration tests from the + # cosmos-specific template handle this testing. + RunUnitTests: false + Artifacts: + - name: azure-cosmos + safeName: azurecosmos diff --git a/sdk/cosmosdb/cosmos/CHANGELOG.md b/sdk/cosmosdb/cosmos/CHANGELOG.md index bcce9432ff49..b2770ed834e1 100644 --- a/sdk/cosmosdb/cosmos/CHANGELOG.md +++ b/sdk/cosmosdb/cosmos/CHANGELOG.md @@ -1,8 +1,21 @@ # Release History -## 3.7.0 (Unreleased) +## 3.7.3 (Unreleased) + + +## 3.7.2 (Unreleased) + +- BUGFIX: Internal abort signal incorrectly triggered when user passes a custom abort signal. See #9510 for details. + +## 3.7.1 (2020-6-12) + +- BUGFIX: Typo in globalCrypto.js causing errors in IE browser +- BUGFIX: Resource tokens not matching for item delete operations (#9110) + +## 3.7.0 (2020-6-08) - BUGFIX: Support crypto functions in Internet Explorer browser +- BUGFIX: Incorrect key casing in object returned by `setAuthorizationHeader` - FEATURE: Adds `readOffer` methods to container and database - FEATURE: Allows string value `partitionKey` parameter when creating containers @@ -177,7 +190,7 @@ Fixes broken session tokens in the browser. Cosmos uses file system friendly bas - User cancelable requests - Update to the latest Cosmos REST API version where [all containers have unlimited scale](https://docs.microsoft.com/en-us/azure/cosmos-db/migrate-containers-partitioned-to-nonpartitioned) - Make it easier to use Cosmos from the browser -- Better align with the new [Azure JS SDK guidlines](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html) +- Better align with the new [Azure JS SDK guidlines](https://azure.github.io/azure-sdk/typescript_introduction.html) ### Migration Guide for Breaking Changes @@ -193,14 +206,14 @@ Constructor options have been simplified: const client = new CosmosClient({ endpoint: "https://your-database.cosmos.azure.com", auth: { - masterKey: "your-primary-key" - } + masterKey: "your-primary-key", + }, }); // v3 const client = new CosmosClient({ endpoint: "https://your-database.cosmos.azure.com", - key: "your-primary-key" + key: "your-primary-key", }); ``` diff --git a/sdk/cosmosdb/cosmos/package.json b/sdk/cosmosdb/cosmos/package.json index bc307608fe16..559bb710b4d1 100644 --- a/sdk/cosmosdb/cosmos/package.json +++ b/sdk/cosmosdb/cosmos/package.json @@ -1,6 +1,6 @@ { "name": "@azure/cosmos", - "version": "3.7.0", + "version": "3.7.3", "description": "Microsoft Azure Cosmos DB Service Node.js SDK for SQL API", "sdk-type": "client", "keywords": [ @@ -60,7 +60,7 @@ "extract-api": "npm run build:src && api-extractor run --local", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "echo skipped", - "integration-test:node": "mocha -r test/mocha.env.ts -r ts-node/register -r esm -r dotenv/config -r ./test/common/setup.ts \"./test/**/*.spec.ts\" --timeout 100000 --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "mocha -r test/mocha.env.ts -r ts-node/register -r esm -r dotenv/config -r ./test/common/setup.ts \"./test/**/*.spec.ts\" --timeout 100000", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json tsconfig.json src test samples --ext .ts --fix", "lint": "eslint package.json tsconfig.json src test samples --ext .ts -f html -o cosmos-lintReport.html || exit 0", @@ -89,8 +89,8 @@ "os-name": "^3.1.0", "priorityqueuejs": "^1.0.0", "semaphore": "^1.0.5", - "tslib": "^1.10.0", - "uuid": "^3.3.2" + "tslib": "^2.0.0", + "uuid": "^8.1.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^2.0.1", @@ -103,14 +103,14 @@ "@types/node-fetch": "^2.5.0", "@types/priorityqueuejs": "^1.0.1", "@types/semaphore": "^1.1.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@types/tunnel": "^0.0.1", "@types/underscore": "^1.8.8", - "@types/uuid": "^3.4.3", + "@types/uuid": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/eslint-plugin-tslint": "^2.8.0", "@typescript-eslint/parser": "^2.0.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "eslint": "^6.1.0", @@ -128,13 +128,13 @@ "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-local-resolve": "^1.0.7", - "sinon": "^7.1.0", + "sinon": "^9.0.2", "snap-shot-it": "^7.9.1", "source-map-support": "^0.5.9", "ts-node": "^8.3.0", "tslint": "^5.0.0", "tslint-config-prettier": "^1.14.0", "typedoc": "^0.15.0", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/cosmosdb/cosmos/samples/BulkUpdateWithSproc.ts b/sdk/cosmosdb/cosmos/samples/BulkUpdateWithSproc.ts index 39d9c8fb0016..42cb6d30075d 100644 --- a/sdk/cosmosdb/cosmos/samples/BulkUpdateWithSproc.ts +++ b/sdk/cosmosdb/cosmos/samples/BulkUpdateWithSproc.ts @@ -3,7 +3,7 @@ import { logSampleHeader, handleError, finish, logStep } from "./Shared/handleError"; import { CosmosClient } from "../dist"; import { endpoint, key, database as databaseId, container as containerId } from "./Shared/config"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; logSampleHeader("Bulk Update Using Stored Procedures"); // Only to make TypeScript happy diff --git a/sdk/cosmosdb/cosmos/src/ClientContext.ts b/sdk/cosmosdb/cosmos/src/ClientContext.ts index f9319200abfc..bdeae68f4632 100644 --- a/sdk/cosmosdb/cosmos/src/ClientContext.ts +++ b/sdk/cosmosdb/cosmos/src/ClientContext.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { PartitionKeyRange } from "./client/Container/PartitionKeyRange"; import { Resource } from "./client/Resource"; import { Constants, HTTPMethod, OperationType, ResourceType } from "./common/constants"; diff --git a/sdk/cosmosdb/cosmos/src/auth.ts b/sdk/cosmosdb/cosmos/src/auth.ts index 1a703f7ba9c6..8f6cf1ffa710 100644 --- a/sdk/cosmosdb/cosmos/src/auth.ts +++ b/sdk/cosmosdb/cosmos/src/auth.ts @@ -1,7 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { generateHeaders } from "./utils/headers"; -import { Constants, getResourceIdFromPath, HTTPMethod, ResourceType } from "./common"; +import { + Constants, + getResourceIdFromPath, + HTTPMethod, + ResourceType, + trimSlashFromLeftAndRight +} from "./common"; import { CosmosClientOptions } from "./CosmosClientOptions"; import { CosmosHeaders } from "./queryExecutionContext"; @@ -93,7 +99,7 @@ export async function setAuthorizationTokenHeaderUsingMasterKey( * @param resourceId */ // TODO: Resource tokens -function getAuthorizationTokenUsingResourceTokens( +export function getAuthorizationTokenUsingResourceTokens( resourceTokens: { [resourceId: string]: string }, path: string, resourceId: string @@ -106,22 +112,36 @@ function getAuthorizationTokenUsingResourceTokens( return resourceTokens[Object.keys(resourceTokens)[0]]; } + // If we have exact resource token for the path use it if (resourceId && resourceTokens[resourceId]) { return resourceTokens[resourceId]; } // minimum valid path /dbs if (!path || path.length < 4) { + // TODO: This should throw an error return null; } - // remove '/' from left and right of path - path = path[0] === "/" ? path.substring(1) : path; - path = path[path.length - 1] === "/" ? path.substring(0, path.length - 1) : path; - + path = trimSlashFromLeftAndRight(path); const pathSegments = (path && path.split("/")) || []; - // if it's an incomplete path like /dbs/db1/colls/, start from the paretn resource + // Item path + if (pathSegments.length === 6) { + // Look for a container token matching the item path + const containerPath = pathSegments + .slice(0, 4) + .map(decodeURIComponent) + .join("/"); + if (resourceTokens[containerPath]) { + return resourceTokens[containerPath]; + } + } + + // TODO remove in v4: This is legacy behavior that lets someone use a resource token pointing ONLY at an ID + // It was used when _rid was exposed by the SDK, but now that we are using user provided ids it is not needed + // However removing it now would be a breaking change + // if it's an incomplete path like /dbs/db1/colls/, start from the parent resource let index = pathSegments.length % 2 === 0 ? pathSegments.length - 1 : pathSegments.length - 2; for (; index > 0; index -= 2) { const id = decodeURI(pathSegments[index]); @@ -130,5 +150,7 @@ function getAuthorizationTokenUsingResourceTokens( } } } + + // TODO: This should throw an error return null; } diff --git a/sdk/cosmosdb/cosmos/src/client/Container/Containers.ts b/sdk/cosmosdb/cosmos/src/client/Container/Containers.ts index 1198178c91a6..927627c60f83 100644 --- a/sdk/cosmosdb/cosmos/src/client/Container/Containers.ts +++ b/sdk/cosmosdb/cosmos/src/client/Container/Containers.ts @@ -134,7 +134,7 @@ export class Containers { }; } - const response = await this.clientContext.create({ + const response = await this.clientContext.create({ body, path, resourceType: ResourceType.container, @@ -172,8 +172,8 @@ export class Containers { throw new Error("body parameter must be an object with an id property"); } /* - 1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster) - 2. If it fails with NotFound error, attempt to create the db. Else, return the read results. + 1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster) + 2. If it fails with NotFound error, attempt to create the container. Else, return the read results. */ try { const readResponse = await this.database.container(body.id).read(options); diff --git a/sdk/cosmosdb/cosmos/src/client/Item/Item.ts b/sdk/cosmosdb/cosmos/src/client/Item/Item.ts index 594dda8db65c..1420531befb4 100644 --- a/sdk/cosmosdb/cosmos/src/client/Item/Item.ts +++ b/sdk/cosmosdb/cosmos/src/client/Item/Item.ts @@ -7,7 +7,7 @@ import { getPathFromLink, isResourceValid, ResourceType, - StatusCodes + StatusCodes, } from "../../common"; import { PartitionKey } from "../../documents"; import { extractPartitionKey, undefinedPartitionKey } from "../../extractPartitionKey"; @@ -56,8 +56,7 @@ export class Item { * * There is no set schema for JSON items. They may contain any number of custom properties. * - * @param options Additional options for the request, such as the partition key. - * Note, if you provide a partition key on the options object, it will override the primary key on `this.partitionKey`. + * @param options Additional options for the request * * @example Using custom type for response * ```typescript @@ -76,7 +75,7 @@ export class Item { ): Promise> { if (this.partitionKey === undefined) { const { - resource: partitionKeyDefinition + resource: partitionKeyDefinition, } = await this.container.readPartitionKeyDefinition(); this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); } @@ -89,7 +88,7 @@ export class Item { resourceType: ResourceType.item, resourceId: id, options, - partitionKey: this.partitionKey + partitionKey: this.partitionKey, }); } catch (error) { if (error.code !== StatusCodes.NotFound) { @@ -113,7 +112,7 @@ export class Item { * There is no set schema for JSON items. They may contain any number of custom properties. * * @param body The definition to replace the existing {@link Item}'s definition with. - * @param options Additional options for the request, such as the partition key. + * @param options Additional options for the request */ public replace( body: ItemDefinition, @@ -128,7 +127,7 @@ export class Item { * There is no set schema for JSON items. They may contain any number of custom properties. * * @param body The definition to replace the existing {@link Item}'s definition with. - * @param options Additional options for the request, such as the partition key. + * @param options Additional options for the request */ public replace( body: T, @@ -140,7 +139,7 @@ export class Item { ): Promise> { if (this.partitionKey === undefined) { const { - resource: partitionKeyDefinition + resource: partitionKeyDefinition, } = await this.container.readPartitionKeyDefinition(); this.partitionKey = extractPartitionKey(body, partitionKeyDefinition); } @@ -159,7 +158,7 @@ export class Item { resourceType: ResourceType.item, resourceId: id, options, - partitionKey: this.partitionKey + partitionKey: this.partitionKey, }); return new ItemResponse( response.result, @@ -176,14 +175,14 @@ export class Item { * Any provided type, T, is not necessarily enforced by the SDK. * You may get more or less properties and it's up to your logic to enforce it. * - * @param options Additional options for the request, such as the partition key. + * @param options Additional options for the request */ public async delete( options: RequestOptions = {} ): Promise> { if (this.partitionKey === undefined) { const { - resource: partitionKeyDefinition + resource: partitionKeyDefinition, } = await this.container.readPartitionKeyDefinition(); this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); } @@ -196,7 +195,7 @@ export class Item { resourceType: ResourceType.item, resourceId: id, options, - partitionKey: this.partitionKey + partitionKey: this.partitionKey, }); return new ItemResponse( response.result, diff --git a/sdk/cosmosdb/cosmos/src/client/Item/Items.ts b/sdk/cosmosdb/cosmos/src/client/Item/Items.ts index 3f27a748edae..161ba2cddaf0 100644 --- a/sdk/cosmosdb/cosmos/src/client/Item/Items.ts +++ b/sdk/cosmosdb/cosmos/src/client/Item/Items.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { ChangeFeedIterator } from "../../ChangeFeedIterator"; import { ChangeFeedOptions } from "../../ChangeFeedOptions"; import { ClientContext } from "../../ClientContext"; diff --git a/sdk/cosmosdb/cosmos/src/request/RequestHandler.ts b/sdk/cosmosdb/cosmos/src/request/RequestHandler.ts index 29c6b9008526..de980b12e446 100644 --- a/sdk/cosmosdb/cosmos/src/request/RequestHandler.ts +++ b/sdk/cosmosdb/cosmos/src/request/RequestHandler.ts @@ -32,7 +32,7 @@ async function httpRequest(requestContext: RequestContext) { // Wrap users passed abort events and call our own internal abort() const userSignal = requestContext.options && requestContext.options.abortSignal; if (userSignal) { - if (userSignal) { + if (userSignal.aborted) { controller.abort(); } else { userSignal.addEventListener("abort", () => { @@ -62,7 +62,7 @@ async function httpRequest(requestContext: RequestContext) { return parsedUrl.protocol === "http" ? defaultHttpAgent : defaultHttpsAgent; }, signal, - body: requestContext.body + body: requestContext.body, } as RequestInit); } catch (error) { if (error.name === "AbortError") { @@ -119,7 +119,7 @@ async function httpRequest(requestContext: RequestContext) { Object.defineProperty(errorResponse, "retryAfterInMilliseconds", { get: () => { return errorResponse.retryAfterInMs; - } + }, }); } @@ -129,7 +129,7 @@ async function httpRequest(requestContext: RequestContext) { headers, result, code: response.status, - substatus + substatus, }; } @@ -147,6 +147,6 @@ export async function request(requestContext: RequestContext): Promise new CosmosClient(`bad;Connection=string;`)); }); }); - describe("Validate user passed AbortController.signal", function() { - it("should throw exception if aborted during the request", async function() { + describe("Validate user passed AbortController.signal", function () { + it("should throw exception if aborted during the request", async function () { const client = new CosmosClient({ endpoint, key: masterKey }); try { const controller = new AbortController(); @@ -63,7 +63,7 @@ describe("NodeJS CRUD Tests", function() { assert.equal(err.name, "AbortError", "client should throw exception"); } }); - it("should throw exception if passed an already aborted signal", async function() { + it("should throw exception if passed an already aborted signal", async function () { const client = new CosmosClient({ endpoint, key: masterKey }); try { const controller = new AbortController(); @@ -75,13 +75,13 @@ describe("NodeJS CRUD Tests", function() { assert.equal(err.name, "AbortError", "client should throw exception"); } }); - it("should abort a query", async function() { + it("should abort a query", async function () { const container = await getTestContainer("abort query"); await bulkInsertItems(container, generateDocuments(20)); try { const controller = new AbortController(); const signal = controller.signal; - setTimeout(() => controller.abort(), 5000); + setTimeout(() => controller.abort(), 50); // Setting maxItemCount = 1 to ensure this query take a long time await container.items .query("SELECT * from c", { abortSignal: signal, maxItemCount: 1 }) @@ -91,5 +91,16 @@ describe("NodeJS CRUD Tests", function() { assert.equal(err.name, "AbortError", "client should throw exception"); } }); + it("should not abort if abort signal is never called", async function () { + // Testing the happy path to prevent this bug https://github.com/Azure/azure-sdk-for-js/issues/9510 + const client = new CosmosClient({ endpoint, key: masterKey }); + try { + const controller = new AbortController(); + const signal = controller.signal; + await client.getDatabaseAccount({ abortSignal: signal }); + } catch (err) { + assert.fail(err); + } + }); }); }); diff --git a/sdk/cosmosdb/cosmos/test/unit/auth.spec.ts b/sdk/cosmosdb/cosmos/test/unit/auth.spec.ts new file mode 100644 index 000000000000..217ee3a51c1e --- /dev/null +++ b/sdk/cosmosdb/cosmos/test/unit/auth.spec.ts @@ -0,0 +1,28 @@ +import { getAuthorizationTokenUsingResourceTokens } from "../../src/auth"; +import assert from "assert"; + +describe("NodeJS CRUD Tests", function() { + this.timeout(process.env.MOCHA_TIMEOUT || 10000); + + it("should find exact match", async function() { + const token = getAuthorizationTokenUsingResourceTokens( + { + foo: "bar" + }, + "foo", + "foo" + ); + assert.strictEqual(token, "bar"); + }); + + it("should only allow container tokens", async function() { + const token = getAuthorizationTokenUsingResourceTokens( + { + "dbs/ValidateAuthorization containe8734/colls/ValidateAuthorization containe5344": "token" + }, + "/dbs/ValidateAuthorization%20containe8734/colls/ValidateAuthorization%20containe5344/docs/coll1doc1", + "dbs/ValidateAuthorization containe8734/colls/ValidateAuthorization containe5344/docs/coll1doc1" + ); + assert.strictEqual(token, "token"); + }); +}); diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index b07e7a940cbb..c6772adaa277 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-datafactory", "author": "Microsoft Corporation", "description": "DataFactoryManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "7.1.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClientContext.ts b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClientContext.ts index 48bd8b27ddac..9379c3c3572c 100644 --- a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClientContext.ts +++ b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-datafactory"; -const packageVersion = "7.0.0"; +const packageVersion = "7.1.0"; export class DataFactoryManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/datafactory/arm-datafactory/src/models/dataFlowDebugSessionMappers.ts b/sdk/datafactory/arm-datafactory/src/models/dataFlowDebugSessionMappers.ts index 0d470f86b98c..b9ccb6592dde 100644 --- a/sdk/datafactory/arm-datafactory/src/models/dataFlowDebugSessionMappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/dataFlowDebugSessionMappers.ts @@ -120,6 +120,7 @@ export { EloquaObjectDataset, EntityReference, EnvironmentVariableSetup, + ExcelDataset, FileServerLinkedService, FileServerLocation, FileShareDataset, @@ -200,6 +201,7 @@ export { OracleTableDataset, OrcDataset, OrcFormat, + PackageStore, ParameterSpecification, ParquetDataset, ParquetFormat, @@ -245,8 +247,12 @@ export { ServiceNowObjectDataset, SftpLocation, SftpServerLinkedService, + SharePointOnlineListLinkedService, + SharePointOnlineListResourceDataset, ShopifyLinkedService, ShopifyObjectDataset, + SnowflakeDataset, + SnowflakeLinkedService, SparkLinkedService, SparkObjectDataset, SqlServerLinkedService, @@ -270,6 +276,7 @@ export { WebTableDataset, XeroLinkedService, XeroObjectDataset, + XmlDataset, ZohoLinkedService, ZohoObjectDataset } from "../models/mappers"; diff --git a/sdk/datafactory/arm-datafactory/src/models/dataFlowsMappers.ts b/sdk/datafactory/arm-datafactory/src/models/dataFlowsMappers.ts index 9d3716d531f6..c3dfbe1cfa58 100644 --- a/sdk/datafactory/arm-datafactory/src/models/dataFlowsMappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/dataFlowsMappers.ts @@ -98,6 +98,7 @@ export { AzureTableStorageLinkedService, BaseResource, BinaryDataset, + BinaryReadSettings, BinarySink, BinarySource, BlobEventsTrigger, @@ -115,6 +116,7 @@ export { CommonDataServiceForAppsSink, CommonDataServiceForAppsSource, ComponentSetup, + CompressionReadSettings, ConcurLinkedService, ConcurObjectDataset, ConcurSource, @@ -196,11 +198,14 @@ export { EloquaSource, EntityReference, EnvironmentVariableSetup, + ExcelDataset, + ExcelSource, ExecuteDataFlowActivity, ExecuteDataFlowActivityTypePropertiesCompute, ExecutePipelineActivity, ExecuteSSISPackageActivity, ExecutionActivity, + ExportSettings, Expression, Factory, FactoryGitHubConfiguration, @@ -222,6 +227,7 @@ export { FtpServerLinkedService, FtpServerLocation, GetMetadataActivity, + GlobalParameterSpecification, GoogleAdWordsLinkedService, GoogleAdWordsObjectDataset, GoogleAdWordsSource, @@ -263,6 +269,7 @@ export { ImpalaLinkedService, ImpalaObjectDataset, ImpalaSource, + ImportSettings, InformixLinkedService, InformixSink, InformixSource, @@ -282,6 +289,7 @@ export { JiraSource, JsonDataset, JsonFormat, + JsonReadSettings, JsonSink, JsonSource, JsonWriteSettings, @@ -345,6 +353,7 @@ export { OrcFormat, OrcSink, OrcSource, + PackageStore, ParameterSpecification, ParquetDataset, ParquetFormat, @@ -431,10 +440,19 @@ export { SftpReadSettings, SftpServerLinkedService, SftpWriteSettings, + SharePointOnlineListLinkedService, + SharePointOnlineListResourceDataset, + SharePointOnlineListSource, ShopifyLinkedService, ShopifyObjectDataset, ShopifySource, SkipErrorFile, + SnowflakeDataset, + SnowflakeExportCopyCommand, + SnowflakeImportCopyCommand, + SnowflakeLinkedService, + SnowflakeSink, + SnowflakeSource, SparkLinkedService, SparkObjectDataset, SparkSource, @@ -442,6 +460,7 @@ export { SqlDWSource, SqlMISink, SqlMISource, + SqlPartitionSettings, SqlServerLinkedService, SqlServerSink, SqlServerSource, @@ -504,6 +523,10 @@ export { XeroLinkedService, XeroObjectDataset, XeroSource, + XmlDataset, + XmlReadSettings, + XmlSource, + ZipDeflateReadSettings, ZohoLinkedService, ZohoObjectDataset, ZohoSource diff --git a/sdk/datafactory/arm-datafactory/src/models/datasetsMappers.ts b/sdk/datafactory/arm-datafactory/src/models/datasetsMappers.ts index 4fd2bf0b1967..dd56da18e57b 100644 --- a/sdk/datafactory/arm-datafactory/src/models/datasetsMappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/datasetsMappers.ts @@ -98,6 +98,7 @@ export { AzureTableStorageLinkedService, BaseResource, BinaryDataset, + BinaryReadSettings, BinarySink, BinarySource, BlobEventsTrigger, @@ -115,6 +116,7 @@ export { CommonDataServiceForAppsSink, CommonDataServiceForAppsSource, ComponentSetup, + CompressionReadSettings, ConcurLinkedService, ConcurObjectDataset, ConcurSource, @@ -196,11 +198,14 @@ export { EloquaSource, EntityReference, EnvironmentVariableSetup, + ExcelDataset, + ExcelSource, ExecuteDataFlowActivity, ExecuteDataFlowActivityTypePropertiesCompute, ExecutePipelineActivity, ExecuteSSISPackageActivity, ExecutionActivity, + ExportSettings, Expression, Factory, FactoryGitHubConfiguration, @@ -222,6 +227,7 @@ export { FtpServerLinkedService, FtpServerLocation, GetMetadataActivity, + GlobalParameterSpecification, GoogleAdWordsLinkedService, GoogleAdWordsObjectDataset, GoogleAdWordsSource, @@ -263,6 +269,7 @@ export { ImpalaLinkedService, ImpalaObjectDataset, ImpalaSource, + ImportSettings, InformixLinkedService, InformixSink, InformixSource, @@ -282,6 +289,7 @@ export { JiraSource, JsonDataset, JsonFormat, + JsonReadSettings, JsonSink, JsonSource, JsonWriteSettings, @@ -345,6 +353,7 @@ export { OrcFormat, OrcSink, OrcSource, + PackageStore, ParameterSpecification, ParquetDataset, ParquetFormat, @@ -431,10 +440,19 @@ export { SftpReadSettings, SftpServerLinkedService, SftpWriteSettings, + SharePointOnlineListLinkedService, + SharePointOnlineListResourceDataset, + SharePointOnlineListSource, ShopifyLinkedService, ShopifyObjectDataset, ShopifySource, SkipErrorFile, + SnowflakeDataset, + SnowflakeExportCopyCommand, + SnowflakeImportCopyCommand, + SnowflakeLinkedService, + SnowflakeSink, + SnowflakeSource, SparkLinkedService, SparkObjectDataset, SparkSource, @@ -442,6 +460,7 @@ export { SqlDWSource, SqlMISink, SqlMISource, + SqlPartitionSettings, SqlServerLinkedService, SqlServerSink, SqlServerSource, @@ -504,6 +523,10 @@ export { XeroLinkedService, XeroObjectDataset, XeroSource, + XmlDataset, + XmlReadSettings, + XmlSource, + ZipDeflateReadSettings, ZohoLinkedService, ZohoObjectDataset, ZohoSource diff --git a/sdk/datafactory/arm-datafactory/src/models/factoriesMappers.ts b/sdk/datafactory/arm-datafactory/src/models/factoriesMappers.ts index 1e2234e64d0a..2b005e64716a 100644 --- a/sdk/datafactory/arm-datafactory/src/models/factoriesMappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/factoriesMappers.ts @@ -99,6 +99,7 @@ export { AzureTableStorageLinkedService, BaseResource, BinaryDataset, + BinaryReadSettings, BinarySink, BinarySource, BlobEventsTrigger, @@ -116,6 +117,7 @@ export { CommonDataServiceForAppsSink, CommonDataServiceForAppsSource, ComponentSetup, + CompressionReadSettings, ConcurLinkedService, ConcurObjectDataset, ConcurSource, @@ -196,11 +198,14 @@ export { EloquaSource, EntityReference, EnvironmentVariableSetup, + ExcelDataset, + ExcelSource, ExecuteDataFlowActivity, ExecuteDataFlowActivityTypePropertiesCompute, ExecutePipelineActivity, ExecuteSSISPackageActivity, ExecutionActivity, + ExportSettings, Expression, Factory, FactoryGitHubConfiguration, @@ -227,6 +232,7 @@ export { GetMetadataActivity, GitHubAccessTokenRequest, GitHubAccessTokenResponse, + GlobalParameterSpecification, GoogleAdWordsLinkedService, GoogleAdWordsObjectDataset, GoogleAdWordsSource, @@ -268,6 +274,7 @@ export { ImpalaLinkedService, ImpalaObjectDataset, ImpalaSource, + ImportSettings, InformixLinkedService, InformixSink, InformixSource, @@ -287,6 +294,7 @@ export { JiraSource, JsonDataset, JsonFormat, + JsonReadSettings, JsonSink, JsonSource, JsonWriteSettings, @@ -350,6 +358,7 @@ export { OrcFormat, OrcSink, OrcSource, + PackageStore, ParameterSpecification, ParquetDataset, ParquetFormat, @@ -436,10 +445,19 @@ export { SftpReadSettings, SftpServerLinkedService, SftpWriteSettings, + SharePointOnlineListLinkedService, + SharePointOnlineListResourceDataset, + SharePointOnlineListSource, ShopifyLinkedService, ShopifyObjectDataset, ShopifySource, SkipErrorFile, + SnowflakeDataset, + SnowflakeExportCopyCommand, + SnowflakeImportCopyCommand, + SnowflakeLinkedService, + SnowflakeSink, + SnowflakeSource, SparkLinkedService, SparkObjectDataset, SparkSource, @@ -447,6 +465,7 @@ export { SqlDWSource, SqlMISink, SqlMISource, + SqlPartitionSettings, SqlServerLinkedService, SqlServerSink, SqlServerSource, @@ -510,6 +529,10 @@ export { XeroLinkedService, XeroObjectDataset, XeroSource, + XmlDataset, + XmlReadSettings, + XmlSource, + ZipDeflateReadSettings, ZohoLinkedService, ZohoObjectDataset, ZohoSource diff --git a/sdk/datafactory/arm-datafactory/src/models/index.ts b/sdk/datafactory/arm-datafactory/src/models/index.ts index 3cb4579316c5..6da41a2fbc6a 100644 --- a/sdk/datafactory/arm-datafactory/src/models/index.ts +++ b/sdk/datafactory/arm-datafactory/src/models/index.ts @@ -210,6 +210,21 @@ export interface FactoryRepoConfiguration { lastCommitId?: string; } +/** + * Definition of a single parameter for an entity. + */ +export interface GlobalParameterSpecification { + /** + * Global Parameter type. Possible values include: 'Object', 'String', 'Int', 'Float', 'Bool', + * 'Array' + */ + type: GlobalParameterType; + /** + * Value of parameter. + */ + value: any; +} + /** * Factory resource type. */ @@ -237,6 +252,10 @@ export interface Factory extends Resource { * Git repo information of the factory. */ repoConfiguration?: FactoryRepoConfigurationUnion; + /** + * List of parameters for factory. + */ + globalParameters?: { [propertyName: string]: GlobalParameterSpecification }; /** * Describes unknown properties. The value of an unknown property can be of "any" type. */ @@ -436,7 +455,7 @@ export interface ParameterSpecification { /** * Contains the possible cases for LinkedService. */ -export type LinkedServiceUnion = LinkedService | AzureFunctionLinkedService | AzureDataExplorerLinkedService | SapTableLinkedService | GoogleAdWordsLinkedService | OracleServiceCloudLinkedService | DynamicsAXLinkedService | ResponsysLinkedService | AzureDatabricksLinkedService | AzureDataLakeAnalyticsLinkedService | HDInsightOnDemandLinkedService | SalesforceMarketingCloudLinkedService | NetezzaLinkedService | VerticaLinkedService | ZohoLinkedService | XeroLinkedService | SquareLinkedService | SparkLinkedService | ShopifyLinkedService | ServiceNowLinkedService | QuickBooksLinkedService | PrestoLinkedService | PhoenixLinkedService | PaypalLinkedService | MarketoLinkedService | AzureMariaDBLinkedService | MariaDBLinkedService | MagentoLinkedService | JiraLinkedService | ImpalaLinkedService | HubspotLinkedService | HiveLinkedService | HBaseLinkedService | GreenplumLinkedService | GoogleBigQueryLinkedService | EloquaLinkedService | DrillLinkedService | CouchbaseLinkedService | ConcurLinkedService | AzurePostgreSqlLinkedService | AmazonMWSLinkedService | SapHanaLinkedService | SapBWLinkedService | SftpServerLinkedService | FtpServerLinkedService | HttpLinkedService | AzureSearchLinkedService | CustomDataSourceLinkedService | AmazonRedshiftLinkedService | AmazonS3LinkedService | RestServiceLinkedService | SapOpenHubLinkedService | SapEccLinkedService | SapCloudForCustomerLinkedService | SalesforceServiceCloudLinkedService | SalesforceLinkedService | Office365LinkedService | AzureBlobFSLinkedService | AzureDataLakeStoreLinkedService | CosmosDbMongoDbApiLinkedService | MongoDbV2LinkedService | MongoDbLinkedService | CassandraLinkedService | WebLinkedService | ODataLinkedService | HdfsLinkedService | MicrosoftAccessLinkedService | InformixLinkedService | OdbcLinkedService | AzureMLServiceLinkedService | AzureMLLinkedService | TeradataLinkedService | Db2LinkedService | SybaseLinkedService | PostgreSqlLinkedService | MySqlLinkedService | AzureMySqlLinkedService | OracleLinkedService | GoogleCloudStorageLinkedService | AzureFileStorageLinkedService | FileServerLinkedService | HDInsightLinkedService | CommonDataServiceForAppsLinkedService | DynamicsCrmLinkedService | DynamicsLinkedService | CosmosDbLinkedService | AzureKeyVaultLinkedService | AzureBatchLinkedService | AzureSqlMILinkedService | AzureSqlDatabaseLinkedService | SqlServerLinkedService | AzureSqlDWLinkedService | AzureTableStorageLinkedService | AzureBlobStorageLinkedService | AzureStorageLinkedService; +export type LinkedServiceUnion = LinkedService | SharePointOnlineListLinkedService | SnowflakeLinkedService | AzureFunctionLinkedService | AzureDataExplorerLinkedService | SapTableLinkedService | GoogleAdWordsLinkedService | OracleServiceCloudLinkedService | DynamicsAXLinkedService | ResponsysLinkedService | AzureDatabricksLinkedService | AzureDataLakeAnalyticsLinkedService | HDInsightOnDemandLinkedService | SalesforceMarketingCloudLinkedService | NetezzaLinkedService | VerticaLinkedService | ZohoLinkedService | XeroLinkedService | SquareLinkedService | SparkLinkedService | ShopifyLinkedService | ServiceNowLinkedService | QuickBooksLinkedService | PrestoLinkedService | PhoenixLinkedService | PaypalLinkedService | MarketoLinkedService | AzureMariaDBLinkedService | MariaDBLinkedService | MagentoLinkedService | JiraLinkedService | ImpalaLinkedService | HubspotLinkedService | HiveLinkedService | HBaseLinkedService | GreenplumLinkedService | GoogleBigQueryLinkedService | EloquaLinkedService | DrillLinkedService | CouchbaseLinkedService | ConcurLinkedService | AzurePostgreSqlLinkedService | AmazonMWSLinkedService | SapHanaLinkedService | SapBWLinkedService | SftpServerLinkedService | FtpServerLinkedService | HttpLinkedService | AzureSearchLinkedService | CustomDataSourceLinkedService | AmazonRedshiftLinkedService | AmazonS3LinkedService | RestServiceLinkedService | SapOpenHubLinkedService | SapEccLinkedService | SapCloudForCustomerLinkedService | SalesforceServiceCloudLinkedService | SalesforceLinkedService | Office365LinkedService | AzureBlobFSLinkedService | AzureDataLakeStoreLinkedService | CosmosDbMongoDbApiLinkedService | MongoDbV2LinkedService | MongoDbLinkedService | CassandraLinkedService | WebLinkedService | ODataLinkedService | HdfsLinkedService | MicrosoftAccessLinkedService | InformixLinkedService | OdbcLinkedService | AzureMLServiceLinkedService | AzureMLLinkedService | TeradataLinkedService | Db2LinkedService | SybaseLinkedService | PostgreSqlLinkedService | MySqlLinkedService | AzureMySqlLinkedService | OracleLinkedService | GoogleCloudStorageLinkedService | AzureFileStorageLinkedService | FileServerLinkedService | HDInsightLinkedService | CommonDataServiceForAppsLinkedService | DynamicsCrmLinkedService | DynamicsLinkedService | CosmosDbLinkedService | AzureKeyVaultLinkedService | AzureBatchLinkedService | AzureSqlMILinkedService | AzureSqlDatabaseLinkedService | SqlServerLinkedService | AzureSqlDWLinkedService | AzureTableStorageLinkedService | AzureBlobStorageLinkedService | AzureStorageLinkedService; /** * The Azure Data Factory nested object which contains the information and credential which can be @@ -492,7 +511,7 @@ export interface DatasetFolder { /** * Contains the possible cases for Dataset. */ -export type DatasetUnion = Dataset | GoogleAdWordsObjectDataset | AzureDataExplorerTableDataset | OracleServiceCloudObjectDataset | DynamicsAXResourceDataset | ResponsysObjectDataset | SalesforceMarketingCloudObjectDataset | VerticaTableDataset | NetezzaTableDataset | ZohoObjectDataset | XeroObjectDataset | SquareObjectDataset | SparkObjectDataset | ShopifyObjectDataset | ServiceNowObjectDataset | QuickBooksObjectDataset | PrestoObjectDataset | PhoenixObjectDataset | PaypalObjectDataset | MarketoObjectDataset | AzureMariaDBTableDataset | MariaDBTableDataset | MagentoObjectDataset | JiraObjectDataset | ImpalaObjectDataset | HubspotObjectDataset | HiveObjectDataset | HBaseObjectDataset | GreenplumTableDataset | GoogleBigQueryObjectDataset | EloquaObjectDataset | DrillTableDataset | CouchbaseTableDataset | ConcurObjectDataset | AzurePostgreSqlTableDataset | AmazonMWSObjectDataset | HttpDataset | AzureSearchIndexDataset | WebTableDataset | SapTableResourceDataset | RestResourceDataset | SqlServerTableDataset | SapOpenHubTableDataset | SapHanaTableDataset | SapEccResourceDataset | SapCloudForCustomerResourceDataset | SapBwCubeDataset | SybaseTableDataset | SalesforceServiceCloudObjectDataset | SalesforceObjectDataset | MicrosoftAccessTableDataset | PostgreSqlTableDataset | MySqlTableDataset | OdbcTableDataset | InformixTableDataset | RelationalTableDataset | Db2TableDataset | AmazonRedshiftTableDataset | AzureMySqlTableDataset | TeradataTableDataset | OracleTableDataset | ODataResourceDataset | CosmosDbMongoDbApiCollectionDataset | MongoDbV2CollectionDataset | MongoDbCollectionDataset | FileShareDataset | Office365Dataset | AzureBlobFSDataset | AzureDataLakeStoreDataset | CommonDataServiceForAppsEntityDataset | DynamicsCrmEntityDataset | DynamicsEntityDataset | DocumentDbCollectionDataset | CosmosDbSqlApiCollectionDataset | CustomDataset | CassandraTableDataset | AzureSqlDWTableDataset | AzureSqlMITableDataset | AzureSqlTableDataset | AzureTableDataset | AzureBlobDataset | BinaryDataset | OrcDataset | JsonDataset | DelimitedTextDataset | ParquetDataset | AvroDataset | AmazonS3Dataset; +export type DatasetUnion = Dataset | SharePointOnlineListResourceDataset | SnowflakeDataset | GoogleAdWordsObjectDataset | AzureDataExplorerTableDataset | OracleServiceCloudObjectDataset | DynamicsAXResourceDataset | ResponsysObjectDataset | SalesforceMarketingCloudObjectDataset | VerticaTableDataset | NetezzaTableDataset | ZohoObjectDataset | XeroObjectDataset | SquareObjectDataset | SparkObjectDataset | ShopifyObjectDataset | ServiceNowObjectDataset | QuickBooksObjectDataset | PrestoObjectDataset | PhoenixObjectDataset | PaypalObjectDataset | MarketoObjectDataset | AzureMariaDBTableDataset | MariaDBTableDataset | MagentoObjectDataset | JiraObjectDataset | ImpalaObjectDataset | HubspotObjectDataset | HiveObjectDataset | HBaseObjectDataset | GreenplumTableDataset | GoogleBigQueryObjectDataset | EloquaObjectDataset | DrillTableDataset | CouchbaseTableDataset | ConcurObjectDataset | AzurePostgreSqlTableDataset | AmazonMWSObjectDataset | HttpDataset | AzureSearchIndexDataset | WebTableDataset | SapTableResourceDataset | RestResourceDataset | SqlServerTableDataset | SapOpenHubTableDataset | SapHanaTableDataset | SapEccResourceDataset | SapCloudForCustomerResourceDataset | SapBwCubeDataset | SybaseTableDataset | SalesforceServiceCloudObjectDataset | SalesforceObjectDataset | MicrosoftAccessTableDataset | PostgreSqlTableDataset | MySqlTableDataset | OdbcTableDataset | InformixTableDataset | RelationalTableDataset | Db2TableDataset | AmazonRedshiftTableDataset | AzureMySqlTableDataset | TeradataTableDataset | OracleTableDataset | ODataResourceDataset | CosmosDbMongoDbApiCollectionDataset | MongoDbV2CollectionDataset | MongoDbCollectionDataset | FileShareDataset | Office365Dataset | AzureBlobFSDataset | AzureDataLakeStoreDataset | CommonDataServiceForAppsEntityDataset | DynamicsCrmEntityDataset | DynamicsEntityDataset | DocumentDbCollectionDataset | CosmosDbSqlApiCollectionDataset | CustomDataset | CassandraTableDataset | AzureSqlDWTableDataset | AzureSqlMITableDataset | AzureSqlTableDataset | AzureTableDataset | AzureBlobDataset | BinaryDataset | OrcDataset | XmlDataset | JsonDataset | DelimitedTextDataset | ParquetDataset | ExcelDataset | AvroDataset | AmazonS3Dataset; /** * The Azure Data Factory nested object which identifies data within different data stores, such as @@ -1935,6 +1954,14 @@ export interface DataFlowSink extends Transformation { * Dataset reference. */ dataset?: DatasetReference; + /** + * Linked service reference. + */ + linkedService?: LinkedServiceReference; + /** + * Schema linked service reference. + */ + schemaLinkedService?: LinkedServiceReference; } /** @@ -1945,6 +1972,14 @@ export interface DataFlowSource extends Transformation { * Dataset reference. */ dataset?: DatasetReference; + /** + * Linked service reference. + */ + linkedService?: LinkedServiceReference; + /** + * Schema linked service reference. + */ + schemaLinkedService?: LinkedServiceReference; } /** @@ -1986,6 +2021,98 @@ export interface MappingDataFlow { script?: string; } +/** + * SharePoint Online List linked service. + */ +export interface SharePointOnlineListLinkedService { + /** + * Polymorphic Discriminator + */ + type: "SharePointOnlineList"; + /** + * The integration runtime reference. + */ + connectVia?: IntegrationRuntimeReference; + /** + * Linked service description. + */ + description?: string; + /** + * Parameters for linked service. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the linked service. + */ + annotations?: any[]; + /** + * The URL of the SharePoint Online site. For example, + * https://contoso.sharepoint.com/sites/siteName. Type: string (or Expression with resultType + * string). + */ + siteUrl: any; + /** + * The tenant ID under which your application resides. You can find it from Azure portal Active + * Directory overview page. Type: string (or Expression with resultType string). + */ + tenantId: any; + /** + * The application (client) ID of your application registered in Azure Active Directory. Make + * sure to grant SharePoint site permission to this application. Type: string (or Expression with + * resultType string). + */ + servicePrincipalId: any; + /** + * The client secret of your application registered in Azure Active Directory. Type: string (or + * Expression with resultType string). + */ + servicePrincipalKey: SecretBaseUnion; + /** + * The encrypted credential used for authentication. Credentials are encrypted using the + * integration runtime credential manager. Type: string (or Expression with resultType string). + */ + encryptedCredential?: any; +} + +/** + * Snowflake linked service. + */ +export interface SnowflakeLinkedService { + /** + * Polymorphic Discriminator + */ + type: "Snowflake"; + /** + * The integration runtime reference. + */ + connectVia?: IntegrationRuntimeReference; + /** + * Linked service description. + */ + description?: string; + /** + * Parameters for linked service. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the linked service. + */ + annotations?: any[]; + /** + * The connection string of snowflake. Type: string, SecureString. + */ + connectionString: any; + /** + * The Azure key vault secret reference of password in connection string. + */ + password?: AzureKeyVaultSecretReference; + /** + * The encrypted credential used for authentication. Credentials are encrypted using the + * integration runtime credential manager. Type: string (or Expression with resultType string). + */ + encryptedCredential?: any; +} + /** * Azure Function linked service. */ @@ -4663,7 +4790,7 @@ export interface SapHanaLinkedService { /** * Host name of the SAP HANA server. Type: string (or Expression with resultType string). */ - server: any; + server?: any; /** * The authentication type to be used to connect to the SAP HANA server. Possible values include: * 'Basic', 'Windows' @@ -6759,7 +6886,7 @@ export interface AzureFileStorageLinkedService { /** * Host name of the server. Type: string (or Expression with resultType string). */ - host: any; + host?: any; /** * User ID to logon the server. Type: string (or Expression with resultType string). */ @@ -6768,6 +6895,29 @@ export interface AzureFileStorageLinkedService { * Password to logon the server. */ password?: SecretBaseUnion; + /** + * The connection string. It is mutually exclusive with sasUri property. Type: string, + * SecureString or AzureKeyVaultSecretReference. + */ + connectionString?: any; + /** + * The Azure key vault secret reference of accountKey in connection string. + */ + accountKey?: AzureKeyVaultSecretReference; + /** + * SAS URI of the Azure File resource. It is mutually exclusive with connectionString property. + * Type: string, SecureString or AzureKeyVaultSecretReference. + */ + sasUri?: any; + /** + * The Azure key vault secret reference of sasToken in sas uri. + */ + sasToken?: AzureKeyVaultSecretReference; + /** + * The azure file share name. It is required when auth with accountKey/sasToken. Type: string (or + * Expression with resultType string). + */ + fileShare?: any; /** * The encrypted credential used for authentication. Credentials are encrypted using the * integration runtime credential manager. Type: string (or Expression with resultType string). @@ -7657,6 +7807,99 @@ export interface AzureStorageLinkedService { encryptedCredential?: string; } +/** + * The sharepoint online list resource dataset. + */ +export interface SharePointOnlineListResourceDataset { + /** + * Polymorphic Discriminator + */ + type: "SharePointOnlineListResource"; + /** + * Dataset description. + */ + description?: string; + /** + * Columns that define the structure of the dataset. Type: array (or Expression with resultType + * array), itemType: DatasetDataElement. + */ + structure?: any; + /** + * Columns that define the physical type schema of the dataset. Type: array (or Expression with + * resultType array), itemType: DatasetSchemaDataElement. + */ + schema?: any; + /** + * Linked service reference. + */ + linkedServiceName: LinkedServiceReference; + /** + * Parameters for dataset. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the Dataset. + */ + annotations?: any[]; + /** + * The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + */ + folder?: DatasetFolder; + /** + * The name of the SharePoint Online list. Type: string (or Expression with resultType string). + */ + listName?: any; +} + +/** + * The snowflake dataset. + */ +export interface SnowflakeDataset { + /** + * Polymorphic Discriminator + */ + type: "SnowflakeTable"; + /** + * Dataset description. + */ + description?: string; + /** + * Columns that define the structure of the dataset. Type: array (or Expression with resultType + * array), itemType: DatasetDataElement. + */ + structure?: any; + /** + * Columns that define the physical type schema of the dataset. Type: array (or Expression with + * resultType array), itemType: DatasetSchemaDataElement. + */ + schema?: any; + /** + * Linked service reference. + */ + linkedServiceName: LinkedServiceReference; + /** + * Parameters for dataset. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the Dataset. + */ + annotations?: any[]; + /** + * The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + */ + folder?: DatasetFolder; + /** + * The schema name of the Snowflake database. Type: string (or Expression with resultType + * string). + */ + snowflakeDatasetSchema?: any; + /** + * The table name of the Snowflake database. Type: string (or Expression with resultType string). + */ + table?: any; +} + /** * Google AdWords service dataset. */ @@ -12121,13 +12364,13 @@ export interface OrcDataset { } /** - * Json dataset. + * Xml dataset. */ -export interface JsonDataset { +export interface XmlDataset { /** * Polymorphic Discriminator */ - type: "Json"; + type: "Xml"; /** * Dataset description. */ @@ -12170,6 +12413,10 @@ export interface JsonDataset { * resultType string). */ encodingName?: any; + /** + * The null value string. Type: string (or Expression with resultType string). + */ + nullValue?: any; /** * The data compression method used for the json dataset. */ @@ -12177,13 +12424,13 @@ export interface JsonDataset { } /** - * Delimited text dataset. + * Json dataset. */ -export interface DelimitedTextDataset { +export interface JsonDataset { /** * Polymorphic Discriminator */ - type: "DelimitedText"; + type: "Json"; /** * Dataset description. */ @@ -12215,35 +12462,91 @@ export interface DelimitedTextDataset { */ folder?: DatasetFolder; /** - * The location of the delimited text storage. + * The location of the json data storage. */ location: DatasetLocationUnion; /** - * The column delimiter. Type: string (or Expression with resultType string). + * The code page name of the preferred encoding. If not specified, the default value is UTF-8, + * unless BOM denotes another Unicode encoding. Refer to the name column of the table in the + * following link to set supported values: + * https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with + * resultType string). */ - columnDelimiter?: any; + encodingName?: any; /** - * The row delimiter. Type: string (or Expression with resultType string). + * The data compression method used for the json dataset. */ - rowDelimiter?: any; + compression?: DatasetCompressionUnion; +} + +/** + * Delimited text dataset. + */ +export interface DelimitedTextDataset { /** - * The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM - * denotes another Unicode encoding. Refer to the name column of the table in the following link - * to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: - * string (or Expression with resultType string). + * Polymorphic Discriminator */ - encodingName?: any; - compressionCodec?: any; + type: "DelimitedText"; /** - * The data compression method used for DelimitedText. + * Dataset description. */ - compressionLevel?: any; + description?: string; /** - * The quote character. Type: string (or Expression with resultType string). + * Columns that define the structure of the dataset. Type: array (or Expression with resultType + * array), itemType: DatasetDataElement. */ - quoteChar?: any; + structure?: any; /** - * The escape character. Type: string (or Expression with resultType string). + * Columns that define the physical type schema of the dataset. Type: array (or Expression with + * resultType array), itemType: DatasetSchemaDataElement. + */ + schema?: any; + /** + * Linked service reference. + */ + linkedServiceName: LinkedServiceReference; + /** + * Parameters for dataset. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the Dataset. + */ + annotations?: any[]; + /** + * The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + */ + folder?: DatasetFolder; + /** + * The location of the delimited text storage. + */ + location: DatasetLocationUnion; + /** + * The column delimiter. Type: string (or Expression with resultType string). + */ + columnDelimiter?: any; + /** + * The row delimiter. Type: string (or Expression with resultType string). + */ + rowDelimiter?: any; + /** + * The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM + * denotes another Unicode encoding. Refer to the name column of the table in the following link + * to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + * string (or Expression with resultType string). + */ + encodingName?: any; + compressionCodec?: any; + /** + * The data compression method used for DelimitedText. + */ + compressionLevel?: any; + /** + * The quote character. Type: string (or Expression with resultType string). + */ + quoteChar?: any; + /** + * The escape character. Type: string (or Expression with resultType string). */ escapeChar?: any; /** @@ -12303,6 +12606,72 @@ export interface ParquetDataset { compressionCodec?: any; } +/** + * Excel dataset. + */ +export interface ExcelDataset { + /** + * Polymorphic Discriminator + */ + type: "Excel"; + /** + * Dataset description. + */ + description?: string; + /** + * Columns that define the structure of the dataset. Type: array (or Expression with resultType + * array), itemType: DatasetDataElement. + */ + structure?: any; + /** + * Columns that define the physical type schema of the dataset. Type: array (or Expression with + * resultType array), itemType: DatasetSchemaDataElement. + */ + schema?: any; + /** + * Linked service reference. + */ + linkedServiceName: LinkedServiceReference; + /** + * Parameters for dataset. + */ + parameters?: { [propertyName: string]: ParameterSpecification }; + /** + * List of tags that can be used for describing the Dataset. + */ + annotations?: any[]; + /** + * The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + */ + folder?: DatasetFolder; + /** + * The location of the excel storage. + */ + location: DatasetLocationUnion; + /** + * The sheet of excel file. Type: string (or Expression with resultType string). + */ + sheetName: any; + /** + * The partial data of one sheet. Type: string (or Expression with resultType string). + */ + range?: any; + /** + * When used as input, treat the first row of data as headers. When used as output,write the + * headers into the output as the first row of data. The default value is false. Type: boolean + * (or Expression with resultType boolean). + */ + firstRowAsHeader?: any; + /** + * The data compression method used for the json dataset. + */ + compression?: DatasetCompressionUnion; + /** + * The null value string. Type: string (or Expression with resultType string). + */ + nullValue?: any; +} + /** * Avro dataset. */ @@ -13502,164 +13871,165 @@ export interface AzureMLBatchExecutionActivity { } /** - * Activity to get metadata of dataset + * Contains the possible cases for CompressionReadSettings. */ -export interface GetMetadataActivity { +export type CompressionReadSettingsUnion = CompressionReadSettings | ZipDeflateReadSettings; + +/** + * Compression read settings. + */ +export interface CompressionReadSettings { /** * Polymorphic Discriminator */ - type: "GetMetadata"; - /** - * Activity name. - */ - name: string; - /** - * Activity description. - */ - description?: string; - /** - * Activity depends on condition. - */ - dependsOn?: ActivityDependency[]; - /** - * Activity user properties. - */ - userProperties?: UserProperty[]; - /** - * Linked service reference. - */ - linkedServiceName?: LinkedServiceReference; - /** - * Activity policy. - */ - policy?: ActivityPolicy; - /** - * GetMetadata activity dataset reference. - */ - dataset: DatasetReference; + type: "CompressionReadSettings"; /** - * Fields of metadata to get from dataset. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - fieldList?: any[]; + [property: string]: any; } /** - * Web activity authentication properties. + * The ZipDeflate compression read settings. */ -export interface WebActivityAuthentication { - /** - * Web activity authentication (Basic/ClientCertificate/MSI) - */ - type: string; +export interface ZipDeflateReadSettings { /** - * Base64-encoded contents of a PFX file. + * Polymorphic Discriminator */ - pfx?: SecretBaseUnion; + type: "ZipDeflateReadSettings"; /** - * Web activity authentication user name for basic authentication. + * Preserve the zip file name as folder path. Type: boolean (or Expression with resultType + * boolean). */ - username?: string; + preserveZipFileNameAsFolder?: any; +} + +/** + * Contains the possible cases for FormatReadSettings. + */ +export type FormatReadSettingsUnion = FormatReadSettings | BinaryReadSettings | XmlReadSettings | JsonReadSettings | DelimitedTextReadSettings; + +/** + * Format read settings. + */ +export interface FormatReadSettings { /** - * Password for the PFX file or basic authentication. + * Polymorphic Discriminator */ - password?: SecretBaseUnion; + type: "FormatReadSettings"; /** - * Resource for which Azure Auth token will be requested when using MSI Authentication. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - resource?: string; + [property: string]: any; } /** - * Web activity. + * Binary read settings. */ -export interface WebActivity { +export interface BinaryReadSettings { /** * Polymorphic Discriminator */ - type: "WebActivity"; - /** - * Activity name. - */ - name: string; + type: "BinaryReadSettings"; /** - * Activity description. + * Compression settings. */ - description?: string; + compressionProperties?: CompressionReadSettingsUnion; +} + +/** + * Xml read settings. + */ +export interface XmlReadSettings { /** - * Activity depends on condition. + * Polymorphic Discriminator */ - dependsOn?: ActivityDependency[]; + type: "XmlReadSettings"; /** - * Activity user properties. + * Compression settings. */ - userProperties?: UserProperty[]; + compressionProperties?: CompressionReadSettingsUnion; /** - * Linked service reference. + * Indicates what validation method is used when reading the xml files. Allowed values: 'none', + * 'xsd', or 'dtd'. Type: string (or Expression with resultType string). */ - linkedServiceName?: LinkedServiceReference; + validationMode?: any; /** - * Activity policy. + * Namespace uri to prefix mappings to override the prefixes in column names when namespace is + * enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name + * in the xml data file will be used. Example: "{"http://www.example.com/xml":"prefix"}" Type: + * object (or Expression with resultType object). */ - policy?: ActivityPolicy; + namespacePrefixes?: any; +} + +/** + * Json read settings. + */ +export interface JsonReadSettings { /** - * Rest API method for target endpoint. Possible values include: 'GET', 'POST', 'PUT', 'DELETE' + * Polymorphic Discriminator */ - method: WebActivityMethod; + type: "JsonReadSettings"; /** - * Web activity target endpoint and path. Type: string (or Expression with resultType string). + * Compression settings. */ - url: any; + compressionProperties?: CompressionReadSettingsUnion; +} + +/** + * Delimited text read settings. + */ +export interface DelimitedTextReadSettings { /** - * Represents the headers that will be sent to the request. For example, to set the language and - * type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": - * "application/json" }. Type: string (or Expression with resultType string). + * Polymorphic Discriminator */ - headers?: any; + type: "DelimitedTextReadSettings"; /** - * Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not - * allowed for GET method Type: string (or Expression with resultType string). + * Indicates the number of non-empty rows to skip when reading data from input files. Type: + * integer (or Expression with resultType integer). */ - body?: any; + skipLineCount?: any; /** - * Authentication method used for calling the endpoint. + * Compression settings. */ - authentication?: WebActivityAuthentication; + compressionProperties?: CompressionReadSettingsUnion; +} + +/** + * Distcp settings. + */ +export interface DistcpSettings { /** - * List of datasets passed to web endpoint. + * Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType + * string). */ - datasets?: DatasetReference[]; + resourceManagerEndpoint: any; /** - * List of linked services passed to web endpoint. + * Specifies an existing folder path which will be used to store temp Distcp command script. The + * script file is generated by ADF and will be removed after Copy job finished. Type: string (or + * Expression with resultType string). */ - linkedServices?: LinkedServiceReference[]; + tempScriptPath: any; /** - * The integration runtime reference. + * Specifies the Distcp options. Type: string (or Expression with resultType string). */ - connectVia?: IntegrationRuntimeReference; + distcpOptions?: any; } /** - * Contains the possible cases for CopySource. + * Contains the possible cases for StoreReadSettings. */ -export type CopySourceUnion = CopySource | HttpSource | AzureBlobFSSource | AzureDataLakeStoreSource | Office365Source | CosmosDbMongoDbApiSource | MongoDbV2Source | MongoDbSource | WebSource | OracleSource | AzureDataExplorerSource | HdfsSource | FileSystemSource | RestSource | SalesforceServiceCloudSource | ODataSource | MicrosoftAccessSource | RelationalSource | CommonDataServiceForAppsSource | DynamicsCrmSource | DynamicsSource | CosmosDbSqlApiSource | DocumentDbCollectionSource | BlobSource | TabularSourceUnion | BinarySource | OrcSource | JsonSource | DelimitedTextSource | ParquetSource | AvroSource; +export type StoreReadSettingsUnion = StoreReadSettings | HdfsReadSettings | HttpReadSettings | SftpReadSettings | FtpReadSettings | GoogleCloudStorageReadSettings | AzureFileStorageReadSettings | FileServerReadSettings | AmazonS3ReadSettings | AzureDataLakeStoreReadSettings | AzureBlobFSReadSettings | AzureBlobStorageReadSettings; /** - * A copy activity source. + * Connector read setting. */ -export interface CopySource { +export interface StoreReadSettings { /** * Polymorphic Discriminator */ - type: "CopySource"; - /** - * Source retry count. Type: integer (or Expression with resultType integer). - */ - sourceRetryCount?: any; - /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - */ - sourceRetryWait?: any; + type: "StoreReadSettings"; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). @@ -13672,447 +14042,815 @@ export interface CopySource { } /** - * A copy activity source for an HTTP file. + * HDFS read settings. */ -export interface HttpSource { +export interface HdfsReadSettings { /** * Polymorphic Discriminator */ - type: "HttpSource"; - /** - * Source retry count. Type: integer (or Expression with resultType integer). - */ - sourceRetryCount?: any; - /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - */ - sourceRetryWait?: any; + type: "HdfsReadSettings"; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). */ maxConcurrentConnections?: any; /** - * Specifies the timeout for a HTTP client to get HTTP response from HTTP server. The default - * value is equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or Expression with - * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - httpRequestTimeout?: any; -} - -/** - * A copy activity Azure BlobFS source. - */ -export interface AzureBlobFSSource { + recursive?: any; /** - * Polymorphic Discriminator + * HDFS wildcardFolderPath. Type: string (or Expression with resultType string). */ - type: "AzureBlobFSSource"; + wildcardFolderPath?: any; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * HDFS wildcardFileName. Type: string (or Expression with resultType string). */ - sourceRetryCount?: any; + wildcardFileName?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). */ - sourceRetryWait?: any; + fileListPath?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Indicates whether to enable partition discovery. */ - maxConcurrentConnections?: any; + enablePartitionDiscovery?: boolean; /** - * Treat empty as null. Type: boolean (or Expression with resultType boolean). + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). */ - treatEmptyAsNull?: any; + partitionRootPath?: any; /** - * Number of header lines to skip from each blob. Type: integer (or Expression with resultType - * integer). + * The start of file's modified datetime. Type: string (or Expression with resultType string). */ - skipHeaderLineCount?: any; + modifiedDatetimeStart?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). + * The end of file's modified datetime. Type: string (or Expression with resultType string). */ - recursive?: any; + modifiedDatetimeEnd?: any; + /** + * Specifies Distcp-related settings. + */ + distcpSettings?: DistcpSettings; } /** - * A copy activity Azure Data Lake source. + * Sftp read settings. */ -export interface AzureDataLakeStoreSource { +export interface HttpReadSettings { /** * Polymorphic Discriminator */ - type: "AzureDataLakeStoreSource"; - /** - * Source retry count. Type: integer (or Expression with resultType integer). - */ - sourceRetryCount?: any; - /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - */ - sourceRetryWait?: any; + type: "HttpReadSettings"; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). */ maxConcurrentConnections?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; -} - -/** - * A copy activity source for an Office 365 service. - */ -export interface Office365Source { - /** - * Polymorphic Discriminator + * The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression + * with resultType string). */ - type: "Office365Source"; + requestMethod?: any; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression + * with resultType string). */ - sourceRetryCount?: any; + requestBody?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * The additional HTTP headers in the request to the RESTful API. Type: string (or Expression + * with resultType string). */ - sourceRetryWait?: any; + additionalHeaders?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Specifies the timeout for a HTTP client to get HTTP response from HTTP server. */ - maxConcurrentConnections?: any; + requestTimeout?: any; /** - * The groups containing all the users. Type: array of strings (or Expression with resultType - * array of strings). + * Indicates whether to enable partition discovery. */ - allowedGroups?: any; + enablePartitionDiscovery?: boolean; /** - * The user scope uri. Type: string (or Expression with resultType string). + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). */ - userScopeFilterUri?: any; + partitionRootPath?: any; +} + +/** + * Sftp read settings. + */ +export interface SftpReadSettings { /** - * The Column to apply the and . Type: - * string (or Expression with resultType string). + * Polymorphic Discriminator */ - dateFilterColumn?: any; + type: "SftpReadSettings"; /** - * Start time of the requested range for this dataset. Type: string (or Expression with - * resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - startTime?: any; + maxConcurrentConnections?: any; /** - * End time of the requested range for this dataset. Type: string (or Expression with resultType - * string). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - endTime?: any; + recursive?: any; /** - * The columns to be read out from the Office 365 table. Type: array of objects (or Expression - * with resultType array of objects). Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } - * ] + * Sftp wildcardFolderPath. Type: string (or Expression with resultType string). */ - outputColumns?: any; -} - -/** - * Specify the column name and value of additional columns. - */ -export interface AdditionalColumns { + wildcardFolderPath?: any; /** - * Additional column name. Type: string (or Expression with resultType string). + * Sftp wildcardFileName. Type: string (or Expression with resultType string). */ - name?: any; + wildcardFileName?: any; /** - * Additional column value. Type: string (or Expression with resultType string). + * Indicates whether to enable partition discovery. */ - value?: any; -} - -/** - * Cursor methods for Mongodb query - */ -export interface MongoDbCursorMethodsProperties { + enablePartitionDiscovery?: boolean; /** - * Specifies the fields to return in the documents that match the query filter. To return all - * fields in the matching documents, omit this parameter. Type: string (or Expression with + * Specify the root path where partition discovery starts from. Type: string (or Expression with * resultType string). */ - project?: any; + partitionRootPath?: any; /** - * Specifies the order in which the query returns matching documents. Type: string (or Expression - * with resultType string). Type: string (or Expression with resultType string). + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). */ - sort?: any; + fileListPath?: any; /** - * Specifies the how many documents skipped and where MongoDB begins returning results. This - * approach may be useful in implementing paginated results. Type: integer (or Expression with - * resultType integer). + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). */ - skip?: any; + deleteFilesAfterCompletion?: any; /** - * Specifies the maximum number of documents the server returns. limit() is analogous to the - * LIMIT statement in a SQL database. Type: integer (or Expression with resultType integer). + * The start of file's modified datetime. Type: string (or Expression with resultType string). */ - limit?: any; + modifiedDatetimeStart?: any; /** - * Describes unknown properties. The value of an unknown property can be of "any" type. + * The end of file's modified datetime. Type: string (or Expression with resultType string). */ - [property: string]: any; + modifiedDatetimeEnd?: any; } /** - * A copy activity source for a CosmosDB (MongoDB API) database. + * Ftp read settings. */ -export interface CosmosDbMongoDbApiSource { +export interface FtpReadSettings { /** * Polymorphic Discriminator */ - type: "CosmosDbMongoDbApiSource"; + type: "FtpReadSettings"; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - sourceRetryCount?: any; + maxConcurrentConnections?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - sourceRetryWait?: any; + recursive?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Ftp wildcardFolderPath. Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + wildcardFolderPath?: any; /** - * Specifies selection filter using query operators. To return all documents in a collection, - * omit this parameter or pass an empty document ({}). Type: string (or Expression with - * resultType string). + * Ftp wildcardFileName. Type: string (or Expression with resultType string). */ - filter?: any; + wildcardFileName?: any; /** - * Cursor methods for Mongodb query. + * Indicates whether to enable partition discovery. */ - cursorMethods?: MongoDbCursorMethodsProperties; + enablePartitionDiscovery?: boolean; /** - * Specifies the number of documents to return in each batch of the response from MongoDB - * instance. In most cases, modifying the batch size will not affect the user or the application. - * This property's main purpose is to avoid hit the limitation of response size. Type: integer - * (or Expression with resultType integer). + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). */ - batchSize?: any; + partitionRootPath?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). */ - queryTimeout?: any; + deleteFilesAfterCompletion?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). */ - additionalColumns?: AdditionalColumns[]; + fileListPath?: any; + /** + * Specify whether to use binary transfer mode for FTP stores. + */ + useBinaryTransfer?: boolean; } /** - * A copy activity source for a MongoDB database. + * Google Cloud Storage read settings. */ -export interface MongoDbV2Source { +export interface GoogleCloudStorageReadSettings { /** * Polymorphic Discriminator */ - type: "MongoDbV2Source"; + type: "GoogleCloudStorageReadSettings"; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - sourceRetryCount?: any; + maxConcurrentConnections?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - sourceRetryWait?: any; + recursive?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Google Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + wildcardFolderPath?: any; /** - * Specifies selection filter using query operators. To return all documents in a collection, - * omit this parameter or pass an empty document ({}). Type: string (or Expression with + * Google Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). + */ + wildcardFileName?: any; + /** + * The prefix filter for the Google Cloud Storage object name. Type: string (or Expression with * resultType string). */ - filter?: any; + prefix?: any; /** - * Cursor methods for Mongodb query + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). */ - cursorMethods?: MongoDbCursorMethodsProperties; + fileListPath?: any; /** - * Specifies the number of documents to return in each batch of the response from MongoDB - * instance. In most cases, modifying the batch size will not affect the user or the application. - * This property's main purpose is to avoid hit the limitation of response size. Type: integer - * (or Expression with resultType integer). + * Indicates whether to enable partition discovery. */ - batchSize?: any; + enablePartitionDiscovery?: boolean; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). */ - queryTimeout?: any; + partitionRootPath?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). */ - additionalColumns?: AdditionalColumns[]; + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; } /** - * A copy activity source for a MongoDB database. + * Azure File Storage read settings. */ -export interface MongoDbSource { +export interface AzureFileStorageReadSettings { /** * Polymorphic Discriminator */ - type: "MongoDbSource"; + type: "AzureFileStorageReadSettings"; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - sourceRetryCount?: any; + maxConcurrentConnections?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - sourceRetryWait?: any; + recursive?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Azure File Storage wildcardFolderPath. Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + wildcardFolderPath?: any; /** - * Database query. Should be a SQL-92 query expression. Type: string (or Expression with + * Azure File Storage wildcardFileName. Type: string (or Expression with resultType string). + */ + wildcardFileName?: any; + /** + * The prefix filter for the Azure File name starting from root path. Type: string (or Expression + * with resultType string). + */ + prefix?: any; + /** + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). + */ + fileListPath?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with * resultType string). */ - query?: any; + partitionRootPath?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). */ - additionalColumns?: AdditionalColumns[]; + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; } /** - * A copy activity source for web page table. + * File server read settings. */ -export interface WebSource { +export interface FileServerReadSettings { /** * Polymorphic Discriminator */ - type: "WebSource"; + type: "FileServerReadSettings"; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - sourceRetryCount?: any; + maxConcurrentConnections?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - sourceRetryWait?: any; + recursive?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * FileServer wildcardFolderPath. Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + wildcardFolderPath?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * FileServer wildcardFileName. Type: string (or Expression with resultType string). */ - additionalColumns?: AdditionalColumns[]; + wildcardFileName?: any; + /** + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). + */ + fileListPath?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). + */ + partitionRootPath?: any; + /** + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). + */ + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; + /** + * Specify a filter to be used to select a subset of files in the folderPath rather than all + * files. Type: string (or Expression with resultType string). + */ + fileFilter?: any; } /** - * The settings that will be leveraged for Oracle source partitioning. + * Azure data lake store read settings. */ -export interface OraclePartitionSettings { +export interface AmazonS3ReadSettings { /** - * Names of the physical partitions of Oracle table. + * Polymorphic Discriminator */ - partitionNames?: any; + type: "AmazonS3ReadSettings"; /** - * The name of the column in integer type that will be used for proceeding range partitioning. - * Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - partitionColumnName?: any; + maxConcurrentConnections?: any; /** - * The maximum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - partitionUpperBound?: any; + recursive?: any; /** - * The minimum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). + * AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType string). */ - partitionLowerBound?: any; + wildcardFolderPath?: any; + /** + * AmazonS3 wildcardFileName. Type: string (or Expression with resultType string). + */ + wildcardFileName?: any; + /** + * The prefix filter for the S3 object name. Type: string (or Expression with resultType string). + */ + prefix?: any; + /** + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). + */ + fileListPath?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). + */ + partitionRootPath?: any; + /** + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). + */ + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; } /** - * A copy activity Oracle source. + * Azure data lake store read settings. */ -export interface OracleSource { +export interface AzureDataLakeStoreReadSettings { /** * Polymorphic Discriminator */ - type: "OracleSource"; + type: "AzureDataLakeStoreReadSettings"; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - sourceRetryCount?: any; + maxConcurrentConnections?: any; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - sourceRetryWait?: any; + recursive?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * ADLS wildcardFolderPath. Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + wildcardFolderPath?: any; /** - * Oracle reader query. Type: string (or Expression with resultType string). + * ADLS wildcardFileName. Type: string (or Expression with resultType string). */ - oracleReaderQuery?: any; + wildcardFileName?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). */ - queryTimeout?: any; + fileListPath?: any; /** - * The partition mechanism that will be used for Oracle read in parallel. Possible values - * include: 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' + * Lists files after the value (exclusive) based on file/folder names’ lexicographical order. + * Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. + * Type: string (or Expression with resultType string). */ - partitionOption?: OraclePartitionOption; + listAfter?: any; + /** + * Lists files before the value (inclusive) based on file/folder names’ lexicographical order. + * Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. + * Type: string (or Expression with resultType string). + */ + listBefore?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). + */ + partitionRootPath?: any; + /** + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). + */ + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; +} + +/** + * Azure blobFS read settings. + */ +export interface AzureBlobFSReadSettings { + /** + * Polymorphic Discriminator + */ + type: "AzureBlobFSReadSettings"; + /** + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). + */ + maxConcurrentConnections?: any; + /** + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). + */ + recursive?: any; + /** + * Azure blobFS wildcardFolderPath. Type: string (or Expression with resultType string). + */ + wildcardFolderPath?: any; + /** + * Azure blobFS wildcardFileName. Type: string (or Expression with resultType string). + */ + wildcardFileName?: any; + /** + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). + */ + fileListPath?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). + */ + partitionRootPath?: any; + /** + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). + */ + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; +} + +/** + * Azure blob read settings. + */ +export interface AzureBlobStorageReadSettings { + /** + * Polymorphic Discriminator + */ + type: "AzureBlobStorageReadSettings"; + /** + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). + */ + maxConcurrentConnections?: any; + /** + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). + */ + recursive?: any; + /** + * Azure blob wildcardFolderPath. Type: string (or Expression with resultType string). + */ + wildcardFolderPath?: any; + /** + * Azure blob wildcardFileName. Type: string (or Expression with resultType string). + */ + wildcardFileName?: any; + /** + * The prefix filter for the Azure Blob name. Type: string (or Expression with resultType + * string). + */ + prefix?: any; + /** + * Point to a text file that lists each file (relative path to the path configured in the + * dataset) that you want to copy. Type: string (or Expression with resultType string). + */ + fileListPath?: any; + /** + * Indicates whether to enable partition discovery. + */ + enablePartitionDiscovery?: boolean; + /** + * Specify the root path where partition discovery starts from. Type: string (or Expression with + * resultType string). + */ + partitionRootPath?: any; + /** + * Indicates whether the source files need to be deleted after copy completion. Default is false. + * Type: boolean (or Expression with resultType boolean). + */ + deleteFilesAfterCompletion?: any; + /** + * The start of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeStart?: any; + /** + * The end of file's modified datetime. Type: string (or Expression with resultType string). + */ + modifiedDatetimeEnd?: any; +} + +/** + * Activity to get metadata of dataset + */ +export interface GetMetadataActivity { + /** + * Polymorphic Discriminator + */ + type: "GetMetadata"; + /** + * Activity name. + */ + name: string; + /** + * Activity description. + */ + description?: string; + /** + * Activity depends on condition. + */ + dependsOn?: ActivityDependency[]; + /** + * Activity user properties. + */ + userProperties?: UserProperty[]; + /** + * Linked service reference. + */ + linkedServiceName?: LinkedServiceReference; + /** + * Activity policy. + */ + policy?: ActivityPolicy; + /** + * GetMetadata activity dataset reference. + */ + dataset: DatasetReference; + /** + * Fields of metadata to get from dataset. + */ + fieldList?: any[]; + /** + * GetMetadata activity store settings. + */ + storeSettings?: StoreReadSettingsUnion; + /** + * GetMetadata activity format settings. + */ + formatSettings?: FormatReadSettingsUnion; +} + +/** + * Web activity authentication properties. + */ +export interface WebActivityAuthentication { + /** + * Web activity authentication (Basic/ClientCertificate/MSI) + */ + type: string; + /** + * Base64-encoded contents of a PFX file. + */ + pfx?: SecretBaseUnion; + /** + * Web activity authentication user name for basic authentication. + */ + username?: string; + /** + * Password for the PFX file or basic authentication. + */ + password?: SecretBaseUnion; + /** + * Resource for which Azure Auth token will be requested when using MSI Authentication. + */ + resource?: string; +} + +/** + * Web activity. + */ +export interface WebActivity { + /** + * Polymorphic Discriminator + */ + type: "WebActivity"; + /** + * Activity name. + */ + name: string; + /** + * Activity description. + */ + description?: string; + /** + * Activity depends on condition. + */ + dependsOn?: ActivityDependency[]; + /** + * Activity user properties. + */ + userProperties?: UserProperty[]; + /** + * Linked service reference. + */ + linkedServiceName?: LinkedServiceReference; + /** + * Activity policy. + */ + policy?: ActivityPolicy; + /** + * Rest API method for target endpoint. Possible values include: 'GET', 'POST', 'PUT', 'DELETE' + */ + method: WebActivityMethod; + /** + * Web activity target endpoint and path. Type: string (or Expression with resultType string). + */ + url: any; + /** + * Represents the headers that will be sent to the request. For example, to set the language and + * type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": + * "application/json" }. Type: string (or Expression with resultType string). + */ + headers?: any; + /** + * Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not + * allowed for GET method Type: string (or Expression with resultType string). + */ + body?: any; + /** + * Authentication method used for calling the endpoint. + */ + authentication?: WebActivityAuthentication; + /** + * List of datasets passed to web endpoint. + */ + datasets?: DatasetReference[]; + /** + * List of linked services passed to web endpoint. + */ + linkedServices?: LinkedServiceReference[]; + /** + * The integration runtime reference. + */ + connectVia?: IntegrationRuntimeReference; +} + +/** + * Contains the possible cases for CopySource. + */ +export type CopySourceUnion = CopySource | SharePointOnlineListSource | SnowflakeSource | HttpSource | AzureBlobFSSource | AzureDataLakeStoreSource | Office365Source | CosmosDbMongoDbApiSource | MongoDbV2Source | MongoDbSource | WebSource | OracleSource | AzureDataExplorerSource | HdfsSource | FileSystemSource | RestSource | SalesforceServiceCloudSource | ODataSource | MicrosoftAccessSource | RelationalSource | CommonDataServiceForAppsSource | DynamicsCrmSource | DynamicsSource | CosmosDbSqlApiSource | DocumentDbCollectionSource | BlobSource | TabularSourceUnion | BinarySource | OrcSource | XmlSource | JsonSource | DelimitedTextSource | ParquetSource | ExcelSource | AvroSource; + +/** + * A copy activity source. + */ +export interface CopySource { + /** + * Polymorphic Discriminator + */ + type: "CopySource"; + /** + * Source retry count. Type: integer (or Expression with resultType integer). + */ + sourceRetryCount?: any; + /** + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sourceRetryWait?: any; /** - * The settings that will be leveraged for Oracle source partitioning. + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - partitionSettings?: OraclePartitionSettings; + maxConcurrentConnections?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - additionalColumns?: AdditionalColumns[]; + [property: string]: any; } /** - * A copy activity Azure Data Explorer (Kusto) source. + * A copy activity source for sharePoint online list source. */ -export interface AzureDataExplorerSource { +export interface SharePointOnlineListSource { /** * Polymorphic Discriminator */ - type: "AzureDataExplorerSource"; + type: "SharePointOnlineListSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14128,56 +14866,67 @@ export interface AzureDataExplorerSource { */ maxConcurrentConnections?: any; /** - * Database query. Should be a Kusto Query Language (KQL) query. Type: string (or Expression with - * resultType string). + * The OData query to filter the data in SharePoint Online list. For example, "$top=1". Type: + * string (or Expression with resultType string). */ - query: any; + query?: any; /** - * The name of the Boolean option that controls whether truncation is applied to result-sets that - * go beyond a certain row-count limit. + * The wait time to get a response from SharePoint Online. Default value is 5 minutes (00:05:00). + * Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - noTruncation?: any; + httpRequestTimeout?: any; +} + +/** + * Contains the possible cases for ExportSettings. + */ +export type ExportSettingsUnion = ExportSettings | SnowflakeExportCopyCommand; + +/** + * Export command settings. + */ +export interface ExportSettings { /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. + * Polymorphic Discriminator */ - queryTimeout?: any; + type: "ExportSettings"; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - additionalColumns?: AdditionalColumns[]; + [property: string]: any; } /** - * Distcp settings. + * Snowflake export command settings. */ -export interface DistcpSettings { +export interface SnowflakeExportCopyCommand { /** - * Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType - * string). + * Polymorphic Discriminator */ - resourceManagerEndpoint: any; + type: "SnowflakeExportCopyCommand"; /** - * Specifies an existing folder path which will be used to store temp Distcp command script. The - * script file is generated by ADF and will be removed after Copy job finished. Type: string (or - * Expression with resultType string). + * Additional copy options directly passed to snowflake Copy Command. Type: key value pairs + * (value should be string type) (or Expression with resultType object). Example: + * "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } */ - tempScriptPath: any; + additionalCopyOptions?: { [propertyName: string]: any }; /** - * Specifies the Distcp options. Type: string (or Expression with resultType string). + * Additional format options directly passed to snowflake Copy Command. Type: key value pairs + * (value should be string type) (or Expression with resultType object). Example: + * "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": "'FALSE'" } */ - distcpOptions?: any; + additionalFormatOptions?: { [propertyName: string]: any }; } /** - * A copy activity HDFS source. + * A copy activity snowflake source. */ -export interface HdfsSource { +export interface SnowflakeSource { /** * Polymorphic Discriminator */ - type: "HdfsSource"; + type: "SnowflakeSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14193,24 +14942,23 @@ export interface HdfsSource { */ maxConcurrentConnections?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). + * Snowflake Sql query. Type: string (or Expression with resultType string). */ - recursive?: any; + query?: any; /** - * Specifies Distcp-related settings. + * Snowflake export settings. */ - distcpSettings?: DistcpSettings; + exportSettings?: SnowflakeExportCopyCommand; } /** - * A copy activity file system source. + * A copy activity source for an HTTP file. */ -export interface FileSystemSource { +export interface HttpSource { /** * Polymorphic Discriminator */ - type: "FileSystemSource"; + type: "HttpSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14226,25 +14974,21 @@ export interface FileSystemSource { */ maxConcurrentConnections?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; - /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Specifies the timeout for a HTTP client to get HTTP response from HTTP server. The default + * value is equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - additionalColumns?: AdditionalColumns[]; + httpRequestTimeout?: any; } /** - * A copy activity Rest service source. + * A copy activity Azure BlobFS source. */ -export interface RestSource { +export interface AzureBlobFSSource { /** * Polymorphic Discriminator */ - type: "RestSource"; + type: "AzureBlobFSSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14260,50 +15004,29 @@ export interface RestSource { */ maxConcurrentConnections?: any; /** - * The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression - * with resultType string). - */ - requestMethod?: any; - /** - * The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression - * with resultType string). - */ - requestBody?: any; - /** - * The additional HTTP headers in the request to the RESTful API. Type: string (or Expression - * with resultType string). - */ - additionalHeaders?: any; - /** - * The pagination rules to compose next page requests. Type: string (or Expression with - * resultType string). - */ - paginationRules?: any; - /** - * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the - * timeout to read response data. Default value: 00:01:40. Type: string (or Expression with - * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Treat empty as null. Type: boolean (or Expression with resultType boolean). */ - httpRequestTimeout?: any; + treatEmptyAsNull?: any; /** - * The time to await before sending next page request. + * Number of header lines to skip from each blob. Type: integer (or Expression with resultType + * integer). */ - requestInterval?: any; + skipHeaderLineCount?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - additionalColumns?: AdditionalColumns[]; + recursive?: any; } /** - * A copy activity Salesforce Service Cloud source. + * A copy activity Azure Data Lake source. */ -export interface SalesforceServiceCloudSource { +export interface AzureDataLakeStoreSource { /** * Polymorphic Discriminator */ - type: "SalesforceServiceCloudSource"; + type: "AzureDataLakeStoreSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14319,29 +15042,20 @@ export interface SalesforceServiceCloudSource { */ maxConcurrentConnections?: any; /** - * Database query. Type: string (or Expression with resultType string). - */ - query?: any; - /** - * The read behavior for the operation. Default is Query. Possible values include: 'Query', - * 'QueryAll' - */ - readBehavior?: SalesforceSourceReadBehavior; - /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - additionalColumns?: AdditionalColumns[]; + recursive?: any; } /** - * A copy activity source for OData source. + * A copy activity source for an Office 365 service. */ -export interface ODataSource { +export interface Office365Source { /** * Polymorphic Discriminator */ - type: "ODataSource"; + type: "Office365Source"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14357,57 +15071,91 @@ export interface ODataSource { */ maxConcurrentConnections?: any; /** - * OData query. For example, "$top=1". Type: string (or Expression with resultType string). + * The groups containing all the users. Type: array of strings (or Expression with resultType + * array of strings). */ - query?: any; + allowedGroups?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * The user scope uri. Type: string (or Expression with resultType string). */ - additionalColumns?: AdditionalColumns[]; + userScopeFilterUri?: any; + /** + * The Column to apply the and . Type: + * string (or Expression with resultType string). + */ + dateFilterColumn?: any; + /** + * Start time of the requested range for this dataset. Type: string (or Expression with + * resultType string). + */ + startTime?: any; + /** + * End time of the requested range for this dataset. Type: string (or Expression with resultType + * string). + */ + endTime?: any; + /** + * The columns to be read out from the Office 365 table. Type: array of objects (or Expression + * with resultType array of objects). Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } + * ] + */ + outputColumns?: any; } /** - * A copy activity source for Microsoft Access. + * Specify the column name and value of additional columns. */ -export interface MicrosoftAccessSource { +export interface AdditionalColumns { /** - * Polymorphic Discriminator + * Additional column name. Type: string (or Expression with resultType string). */ - type: "MicrosoftAccessSource"; + name?: any; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * Additional column value. Type: string (or Expression with resultType string). */ - sourceRetryCount?: any; + value?: any; +} + +/** + * Cursor methods for Mongodb query + */ +export interface MongoDbCursorMethodsProperties { /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Specifies the fields to return in the documents that match the query filter. To return all + * fields in the matching documents, omit this parameter. Type: string (or Expression with + * resultType string). */ - sourceRetryWait?: any; + project?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Specifies the order in which the query returns matching documents. Type: string (or Expression + * with resultType string). Type: string (or Expression with resultType string). */ - maxConcurrentConnections?: any; + sort?: any; /** - * Database query. Type: string (or Expression with resultType string). + * Specifies the how many documents skipped and where MongoDB begins returning results. This + * approach may be useful in implementing paginated results. Type: integer (or Expression with + * resultType integer). */ - query?: any; + skip?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Specifies the maximum number of documents the server returns. limit() is analogous to the + * LIMIT statement in a SQL database. Type: integer (or Expression with resultType integer). */ - additionalColumns?: AdditionalColumns[]; + limit?: any; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; } /** - * A copy activity source for various relational databases. + * A copy activity source for a CosmosDB (MongoDB API) database. */ -export interface RelationalSource { +export interface CosmosDbMongoDbApiSource { /** * Polymorphic Discriminator */ - type: "RelationalSource"; + type: "CosmosDbMongoDbApiSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14423,9 +15171,27 @@ export interface RelationalSource { */ maxConcurrentConnections?: any; /** - * Database query. Type: string (or Expression with resultType string). + * Specifies selection filter using query operators. To return all documents in a collection, + * omit this parameter or pass an empty document ({}). Type: string (or Expression with + * resultType string). */ - query?: any; + filter?: any; + /** + * Cursor methods for Mongodb query. + */ + cursorMethods?: MongoDbCursorMethodsProperties; + /** + * Specifies the number of documents to return in each batch of the response from MongoDB + * instance. In most cases, modifying the batch size will not affect the user or the application. + * This property's main purpose is to avoid hit the limitation of response size. Type: integer + * (or Expression with resultType integer). + */ + batchSize?: any; + /** + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + queryTimeout?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -14434,13 +15200,13 @@ export interface RelationalSource { } /** - * A copy activity Common Data Service for Apps source. + * A copy activity source for a MongoDB database. */ -export interface CommonDataServiceForAppsSource { +export interface MongoDbV2Source { /** * Polymorphic Discriminator */ - type: "CommonDataServiceForAppsSource"; + type: "MongoDbV2Source"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14456,10 +15222,27 @@ export interface CommonDataServiceForAppsSource { */ maxConcurrentConnections?: any; /** - * FetchXML is a proprietary query language that is used in Microsoft Common Data Service for - * Apps (online & on-premises). Type: string (or Expression with resultType string). + * Specifies selection filter using query operators. To return all documents in a collection, + * omit this parameter or pass an empty document ({}). Type: string (or Expression with + * resultType string). */ - query?: any; + filter?: any; + /** + * Cursor methods for Mongodb query + */ + cursorMethods?: MongoDbCursorMethodsProperties; + /** + * Specifies the number of documents to return in each batch of the response from MongoDB + * instance. In most cases, modifying the batch size will not affect the user or the application. + * This property's main purpose is to avoid hit the limitation of response size. Type: integer + * (or Expression with resultType integer). + */ + batchSize?: any; + /** + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + queryTimeout?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -14468,13 +15251,13 @@ export interface CommonDataServiceForAppsSource { } /** - * A copy activity Dynamics CRM source. + * A copy activity source for a MongoDB database. */ -export interface DynamicsCrmSource { +export interface MongoDbSource { /** * Polymorphic Discriminator */ - type: "DynamicsCrmSource"; + type: "MongoDbSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14490,8 +15273,8 @@ export interface DynamicsCrmSource { */ maxConcurrentConnections?: any; /** - * FetchXML is a proprietary query language that is used in Microsoft Dynamics CRM (online & - * on-premises). Type: string (or Expression with resultType string). + * Database query. Should be a SQL-92 query expression. Type: string (or Expression with + * resultType string). */ query?: any; /** @@ -14502,13 +15285,13 @@ export interface DynamicsCrmSource { } /** - * A copy activity Dynamics source. + * A copy activity source for web page table. */ -export interface DynamicsSource { +export interface WebSource { /** * Polymorphic Discriminator */ - type: "DynamicsSource"; + type: "WebSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14523,11 +15306,6 @@ export interface DynamicsSource { * Expression with resultType integer). */ maxConcurrentConnections?: any; - /** - * FetchXML is a proprietary query language that is used in Microsoft Dynamics (online & - * on-premises). Type: string (or Expression with resultType string). - */ - query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -14536,13 +15314,38 @@ export interface DynamicsSource { } /** - * A copy activity Azure CosmosDB (SQL API) Collection source. + * The settings that will be leveraged for Oracle source partitioning. */ -export interface CosmosDbSqlApiSource { +export interface OraclePartitionSettings { + /** + * Names of the physical partitions of Oracle table. + */ + partitionNames?: any; + /** + * The name of the column in integer type that will be used for proceeding range partitioning. + * Type: string (or Expression with resultType string). + */ + partitionColumnName?: any; + /** + * The maximum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionUpperBound?: any; + /** + * The minimum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionLowerBound?: any; +} + +/** + * A copy activity Oracle source. + */ +export interface OracleSource { /** * Polymorphic Discriminator */ - type: "CosmosDbSqlApiSource"; + type: "OracleSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14558,17 +15361,23 @@ export interface CosmosDbSqlApiSource { */ maxConcurrentConnections?: any; /** - * SQL API query. Type: string (or Expression with resultType string). + * Oracle reader query. Type: string (or Expression with resultType string). */ - query?: any; + oracleReaderQuery?: any; /** - * Page size of the result. Type: integer (or Expression with resultType integer). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - pageSize?: any; + queryTimeout?: any; /** - * Preferred regions. Type: array of strings (or Expression with resultType array of strings). + * The partition mechanism that will be used for Oracle read in parallel. Possible values + * include: 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' */ - preferredRegions?: any; + partitionOption?: OraclePartitionOption; + /** + * The settings that will be leveraged for Oracle source partitioning. + */ + partitionSettings?: OraclePartitionSettings; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -14577,13 +15386,13 @@ export interface CosmosDbSqlApiSource { } /** - * A copy activity Document Database Collection source. + * A copy activity Azure Data Explorer (Kusto) source. */ -export interface DocumentDbCollectionSource { +export interface AzureDataExplorerSource { /** * Polymorphic Discriminator */ - type: "DocumentDbCollectionSource"; + type: "AzureDataExplorerSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14599,16 +15408,18 @@ export interface DocumentDbCollectionSource { */ maxConcurrentConnections?: any; /** - * Documents query. Type: string (or Expression with resultType string). + * Database query. Should be a Kusto Query Language (KQL) query. Type: string (or Expression with + * resultType string). */ - query?: any; + query: any; /** - * Nested properties separator. Type: string (or Expression with resultType string). + * The name of the Boolean option that controls whether truncation is applied to result-sets that + * go beyond a certain row-count limit. */ - nestingSeparator?: any; + noTruncation?: any; /** * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. */ queryTimeout?: any; /** @@ -14619,13 +15430,13 @@ export interface DocumentDbCollectionSource { } /** - * A copy activity Azure Blob source. + * A copy activity HDFS source. */ -export interface BlobSource { +export interface HdfsSource { /** * Polymorphic Discriminator */ - type: "BlobSource"; + type: "HdfsSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14640,54 +15451,25 @@ export interface BlobSource { * Expression with resultType integer). */ maxConcurrentConnections?: any; - /** - * Treat empty as null. Type: boolean (or Expression with resultType boolean). - */ - treatEmptyAsNull?: any; - /** - * Number of header lines to skip from each blob. Type: integer (or Expression with resultType - * integer). - */ - skipHeaderLineCount?: any; /** * If true, files under the folder path will be read recursively. Default is true. Type: boolean * (or Expression with resultType boolean). */ recursive?: any; -} - -/** - * The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with - * unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then - * copied into the targeted sink from the interim S3. - */ -export interface RedshiftUnloadSettings { - /** - * The name of the Amazon S3 linked service which will be used for the unload operation when - * copying from the Amazon Redshift source. - */ - s3LinkedServiceName: LinkedServiceReference; /** - * The bucket of the interim Amazon S3 which will be used to store the unloaded data from Amazon - * Redshift source. The bucket must be in the same region as the Amazon Redshift source. Type: - * string (or Expression with resultType string). + * Specifies Distcp-related settings. */ - bucketName: any; + distcpSettings?: DistcpSettings; } /** - * Contains the possible cases for TabularSource. - */ -export type TabularSourceUnion = TabularSource | AmazonRedshiftSource | GoogleAdWordsSource | OracleServiceCloudSource | DynamicsAXSource | ResponsysSource | SalesforceMarketingCloudSource | VerticaSource | NetezzaSource | ZohoSource | XeroSource | SquareSource | SparkSource | ShopifySource | ServiceNowSource | QuickBooksSource | PrestoSource | PhoenixSource | PaypalSource | MarketoSource | AzureMariaDBSource | MariaDBSource | MagentoSource | JiraSource | ImpalaSource | HubspotSource | HiveSource | HBaseSource | GreenplumSource | GoogleBigQuerySource | EloquaSource | DrillSource | CouchbaseSource | ConcurSource | AzurePostgreSqlSource | AmazonMWSSource | CassandraSource | TeradataSource | AzureMySqlSource | SqlDWSource | SqlMISource | AzureSqlSource | SqlServerSource | SqlSource | SapTableSource | SapOpenHubSource | SapHanaSource | SapEccSource | SapCloudForCustomerSource | SalesforceSource | SapBwSource | SybaseSource | PostgreSqlSource | MySqlSource | OdbcSource | Db2Source | InformixSource | AzureTableSource; - -/** - * Copy activity sources of tabular type. + * A copy activity file system source. */ -export interface TabularSource { +export interface FileSystemSource { /** * Polymorphic Discriminator */ - type: "TabularSource"; + type: "FileSystemSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14703,10 +15485,10 @@ export interface TabularSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - queryTimeout?: any; + recursive?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -14715,13 +15497,13 @@ export interface TabularSource { } /** - * A copy activity source for Amazon Redshift Source. + * A copy activity Rest service source. */ -export interface AmazonRedshiftSource { +export interface RestSource { /** * Polymorphic Discriminator */ - type: "AmazonRedshiftSource"; + type: "RestSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14737,35 +15519,50 @@ export interface AmazonRedshiftSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression + * with resultType string). */ - queryTimeout?: any; + requestMethod?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression + * with resultType string). */ - additionalColumns?: AdditionalColumns[]; + requestBody?: any; /** - * Database query. Type: string (or Expression with resultType string). + * The additional HTTP headers in the request to the RESTful API. Type: string (or Expression + * with resultType string). */ - query?: any; + additionalHeaders?: any; /** - * The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with - * unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then - * copied into the targeted sink from the interim S3. + * The pagination rules to compose next page requests. Type: string (or Expression with + * resultType string). */ - redshiftUnloadSettings?: RedshiftUnloadSettings; + paginationRules?: any; + /** + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:01:40. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + httpRequestTimeout?: any; + /** + * The time to await before sending next page request. + */ + requestInterval?: any; + /** + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). + */ + additionalColumns?: AdditionalColumns[]; } /** - * A copy activity Google AdWords service source. + * A copy activity Salesforce Service Cloud source. */ -export interface GoogleAdWordsSource { +export interface SalesforceServiceCloudSource { /** * Polymorphic Discriminator */ - type: "GoogleAdWordsSource"; + type: "SalesforceServiceCloudSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14781,29 +15578,29 @@ export interface GoogleAdWordsSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Database query. Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; + /** + * The read behavior for the operation. Default is Query. Possible values include: 'Query', + * 'QueryAll' + */ + readBehavior?: SalesforceSourceReadBehavior; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Oracle Service Cloud source. + * A copy activity source for OData source. */ -export interface OracleServiceCloudSource { +export interface ODataSource { /** * Polymorphic Discriminator */ - type: "OracleServiceCloudSource"; + type: "ODataSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14819,29 +15616,30 @@ export interface OracleServiceCloudSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * OData query. For example, "$top=1". Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; + /** + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:05:00. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + httpRequestTimeout?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Dynamics AX source. + * A copy activity source for Microsoft Access. */ -export interface DynamicsAXSource { +export interface MicrosoftAccessSource { /** * Polymorphic Discriminator */ - type: "DynamicsAXSource"; + type: "MicrosoftAccessSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14857,29 +15655,24 @@ export interface DynamicsAXSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Database query. Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Responsys source. + * A copy activity source for various relational databases. */ -export interface ResponsysSource { +export interface RelationalSource { /** * Polymorphic Discriminator */ - type: "ResponsysSource"; + type: "RelationalSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14895,29 +15688,24 @@ export interface ResponsysSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Database query. Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Salesforce Marketing Cloud source. + * A copy activity Common Data Service for Apps source. */ -export interface SalesforceMarketingCloudSource { +export interface CommonDataServiceForAppsSource { /** * Polymorphic Discriminator */ - type: "SalesforceMarketingCloudSource"; + type: "CommonDataServiceForAppsSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14933,29 +15721,25 @@ export interface SalesforceMarketingCloudSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * FetchXML is a proprietary query language that is used in Microsoft Common Data Service for + * Apps (online & on-premises). Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Vertica source. + * A copy activity Dynamics CRM source. */ -export interface VerticaSource { +export interface DynamicsCrmSource { /** * Polymorphic Discriminator */ - type: "VerticaSource"; + type: "DynamicsCrmSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -14971,50 +15755,25 @@ export interface VerticaSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * FetchXML is a proprietary query language that is used in Microsoft Dynamics CRM (online & + * on-premises). Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; -} - -/** - * The settings that will be leveraged for Netezza source partitioning. - */ -export interface NetezzaPartitionSettings { - /** - * The name of the column in integer type that will be used for proceeding range partitioning. - * Type: string (or Expression with resultType string). - */ - partitionColumnName?: any; - /** - * The maximum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionUpperBound?: any; - /** - * The minimum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionLowerBound?: any; } /** - * A copy activity Netezza source. + * A copy activity Dynamics source. */ -export interface NetezzaSource { +export interface DynamicsSource { /** * Polymorphic Discriminator */ - type: "NetezzaSource"; + type: "DynamicsSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15030,38 +15789,25 @@ export interface NetezzaSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * FetchXML is a proprietary query language that is used in Microsoft Dynamics (online & + * on-premises). Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; - /** - * The partition mechanism that will be used for Netezza read in parallel. Possible values - * include: 'None', 'DataSlice', 'DynamicRange' - */ - partitionOption?: NetezzaPartitionOption; - /** - * The settings that will be leveraged for Netezza source partitioning. - */ - partitionSettings?: NetezzaPartitionSettings; } /** - * A copy activity Zoho server source. + * A copy activity Azure CosmosDB (SQL API) Collection source. */ -export interface ZohoSource { +export interface CosmosDbSqlApiSource { /** * Polymorphic Discriminator */ - type: "ZohoSource"; + type: "CosmosDbSqlApiSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15077,29 +15823,32 @@ export interface ZohoSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * SQL API query. Type: string (or Expression with resultType string). */ - queryTimeout?: any; + query?: any; + /** + * Page size of the result. Type: integer (or Expression with resultType integer). + */ + pageSize?: any; + /** + * Preferred regions. Type: array of strings (or Expression with resultType array of strings). + */ + preferredRegions?: any; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Xero Service source. + * A copy activity Document Database Collection source. */ -export interface XeroSource { +export interface DocumentDbCollectionSource { /** * Polymorphic Discriminator */ - type: "XeroSource"; + type: "DocumentDbCollectionSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15114,6 +15863,14 @@ export interface XeroSource { * Expression with resultType integer). */ maxConcurrentConnections?: any; + /** + * Documents query. Type: string (or Expression with resultType string). + */ + query?: any; + /** + * Nested properties separator. Type: string (or Expression with resultType string). + */ + nestingSeparator?: any; /** * Query timeout. Type: string (or Expression with resultType string), pattern: * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). @@ -15124,20 +15881,16 @@ export interface XeroSource { * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Square Service source. + * A copy activity Azure Blob source. */ -export interface SquareSource { +export interface BlobSource { /** * Polymorphic Discriminator */ - type: "SquareSource"; + type: "BlobSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15153,29 +15906,53 @@ export interface SquareSource { */ maxConcurrentConnections?: any; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Treat empty as null. Type: boolean (or Expression with resultType boolean). */ - queryTimeout?: any; + treatEmptyAsNull?: any; /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * Number of header lines to skip from each blob. Type: integer (or Expression with resultType + * integer). */ - additionalColumns?: AdditionalColumns[]; + skipHeaderLineCount?: any; /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). + * If true, files under the folder path will be read recursively. Default is true. Type: boolean + * (or Expression with resultType boolean). */ - query?: any; + recursive?: any; } /** - * A copy activity Spark Server source. + * The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with + * unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then + * copied into the targeted sink from the interim S3. */ -export interface SparkSource { +export interface RedshiftUnloadSettings { + /** + * The name of the Amazon S3 linked service which will be used for the unload operation when + * copying from the Amazon Redshift source. + */ + s3LinkedServiceName: LinkedServiceReference; + /** + * The bucket of the interim Amazon S3 which will be used to store the unloaded data from Amazon + * Redshift source. The bucket must be in the same region as the Amazon Redshift source. Type: + * string (or Expression with resultType string). + */ + bucketName: any; +} + +/** + * Contains the possible cases for TabularSource. + */ +export type TabularSourceUnion = TabularSource | AmazonRedshiftSource | GoogleAdWordsSource | OracleServiceCloudSource | DynamicsAXSource | ResponsysSource | SalesforceMarketingCloudSource | VerticaSource | NetezzaSource | ZohoSource | XeroSource | SquareSource | SparkSource | ShopifySource | ServiceNowSource | QuickBooksSource | PrestoSource | PhoenixSource | PaypalSource | MarketoSource | AzureMariaDBSource | MariaDBSource | MagentoSource | JiraSource | ImpalaSource | HubspotSource | HiveSource | HBaseSource | GreenplumSource | GoogleBigQuerySource | EloquaSource | DrillSource | CouchbaseSource | ConcurSource | AzurePostgreSqlSource | AmazonMWSSource | CassandraSource | TeradataSource | AzureMySqlSource | SqlDWSource | SqlMISource | AzureSqlSource | SqlServerSource | SqlSource | SapTableSource | SapOpenHubSource | SapHanaSource | SapEccSource | SapCloudForCustomerSource | SalesforceSource | SapBwSource | SybaseSource | PostgreSqlSource | MySqlSource | OdbcSource | Db2Source | InformixSource | AzureTableSource; + +/** + * Copy activity sources of tabular type. + */ +export interface TabularSource { /** * Polymorphic Discriminator */ - type: "SparkSource"; + type: "TabularSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15200,20 +15977,16 @@ export interface SparkSource { * Expression with resultType array of objects). */ additionalColumns?: AdditionalColumns[]; - /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). - */ - query?: any; } /** - * A copy activity Shopify Service source. + * A copy activity source for Amazon Redshift Source. */ -export interface ShopifySource { +export interface AmazonRedshiftSource { /** * Polymorphic Discriminator */ - type: "ShopifySource"; + type: "AmazonRedshiftSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15239,19 +16012,25 @@ export interface ShopifySource { */ additionalColumns?: AdditionalColumns[]; /** - * A query to retrieve data from source. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ query?: any; + /** + * The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with + * unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then + * copied into the targeted sink from the interim S3. + */ + redshiftUnloadSettings?: RedshiftUnloadSettings; } /** - * A copy activity ServiceNow server source. + * A copy activity Google AdWords service source. */ -export interface ServiceNowSource { +export interface GoogleAdWordsSource { /** * Polymorphic Discriminator */ - type: "ServiceNowSource"; + type: "GoogleAdWordsSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15283,13 +16062,13 @@ export interface ServiceNowSource { } /** - * A copy activity QuickBooks server source. + * A copy activity Oracle Service Cloud source. */ -export interface QuickBooksSource { +export interface OracleServiceCloudSource { /** * Polymorphic Discriminator */ - type: "QuickBooksSource"; + type: "OracleServiceCloudSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15321,13 +16100,13 @@ export interface QuickBooksSource { } /** - * A copy activity Presto server source. + * A copy activity Dynamics AX source. */ -export interface PrestoSource { +export interface DynamicsAXSource { /** * Polymorphic Discriminator */ - type: "PrestoSource"; + type: "DynamicsAXSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15356,16 +16135,22 @@ export interface PrestoSource { * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; + /** + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:05:00. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + httpRequestTimeout?: any; } /** - * A copy activity Phoenix server source. + * A copy activity Responsys source. */ -export interface PhoenixSource { +export interface ResponsysSource { /** * Polymorphic Discriminator */ - type: "PhoenixSource"; + type: "ResponsysSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15397,13 +16182,13 @@ export interface PhoenixSource { } /** - * A copy activity Paypal Service source. + * A copy activity Salesforce Marketing Cloud source. */ -export interface PaypalSource { +export interface SalesforceMarketingCloudSource { /** * Polymorphic Discriminator */ - type: "PaypalSource"; + type: "SalesforceMarketingCloudSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15435,13 +16220,13 @@ export interface PaypalSource { } /** - * A copy activity Marketo server source. + * A copy activity Vertica source. */ -export interface MarketoSource { +export interface VerticaSource { /** * Polymorphic Discriminator */ - type: "MarketoSource"; + type: "VerticaSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15473,13 +16258,34 @@ export interface MarketoSource { } /** - * A copy activity Azure MariaDB source. + * The settings that will be leveraged for Netezza source partitioning. */ -export interface AzureMariaDBSource { +export interface NetezzaPartitionSettings { + /** + * The name of the column in integer type that will be used for proceeding range partitioning. + * Type: string (or Expression with resultType string). + */ + partitionColumnName?: any; + /** + * The maximum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionUpperBound?: any; + /** + * The minimum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionLowerBound?: any; +} + +/** + * A copy activity Netezza source. + */ +export interface NetezzaSource { /** * Polymorphic Discriminator */ - type: "AzureMariaDBSource"; + type: "NetezzaSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15508,16 +16314,25 @@ export interface AzureMariaDBSource { * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; + /** + * The partition mechanism that will be used for Netezza read in parallel. Possible values + * include: 'None', 'DataSlice', 'DynamicRange' + */ + partitionOption?: NetezzaPartitionOption; + /** + * The settings that will be leveraged for Netezza source partitioning. + */ + partitionSettings?: NetezzaPartitionSettings; } /** - * A copy activity MariaDB server source. + * A copy activity Zoho server source. */ -export interface MariaDBSource { +export interface ZohoSource { /** * Polymorphic Discriminator */ - type: "MariaDBSource"; + type: "ZohoSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15549,13 +16364,13 @@ export interface MariaDBSource { } /** - * A copy activity Magento server source. + * A copy activity Xero Service source. */ -export interface MagentoSource { +export interface XeroSource { /** * Polymorphic Discriminator */ - type: "MagentoSource"; + type: "XeroSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15587,13 +16402,13 @@ export interface MagentoSource { } /** - * A copy activity Jira Service source. + * A copy activity Square Service source. */ -export interface JiraSource { +export interface SquareSource { /** * Polymorphic Discriminator */ - type: "JiraSource"; + type: "SquareSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15625,13 +16440,13 @@ export interface JiraSource { } /** - * A copy activity Impala server source. + * A copy activity Spark Server source. */ -export interface ImpalaSource { +export interface SparkSource { /** * Polymorphic Discriminator */ - type: "ImpalaSource"; + type: "SparkSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15663,13 +16478,13 @@ export interface ImpalaSource { } /** - * A copy activity Hubspot Service source. + * A copy activity Shopify Service source. */ -export interface HubspotSource { +export interface ShopifySource { /** * Polymorphic Discriminator */ - type: "HubspotSource"; + type: "ShopifySource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15701,13 +16516,13 @@ export interface HubspotSource { } /** - * A copy activity Hive Server source. + * A copy activity ServiceNow server source. */ -export interface HiveSource { +export interface ServiceNowSource { /** * Polymorphic Discriminator */ - type: "HiveSource"; + type: "ServiceNowSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15739,13 +16554,13 @@ export interface HiveSource { } /** - * A copy activity HBase server source. + * A copy activity QuickBooks server source. */ -export interface HBaseSource { +export interface QuickBooksSource { /** * Polymorphic Discriminator */ - type: "HBaseSource"; + type: "QuickBooksSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15777,13 +16592,13 @@ export interface HBaseSource { } /** - * A copy activity Greenplum Database source. + * A copy activity Presto server source. */ -export interface GreenplumSource { +export interface PrestoSource { /** * Polymorphic Discriminator */ - type: "GreenplumSource"; + type: "PrestoSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15815,13 +16630,13 @@ export interface GreenplumSource { } /** - * A copy activity Google BigQuery service source. + * A copy activity Phoenix server source. */ -export interface GoogleBigQuerySource { +export interface PhoenixSource { /** * Polymorphic Discriminator */ - type: "GoogleBigQuerySource"; + type: "PhoenixSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15853,13 +16668,13 @@ export interface GoogleBigQuerySource { } /** - * A copy activity Eloqua server source. + * A copy activity Paypal Service source. */ -export interface EloquaSource { +export interface PaypalSource { /** * Polymorphic Discriminator */ - type: "EloquaSource"; + type: "PaypalSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15891,13 +16706,13 @@ export interface EloquaSource { } /** - * A copy activity Drill server source. + * A copy activity Marketo server source. */ -export interface DrillSource { +export interface MarketoSource { /** * Polymorphic Discriminator */ - type: "DrillSource"; + type: "MarketoSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15929,13 +16744,13 @@ export interface DrillSource { } /** - * A copy activity Couchbase server source. + * A copy activity Azure MariaDB source. */ -export interface CouchbaseSource { +export interface AzureMariaDBSource { /** * Polymorphic Discriminator */ - type: "CouchbaseSource"; + type: "AzureMariaDBSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -15967,13 +16782,13 @@ export interface CouchbaseSource { } /** - * A copy activity Concur Service source. + * A copy activity MariaDB server source. */ -export interface ConcurSource { +export interface MariaDBSource { /** * Polymorphic Discriminator */ - type: "ConcurSource"; + type: "MariaDBSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16005,13 +16820,13 @@ export interface ConcurSource { } /** - * A copy activity Azure PostgreSQL source. + * A copy activity Magento server source. */ -export interface AzurePostgreSqlSource { +export interface MagentoSource { /** * Polymorphic Discriminator */ - type: "AzurePostgreSqlSource"; + type: "MagentoSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16043,13 +16858,13 @@ export interface AzurePostgreSqlSource { } /** - * A copy activity Amazon Marketplace Web Service source. + * A copy activity Jira Service source. */ -export interface AmazonMWSSource { +export interface JiraSource { /** * Polymorphic Discriminator */ - type: "AmazonMWSSource"; + type: "JiraSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16081,13 +16896,13 @@ export interface AmazonMWSSource { } /** - * A copy activity source for a Cassandra database. + * A copy activity Impala server source. */ -export interface CassandraSource { +export interface ImpalaSource { /** * Polymorphic Discriminator */ - type: "CassandraSource"; + type: "ImpalaSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16113,50 +16928,19 @@ export interface CassandraSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Should be a SQL-92 query expression or Cassandra Query Language (CQL) command. - * Type: string (or Expression with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; - /** - * The consistency level specifies how many Cassandra servers must respond to a read request - * before returning data to the client application. Cassandra checks the specified number of - * Cassandra servers for data to satisfy the read request. Must be one of - * cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is case-insensitive. - * Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', 'LOCAL_QUORUM', 'ONE', 'TWO', - * 'THREE', 'LOCAL_ONE', 'SERIAL', 'LOCAL_SERIAL' - */ - consistencyLevel?: CassandraSourceReadConsistencyLevels; -} - -/** - * The settings that will be leveraged for teradata source partitioning. - */ -export interface TeradataPartitionSettings { - /** - * The name of the column that will be used for proceeding range or hash partitioning. Type: - * string (or Expression with resultType string). - */ - partitionColumnName?: any; - /** - * The maximum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionUpperBound?: any; - /** - * The minimum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionLowerBound?: any; } /** - * A copy activity Teradata source. + * A copy activity Hubspot Service source. */ -export interface TeradataSource { +export interface HubspotSource { /** * Polymorphic Discriminator */ - type: "TeradataSource"; + type: "HubspotSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16182,28 +16966,19 @@ export interface TeradataSource { */ additionalColumns?: AdditionalColumns[]; /** - * Teradata query. Type: string (or Expression with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; - /** - * The partition mechanism that will be used for teradata read in parallel. Possible values - * include: 'None', 'Hash', 'DynamicRange' - */ - partitionOption?: TeradataPartitionOption; - /** - * The settings that will be leveraged for teradata source partitioning. - */ - partitionSettings?: TeradataPartitionSettings; } /** - * A copy activity Azure MySQL source. + * A copy activity Hive Server source. */ -export interface AzureMySqlSource { +export interface HiveSource { /** * Polymorphic Discriminator */ - type: "AzureMySqlSource"; + type: "HiveSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16229,19 +17004,19 @@ export interface AzureMySqlSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; } /** - * A copy activity SQL Data Warehouse source. + * A copy activity HBase server source. */ -export interface SqlDWSource { +export interface HBaseSource { /** * Polymorphic Discriminator */ - type: "SqlDWSource"; + type: "HBaseSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16267,45 +17042,19 @@ export interface SqlDWSource { */ additionalColumns?: AdditionalColumns[]; /** - * SQL Data Warehouse reader query. Type: string (or Expression with resultType string). - */ - sqlReaderQuery?: any; - /** - * Name of the stored procedure for a SQL Data Warehouse source. This cannot be used at the same - * time as SqlReaderQuery. Type: string (or Expression with resultType string). - */ - sqlReaderStoredProcedureName?: any; - /** - * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", - * type: "int"}}". Type: object (or Expression with resultType object), itemType: - * StoredProcedureParameter. - */ - storedProcedureParameters?: any; -} - -/** - * SQL stored procedure parameter. - */ -export interface StoredProcedureParameter { - /** - * Stored procedure parameter value. Type: string (or Expression with resultType string). - */ - value?: any; - /** - * Stored procedure parameter type. Possible values include: 'String', 'Int', 'Int64', 'Decimal', - * 'Guid', 'Boolean', 'Date' + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - type?: StoredProcedureParameterType; + query?: any; } /** - * A copy activity Azure SQL Managed Instance source. + * A copy activity Greenplum Database source. */ -export interface SqlMISource { +export interface GreenplumSource { /** * Polymorphic Discriminator */ - type: "SqlMISource"; + type: "GreenplumSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16331,33 +17080,19 @@ export interface SqlMISource { */ additionalColumns?: AdditionalColumns[]; /** - * SQL reader query. Type: string (or Expression with resultType string). - */ - sqlReaderQuery?: any; - /** - * Name of the stored procedure for a Azure SQL Managed Instance source. This cannot be used at - * the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - */ - sqlReaderStoredProcedureName?: any; - /** - * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", - * type: "int"}}". - */ - storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; - /** - * Which additional types to produce. + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - produceAdditionalTypes?: any; + query?: any; } /** - * A copy activity Azure SQL source. + * A copy activity Google BigQuery service source. */ -export interface AzureSqlSource { +export interface GoogleBigQuerySource { /** * Polymorphic Discriminator */ - type: "AzureSqlSource"; + type: "GoogleBigQuerySource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16383,33 +17118,19 @@ export interface AzureSqlSource { */ additionalColumns?: AdditionalColumns[]; /** - * SQL reader query. Type: string (or Expression with resultType string). - */ - sqlReaderQuery?: any; - /** - * Name of the stored procedure for a SQL Database source. This cannot be used at the same time - * as SqlReaderQuery. Type: string (or Expression with resultType string). - */ - sqlReaderStoredProcedureName?: any; - /** - * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", - * type: "int"}}". - */ - storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; - /** - * Which additional types to produce. + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - produceAdditionalTypes?: any; + query?: any; } /** - * A copy activity SQL server source. + * A copy activity Eloqua server source. */ -export interface SqlServerSource { +export interface EloquaSource { /** * Polymorphic Discriminator */ - type: "SqlServerSource"; + type: "EloquaSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16435,33 +17156,19 @@ export interface SqlServerSource { */ additionalColumns?: AdditionalColumns[]; /** - * SQL reader query. Type: string (or Expression with resultType string). - */ - sqlReaderQuery?: any; - /** - * Name of the stored procedure for a SQL Database source. This cannot be used at the same time - * as SqlReaderQuery. Type: string (or Expression with resultType string). - */ - sqlReaderStoredProcedureName?: any; - /** - * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", - * type: "int"}}". - */ - storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; - /** - * Which additional types to produce. + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - produceAdditionalTypes?: any; + query?: any; } /** - * A copy activity SQL source. + * A copy activity Drill server source. */ -export interface SqlSource { +export interface DrillSource { /** * Polymorphic Discriminator */ - type: "SqlSource"; + type: "DrillSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16487,61 +17194,19 @@ export interface SqlSource { */ additionalColumns?: AdditionalColumns[]; /** - * SQL reader query. Type: string (or Expression with resultType string). - */ - sqlReaderQuery?: any; - /** - * Name of the stored procedure for a SQL Database source. This cannot be used at the same time - * as SqlReaderQuery. Type: string (or Expression with resultType string). - */ - sqlReaderStoredProcedureName?: any; - /** - * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", - * type: "int"}}". - */ - storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; - /** - * Specifies the transaction locking behavior for the SQL source. Allowed values: - * ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is - * ReadCommitted. Type: string (or Expression with resultType string). - */ - isolationLevel?: any; -} - -/** - * The settings that will be leveraged for SAP table source partitioning. - */ -export interface SapTablePartitionSettings { - /** - * The name of the column that will be used for proceeding range partitioning. Type: string (or - * Expression with resultType string). - */ - partitionColumnName?: any; - /** - * The maximum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionUpperBound?: any; - /** - * The minimum value of column specified in partitionColumnName that will be used for proceeding - * range partitioning. Type: string (or Expression with resultType string). - */ - partitionLowerBound?: any; - /** - * The maximum value of partitions the table will be split into. Type: integer (or Expression - * with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - maxPartitionsNumber?: any; + query?: any; } /** - * A copy activity source for SAP Table source. + * A copy activity Couchbase server source. */ -export interface SapTableSource { +export interface CouchbaseSource { /** * Polymorphic Discriminator */ - type: "SapTableSource"; + type: "CouchbaseSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16567,54 +17232,57 @@ export interface SapTableSource { */ additionalColumns?: AdditionalColumns[]; /** - * The number of rows to be retrieved. Type: integer(or Expression with resultType integer). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - rowCount?: any; + query?: any; +} + +/** + * A copy activity Concur Service source. + */ +export interface ConcurSource { /** - * The number of rows that will be skipped. Type: integer (or Expression with resultType - * integer). + * Polymorphic Discriminator */ - rowSkips?: any; + type: "ConcurSource"; /** - * The fields of the SAP table that will be retrieved. For example, column0, column1. Type: - * string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - rfcTableFields?: any; + sourceRetryCount?: any; /** - * The options for the filtering of the SAP Table. For example, COLUMN0 EQ SOME VALUE. Type: - * string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - rfcTableOptions?: any; + sourceRetryWait?: any; /** - * Specifies the maximum number of rows that will be retrieved at a time when retrieving data - * from SAP Table. Type: integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - batchSize?: any; + maxConcurrentConnections?: any; /** - * Specifies the custom RFC function module that will be used to read data from SAP Table. Type: - * string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - customRfcReadTableFunctionModule?: any; + queryTimeout?: any; /** - * The partition mechanism that will be used for SAP table read in parallel. Possible values - * include: 'None', 'PartitionOnInt', 'PartitionOnCalendarYear', 'PartitionOnCalendarMonth', - * 'PartitionOnCalendarDate', 'PartitionOnTime' + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - partitionOption?: SapTablePartitionOption; + additionalColumns?: AdditionalColumns[]; /** - * The settings that will be leveraged for SAP table source partitioning. + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - partitionSettings?: SapTablePartitionSettings; + query?: any; } /** - * A copy activity source for SAP Business Warehouse Open Hub Destination source. + * A copy activity Azure PostgreSQL source. */ -export interface SapOpenHubSource { +export interface AzurePostgreSqlSource { /** * Polymorphic Discriminator */ - type: "SapOpenHubSource"; + type: "AzurePostgreSqlSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16640,37 +17308,19 @@ export interface SapOpenHubSource { */ additionalColumns?: AdditionalColumns[]; /** - * Whether to exclude the records of the last request. The default value is true. Type: boolean - * (or Expression with resultType boolean). - */ - excludeLastRequest?: any; - /** - * The ID of request for delta loading. Once it is set, only data with requestId larger than the - * value of this property will be retrieved. The default value is 0. Type: integer (or Expression - * with resultType integer ). - */ - baseRequestId?: any; -} - -/** - * The settings that will be leveraged for SAP HANA source partitioning. - */ -export interface SapHanaPartitionSettings { - /** - * The name of the column that will be used for proceeding range partitioning. Type: string (or - * Expression with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ - partitionColumnName?: any; + query?: any; } /** - * A copy activity source for SAP HANA source. + * A copy activity Amazon Marketplace Web Service source. */ -export interface SapHanaSource { +export interface AmazonMWSSource { /** * Polymorphic Discriminator */ - type: "SapHanaSource"; + type: "AmazonMWSSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16696,33 +17346,19 @@ export interface SapHanaSource { */ additionalColumns?: AdditionalColumns[]; /** - * SAP HANA Sql query. Type: string (or Expression with resultType string). + * A query to retrieve data from source. Type: string (or Expression with resultType string). */ query?: any; - /** - * The packet size of data read from SAP HANA. Type: integer(or Expression with resultType - * integer). - */ - packetSize?: any; - /** - * The partition mechanism that will be used for SAP HANA read in parallel. Possible values - * include: 'None', 'PhysicalPartitionsOfTable', 'SapHanaDynamicRange' - */ - partitionOption?: SapHanaPartitionOption; - /** - * The settings that will be leveraged for SAP HANA source partitioning. - */ - partitionSettings?: SapHanaPartitionSettings; } /** - * A copy activity source for SAP ECC source. + * A copy activity source for a Cassandra database. */ -export interface SapEccSource { +export interface CassandraSource { /** * Polymorphic Discriminator */ - type: "SapEccSource"; + type: "CassandraSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16748,20 +17384,50 @@ export interface SapEccSource { */ additionalColumns?: AdditionalColumns[]; /** - * SAP ECC OData query. For example, "$top=1". Type: string (or Expression with resultType - * string). + * Database query. Should be a SQL-92 query expression or Cassandra Query Language (CQL) command. + * Type: string (or Expression with resultType string). */ query?: any; + /** + * The consistency level specifies how many Cassandra servers must respond to a read request + * before returning data to the client application. Cassandra checks the specified number of + * Cassandra servers for data to satisfy the read request. Must be one of + * cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is case-insensitive. + * Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', 'LOCAL_QUORUM', 'ONE', 'TWO', + * 'THREE', 'LOCAL_ONE', 'SERIAL', 'LOCAL_SERIAL' + */ + consistencyLevel?: CassandraSourceReadConsistencyLevels; } /** - * A copy activity source for SAP Cloud for Customer source. + * The settings that will be leveraged for teradata source partitioning. */ -export interface SapCloudForCustomerSource { +export interface TeradataPartitionSettings { + /** + * The name of the column that will be used for proceeding range or hash partitioning. Type: + * string (or Expression with resultType string). + */ + partitionColumnName?: any; + /** + * The maximum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionUpperBound?: any; + /** + * The minimum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionLowerBound?: any; +} + +/** + * A copy activity Teradata source. + */ +export interface TeradataSource { /** * Polymorphic Discriminator */ - type: "SapCloudForCustomerSource"; + type: "TeradataSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16787,20 +17453,28 @@ export interface SapCloudForCustomerSource { */ additionalColumns?: AdditionalColumns[]; /** - * SAP Cloud for Customer OData query. For example, "$top=1". Type: string (or Expression with - * resultType string). + * Teradata query. Type: string (or Expression with resultType string). */ query?: any; + /** + * The partition mechanism that will be used for teradata read in parallel. Possible values + * include: 'None', 'Hash', 'DynamicRange' + */ + partitionOption?: TeradataPartitionOption; + /** + * The settings that will be leveraged for teradata source partitioning. + */ + partitionSettings?: TeradataPartitionSettings; } /** - * A copy activity Salesforce source. + * A copy activity Azure MySQL source. */ -export interface SalesforceSource { +export interface AzureMySqlSource { /** * Polymorphic Discriminator */ - type: "SalesforceSource"; + type: "AzureMySqlSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16829,21 +17503,42 @@ export interface SalesforceSource { * Database query. Type: string (or Expression with resultType string). */ query?: any; +} + +/** + * The settings that will be leveraged for Sql source partitioning. + */ +export interface SqlPartitionSettings { /** - * The read behavior for the operation. Default is Query. Possible values include: 'Query', - * 'QueryAll' + * The name of the column in integer or datetime type that will be used for proceeding + * partitioning. If not specified, the primary key of the table is auto-detected and used as the + * partition column. Type: string (or Expression with resultType string). */ - readBehavior?: SalesforceSourceReadBehavior; + partitionColumnName?: any; + /** + * The maximum value of the partition column for partition range splitting. This value is used to + * decide the partition stride, not for filtering the rows in table. All rows in the table or + * query result will be partitioned and copied. Type: string (or Expression with resultType + * string). + */ + partitionUpperBound?: any; + /** + * The minimum value of the partition column for partition range splitting. This value is used to + * decide the partition stride, not for filtering the rows in table. All rows in the table or + * query result will be partitioned and copied. Type: string (or Expression with resultType + * string). + */ + partitionLowerBound?: any; } /** - * A copy activity source for SapBW server via MDX. + * A copy activity SQL Data Warehouse source. */ -export interface SapBwSource { +export interface SqlDWSource { /** * Polymorphic Discriminator */ - type: "SapBwSource"; + type: "SqlDWSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16869,19 +17564,54 @@ export interface SapBwSource { */ additionalColumns?: AdditionalColumns[]; /** - * MDX query. Type: string (or Expression with resultType string). + * SQL Data Warehouse reader query. Type: string (or Expression with resultType string). */ - query?: any; + sqlReaderQuery?: any; + /** + * Name of the stored procedure for a SQL Data Warehouse source. This cannot be used at the same + * time as SqlReaderQuery. Type: string (or Expression with resultType string). + */ + sqlReaderStoredProcedureName?: any; + /** + * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", + * type: "int"}}". Type: object (or Expression with resultType object), itemType: + * StoredProcedureParameter. + */ + storedProcedureParameters?: any; + /** + * The partition mechanism that will be used for Sql read in parallel. Possible values include: + * 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' + */ + partitionOption?: SqlPartitionOption; + /** + * The settings that will be leveraged for Sql source partitioning. + */ + partitionSettings?: SqlPartitionSettings; } /** - * A copy activity source for Sybase databases. + * SQL stored procedure parameter. */ -export interface SybaseSource { +export interface StoredProcedureParameter { + /** + * Stored procedure parameter value. Type: string (or Expression with resultType string). + */ + value?: any; + /** + * Stored procedure parameter type. Possible values include: 'String', 'Int', 'Int64', 'Decimal', + * 'Guid', 'Boolean', 'Date' + */ + type?: StoredProcedureParameterType; +} + +/** + * A copy activity Azure SQL Managed Instance source. + */ +export interface SqlMISource { /** * Polymorphic Discriminator */ - type: "SybaseSource"; + type: "SqlMISource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16907,19 +17637,42 @@ export interface SybaseSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * SQL reader query. Type: string (or Expression with resultType string). */ - query?: any; + sqlReaderQuery?: any; + /** + * Name of the stored procedure for a Azure SQL Managed Instance source. This cannot be used at + * the same time as SqlReaderQuery. Type: string (or Expression with resultType string). + */ + sqlReaderStoredProcedureName?: any; + /** + * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", + * type: "int"}}". + */ + storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; + /** + * Which additional types to produce. + */ + produceAdditionalTypes?: any; + /** + * The partition mechanism that will be used for Sql read in parallel. Possible values include: + * 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' + */ + partitionOption?: SqlPartitionOption; + /** + * The settings that will be leveraged for Sql source partitioning. + */ + partitionSettings?: SqlPartitionSettings; } /** - * A copy activity source for PostgreSQL databases. + * A copy activity Azure SQL source. */ -export interface PostgreSqlSource { +export interface AzureSqlSource { /** * Polymorphic Discriminator */ - type: "PostgreSqlSource"; + type: "AzureSqlSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16945,19 +17698,42 @@ export interface PostgreSqlSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * SQL reader query. Type: string (or Expression with resultType string). */ - query?: any; + sqlReaderQuery?: any; + /** + * Name of the stored procedure for a SQL Database source. This cannot be used at the same time + * as SqlReaderQuery. Type: string (or Expression with resultType string). + */ + sqlReaderStoredProcedureName?: any; + /** + * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", + * type: "int"}}". + */ + storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; + /** + * Which additional types to produce. + */ + produceAdditionalTypes?: any; + /** + * The partition mechanism that will be used for Sql read in parallel. Possible values include: + * 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' + */ + partitionOption?: SqlPartitionOption; + /** + * The settings that will be leveraged for Sql source partitioning. + */ + partitionSettings?: SqlPartitionSettings; } /** - * A copy activity source for MySQL databases. + * A copy activity SQL server source. */ -export interface MySqlSource { +export interface SqlServerSource { /** * Polymorphic Discriminator */ - type: "MySqlSource"; + type: "SqlServerSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -16983,19 +17759,42 @@ export interface MySqlSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * SQL reader query. Type: string (or Expression with resultType string). */ - query?: any; + sqlReaderQuery?: any; + /** + * Name of the stored procedure for a SQL Database source. This cannot be used at the same time + * as SqlReaderQuery. Type: string (or Expression with resultType string). + */ + sqlReaderStoredProcedureName?: any; + /** + * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", + * type: "int"}}". + */ + storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; + /** + * Which additional types to produce. + */ + produceAdditionalTypes?: any; + /** + * The partition mechanism that will be used for Sql read in parallel. Possible values include: + * 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' + */ + partitionOption?: SqlPartitionOption; + /** + * The settings that will be leveraged for Sql source partitioning. + */ + partitionSettings?: SqlPartitionSettings; } /** - * A copy activity source for ODBC databases. + * A copy activity SQL source. */ -export interface OdbcSource { +export interface SqlSource { /** * Polymorphic Discriminator */ - type: "OdbcSource"; + type: "SqlSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -17021,57 +17820,70 @@ export interface OdbcSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * SQL reader query. Type: string (or Expression with resultType string). */ - query?: any; -} - -/** - * A copy activity source for Db2 databases. - */ -export interface Db2Source { + sqlReaderQuery?: any; /** - * Polymorphic Discriminator + * Name of the stored procedure for a SQL Database source. This cannot be used at the same time + * as SqlReaderQuery. Type: string (or Expression with resultType string). */ - type: "Db2Source"; + sqlReaderStoredProcedureName?: any; /** - * Source retry count. Type: integer (or Expression with resultType integer). + * Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", + * type: "int"}}". */ - sourceRetryCount?: any; + storedProcedureParameters?: { [propertyName: string]: StoredProcedureParameter }; /** - * Source retry wait. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * Specifies the transaction locking behavior for the SQL source. Allowed values: + * ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is + * ReadCommitted. Type: string (or Expression with resultType string). */ - sourceRetryWait?: any; + isolationLevel?: any; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * The partition mechanism that will be used for Sql read in parallel. Possible values include: + * 'None', 'PhysicalPartitionsOfTable', 'DynamicRange' */ - maxConcurrentConnections?: any; + partitionOption?: SqlPartitionOption; /** - * Query timeout. Type: string (or Expression with resultType string), pattern: - * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * The settings that will be leveraged for Sql source partitioning. */ - queryTimeout?: any; + partitionSettings?: SqlPartitionSettings; +} + +/** + * The settings that will be leveraged for SAP table source partitioning. + */ +export interface SapTablePartitionSettings { /** - * Specifies the additional columns to be added to source data. Type: array of objects (or - * Expression with resultType array of objects). + * The name of the column that will be used for proceeding range partitioning. Type: string (or + * Expression with resultType string). */ - additionalColumns?: AdditionalColumns[]; + partitionColumnName?: any; /** - * Database query. Type: string (or Expression with resultType string). + * The maximum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). */ - query?: any; + partitionUpperBound?: any; + /** + * The minimum value of column specified in partitionColumnName that will be used for proceeding + * range partitioning. Type: string (or Expression with resultType string). + */ + partitionLowerBound?: any; + /** + * The maximum value of partitions the table will be split into. Type: integer (or Expression + * with resultType string). + */ + maxPartitionsNumber?: any; } /** - * A copy activity source for Informix. + * A copy activity source for SAP Table source. */ -export interface InformixSource { +export interface SapTableSource { /** * Polymorphic Discriminator */ - type: "InformixSource"; + type: "SapTableSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -17097,19 +17909,54 @@ export interface InformixSource { */ additionalColumns?: AdditionalColumns[]; /** - * Database query. Type: string (or Expression with resultType string). + * The number of rows to be retrieved. Type: integer(or Expression with resultType integer). + */ + rowCount?: any; + /** + * The number of rows that will be skipped. Type: integer (or Expression with resultType + * integer). + */ + rowSkips?: any; + /** + * The fields of the SAP table that will be retrieved. For example, column0, column1. Type: + * string (or Expression with resultType string). + */ + rfcTableFields?: any; + /** + * The options for the filtering of the SAP Table. For example, COLUMN0 EQ SOME VALUE. Type: + * string (or Expression with resultType string). + */ + rfcTableOptions?: any; + /** + * Specifies the maximum number of rows that will be retrieved at a time when retrieving data + * from SAP Table. Type: integer (or Expression with resultType integer). + */ + batchSize?: any; + /** + * Specifies the custom RFC function module that will be used to read data from SAP Table. Type: + * string (or Expression with resultType string). + */ + customRfcReadTableFunctionModule?: any; + /** + * The partition mechanism that will be used for SAP table read in parallel. Possible values + * include: 'None', 'PartitionOnInt', 'PartitionOnCalendarYear', 'PartitionOnCalendarMonth', + * 'PartitionOnCalendarDate', 'PartitionOnTime' + */ + partitionOption?: SapTablePartitionOption; + /** + * The settings that will be leveraged for SAP table source partitioning. */ - query?: any; + partitionSettings?: SapTablePartitionSettings; } /** - * A copy activity Azure Table source. + * A copy activity source for SAP Business Warehouse Open Hub Destination source. */ -export interface AzureTableSource { +export interface SapOpenHubSource { /** * Polymorphic Discriminator */ - type: "AzureTableSource"; + type: "SapOpenHubSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -17135,528 +17982,521 @@ export interface AzureTableSource { */ additionalColumns?: AdditionalColumns[]; /** - * Azure Table source query. Type: string (or Expression with resultType string). + * Whether to exclude the records of the last request. The default value is true. Type: boolean + * (or Expression with resultType boolean). */ - azureTableSourceQuery?: any; + excludeLastRequest?: any; /** - * Azure Table source ignore table not found. Type: boolean (or Expression with resultType - * boolean). + * The ID of request for delta loading. Once it is set, only data with requestId larger than the + * value of this property will be retrieved. The default value is 0. Type: integer (or Expression + * with resultType integer ). */ - azureTableSourceIgnoreTableNotFound?: any; + baseRequestId?: any; } /** - * Contains the possible cases for StoreReadSettings. - */ -export type StoreReadSettingsUnion = StoreReadSettings | HdfsReadSettings | HttpReadSettings | SftpReadSettings | FtpReadSettings | GoogleCloudStorageReadSettings | AzureFileStorageReadSettings | FileServerReadSettings | AmazonS3ReadSettings | AzureDataLakeStoreReadSettings | AzureBlobFSReadSettings | AzureBlobStorageReadSettings; - -/** - * Connector read setting. + * The settings that will be leveraged for SAP HANA source partitioning. */ -export interface StoreReadSettings { - /** - * Polymorphic Discriminator - */ - type: "StoreReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; +export interface SapHanaPartitionSettings { /** - * Describes unknown properties. The value of an unknown property can be of "any" type. + * The name of the column that will be used for proceeding range partitioning. Type: string (or + * Expression with resultType string). */ - [property: string]: any; + partitionColumnName?: any; } /** - * HDFS read settings. + * A copy activity source for SAP HANA source. */ -export interface HdfsReadSettings { +export interface SapHanaSource { /** * Polymorphic Discriminator */ - type: "HdfsReadSettings"; + type: "SapHanaSource"; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Source retry count. Type: integer (or Expression with resultType integer). */ - maxConcurrentConnections?: any; + sourceRetryCount?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - recursive?: any; + sourceRetryWait?: any; /** - * HDFS wildcardFolderPath. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - wildcardFolderPath?: any; + maxConcurrentConnections?: any; /** - * HDFS wildcardFileName. Type: string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + queryTimeout?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - fileListPath?: any; + additionalColumns?: AdditionalColumns[]; /** - * Indicates whether to enable partition discovery. + * SAP HANA Sql query. Type: string (or Expression with resultType string). */ - enablePartitionDiscovery?: boolean; + query?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * The packet size of data read from SAP HANA. Type: integer(or Expression with resultType + * integer). */ - modifiedDatetimeStart?: any; + packetSize?: any; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * The partition mechanism that will be used for SAP HANA read in parallel. Possible values + * include: 'None', 'PhysicalPartitionsOfTable', 'SapHanaDynamicRange' */ - modifiedDatetimeEnd?: any; + partitionOption?: SapHanaPartitionOption; /** - * Specifies Distcp-related settings. + * The settings that will be leveraged for SAP HANA source partitioning. */ - distcpSettings?: DistcpSettings; + partitionSettings?: SapHanaPartitionSettings; } /** - * Sftp read settings. + * A copy activity source for SAP ECC source. */ -export interface HttpReadSettings { +export interface SapEccSource { /** * Polymorphic Discriminator */ - type: "HttpReadSettings"; + type: "SapEccSource"; + /** + * Source retry count. Type: integer (or Expression with resultType integer). + */ + sourceRetryCount?: any; + /** + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sourceRetryWait?: any; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). */ maxConcurrentConnections?: any; /** - * The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression - * with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - requestMethod?: any; + queryTimeout?: any; /** - * The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression - * with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - requestBody?: any; + additionalColumns?: AdditionalColumns[]; /** - * The additional HTTP headers in the request to the RESTful API. Type: string (or Expression - * with resultType string). + * SAP ECC OData query. For example, "$top=1". Type: string (or Expression with resultType + * string). */ - additionalHeaders?: any; + query?: any; /** - * Specifies the timeout for a HTTP client to get HTTP response from HTTP server. + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:05:00. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - requestTimeout?: any; + httpRequestTimeout?: any; } /** - * Sftp read settings. + * A copy activity source for SAP Cloud for Customer source. */ -export interface SftpReadSettings { +export interface SapCloudForCustomerSource { /** * Polymorphic Discriminator */ - type: "SftpReadSettings"; + type: "SapCloudForCustomerSource"; /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). + * Source retry count. Type: integer (or Expression with resultType integer). */ - maxConcurrentConnections?: any; + sourceRetryCount?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - recursive?: any; + sourceRetryWait?: any; /** - * Sftp wildcardFolderPath. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - wildcardFolderPath?: any; + maxConcurrentConnections?: any; /** - * Sftp wildcardFileName. Type: string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + queryTimeout?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - fileListPath?: any; + additionalColumns?: AdditionalColumns[]; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * SAP Cloud for Customer OData query. For example, "$top=1". Type: string (or Expression with + * resultType string). */ - modifiedDatetimeStart?: any; + query?: any; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:05:00. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - modifiedDatetimeEnd?: any; + httpRequestTimeout?: any; } /** - * Ftp read settings. + * A copy activity Salesforce source. */ -export interface FtpReadSettings { +export interface SalesforceSource { /** * Polymorphic Discriminator */ - type: "FtpReadSettings"; + type: "SalesforceSource"; + /** + * Source retry count. Type: integer (or Expression with resultType integer). + */ + sourceRetryCount?: any; + /** + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sourceRetryWait?: any; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). */ maxConcurrentConnections?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; - /** - * Ftp wildcardFolderPath. Type: string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFolderPath?: any; + queryTimeout?: any; /** - * Ftp wildcardFileName. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - wildcardFileName?: any; + additionalColumns?: AdditionalColumns[]; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - fileListPath?: any; + query?: any; /** - * Specify whether to use binary transfer mode for FTP stores. + * The read behavior for the operation. Default is Query. Possible values include: 'Query', + * 'QueryAll' */ - useBinaryTransfer?: boolean; + readBehavior?: SalesforceSourceReadBehavior; } /** - * Google Cloud Storage read settings. + * A copy activity source for SapBW server via MDX. */ -export interface GoogleCloudStorageReadSettings { +export interface SapBwSource { /** * Polymorphic Discriminator */ - type: "GoogleCloudStorageReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; - /** - * Google Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). - */ - wildcardFolderPath?: any; + type: "SapBwSource"; /** - * Google Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFileName?: any; + sourceRetryCount?: any; /** - * The prefix filter for the Google Cloud Storage object name. Type: string (or Expression with - * resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - prefix?: any; + sourceRetryWait?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - fileListPath?: any; + maxConcurrentConnections?: any; /** - * Indicates whether to enable partition discovery. + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + queryTimeout?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - modifiedDatetimeStart?: any; + additionalColumns?: AdditionalColumns[]; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * MDX query. Type: string (or Expression with resultType string). */ - modifiedDatetimeEnd?: any; + query?: any; } /** - * Azure File Storage read settings. + * A copy activity source for Sybase databases. */ -export interface AzureFileStorageReadSettings { +export interface SybaseSource { /** * Polymorphic Discriminator */ - type: "AzureFileStorageReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; + type: "SybaseSource"; /** - * Azure File Storage wildcardFolderPath. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFolderPath?: any; + sourceRetryCount?: any; /** - * Azure File Storage wildcardFileName. Type: string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + sourceRetryWait?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - fileListPath?: any; + maxConcurrentConnections?: any; /** - * Indicates whether to enable partition discovery. + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + queryTimeout?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - modifiedDatetimeStart?: any; + additionalColumns?: AdditionalColumns[]; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - modifiedDatetimeEnd?: any; + query?: any; } /** - * File server read settings. + * A copy activity source for PostgreSQL databases. */ -export interface FileServerReadSettings { +export interface PostgreSqlSource { /** * Polymorphic Discriminator */ - type: "FileServerReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; + type: "PostgreSqlSource"; /** - * FileServer wildcardFolderPath. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFolderPath?: any; + sourceRetryCount?: any; /** - * FileServer wildcardFileName. Type: string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + sourceRetryWait?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - fileListPath?: any; + maxConcurrentConnections?: any; /** - * Indicates whether to enable partition discovery. + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + queryTimeout?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - modifiedDatetimeStart?: any; + additionalColumns?: AdditionalColumns[]; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - modifiedDatetimeEnd?: any; + query?: any; } /** - * Azure data lake store read settings. + * A copy activity source for MySQL databases. */ -export interface AmazonS3ReadSettings { +export interface MySqlSource { /** * Polymorphic Discriminator */ - type: "AmazonS3ReadSettings"; + type: "MySqlSource"; + /** + * Source retry count. Type: integer (or Expression with resultType integer). + */ + sourceRetryCount?: any; + /** + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sourceRetryWait?: any; /** * The maximum concurrent connection count for the source data store. Type: integer (or * Expression with resultType integer). */ maxConcurrentConnections?: any; /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - recursive?: any; + queryTimeout?: any; /** - * AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - wildcardFolderPath?: any; + additionalColumns?: AdditionalColumns[]; /** - * AmazonS3 wildcardFileName. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - wildcardFileName?: any; + query?: any; +} + +/** + * A copy activity source for ODBC databases. + */ +export interface OdbcSource { /** - * The prefix filter for the S3 object name. Type: string (or Expression with resultType string). + * Polymorphic Discriminator */ - prefix?: any; + type: "OdbcSource"; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - fileListPath?: any; + sourceRetryCount?: any; /** - * Indicates whether to enable partition discovery. + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + sourceRetryWait?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - modifiedDatetimeStart?: any; + maxConcurrentConnections?: any; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - modifiedDatetimeEnd?: any; + queryTimeout?: any; + /** + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). + */ + additionalColumns?: AdditionalColumns[]; + /** + * Database query. Type: string (or Expression with resultType string). + */ + query?: any; } /** - * Azure data lake store read settings. + * A copy activity source for Db2 databases. */ -export interface AzureDataLakeStoreReadSettings { +export interface Db2Source { /** * Polymorphic Discriminator */ - type: "AzureDataLakeStoreReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; + type: "Db2Source"; /** - * ADLS wildcardFolderPath. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFolderPath?: any; + sourceRetryCount?: any; /** - * ADLS wildcardFileName. Type: string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + sourceRetryWait?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - fileListPath?: any; + maxConcurrentConnections?: any; /** - * Indicates whether to enable partition discovery. + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + queryTimeout?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - modifiedDatetimeStart?: any; + additionalColumns?: AdditionalColumns[]; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - modifiedDatetimeEnd?: any; + query?: any; } /** - * Azure blobFS read settings. + * A copy activity source for Informix. */ -export interface AzureBlobFSReadSettings { +export interface InformixSource { /** * Polymorphic Discriminator */ - type: "AzureBlobFSReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; + type: "InformixSource"; /** - * Azure blobFS wildcardFolderPath. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFolderPath?: any; + sourceRetryCount?: any; /** - * Azure blobFS wildcardFileName. Type: string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + sourceRetryWait?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - fileListPath?: any; + maxConcurrentConnections?: any; /** - * Indicates whether to enable partition discovery. + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - enablePartitionDiscovery?: boolean; + queryTimeout?: any; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - modifiedDatetimeStart?: any; + additionalColumns?: AdditionalColumns[]; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Database query. Type: string (or Expression with resultType string). */ - modifiedDatetimeEnd?: any; + query?: any; } /** - * Azure blob read settings. + * A copy activity Azure Table source. */ -export interface AzureBlobStorageReadSettings { +export interface AzureTableSource { /** * Polymorphic Discriminator */ - type: "AzureBlobStorageReadSettings"; - /** - * The maximum concurrent connection count for the source data store. Type: integer (or - * Expression with resultType integer). - */ - maxConcurrentConnections?: any; - /** - * If true, files under the folder path will be read recursively. Default is true. Type: boolean - * (or Expression with resultType boolean). - */ - recursive?: any; + type: "AzureTableSource"; /** - * Azure blob wildcardFolderPath. Type: string (or Expression with resultType string). + * Source retry count. Type: integer (or Expression with resultType integer). */ - wildcardFolderPath?: any; + sourceRetryCount?: any; /** - * Azure blob wildcardFileName. Type: string (or Expression with resultType string). + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - wildcardFileName?: any; + sourceRetryWait?: any; /** - * The prefix filter for the Azure Blob name. Type: string (or Expression with resultType - * string). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - prefix?: any; + maxConcurrentConnections?: any; /** - * Point to a text file that lists each file (relative path to the path configured in the - * dataset) that you want to copy. Type: string (or Expression with resultType string). + * Query timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - fileListPath?: any; + queryTimeout?: any; /** - * Indicates whether to enable partition discovery. + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). */ - enablePartitionDiscovery?: boolean; + additionalColumns?: AdditionalColumns[]; /** - * The start of file's modified datetime. Type: string (or Expression with resultType string). + * Azure Table source query. Type: string (or Expression with resultType string). */ - modifiedDatetimeStart?: any; + azureTableSourceQuery?: any; /** - * The end of file's modified datetime. Type: string (or Expression with resultType string). + * Azure Table source ignore table not found. Type: boolean (or Expression with resultType + * boolean). */ - modifiedDatetimeEnd?: any; + azureTableSourceIgnoreTableNotFound?: any; } /** @@ -17685,6 +18525,10 @@ export interface BinarySource { * Binary store settings. */ storeSettings?: StoreReadSettingsUnion; + /** + * Binary format settings. + */ + formatSettings?: BinaryReadSettings; } /** @@ -17721,13 +18565,13 @@ export interface OrcSource { } /** - * A copy activity Json source. + * A copy activity Xml source. */ -export interface JsonSource { +export interface XmlSource { /** * Polymorphic Discriminator */ - type: "JsonSource"; + type: "XmlSource"; /** * Source retry count. Type: integer (or Expression with resultType integer). */ @@ -17743,9 +18587,13 @@ export interface JsonSource { */ maxConcurrentConnections?: any; /** - * Json store settings. + * Xml store settings. */ storeSettings?: StoreReadSettingsUnion; + /** + * Xml format settings. + */ + formatSettings?: XmlReadSettings; /** * Specifies the additional columns to be added to source data. Type: array of objects (or * Expression with resultType array of objects). @@ -17754,37 +18602,40 @@ export interface JsonSource { } /** - * Contains the possible cases for FormatReadSettings. - */ -export type FormatReadSettingsUnion = FormatReadSettings | DelimitedTextReadSettings; - -/** - * Format read settings. + * A copy activity Json source. */ -export interface FormatReadSettings { +export interface JsonSource { /** * Polymorphic Discriminator */ - type: "FormatReadSettings"; + type: "JsonSource"; /** - * Describes unknown properties. The value of an unknown property can be of "any" type. + * Source retry count. Type: integer (or Expression with resultType integer). */ - [property: string]: any; -} - -/** - * Delimited text read settings. - */ -export interface DelimitedTextReadSettings { + sourceRetryCount?: any; /** - * Polymorphic Discriminator + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ - type: "DelimitedTextReadSettings"; + sourceRetryWait?: any; /** - * Indicates the number of non-empty rows to skip when reading data from input files. Type: - * integer (or Expression with resultType integer). + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). */ - skipLineCount?: any; + maxConcurrentConnections?: any; + /** + * Json store settings. + */ + storeSettings?: StoreReadSettingsUnion; + /** + * Json format settings. + */ + formatSettings?: JsonReadSettings; + /** + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). + */ + additionalColumns?: AdditionalColumns[]; } /** @@ -17857,6 +18708,39 @@ export interface ParquetSource { additionalColumns?: AdditionalColumns[]; } +/** + * A copy activity excel source. + */ +export interface ExcelSource { + /** + * Polymorphic Discriminator + */ + type: "ExcelSource"; + /** + * Source retry count. Type: integer (or Expression with resultType integer). + */ + sourceRetryCount?: any; + /** + * Source retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sourceRetryWait?: any; + /** + * The maximum concurrent connection count for the source data store. Type: integer (or + * Expression with resultType integer). + */ + maxConcurrentConnections?: any; + /** + * Excel store settings. + */ + storeSettings?: StoreReadSettingsUnion; + /** + * Specifies the additional columns to be added to source data. Type: array of objects (or + * Expression with resultType array of objects). + */ + additionalColumns?: AdditionalColumns[]; +} + /** * A copy activity Avro source. */ @@ -18054,6 +18938,10 @@ export interface DeleteActivity { * Delete activity dataset reference. */ dataset: DatasetReference; + /** + * Delete activity store settings. + */ + storeSettings?: StoreReadSettingsUnion; } /** @@ -18286,7 +19174,8 @@ export interface SSISPackageLocation { */ packagePath?: any; /** - * The type of SSIS package location. Possible values include: 'SSISDB', 'File', 'InlinePackage' + * The type of SSIS package location. Possible values include: 'SSISDB', 'File', 'InlinePackage', + * 'PackageStore' */ type?: SsisPackageLocationType; /** @@ -18302,6 +19191,10 @@ export interface SSISPackageLocation { * string). */ configurationPath?: any; + /** + * The configuration file access credential. + */ + configurationAccessCredential?: SSISAccessCredential; /** * The package name. */ @@ -18813,7 +19706,7 @@ export interface StagingSettings { /** * Contains the possible cases for CopySink. */ -export type CopySinkUnion = CopySink | CosmosDbMongoDbApiSink | SalesforceServiceCloudSink | SalesforceSink | AzureDataExplorerSink | CommonDataServiceForAppsSink | DynamicsCrmSink | DynamicsSink | MicrosoftAccessSink | InformixSink | OdbcSink | AzureSearchIndexSink | AzureBlobFSSink | AzureDataLakeStoreSink | OracleSink | SqlDWSink | SqlMISink | AzureSqlSink | SqlServerSink | SqlSink | CosmosDbSqlApiSink | DocumentDbCollectionSink | FileSystemSink | BlobSink | BinarySink | ParquetSink | AvroSink | AzureTableSink | AzureQueueSink | SapCloudForCustomerSink | AzureMySqlSink | AzurePostgreSqlSink | OrcSink | JsonSink | DelimitedTextSink; +export type CopySinkUnion = CopySink | CosmosDbMongoDbApiSink | SalesforceServiceCloudSink | SalesforceSink | AzureDataExplorerSink | CommonDataServiceForAppsSink | DynamicsCrmSink | DynamicsSink | MicrosoftAccessSink | InformixSink | OdbcSink | AzureSearchIndexSink | AzureBlobFSSink | AzureDataLakeStoreSink | OracleSink | SnowflakeSink | SqlDWSink | SqlMISink | AzureSqlSink | SqlServerSink | SqlSink | CosmosDbSqlApiSink | DocumentDbCollectionSink | FileSystemSink | BlobSink | BinarySink | ParquetSink | AvroSink | AzureTableSink | AzureQueueSink | SapCloudForCustomerSink | AzureMySqlSink | AzurePostgreSqlSink | OrcSink | JsonSink | DelimitedTextSink; /** * A copy activity sink. @@ -19438,6 +20331,88 @@ export interface OracleSink { preCopyScript?: any; } +/** + * Contains the possible cases for ImportSettings. + */ +export type ImportSettingsUnion = ImportSettings | SnowflakeImportCopyCommand; + +/** + * Import command settings. + */ +export interface ImportSettings { + /** + * Polymorphic Discriminator + */ + type: "ImportSettings"; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * Snowflake import command settings. + */ +export interface SnowflakeImportCopyCommand { + /** + * Polymorphic Discriminator + */ + type: "SnowflakeImportCopyCommand"; + /** + * Additional copy options directly passed to snowflake Copy Command. Type: key value pairs + * (value should be string type) (or Expression with resultType object). Example: + * "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } + */ + additionalCopyOptions?: { [propertyName: string]: any }; + /** + * Additional format options directly passed to snowflake Copy Command. Type: key value pairs + * (value should be string type) (or Expression with resultType object). Example: + * "additionalFormatOptions": { "FORCE": "TRUE", "LOAD_UNCERTAIN_FILES": "'FALSE'" } + */ + additionalFormatOptions?: { [propertyName: string]: any }; +} + +/** + * A copy activity snowflake sink. + */ +export interface SnowflakeSink { + /** + * Polymorphic Discriminator + */ + type: "SnowflakeSink"; + /** + * Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. + */ + writeBatchSize?: any; + /** + * Write batch timeout. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + writeBatchTimeout?: any; + /** + * Sink retry count. Type: integer (or Expression with resultType integer). + */ + sinkRetryCount?: any; + /** + * Sink retry wait. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + sinkRetryWait?: any; + /** + * The maximum concurrent connection count for the sink data store. Type: integer (or Expression + * with resultType integer). + */ + maxConcurrentConnections?: any; + /** + * SQL pre-copy script. Type: string (or Expression with resultType string). + */ + preCopyScript?: any; + /** + * Snowflake import settings. + */ + importSettings?: SnowflakeImportCopyCommand; +} + /** * Default value. */ @@ -20418,6 +21393,12 @@ export interface SapCloudForCustomerSink { * 'Update' */ writeBehavior?: SapCloudForCustomerSinkWriteBehavior; + /** + * The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the + * timeout to read response data. Default value: 00:05:00. Type: string (or Expression with + * resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + httpRequestTimeout?: any; } /** @@ -21032,7 +22013,7 @@ export interface WaitActivity { /** * Duration in seconds. */ - waitTimeInSeconds: number; + waitTimeInSeconds: any; } /** @@ -21648,6 +22629,35 @@ export interface SelfHostedIntegrationRuntime { linkedInfo?: LinkedIntegrationRuntimeTypeUnion; } +/** + * The entity reference. + */ +export interface EntityReference { + /** + * The type of this referenced entity. Possible values include: 'IntegrationRuntimeReference', + * 'LinkedServiceReference' + */ + type?: IntegrationRuntimeEntityReferenceType; + /** + * The name of this referenced entity. + */ + referenceName?: string; +} + +/** + * Package store for the SSIS integration runtime. + */ +export interface PackageStore { + /** + * The name of the package store + */ + name: string; + /** + * The package store linked service reference. + */ + packageStoreLinkedService: EntityReference; +} + /** * Contains the possible cases for CustomSetupBase. */ @@ -21721,21 +22731,6 @@ export interface CmdkeySetup { password: SecretBaseUnion; } -/** - * The entity reference. - */ -export interface EntityReference { - /** - * The type of this referenced entity. Possible values include: 'IntegrationRuntimeReference', - * 'LinkedServiceReference' - */ - type?: IntegrationRuntimeEntityReferenceType; - /** - * The name of this referenced entity. - */ - referenceName?: string; -} - /** * Data proxy properties for a managed dedicated integration runtime. */ @@ -21826,6 +22821,10 @@ export interface IntegrationRuntimeSsisProperties { * Custom setup without script properties for a SSIS integration runtime. */ expressCustomSetupProperties?: CustomSetupBaseUnion[]; + /** + * Package stores for the SSIS Integration Runtime. + */ + packageStores?: PackageStore[]; /** * Describes unknown properties. The value of an unknown property can be of "any" type. */ @@ -22704,6 +23703,14 @@ export interface QueryDataFlowDebugSessionsResponse extends Array. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are + * considered only if PublicNetworkAccess is enabled. + */ + inboundIpRules?: InboundIpRule[]; } /** - * Properties of the PartnerNamespace update. + * Properties of the Topic update */ -export interface PartnerNamespaceUpdateParameters { +export interface TopicUpdateParameters { /** - * Tags of the partner namespace. + * Tags of the resource. */ tags?: { [propertyName: string]: string }; + /** + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are + * considered only if PublicNetworkAccess is enabled. + */ + inboundIpRules?: InboundIpRule[]; } /** - * Shared access keys of the partner namespace. + * Shared access keys of the Topic */ -export interface PartnerNamespaceSharedAccessKeys { +export interface TopicSharedAccessKeys { /** - * Shared access key1 for the partner namespace. + * Shared access key1 for the topic. */ key1?: string; /** - * Shared access key2 for the partner namespace. + * Shared access key2 for the topic. */ key2?: string; } /** - * PartnerNamespace regenerate shared access key request. + * Topic regenerate share access key request */ -export interface PartnerNamespaceRegenerateKeyRequest { +export interface TopicRegenerateKeyRequest { /** - * Key name to regenerate (key1 or key2). + * Key name to regenerate key1 or key2 */ keyName: string; } /** - * Information about a partner registration. + * Event Type for a subject under a topic */ -export interface PartnerRegistration extends TrackedResource { +export interface EventType extends Resource { /** - * Provisioning state of the partner registration. Possible values include: 'Creating', - * 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Display name of the event type. */ - readonly provisioningState?: PartnerRegistrationProvisioningState; - /** - * Official name of the partner name. For example: "Contoso". - */ - partnerName?: string; - /** - * Name of the partner resource type. - */ - partnerResourceTypeName?: string; - /** - * Display name of the partner resource type. - */ - partnerResourceTypeDisplayName?: string; - /** - * Short description of the partner resource type. The length of this description should not - * exceed 256 characters. - */ - partnerResourceTypeDescription?: string; - /** - * Long description for the custom scenarios and integration to be displayed in the portal if - * needed. - * Length of this description should not exceed 2048 characters. - */ - longDescription?: string; - /** - * The customer service number of the publisher. The expected phone format should start with a - * '+' sign - * followed by the country code. The remaining digits are then followed. Only digits and spaces - * are allowed and its - * length cannot exceed 16 digits including country code. Examples of valid phone numbers are: +1 - * 515 123 4567 and - * +966 7 5115 2471. Examples of invalid phone numbers are: +1 (515) 123-4567, 1 515 123 4567 and - * +966 121 5115 24 7 551 1234 43 - */ - partnerCustomerServiceNumber?: string; - /** - * The extension of the customer service number of the publisher. Only digits are allowed and - * number of digits should not exceed 10. - */ - partnerCustomerServiceExtension?: string; - /** - * The extension of the customer service URI of the publisher. - */ - customerServiceUri?: string; - /** - * URI of the partner website that can be used by Azure customers to setup Event Grid - * integration on an event source. - */ - setupUri?: string; + displayName?: string; /** - * URI of the logo. + * Description of the event type. */ - logoUri?: string; + description?: string; /** - * Visibility state of the partner registration. Possible values include: 'Hidden', - * 'PublicPreview', 'GenerallyAvailable' + * Url of the schema for this event type. */ - visibilityState?: PartnerRegistrationVisibilityState; + schemaUrl?: string; /** - * List of Azure subscription Ids that are authorized to create a partner namespace - * associated with this partner registration. This is an optional property. Creating - * partner namespaces is always permitted under the same Azure subscription as the one used - * for creating the partner registration. + * IsInDefaultSet flag of the event type. */ - authorizedAzureSubscriptionIds?: string[]; + isInDefaultSet?: boolean; } /** - * Properties of the Partner Registration update. + * Properties of a topic type info. */ -export interface PartnerRegistrationUpdateParameters { +export interface TopicTypeInfo extends Resource { /** - * Tags of the partner registration resource. + * Namespace of the provider of the topic type. */ - tags?: { [propertyName: string]: string }; + provider?: string; /** - * Name of the partner topic type. + * Display Name for the topic type. */ - partnerTopicTypeName?: string; + displayName?: string; /** - * Display name of the partner topic type. + * Description of the topic type. */ - partnerTopicTypeDisplayName?: string; + description?: string; /** - * Description of the partner topic type. + * Region type of the resource. Possible values include: 'RegionalResource', 'GlobalResource' */ - partnerTopicTypeDescription?: string; + resourceRegionType?: ResourceRegionType; /** - * URI of the partner website that can be used by Azure customers to setup Event Grid - * integration on an event source. + * Provisioning state of the topic type. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Canceled', 'Failed' */ - setupUri?: string; + provisioningState?: TopicTypeProvisioningState; /** - * URI of the partner logo. + * List of locations supported by this topic type. */ - logoUri?: string; + supportedLocations?: string[]; /** - * List of IDs of Azure AD applications that are authorized to create a partner namespace - * associated with this partner registration. This is an optional property. Creating - * partner namespaces is always permitted under the same Azure subscription as the one used - * for creating the partner registration. + * Source resource format. */ - authorizedAzureSubscriptionIds?: string[]; + sourceResourceFormat?: string; } /** - * Event Type for a subject under a topic + * Optional Parameters. */ -export interface EventType extends Resource { - /** - * Display name of the event type. - */ - displayName?: string; - /** - * Description of the event type. - */ - description?: string; +export interface DomainsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** - * Url of the schema for this event type. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - schemaUrl?: string; + filter?: string; /** - * IsInDefaultSet flag of the event type. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - isInDefaultSet?: boolean; + top?: number; } /** - * Result of the List Partner Registration Event Types operation. + * Optional Parameters. */ -export interface PartnerRegistrationEventTypesListResult { +export interface DomainsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * A collection of partner registration event types. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - value?: EventType[]; + filter?: string; /** - * A link for the next page of partner registration event types. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - nextLink?: string; + top?: number; } /** - * Properties of the Partner Topic update. + * Optional Parameters. */ -export interface PartnerTopicUpdateParameters { +export interface DomainTopicsListByDomainOptionalParams extends msRest.RequestOptionsBase { /** - * Tags of the partner topic. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - tags?: { [propertyName: string]: string }; + filter?: string; + /** + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. + */ + top?: number; } /** - * EventGrid Partner Topic. + * Optional Parameters. */ -export interface PartnerTopic extends TrackedResource { - /** - * Source associated with this partner topic. This represents a unique partner resource. - */ - source?: string; - /** - * Expiration time of the partner topic. If this timer expires while the partner topic is still - * never activated, - * the partner topic and corresponding event channel are deleted. - */ - expirationTimeIfNotActivatedUtc?: Date; - /** - * Provisioning state of the partner topic. Possible values include: 'Creating', 'Updating', - * 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: PartnerTopicProvisioningState; +export interface EventSubscriptionsListGlobalBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** - * Activation state of the partner topic. Possible values include: 'NeverActivated', 'Activated', - * 'Deactivated' + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - activationState?: PartnerTopicActivationState; + filter?: string; /** - * Friendly description about the topic. This can be set by the publisher/partner to show custom - * description for the customer partner topic. - * This will be helpful to remove any ambiguity of the origin of creation of the partner topic - * for the customer. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - partnerTopicFriendlyDescription?: string; + top?: number; } /** - * Properties of a partner topic type. + * Optional Parameters. */ -export interface PartnerTopicType extends Resource { - /** - * Official name of the partner. - */ - partnerName?: string; - /** - * Name of the partner topic type. This name should be unique among all partner topic types - * names. - */ - topicTypeName?: string; +export interface EventSubscriptionsListGlobalBySubscriptionForTopicTypeOptionalParams extends msRest.RequestOptionsBase { /** - * Display Name for the partner topic type. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - displayName?: string; + filter?: string; /** - * Description of the partner topic type. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - description?: string; + top?: number; +} + +/** + * Optional Parameters. + */ +export interface EventSubscriptionsListGlobalByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * URI of the partner website that can be used by Azure customers to setup Event Grid - * integration on an event source. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - setupUri?: string; + filter?: string; /** - * Status of whether the customer has authorized a partner to create partner topics - * in the customer's subscription. Possible values include: 'NotApplicable', 'NotAuthorized', - * 'Authorized' + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - authorizationState?: PartnerTopicTypeAuthorizationState; + top?: number; } /** - * Result of the List Partner Topic Types operation. + * Optional Parameters. */ -export interface PartnerTopicTypesListResult { +export interface EventSubscriptionsListGlobalByResourceGroupForTopicTypeOptionalParams extends msRest.RequestOptionsBase { + /** + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. + */ + filter?: string; /** - * A collection of partner topic types. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - value?: PartnerTopicType[]; + top?: number; } /** - * Information of the private link resource. + * Optional Parameters. */ -export interface PrivateLinkResource { - groupId?: string; - displayName?: string; - requiredMembers?: string[]; - requiredZoneNames?: string[]; - /** - * Fully qualified identifier of the resource. - */ - id?: string; +export interface EventSubscriptionsListRegionalBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** - * Name of the resource + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - name?: string; + filter?: string; /** - * Type of the resource + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - type?: string; + top?: number; } /** - * EventGrid System Topic. + * Optional Parameters. */ -export interface SystemTopic extends TrackedResource { +export interface EventSubscriptionsListRegionalByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * Provisioning state of the system topic. Possible values include: 'Creating', 'Updating', - * 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - readonly provisioningState?: ResourceProvisioningState; + filter?: string; /** - * Source for the system topic. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - source?: string; + top?: number; +} + +/** + * Optional Parameters. + */ +export interface EventSubscriptionsListRegionalBySubscriptionForTopicTypeOptionalParams extends msRest.RequestOptionsBase { /** - * TopicType for the system topic. + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. */ - topicType?: string; + filter?: string; /** - * Metric resource id for the system topic. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - readonly metricResourceId?: string; + top?: number; } /** - * Properties of the System Topic update. + * Optional Parameters. */ -export interface SystemTopicUpdateParameters { +export interface EventSubscriptionsListRegionalByResourceGroupForTopicTypeOptionalParams extends msRest.RequestOptionsBase { + /** + * The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the + * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), + * and ne (for not equal). No arithmetic operations are supported. The following is a valid + * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is + * not a valid filter example: $filter=location eq 'westus'. + */ + filter?: string; /** - * Tags of the system topic. + * The number of results to return per page for the list operation. Valid range for top parameter + * is 1 to 100. If not specified, the default number of results to be returned is 20 items per + * page. */ - tags?: { [propertyName: string]: string }; + top?: number; } /** - * EventGrid Topic + * Optional Parameters. */ -export interface Topic extends TrackedResource { - privateEndpointConnections?: PrivateEndpointConnection[]; - /** - * Provisioning state of the topic. Possible values include: 'Creating', 'Updating', 'Deleting', - * 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: TopicProvisioningState; - /** - * Endpoint for the topic. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly endpoint?: string; - /** - * This determines the format that Event Grid should expect for incoming events published to the - * topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventSchemaV1_0'. Default value: 'EventGridSchema'. - */ - inputSchema?: InputSchema; - /** - * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to - * map various properties of a source schema to various required properties of the EventGridEvent - * schema. - */ - inputSchemaMapping?: InputSchemaMappingUnion; - /** - * Metric resource id for the topic. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly metricResourceId?: string; - /** - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled' - */ - publicNetworkAccess?: PublicNetworkAccess; - /** - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are - * considered only if PublicNetworkAccess is enabled. - */ - inboundIpRules?: InboundIpRule[]; - /** - * The Sku pricing tier for the topic. - */ - sku?: ResourceSku; - /** - * Identity information for the resource. - */ - identity?: IdentityInfo; -} - -/** - * Properties of the Topic update - */ -export interface TopicUpdateParameters { - /** - * Tags of the resource. - */ - tags?: { [propertyName: string]: string }; - /** - * Resource identity information. - */ - identity?: IdentityInfo; - /** - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled' - */ - publicNetworkAccess?: PublicNetworkAccess; - /** - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are - * considered only if PublicNetworkAccess is enabled. - */ - inboundIpRules?: InboundIpRule[]; - /** - * The Sku pricing tier for the topic. - */ - sku?: ResourceSku; -} - -/** - * Shared access keys of the Topic - */ -export interface TopicSharedAccessKeys { - /** - * Shared access key1 for the topic. - */ - key1?: string; - /** - * Shared access key2 for the topic. - */ - key2?: string; -} - -/** - * Topic regenerate share access key request - */ -export interface TopicRegenerateKeyRequest { - /** - * Key name to regenerate key1 or key2 - */ - keyName: string; -} - -/** - * Event grid Extension Topic. This is used for getting Event Grid related metrics for Azure - * resources. - */ -export interface ExtensionTopic extends Resource { - /** - * Description of the extension topic. - */ - description?: string; - /** - * System topic resource id which is mapped to the source. - */ - systemTopic?: string; -} - -/** - * Properties of a topic type info. - */ -export interface TopicTypeInfo extends Resource { - /** - * Namespace of the provider of the topic type. - */ - provider?: string; - /** - * Display Name for the topic type. - */ - displayName?: string; - /** - * Description of the topic type. - */ - description?: string; - /** - * Region type of the resource. Possible values include: 'RegionalResource', 'GlobalResource' - */ - resourceRegionType?: ResourceRegionType; - /** - * Provisioning state of the topic type. Possible values include: 'Creating', 'Updating', - * 'Deleting', 'Succeeded', 'Canceled', 'Failed' - */ - provisioningState?: TopicTypeProvisioningState; - /** - * List of locations supported by this topic type. - */ - supportedLocations?: string[]; - /** - * Source resource format. - */ - sourceResourceFormat?: string; -} - -/** - * Optional Parameters. - */ -export interface DomainsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface EventSubscriptionsListByResourceOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1691,7 +1341,7 @@ export interface DomainsListBySubscriptionOptionalParams extends msRest.RequestO /** * Optional Parameters. */ -export interface DomainsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface EventSubscriptionsListByDomainTopicOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1712,7 +1362,7 @@ export interface DomainsListByResourceGroupOptionalParams extends msRest.Request /** * Optional Parameters. */ -export interface DomainTopicsListByDomainOptionalParams extends msRest.RequestOptionsBase { +export interface TopicsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1733,7 +1383,7 @@ export interface DomainTopicsListByDomainOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface EventChannelsListByPartnerNamespaceOptionalParams extends msRest.RequestOptionsBase { +export interface TopicsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1754,7 +1404,7 @@ export interface EventChannelsListByPartnerNamespaceOptionalParams extends msRes /** * Optional Parameters. */ -export interface EventSubscriptionsListGlobalBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface PrivateEndpointConnectionsListByResourceOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1775,7 +1425,7 @@ export interface EventSubscriptionsListGlobalBySubscriptionOptionalParams extend /** * Optional Parameters. */ -export interface EventSubscriptionsListGlobalBySubscriptionForTopicTypeOptionalParams extends msRest.RequestOptionsBase { +export interface PrivateLinkResourcesListByResourceOptionalParams extends msRest.RequestOptionsBase { /** * The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the @@ -1794,1961 +1444,241 @@ export interface EventSubscriptionsListGlobalBySubscriptionForTopicTypeOptionalP } /** - * Optional Parameters. + * An interface representing EventGridManagementClientOptions. */ -export interface EventSubscriptionsListGlobalByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; +export interface EventGridManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; } /** - * Optional Parameters. + * @interface + * Result of the List Domains operation. + * @extends Array */ -export interface EventSubscriptionsListGlobalByResourceGroupForTopicTypeOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; +export interface DomainsListResult extends Array { /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. + * A link for the next page of domains. */ - top?: number; + nextLink?: string; } /** - * Optional Parameters. + * @interface + * Result of the List Domain Topics operation. + * @extends Array */ -export interface EventSubscriptionsListRegionalBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; +export interface DomainTopicsListResult extends Array { /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. + * A link for the next page of domain topics. */ - top?: number; + nextLink?: string; } /** - * Optional Parameters. + * @interface + * Result of the List EventSubscriptions operation + * @extends Array */ -export interface EventSubscriptionsListRegionalByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; +export interface EventSubscriptionsListResult extends Array { /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. + * A link for the next page of event subscriptions */ - top?: number; + nextLink?: string; } /** - * Optional Parameters. + * @interface + * Result of the List Operations operation + * @extends Array */ -export interface EventSubscriptionsListRegionalBySubscriptionForTopicTypeOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; +export interface OperationsListResult extends Array { } /** - * Optional Parameters. + * @interface + * Result of the List Topics operation + * @extends Array */ -export interface EventSubscriptionsListRegionalByResourceGroupForTopicTypeOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface EventSubscriptionsListByResourceOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface EventSubscriptionsListByDomainTopicOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface SystemTopicEventSubscriptionsListBySystemTopicOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerTopicEventSubscriptionsListByPartnerTopicOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerNamespacesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerNamespacesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerRegistrationsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerRegistrationsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PartnerTopicsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; +export interface TopicsListResult extends Array { /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. + * A link for the next page of topics */ - top?: number; + nextLink?: string; } /** - * Optional Parameters. + * @interface + * Result of the List Event Types operation + * @extends Array */ -export interface PartnerTopicsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; +export interface EventTypesListResult extends Array { } /** - * Optional Parameters. + * @interface + * Result of the list of all private endpoint connections operation. + * @extends Array */ -export interface PrivateEndpointConnectionsListByResourceOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; +export interface PrivateEndpointConnectionListResult extends Array { /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. + * A link for the next page of private endpoint connection resources. */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface PrivateLinkResourcesListByResourceOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface SystemTopicsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface SystemTopicsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface TopicsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * Optional Parameters. - */ -export interface TopicsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the - * 'contains' function as well as the following logical operations: not, and, or, eq (for equal), - * and ne (for not equal). No arithmetic operations are supported. The following is a valid - * filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is - * not a valid filter example: $filter=location eq 'westus'. - */ - filter?: string; - /** - * The number of results to return per page for the list operation. Valid range for top parameter - * is 1 to 100. If not specified, the default number of results to be returned is 20 items per - * page. - */ - top?: number; -} - -/** - * An interface representing EventGridManagementClientOptions. - */ -export interface EventGridManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * Result of the List Domains operation - * @extends Array - */ -export interface DomainsListResult extends Array { - /** - * A link for the next page of domains - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Domain Topics operation - * @extends Array - */ -export interface DomainTopicsListResult extends Array { - /** - * A link for the next page of domain topics - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Event Channels operation - * @extends Array - */ -export interface EventChannelsListResult extends Array { - /** - * A link for the next page of event channels - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List EventSubscriptions operation - * @extends Array - */ -export interface EventSubscriptionsListResult extends Array { - /** - * A link for the next page of event subscriptions - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Operations operation - * @extends Array - */ -export interface OperationsListResult extends Array { -} - -/** - * @interface - * Result of the List Partner Namespaces operation - * @extends Array - */ -export interface PartnerNamespacesListResult extends Array { - /** - * A link for the next page of partner namespaces. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Partner Registrations operation. - * @extends Array - */ -export interface PartnerRegistrationsListResult extends Array { - /** - * A link for the next page of partner registrations. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Partner Topics operation. - * @extends Array - */ -export interface PartnerTopicsListResult extends Array { - /** - * A link for the next page of partner topics. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the list of all private endpoint connections operation. - * @extends Array - */ -export interface PrivateEndpointConnectionListResult extends Array { - /** - * A link for the next page of private endpoint connection resources. - */ - nextLink?: string; + nextLink?: string; } /** * @interface * Result of the List private link resources operation. - * @extends Array - */ -export interface PrivateLinkResourcesListResult extends Array { - /** - * A link for the next page of private link resources. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List System topics operation. - * @extends Array - */ -export interface SystemTopicsListResult extends Array { - /** - * A link for the next page of topics. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Topics operation - * @extends Array - */ -export interface TopicsListResult extends Array { - /** - * A link for the next page of topics - */ - nextLink?: string; -} - -/** - * @interface - * Result of the List Event Types operation - * @extends Array - */ -export interface EventTypesListResult extends Array { -} - -/** - * @interface - * Result of the List Topic Types operation - * @extends Array - */ -export interface TopicTypesListResult extends Array { -} - -/** - * Defines values for PersistedConnectionStatus. - * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - * @readonly - * @enum {string} - */ -export type PersistedConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; - -/** - * Defines values for ResourceProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type ResourceProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for DomainProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type DomainProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for InputSchema. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' - * @readonly - * @enum {string} - */ -export type InputSchema = 'EventGridSchema' | 'CustomEventSchema' | 'CloudEventSchemaV1_0'; - -/** - * Defines values for PublicNetworkAccess. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type PublicNetworkAccess = 'Enabled' | 'Disabled'; - -/** - * Defines values for IpActionType. - * Possible values include: 'Allow' - * @readonly - * @enum {string} - */ -export type IpActionType = 'Allow'; - -/** - * Defines values for Sku. - * Possible values include: 'Basic', 'Premium' - * @readonly - * @enum {string} - */ -export type Sku = 'Basic' | 'Premium'; - -/** - * Defines values for IdentityType. - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - * UserAssigned' - * @readonly - * @enum {string} - */ -export type IdentityType = 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned'; - -/** - * Defines values for DomainTopicProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type DomainTopicProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for EventChannelProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type EventChannelProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for PartnerTopicReadinessState. - * Possible values include: 'NotActivatedByUserYet', 'ActivatedByUser', 'DeactivatedByUser', - * 'DeletedByUser' - * @readonly - * @enum {string} - */ -export type PartnerTopicReadinessState = 'NotActivatedByUserYet' | 'ActivatedByUser' | 'DeactivatedByUser' | 'DeletedByUser'; - -/** - * Defines values for EventSubscriptionProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', - * 'AwaitingManualAction' - * @readonly - * @enum {string} - */ -export type EventSubscriptionProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed' | 'AwaitingManualAction'; - -/** - * Defines values for EventSubscriptionIdentityType. - * Possible values include: 'SystemAssigned', 'UserAssigned' - * @readonly - * @enum {string} - */ -export type EventSubscriptionIdentityType = 'SystemAssigned' | 'UserAssigned'; - -/** - * Defines values for EventDeliverySchema. - * Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0' - * @readonly - * @enum {string} - */ -export type EventDeliverySchema = 'EventGridSchema' | 'CustomInputSchema' | 'CloudEventSchemaV1_0'; - -/** - * Defines values for PartnerNamespaceProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type PartnerNamespaceProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for PartnerRegistrationProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type PartnerRegistrationProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for PartnerRegistrationVisibilityState. - * Possible values include: 'Hidden', 'PublicPreview', 'GenerallyAvailable' - * @readonly - * @enum {string} - */ -export type PartnerRegistrationVisibilityState = 'Hidden' | 'PublicPreview' | 'GenerallyAvailable'; - -/** - * Defines values for PartnerTopicProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type PartnerTopicProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for PartnerTopicActivationState. - * Possible values include: 'NeverActivated', 'Activated', 'Deactivated' - * @readonly - * @enum {string} - */ -export type PartnerTopicActivationState = 'NeverActivated' | 'Activated' | 'Deactivated'; - -/** - * Defines values for PartnerTopicTypeAuthorizationState. - * Possible values include: 'NotApplicable', 'NotAuthorized', 'Authorized' - * @readonly - * @enum {string} - */ -export type PartnerTopicTypeAuthorizationState = 'NotApplicable' | 'NotAuthorized' | 'Authorized'; - -/** - * Defines values for TopicProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type TopicProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for ResourceRegionType. - * Possible values include: 'RegionalResource', 'GlobalResource' - * @readonly - * @enum {string} - */ -export type ResourceRegionType = 'RegionalResource' | 'GlobalResource'; - -/** - * Defines values for TopicTypeProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type TopicTypeProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Contains response data for the get operation. - */ -export type DomainsGetResponse = Domain & { - /** - * 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: Domain; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type DomainsCreateOrUpdateResponse = Domain & { - /** - * 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: Domain; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type DomainsUpdateResponse = Domain & { - /** - * 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: Domain; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type DomainsListBySubscriptionResponse = DomainsListResult & { - /** - * 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: DomainsListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DomainsListByResourceGroupResponse = DomainsListResult & { - /** - * 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: DomainsListResult; - }; -}; - -/** - * Contains response data for the listSharedAccessKeys operation. - */ -export type DomainsListSharedAccessKeysResponse = DomainSharedAccessKeys & { - /** - * 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: DomainSharedAccessKeys; - }; -}; - -/** - * Contains response data for the regenerateKey operation. - */ -export type DomainsRegenerateKeyResponse = DomainSharedAccessKeys & { - /** - * 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: DomainSharedAccessKeys; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DomainsBeginCreateOrUpdateResponse = Domain & { - /** - * 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: Domain; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type DomainsBeginUpdateResponse = Domain & { - /** - * 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: Domain; - }; -}; - -/** - * Contains response data for the listBySubscriptionNext operation. - */ -export type DomainsListBySubscriptionNextResponse = DomainsListResult & { - /** - * 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: DomainsListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type DomainsListByResourceGroupNextResponse = DomainsListResult & { - /** - * 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: DomainsListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DomainTopicsGetResponse = DomainTopic & { - /** - * 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: DomainTopic; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type DomainTopicsCreateOrUpdateResponse = DomainTopic & { - /** - * 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: DomainTopic; - }; -}; - -/** - * Contains response data for the listByDomain operation. - */ -export type DomainTopicsListByDomainResponse = DomainTopicsListResult & { - /** - * 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: DomainTopicsListResult; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DomainTopicsBeginCreateOrUpdateResponse = DomainTopic & { - /** - * 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: DomainTopic; - }; -}; - -/** - * Contains response data for the listByDomainNext operation. - */ -export type DomainTopicsListByDomainNextResponse = DomainTopicsListResult & { - /** - * 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: DomainTopicsListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type EventChannelsGetResponse = EventChannel & { - /** - * 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: EventChannel; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type EventChannelsCreateOrUpdateResponse = EventChannel & { - /** - * 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: EventChannel; - }; -}; - -/** - * Contains response data for the listByPartnerNamespace operation. - */ -export type EventChannelsListByPartnerNamespaceResponse = EventChannelsListResult & { - /** - * 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: EventChannelsListResult; - }; -}; - -/** - * Contains response data for the listByPartnerNamespaceNext operation. - */ -export type EventChannelsListByPartnerNamespaceNextResponse = EventChannelsListResult & { - /** - * 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: EventChannelsListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type EventSubscriptionsGetResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type EventSubscriptionsCreateOrUpdateResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type EventSubscriptionsUpdateResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the getFullUrl operation. - */ -export type EventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl & { - /** - * 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: EventSubscriptionFullUrl; - }; -}; - -/** - * Contains response data for the listGlobalBySubscription operation. - */ -export type EventSubscriptionsListGlobalBySubscriptionResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalBySubscriptionForTopicType operation. - */ -export type EventSubscriptionsListGlobalBySubscriptionForTopicTypeResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalByResourceGroup operation. - */ -export type EventSubscriptionsListGlobalByResourceGroupResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalByResourceGroupForTopicType operation. - */ -export type EventSubscriptionsListGlobalByResourceGroupForTopicTypeResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalBySubscription operation. - */ -export type EventSubscriptionsListRegionalBySubscriptionResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalByResourceGroup operation. - */ -export type EventSubscriptionsListRegionalByResourceGroupResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalBySubscriptionForTopicType operation. - */ -export type EventSubscriptionsListRegionalBySubscriptionForTopicTypeResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalByResourceGroupForTopicType operation. - */ -export type EventSubscriptionsListRegionalByResourceGroupForTopicTypeResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listByResource operation. - */ -export type EventSubscriptionsListByResourceResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listByDomainTopic operation. - */ -export type EventSubscriptionsListByDomainTopicResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type EventSubscriptionsBeginCreateOrUpdateResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type EventSubscriptionsBeginUpdateResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the listGlobalBySubscriptionNext operation. - */ -export type EventSubscriptionsListGlobalBySubscriptionNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalBySubscriptionForTopicTypeNext operation. - */ -export type EventSubscriptionsListGlobalBySubscriptionForTopicTypeNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalByResourceGroupNext operation. - */ -export type EventSubscriptionsListGlobalByResourceGroupNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listGlobalByResourceGroupForTopicTypeNext operation. - */ -export type EventSubscriptionsListGlobalByResourceGroupForTopicTypeNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalBySubscriptionNext operation. - */ -export type EventSubscriptionsListRegionalBySubscriptionNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalByResourceGroupNext operation. - */ -export type EventSubscriptionsListRegionalByResourceGroupNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalBySubscriptionForTopicTypeNext operation. - */ -export type EventSubscriptionsListRegionalBySubscriptionForTopicTypeNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listRegionalByResourceGroupForTopicTypeNext operation. - */ -export type EventSubscriptionsListRegionalByResourceGroupForTopicTypeNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listByResourceNext operation. - */ -export type EventSubscriptionsListByResourceNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the listByDomainTopicNext operation. - */ -export type EventSubscriptionsListByDomainTopicNextResponse = EventSubscriptionsListResult & { - /** - * 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: EventSubscriptionsListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type SystemTopicEventSubscriptionsGetResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type SystemTopicEventSubscriptionsCreateOrUpdateResponse = EventSubscription & { - /** - * 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: EventSubscription; - }; -}; - -/** - * Contains response data for the update operation. + * @extends Array */ -export type SystemTopicEventSubscriptionsUpdateResponse = EventSubscription & { +export interface PrivateLinkResourcesListResult extends Array { /** - * The underlying HTTP response. + * A link for the next page of private link resources. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + nextLink?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * @interface + * Result of the List Topic Types operation + * @extends Array + */ +export interface TopicTypesListResult extends Array { +} /** - * Contains response data for the getFullUrl operation. + * Defines values for PersistedConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} */ -export type SystemTopicEventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PersistedConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscriptionFullUrl; - }; -}; +/** + * Defines values for ResourceProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} + */ +export type ResourceProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; /** - * Contains response data for the listBySystemTopic operation. + * Defines values for DomainProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} */ -export type SystemTopicEventSubscriptionsListBySystemTopicResponse = EventSubscriptionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DomainProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscriptionsListResult; - }; -}; +/** + * Defines values for InputSchema. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventSchemaV1_0' + * @readonly + * @enum {string} + */ +export type InputSchema = 'EventGridSchema' | 'CustomEventSchema' | 'CloudEventSchemaV1_0'; /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} */ -export type SystemTopicEventSubscriptionsBeginCreateOrUpdateResponse = EventSubscription & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * Defines values for IpActionType. + * Possible values include: 'Allow' + * @readonly + * @enum {string} + */ +export type IpActionType = 'Allow'; /** - * Contains response data for the beginUpdate operation. + * Defines values for DomainTopicProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} */ -export type SystemTopicEventSubscriptionsBeginUpdateResponse = EventSubscription & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DomainTopicProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * Defines values for EventSubscriptionProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', + * 'AwaitingManualAction' + * @readonly + * @enum {string} + */ +export type EventSubscriptionProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed' | 'AwaitingManualAction'; /** - * Contains response data for the listBySystemTopicNext operation. + * Defines values for EventDeliverySchema. + * Possible values include: 'EventGridSchema', 'CustomInputSchema', 'CloudEventSchemaV1_0' + * @readonly + * @enum {string} */ -export type SystemTopicEventSubscriptionsListBySystemTopicNextResponse = EventSubscriptionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type EventDeliverySchema = 'EventGridSchema' | 'CustomInputSchema' | 'CloudEventSchemaV1_0'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscriptionsListResult; - }; -}; +/** + * Defines values for TopicProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} + */ +export type TopicProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; /** - * Contains response data for the get operation. + * Defines values for ResourceRegionType. + * Possible values include: 'RegionalResource', 'GlobalResource' + * @readonly + * @enum {string} */ -export type PartnerTopicEventSubscriptionsGetResponse = EventSubscription & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ResourceRegionType = 'RegionalResource' | 'GlobalResource'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * Defines values for TopicTypeProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} + */ +export type TopicTypeProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; /** - * Contains response data for the createOrUpdate operation. + * Defines values for ParentType. + * Possible values include: 'topics', 'domains' + * @readonly + * @enum {string} */ -export type PartnerTopicEventSubscriptionsCreateOrUpdateResponse = EventSubscription & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ParentType = 'topics' | 'domains'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * Defines values for ParentType1. + * Possible values include: 'topics', 'domains' + * @readonly + * @enum {string} + */ +export type ParentType1 = 'topics' | 'domains'; /** - * Contains response data for the update operation. + * Defines values for ParentType2. + * Possible values include: 'topics', 'domains' + * @readonly + * @enum {string} */ -export type PartnerTopicEventSubscriptionsUpdateResponse = EventSubscription & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ParentType2 = 'topics' | 'domains'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscription; - }; -}; +/** + * Defines values for ParentType3. + * Possible values include: 'topics', 'domains' + * @readonly + * @enum {string} + */ +export type ParentType3 = 'topics' | 'domains'; /** - * Contains response data for the getFullUrl operation. + * Contains response data for the get operation. */ -export type PartnerTopicEventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl & { +export type DomainsGetResponse = Domain & { /** * The underlying HTTP response. */ @@ -3761,14 +1691,14 @@ export type PartnerTopicEventSubscriptionsGetFullUrlResponse = EventSubscription /** * The response body as parsed JSON or XML */ - parsedBody: EventSubscriptionFullUrl; + parsedBody: Domain; }; }; /** - * Contains response data for the listByPartnerTopic operation. + * Contains response data for the createOrUpdate operation. */ -export type PartnerTopicEventSubscriptionsListByPartnerTopicResponse = EventSubscriptionsListResult & { +export type DomainsCreateOrUpdateResponse = Domain & { /** * The underlying HTTP response. */ @@ -3781,14 +1711,14 @@ export type PartnerTopicEventSubscriptionsListByPartnerTopicResponse = EventSubs /** * The response body as parsed JSON or XML */ - parsedBody: EventSubscriptionsListResult; + parsedBody: Domain; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the update operation. */ -export type PartnerTopicEventSubscriptionsBeginCreateOrUpdateResponse = EventSubscription & { +export type DomainsUpdateResponse = Domain & { /** * The underlying HTTP response. */ @@ -3801,14 +1731,14 @@ export type PartnerTopicEventSubscriptionsBeginCreateOrUpdateResponse = EventSub /** * The response body as parsed JSON or XML */ - parsedBody: EventSubscription; + parsedBody: Domain; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listBySubscription operation. */ -export type PartnerTopicEventSubscriptionsBeginUpdateResponse = EventSubscription & { +export type DomainsListBySubscriptionResponse = DomainsListResult & { /** * The underlying HTTP response. */ @@ -3821,14 +1751,14 @@ export type PartnerTopicEventSubscriptionsBeginUpdateResponse = EventSubscriptio /** * The response body as parsed JSON or XML */ - parsedBody: EventSubscription; + parsedBody: DomainsListResult; }; }; /** - * Contains response data for the listByPartnerTopicNext operation. + * Contains response data for the listByResourceGroup operation. */ -export type PartnerTopicEventSubscriptionsListByPartnerTopicNextResponse = EventSubscriptionsListResult & { +export type DomainsListByResourceGroupResponse = DomainsListResult & { /** * The underlying HTTP response. */ @@ -3841,14 +1771,14 @@ export type PartnerTopicEventSubscriptionsListByPartnerTopicNextResponse = Event /** * The response body as parsed JSON or XML */ - parsedBody: EventSubscriptionsListResult; + parsedBody: DomainsListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listSharedAccessKeys operation. */ -export type OperationsListResponse = OperationsListResult & { +export type DomainsListSharedAccessKeysResponse = DomainSharedAccessKeys & { /** * The underlying HTTP response. */ @@ -3861,14 +1791,14 @@ export type OperationsListResponse = OperationsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: DomainSharedAccessKeys; }; }; /** - * Contains response data for the get operation. + * Contains response data for the regenerateKey operation. */ -export type PartnerNamespacesGetResponse = PartnerNamespace & { +export type DomainsRegenerateKeyResponse = DomainSharedAccessKeys & { /** * The underlying HTTP response. */ @@ -3881,14 +1811,14 @@ export type PartnerNamespacesGetResponse = PartnerNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespace; + parsedBody: DomainSharedAccessKeys; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PartnerNamespacesCreateOrUpdateResponse = PartnerNamespace & { +export type DomainsBeginCreateOrUpdateResponse = Domain & { /** * The underlying HTTP response. */ @@ -3901,14 +1831,14 @@ export type PartnerNamespacesCreateOrUpdateResponse = PartnerNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespace; + parsedBody: Domain; }; }; /** - * Contains response data for the update operation. + * Contains response data for the beginUpdate operation. */ -export type PartnerNamespacesUpdateResponse = PartnerNamespace & { +export type DomainsBeginUpdateResponse = Domain & { /** * The underlying HTTP response. */ @@ -3921,14 +1851,14 @@ export type PartnerNamespacesUpdateResponse = PartnerNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespace; + parsedBody: Domain; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type PartnerNamespacesListBySubscriptionResponse = PartnerNamespacesListResult & { +export type DomainsListBySubscriptionNextResponse = DomainsListResult & { /** * The underlying HTTP response. */ @@ -3941,14 +1871,14 @@ export type PartnerNamespacesListBySubscriptionResponse = PartnerNamespacesListR /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespacesListResult; + parsedBody: DomainsListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type PartnerNamespacesListByResourceGroupResponse = PartnerNamespacesListResult & { +export type DomainsListByResourceGroupNextResponse = DomainsListResult & { /** * The underlying HTTP response. */ @@ -3961,14 +1891,14 @@ export type PartnerNamespacesListByResourceGroupResponse = PartnerNamespacesList /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespacesListResult; + parsedBody: DomainsListResult; }; }; /** - * Contains response data for the listSharedAccessKeys operation. + * Contains response data for the get operation. */ -export type PartnerNamespacesListSharedAccessKeysResponse = PartnerNamespaceSharedAccessKeys & { +export type DomainTopicsGetResponse = DomainTopic & { /** * The underlying HTTP response. */ @@ -3981,14 +1911,14 @@ export type PartnerNamespacesListSharedAccessKeysResponse = PartnerNamespaceShar /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespaceSharedAccessKeys; + parsedBody: DomainTopic; }; }; /** - * Contains response data for the regenerateKey operation. + * Contains response data for the createOrUpdate operation. */ -export type PartnerNamespacesRegenerateKeyResponse = PartnerNamespaceSharedAccessKeys & { +export type DomainTopicsCreateOrUpdateResponse = DomainTopic & { /** * The underlying HTTP response. */ @@ -4001,14 +1931,14 @@ export type PartnerNamespacesRegenerateKeyResponse = PartnerNamespaceSharedAcces /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespaceSharedAccessKeys; + parsedBody: DomainTopic; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByDomain operation. */ -export type PartnerNamespacesBeginCreateOrUpdateResponse = PartnerNamespace & { +export type DomainTopicsListByDomainResponse = DomainTopicsListResult & { /** * The underlying HTTP response. */ @@ -4021,14 +1951,14 @@ export type PartnerNamespacesBeginCreateOrUpdateResponse = PartnerNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespace; + parsedBody: DomainTopicsListResult; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PartnerNamespacesBeginUpdateResponse = PartnerNamespace & { +export type DomainTopicsBeginCreateOrUpdateResponse = DomainTopic & { /** * The underlying HTTP response. */ @@ -4041,14 +1971,14 @@ export type PartnerNamespacesBeginUpdateResponse = PartnerNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespace; + parsedBody: DomainTopic; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listByDomainNext operation. */ -export type PartnerNamespacesListBySubscriptionNextResponse = PartnerNamespacesListResult & { +export type DomainTopicsListByDomainNextResponse = DomainTopicsListResult & { /** * The underlying HTTP response. */ @@ -4061,14 +1991,14 @@ export type PartnerNamespacesListBySubscriptionNextResponse = PartnerNamespacesL /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespacesListResult; + parsedBody: DomainTopicsListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type PartnerNamespacesListByResourceGroupNextResponse = PartnerNamespacesListResult & { +export type EventSubscriptionsGetResponse = EventSubscription & { /** * The underlying HTTP response. */ @@ -4081,14 +2011,14 @@ export type PartnerNamespacesListByResourceGroupNextResponse = PartnerNamespaces /** * The response body as parsed JSON or XML */ - parsedBody: PartnerNamespacesListResult; + parsedBody: EventSubscription; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdate operation. */ -export type PartnerRegistrationsGetResponse = PartnerRegistration & { +export type EventSubscriptionsCreateOrUpdateResponse = EventSubscription & { /** * The underlying HTTP response. */ @@ -4101,14 +2031,14 @@ export type PartnerRegistrationsGetResponse = PartnerRegistration & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistration; + parsedBody: EventSubscription; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the update operation. */ -export type PartnerRegistrationsCreateOrUpdateResponse = PartnerRegistration & { +export type EventSubscriptionsUpdateResponse = EventSubscription & { /** * The underlying HTTP response. */ @@ -4121,14 +2051,14 @@ export type PartnerRegistrationsCreateOrUpdateResponse = PartnerRegistration & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistration; + parsedBody: EventSubscription; }; }; /** - * Contains response data for the update operation. + * Contains response data for the getFullUrl operation. */ -export type PartnerRegistrationsUpdateResponse = PartnerRegistration & { +export type EventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl & { /** * The underlying HTTP response. */ @@ -4141,14 +2071,14 @@ export type PartnerRegistrationsUpdateResponse = PartnerRegistration & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistration; + parsedBody: EventSubscriptionFullUrl; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listGlobalBySubscription operation. */ -export type PartnerRegistrationsListBySubscriptionResponse = PartnerRegistrationsListResult & { +export type EventSubscriptionsListGlobalBySubscriptionResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4161,14 +2091,14 @@ export type PartnerRegistrationsListBySubscriptionResponse = PartnerRegistration /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistrationsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listGlobalBySubscriptionForTopicType operation. */ -export type PartnerRegistrationsListByResourceGroupResponse = PartnerRegistrationsListResult & { +export type EventSubscriptionsListGlobalBySubscriptionForTopicTypeResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4181,14 +2111,14 @@ export type PartnerRegistrationsListByResourceGroupResponse = PartnerRegistratio /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistrationsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listGlobalByResourceGroup operation. */ -export type PartnerRegistrationsListResponse = PartnerRegistrationsListResult & { +export type EventSubscriptionsListGlobalByResourceGroupResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4201,14 +2131,14 @@ export type PartnerRegistrationsListResponse = PartnerRegistrationsListResult & /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistrationsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listGlobalByResourceGroupForTopicType operation. */ -export type PartnerRegistrationsListBySubscriptionNextResponse = PartnerRegistrationsListResult & { +export type EventSubscriptionsListGlobalByResourceGroupForTopicTypeResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4221,14 +2151,14 @@ export type PartnerRegistrationsListBySubscriptionNextResponse = PartnerRegistra /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistrationsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listRegionalBySubscription operation. */ -export type PartnerRegistrationsListByResourceGroupNextResponse = PartnerRegistrationsListResult & { +export type EventSubscriptionsListRegionalBySubscriptionResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4241,14 +2171,14 @@ export type PartnerRegistrationsListByResourceGroupNextResponse = PartnerRegistr /** * The response body as parsed JSON or XML */ - parsedBody: PartnerRegistrationsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listRegionalByResourceGroup operation. */ -export type PartnerTopicsGetResponse = PartnerTopic & { +export type EventSubscriptionsListRegionalByResourceGroupResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4261,14 +2191,14 @@ export type PartnerTopicsGetResponse = PartnerTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopic; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listRegionalBySubscriptionForTopicType operation. */ -export type PartnerTopicsUpdateResponse = PartnerTopic & { +export type EventSubscriptionsListRegionalBySubscriptionForTopicTypeResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4281,14 +2211,14 @@ export type PartnerTopicsUpdateResponse = PartnerTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopic; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listRegionalByResourceGroupForTopicType operation. */ -export type PartnerTopicsListBySubscriptionResponse = PartnerTopicsListResult & { +export type EventSubscriptionsListRegionalByResourceGroupForTopicTypeResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4301,14 +2231,14 @@ export type PartnerTopicsListBySubscriptionResponse = PartnerTopicsListResult & /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopicsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByResource operation. */ -export type PartnerTopicsListByResourceGroupResponse = PartnerTopicsListResult & { +export type EventSubscriptionsListByResourceResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4321,14 +2251,14 @@ export type PartnerTopicsListByResourceGroupResponse = PartnerTopicsListResult & /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopicsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the activate operation. + * Contains response data for the listByDomainTopic operation. */ -export type PartnerTopicsActivateResponse = PartnerTopic & { +export type EventSubscriptionsListByDomainTopicResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4341,14 +2271,14 @@ export type PartnerTopicsActivateResponse = PartnerTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopic; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the deactivate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PartnerTopicsDeactivateResponse = PartnerTopic & { +export type EventSubscriptionsBeginCreateOrUpdateResponse = EventSubscription & { /** * The underlying HTTP response. */ @@ -4361,14 +2291,14 @@ export type PartnerTopicsDeactivateResponse = PartnerTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopic; + parsedBody: EventSubscription; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the beginUpdate operation. */ -export type PartnerTopicsListBySubscriptionNextResponse = PartnerTopicsListResult & { +export type EventSubscriptionsBeginUpdateResponse = EventSubscription & { /** * The underlying HTTP response. */ @@ -4381,14 +2311,14 @@ export type PartnerTopicsListBySubscriptionNextResponse = PartnerTopicsListResul /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopicsListResult; + parsedBody: EventSubscription; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listGlobalBySubscriptionNext operation. */ -export type PartnerTopicsListByResourceGroupNextResponse = PartnerTopicsListResult & { +export type EventSubscriptionsListGlobalBySubscriptionNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4401,14 +2331,14 @@ export type PartnerTopicsListByResourceGroupNextResponse = PartnerTopicsListResu /** * The response body as parsed JSON or XML */ - parsedBody: PartnerTopicsListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listGlobalBySubscriptionForTopicTypeNext operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { +export type EventSubscriptionsListGlobalBySubscriptionForTopicTypeNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4421,14 +2351,14 @@ export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listGlobalByResourceGroupNext operation. */ -export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection & { +export type EventSubscriptionsListGlobalByResourceGroupNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4441,14 +2371,14 @@ export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResource operation. + * Contains response data for the listGlobalByResourceGroupForTopicTypeNext operation. */ -export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointConnectionListResult & { +export type EventSubscriptionsListGlobalByResourceGroupForTopicTypeNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4461,14 +2391,14 @@ export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointCo /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listRegionalBySubscriptionNext operation. */ -export type PrivateEndpointConnectionsBeginUpdateResponse = PrivateEndpointConnection & { +export type EventSubscriptionsListRegionalBySubscriptionNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4481,14 +2411,14 @@ export type PrivateEndpointConnectionsBeginUpdateResponse = PrivateEndpointConne /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResourceNext operation. + * Contains response data for the listRegionalByResourceGroupNext operation. */ -export type PrivateEndpointConnectionsListByResourceNextResponse = PrivateEndpointConnectionListResult & { +export type EventSubscriptionsListRegionalByResourceGroupNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4501,14 +2431,14 @@ export type PrivateEndpointConnectionsListByResourceNextResponse = PrivateEndpoi /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listRegionalBySubscriptionForTopicTypeNext operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { +export type EventSubscriptionsListRegionalBySubscriptionForTopicTypeNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4521,14 +2451,14 @@ export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResource; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the listByResource operation. + * Contains response data for the listRegionalByResourceGroupForTopicTypeNext operation. */ -export type PrivateLinkResourcesListByResourceResponse = PrivateLinkResourcesListResult & { +export type EventSubscriptionsListRegionalByResourceGroupForTopicTypeNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4541,14 +2471,14 @@ export type PrivateLinkResourcesListByResourceResponse = PrivateLinkResourcesLis /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourcesListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** * Contains response data for the listByResourceNext operation. */ -export type PrivateLinkResourcesListByResourceNextResponse = PrivateLinkResourcesListResult & { +export type EventSubscriptionsListByResourceNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4561,14 +2491,14 @@ export type PrivateLinkResourcesListByResourceNextResponse = PrivateLinkResource /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourcesListResult; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByDomainTopicNext operation. */ -export type SystemTopicsGetResponse = SystemTopic & { +export type EventSubscriptionsListByDomainTopicNextResponse = EventSubscriptionsListResult & { /** * The underlying HTTP response. */ @@ -4581,14 +2511,14 @@ export type SystemTopicsGetResponse = SystemTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopic; + parsedBody: EventSubscriptionsListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type SystemTopicsCreateOrUpdateResponse = SystemTopic & { +export type OperationsListResponse = OperationsListResult & { /** * The underlying HTTP response. */ @@ -4601,14 +2531,14 @@ export type SystemTopicsCreateOrUpdateResponse = SystemTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopic; + parsedBody: OperationsListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type SystemTopicsUpdateResponse = SystemTopic & { +export type TopicsGetResponse = Topic & { /** * The underlying HTTP response. */ @@ -4621,14 +2551,14 @@ export type SystemTopicsUpdateResponse = SystemTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopic; + parsedBody: Topic; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the createOrUpdate operation. */ -export type SystemTopicsListBySubscriptionResponse = SystemTopicsListResult & { +export type TopicsCreateOrUpdateResponse = Topic & { /** * The underlying HTTP response. */ @@ -4641,14 +2571,14 @@ export type SystemTopicsListBySubscriptionResponse = SystemTopicsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopicsListResult; + parsedBody: Topic; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the update operation. */ -export type SystemTopicsListByResourceGroupResponse = SystemTopicsListResult & { +export type TopicsUpdateResponse = Topic & { /** * The underlying HTTP response. */ @@ -4661,14 +2591,14 @@ export type SystemTopicsListByResourceGroupResponse = SystemTopicsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopicsListResult; + parsedBody: Topic; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listBySubscription operation. */ -export type SystemTopicsBeginCreateOrUpdateResponse = SystemTopic & { +export type TopicsListBySubscriptionResponse = TopicsListResult & { /** * The underlying HTTP response. */ @@ -4681,14 +2611,14 @@ export type SystemTopicsBeginCreateOrUpdateResponse = SystemTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopic; + parsedBody: TopicsListResult; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listByResourceGroup operation. */ -export type SystemTopicsBeginUpdateResponse = SystemTopic & { +export type TopicsListByResourceGroupResponse = TopicsListResult & { /** * The underlying HTTP response. */ @@ -4701,14 +2631,14 @@ export type SystemTopicsBeginUpdateResponse = SystemTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopic; + parsedBody: TopicsListResult; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listSharedAccessKeys operation. */ -export type SystemTopicsListBySubscriptionNextResponse = SystemTopicsListResult & { +export type TopicsListSharedAccessKeysResponse = TopicSharedAccessKeys & { /** * The underlying HTTP response. */ @@ -4721,14 +2651,14 @@ export type SystemTopicsListBySubscriptionNextResponse = SystemTopicsListResult /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopicsListResult; + parsedBody: TopicSharedAccessKeys; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the regenerateKey operation. */ -export type SystemTopicsListByResourceGroupNextResponse = SystemTopicsListResult & { +export type TopicsRegenerateKeyResponse = TopicSharedAccessKeys & { /** * The underlying HTTP response. */ @@ -4741,14 +2671,14 @@ export type SystemTopicsListByResourceGroupNextResponse = SystemTopicsListResult /** * The response body as parsed JSON or XML */ - parsedBody: SystemTopicsListResult; + parsedBody: TopicSharedAccessKeys; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listEventTypes operation. */ -export type TopicsGetResponse = Topic & { +export type TopicsListEventTypesResponse = EventTypesListResult & { /** * The underlying HTTP response. */ @@ -4761,14 +2691,14 @@ export type TopicsGetResponse = Topic & { /** * The response body as parsed JSON or XML */ - parsedBody: Topic; + parsedBody: EventTypesListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type TopicsCreateOrUpdateResponse = Topic & { +export type TopicsBeginCreateOrUpdateResponse = Topic & { /** * The underlying HTTP response. */ @@ -4786,9 +2716,9 @@ export type TopicsCreateOrUpdateResponse = Topic & { }; /** - * Contains response data for the update operation. + * Contains response data for the beginUpdate operation. */ -export type TopicsUpdateResponse = Topic & { +export type TopicsBeginUpdateResponse = Topic & { /** * The underlying HTTP response. */ @@ -4806,9 +2736,9 @@ export type TopicsUpdateResponse = Topic & { }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type TopicsListBySubscriptionResponse = TopicsListResult & { +export type TopicsListBySubscriptionNextResponse = TopicsListResult & { /** * The underlying HTTP response. */ @@ -4826,9 +2756,9 @@ export type TopicsListBySubscriptionResponse = TopicsListResult & { }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type TopicsListByResourceGroupResponse = TopicsListResult & { +export type TopicsListByResourceGroupNextResponse = TopicsListResult & { /** * The underlying HTTP response. */ @@ -4846,9 +2776,9 @@ export type TopicsListByResourceGroupResponse = TopicsListResult & { }; /** - * Contains response data for the listSharedAccessKeys operation. + * Contains response data for the get operation. */ -export type TopicsListSharedAccessKeysResponse = TopicSharedAccessKeys & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -4861,14 +2791,14 @@ export type TopicsListSharedAccessKeysResponse = TopicSharedAccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: TopicSharedAccessKeys; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the regenerateKey operation. + * Contains response data for the update operation. */ -export type TopicsRegenerateKeyResponse = TopicSharedAccessKeys & { +export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -4881,14 +2811,14 @@ export type TopicsRegenerateKeyResponse = TopicSharedAccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: TopicSharedAccessKeys; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listEventTypes operation. + * Contains response data for the listByResource operation. */ -export type TopicsListEventTypesResponse = EventTypesListResult & { +export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -4901,14 +2831,14 @@ export type TopicsListEventTypesResponse = EventTypesListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventTypesListResult; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the beginUpdate operation. */ -export type TopicsBeginCreateOrUpdateResponse = Topic & { +export type PrivateEndpointConnectionsBeginUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -4921,14 +2851,14 @@ export type TopicsBeginCreateOrUpdateResponse = Topic & { /** * The response body as parsed JSON or XML */ - parsedBody: Topic; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the listByResourceNext operation. */ -export type TopicsBeginUpdateResponse = Topic & { +export type PrivateEndpointConnectionsListByResourceNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -4941,14 +2871,14 @@ export type TopicsBeginUpdateResponse = Topic & { /** * The response body as parsed JSON or XML */ - parsedBody: Topic; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the get operation. */ -export type TopicsListBySubscriptionNextResponse = TopicsListResult & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The underlying HTTP response. */ @@ -4961,14 +2891,14 @@ export type TopicsListBySubscriptionNextResponse = TopicsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: TopicsListResult; + parsedBody: PrivateLinkResource; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listByResource operation. */ -export type TopicsListByResourceGroupNextResponse = TopicsListResult & { +export type PrivateLinkResourcesListByResourceResponse = PrivateLinkResourcesListResult & { /** * The underlying HTTP response. */ @@ -4981,14 +2911,14 @@ export type TopicsListByResourceGroupNextResponse = TopicsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: TopicsListResult; + parsedBody: PrivateLinkResourcesListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceNext operation. */ -export type ExtensionTopicsGetResponse = ExtensionTopic & { +export type PrivateLinkResourcesListByResourceNextResponse = PrivateLinkResourcesListResult & { /** * The underlying HTTP response. */ @@ -5001,7 +2931,7 @@ export type ExtensionTopicsGetResponse = ExtensionTopic & { /** * The response body as parsed JSON or XML */ - parsedBody: ExtensionTopic; + parsedBody: PrivateLinkResourcesListResult; }; }; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts index c807b128e6c7..468c72e67071 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts @@ -173,84 +173,6 @@ export const InboundIpRule: msRest.CompositeMapper = { } }; -export const ResourceSku: msRest.CompositeMapper = { - serializedName: "ResourceSku", - type: { - name: "Composite", - className: "ResourceSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const UserIdentityProperties: msRest.CompositeMapper = { - serializedName: "UserIdentityProperties", - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - type: { - name: "String" - } - } - } - } -}; - -export const IdentityInfo: msRest.CompositeMapper = { - serializedName: "IdentityInfo", - type: { - name: "Composite", - className: "IdentityInfo", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "UserIdentityProperties" - } - } - } - } - } - } -}; - export const JsonField: msRest.CompositeMapper = { serializedName: "JsonField", type: { @@ -444,20 +366,6 @@ export const Domain: msRest.CompositeMapper = { } } } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "IdentityInfo" - } } } } @@ -497,20 +405,6 @@ export const DomainUpdateParameters: msRest.CompositeMapper = { } } } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "IdentityInfo" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } } } } @@ -572,42 +466,20 @@ export const DomainTopic: msRest.CompositeMapper = { } }; -export const EventChannelSource: msRest.CompositeMapper = { - serializedName: "EventChannelSource", - type: { - name: "Composite", - className: "EventChannelSource", - modelProperties: { - source: { - serializedName: "source", - type: { - name: "String" - } - } - } - } -}; - -export const EventChannelDestination: msRest.CompositeMapper = { - serializedName: "EventChannelDestination", +export const EventSubscriptionDestination: msRest.CompositeMapper = { + serializedName: "EventSubscriptionDestination", type: { name: "Composite", - className: "EventChannelDestination", + polymorphicDiscriminator: { + serializedName: "endpointType", + clientName: "endpointType" + }, + uberParent: "EventSubscriptionDestination", + className: "EventSubscriptionDestination", modelProperties: { - azureSubscriptionId: { - serializedName: "azureSubscriptionId", - type: { - name: "String" - } - }, - resourceGroup: { - serializedName: "resourceGroup", - type: { - name: "String" - } - }, - partnerTopicName: { - serializedName: "partnerTopicName", + endpointType: { + required: true, + serializedName: "endpointType", type: { name: "String" } @@ -644,12 +516,42 @@ export const AdvancedFilter: msRest.CompositeMapper = { } }; -export const EventChannelFilter: msRest.CompositeMapper = { - serializedName: "EventChannelFilter", +export const EventSubscriptionFilter: msRest.CompositeMapper = { + serializedName: "EventSubscriptionFilter", type: { name: "Composite", - className: "EventChannelFilter", + className: "EventSubscriptionFilter", modelProperties: { + subjectBeginsWith: { + serializedName: "subjectBeginsWith", + type: { + name: "String" + } + }, + subjectEndsWith: { + serializedName: "subjectEndsWith", + type: { + name: "String" + } + }, + includedEventTypes: { + serializedName: "includedEventTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isSubjectCaseSensitive: { + serializedName: "isSubjectCaseSensitive", + defaultValue: false, + type: { + name: "Boolean" + } + }, advancedFilters: { serializedName: "advancedFilters", type: { @@ -666,6 +568,50 @@ export const EventChannelFilter: msRest.CompositeMapper = { } }; +export const RetryPolicy: msRest.CompositeMapper = { + serializedName: "RetryPolicy", + type: { + name: "Composite", + className: "RetryPolicy", + modelProperties: { + maxDeliveryAttempts: { + serializedName: "maxDeliveryAttempts", + type: { + name: "Number" + } + }, + eventTimeToLiveInMinutes: { + serializedName: "eventTimeToLiveInMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const DeadLetterDestination: msRest.CompositeMapper = { + serializedName: "DeadLetterDestination", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "endpointType", + clientName: "endpointType" + }, + uberParent: "DeadLetterDestination", + className: "DeadLetterDestination", + modelProperties: { + endpointType: { + required: true, + serializedName: "endpointType", + type: { + name: "String" + } + } + } + } +}; + export const NumberInAdvancedFilter: msRest.CompositeMapper = { serializedName: "NumberIn", type: { @@ -690,6 +636,31 @@ export const NumberInAdvancedFilter: msRest.CompositeMapper = { } }; +export const StorageBlobDeadLetterDestination: msRest.CompositeMapper = { + serializedName: "StorageBlob", + type: { + name: "Composite", + polymorphicDiscriminator: DeadLetterDestination.type.polymorphicDiscriminator, + uberParent: "DeadLetterDestination", + className: "StorageBlobDeadLetterDestination", + modelProperties: { + ...DeadLetterDestination.type.modelProperties, + resourceId: { + serializedName: "properties.resourceId", + type: { + name: "String" + } + }, + blobContainerName: { + serializedName: "properties.blobContainerName", + type: { + name: "String" + } + } + } + } +}; + export const NumberNotInAdvancedFilter: msRest.CompositeMapper = { serializedName: "NumberNotIn", type: { @@ -929,56 +900,48 @@ export const StringContainsAdvancedFilter: msRest.CompositeMapper = { } }; -export const EventChannel: msRest.CompositeMapper = { - serializedName: "EventChannel", +export const WebHookEventSubscriptionDestination: msRest.CompositeMapper = { + serializedName: "WebHook", type: { name: "Composite", - className: "EventChannel", + polymorphicDiscriminator: EventSubscriptionDestination.type.polymorphicDiscriminator, + uberParent: "EventSubscriptionDestination", + className: "WebHookEventSubscriptionDestination", modelProperties: { - ...Resource.type.modelProperties, - source: { - serializedName: "properties.source", - type: { - name: "Composite", - className: "EventChannelSource" - } - }, - destination: { - serializedName: "properties.destination", + ...EventSubscriptionDestination.type.modelProperties, + endpointUrl: { + serializedName: "properties.endpointUrl", type: { - name: "Composite", - className: "EventChannelDestination" + name: "String" } }, - provisioningState: { + endpointBaseUrl: { readOnly: true, - serializedName: "properties.provisioningState", + serializedName: "properties.endpointBaseUrl", type: { name: "String" } }, - partnerTopicReadinessState: { - readOnly: true, - serializedName: "properties.partnerTopicReadinessState", + maxEventsPerBatch: { + serializedName: "properties.maxEventsPerBatch", type: { - name: "String" + name: "Number" } }, - expirationTimeIfNotActivatedUtc: { - serializedName: "properties.expirationTimeIfNotActivatedUtc", + preferredBatchSizeInKilobytes: { + serializedName: "properties.preferredBatchSizeInKilobytes", type: { - name: "DateTime" + name: "Number" } }, - filter: { - serializedName: "properties.filter", + azureActiveDirectoryTenantId: { + serializedName: "properties.azureActiveDirectoryTenantId", type: { - name: "Composite", - className: "EventChannelFilter" + name: "String" } }, - partnerTopicFriendlyDescription: { - serializedName: "properties.partnerTopicFriendlyDescription", + azureActiveDirectoryApplicationIdOrUri: { + serializedName: "properties.azureActiveDirectoryApplicationIdOrUri", type: { name: "String" } @@ -987,276 +950,13 @@ export const EventChannel: msRest.CompositeMapper = { } }; -export const EventSubscriptionDestination: msRest.CompositeMapper = { - serializedName: "EventSubscriptionDestination", +export const EventHubEventSubscriptionDestination: msRest.CompositeMapper = { + serializedName: "EventHub", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "endpointType", - clientName: "endpointType" - }, + polymorphicDiscriminator: EventSubscriptionDestination.type.polymorphicDiscriminator, uberParent: "EventSubscriptionDestination", - className: "EventSubscriptionDestination", - modelProperties: { - endpointType: { - required: true, - serializedName: "endpointType", - type: { - name: "String" - } - } - } - } -}; - -export const EventSubscriptionIdentity: msRest.CompositeMapper = { - serializedName: "EventSubscriptionIdentity", - type: { - name: "Composite", - className: "EventSubscriptionIdentity", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - userAssignedIdentity: { - serializedName: "userAssignedIdentity", - type: { - name: "String" - } - } - } - } -}; - -export const DeliveryWithResourceIdentity: msRest.CompositeMapper = { - serializedName: "DeliveryWithResourceIdentity", - type: { - name: "Composite", - className: "DeliveryWithResourceIdentity", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "EventSubscriptionIdentity" - } - }, - destination: { - serializedName: "destination", - type: { - name: "Composite", - className: "EventSubscriptionDestination" - } - } - } - } -}; - -export const EventSubscriptionFilter: msRest.CompositeMapper = { - serializedName: "EventSubscriptionFilter", - type: { - name: "Composite", - className: "EventSubscriptionFilter", - modelProperties: { - subjectBeginsWith: { - serializedName: "subjectBeginsWith", - type: { - name: "String" - } - }, - subjectEndsWith: { - serializedName: "subjectEndsWith", - type: { - name: "String" - } - }, - includedEventTypes: { - serializedName: "includedEventTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - isSubjectCaseSensitive: { - serializedName: "isSubjectCaseSensitive", - defaultValue: false, - type: { - name: "Boolean" - } - }, - advancedFilters: { - serializedName: "advancedFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdvancedFilter" - } - } - } - } - } - } -}; - -export const RetryPolicy: msRest.CompositeMapper = { - serializedName: "RetryPolicy", - type: { - name: "Composite", - className: "RetryPolicy", - modelProperties: { - maxDeliveryAttempts: { - serializedName: "maxDeliveryAttempts", - type: { - name: "Number" - } - }, - eventTimeToLiveInMinutes: { - serializedName: "eventTimeToLiveInMinutes", - type: { - name: "Number" - } - } - } - } -}; - -export const DeadLetterDestination: msRest.CompositeMapper = { - serializedName: "DeadLetterDestination", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "endpointType", - clientName: "endpointType" - }, - uberParent: "DeadLetterDestination", - className: "DeadLetterDestination", - modelProperties: { - endpointType: { - required: true, - serializedName: "endpointType", - type: { - name: "String" - } - } - } - } -}; - -export const DeadLetterWithResourceIdentity: msRest.CompositeMapper = { - serializedName: "DeadLetterWithResourceIdentity", - type: { - name: "Composite", - className: "DeadLetterWithResourceIdentity", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "EventSubscriptionIdentity" - } - }, - deadLetterDestination: { - serializedName: "deadLetterDestination", - type: { - name: "Composite", - className: "DeadLetterDestination" - } - } - } - } -}; - -export const StorageBlobDeadLetterDestination: msRest.CompositeMapper = { - serializedName: "StorageBlob", - type: { - name: "Composite", - polymorphicDiscriminator: DeadLetterDestination.type.polymorphicDiscriminator, - uberParent: "DeadLetterDestination", - className: "StorageBlobDeadLetterDestination", - modelProperties: { - ...DeadLetterDestination.type.modelProperties, - resourceId: { - serializedName: "properties.resourceId", - type: { - name: "String" - } - }, - blobContainerName: { - serializedName: "properties.blobContainerName", - type: { - name: "String" - } - } - } - } -}; - -export const WebHookEventSubscriptionDestination: msRest.CompositeMapper = { - serializedName: "WebHook", - type: { - name: "Composite", - polymorphicDiscriminator: EventSubscriptionDestination.type.polymorphicDiscriminator, - uberParent: "EventSubscriptionDestination", - className: "WebHookEventSubscriptionDestination", - modelProperties: { - ...EventSubscriptionDestination.type.modelProperties, - endpointUrl: { - serializedName: "properties.endpointUrl", - type: { - name: "String" - } - }, - endpointBaseUrl: { - readOnly: true, - serializedName: "properties.endpointBaseUrl", - type: { - name: "String" - } - }, - maxEventsPerBatch: { - serializedName: "properties.maxEventsPerBatch", - type: { - name: "Number" - } - }, - preferredBatchSizeInKilobytes: { - serializedName: "properties.preferredBatchSizeInKilobytes", - type: { - name: "Number" - } - }, - azureActiveDirectoryTenantId: { - serializedName: "properties.azureActiveDirectoryTenantId", - type: { - name: "String" - } - }, - azureActiveDirectoryApplicationIdOrUri: { - serializedName: "properties.azureActiveDirectoryApplicationIdOrUri", - type: { - name: "String" - } - } - } - } -}; - -export const EventHubEventSubscriptionDestination: msRest.CompositeMapper = { - serializedName: "EventHub", - type: { - name: "Composite", - polymorphicDiscriminator: EventSubscriptionDestination.type.polymorphicDiscriminator, - uberParent: "EventSubscriptionDestination", - className: "EventHubEventSubscriptionDestination", + className: "EventHubEventSubscriptionDestination", modelProperties: { ...EventSubscriptionDestination.type.modelProperties, resourceId: { @@ -1410,13 +1110,6 @@ export const EventSubscription: msRest.CompositeMapper = { className: "EventSubscriptionDestination" } }, - deliveryWithResourceIdentity: { - serializedName: "properties.deliveryWithResourceIdentity", - type: { - name: "Composite", - className: "DeliveryWithResourceIdentity" - } - }, filter: { serializedName: "properties.filter", type: { @@ -1460,13 +1153,6 @@ export const EventSubscription: msRest.CompositeMapper = { name: "Composite", className: "DeadLetterDestination" } - }, - deadLetterWithResourceIdentity: { - serializedName: "properties.deadLetterWithResourceIdentity", - type: { - name: "Composite", - className: "DeadLetterWithResourceIdentity" - } } } } @@ -1485,13 +1171,6 @@ export const EventSubscriptionUpdateParameters: msRest.CompositeMapper = { className: "EventSubscriptionDestination" } }, - deliveryWithResourceIdentity: { - serializedName: "deliveryWithResourceIdentity", - type: { - name: "Composite", - className: "DeliveryWithResourceIdentity" - } - }, filter: { serializedName: "filter", type: { @@ -1535,13 +1214,6 @@ export const EventSubscriptionUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "DeadLetterDestination" } - }, - deadLetterWithResourceIdentity: { - serializedName: "deadLetterWithResourceIdentity", - type: { - name: "Composite", - className: "DeadLetterWithResourceIdentity" - } } } } @@ -1597,478 +1269,35 @@ export const OperationInfo: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationInfo" - } - }, - origin: { - serializedName: "origin", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Object" - } - } - } - } -}; - -export const PartnerNamespace: msRest.CompositeMapper = { - serializedName: "PartnerNamespace", - type: { - name: "Composite", - className: "PartnerNamespace", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - partnerRegistrationFullyQualifiedId: { - serializedName: "properties.partnerRegistrationFullyQualifiedId", - type: { - name: "String" - } - }, - endpoint: { - readOnly: true, - serializedName: "properties.endpoint", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerNamespaceUpdateParameters: msRest.CompositeMapper = { - serializedName: "PartnerNamespaceUpdateParameters", - type: { - name: "Composite", - className: "PartnerNamespaceUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PartnerNamespaceSharedAccessKeys: msRest.CompositeMapper = { - serializedName: "PartnerNamespaceSharedAccessKeys", - type: { - name: "Composite", - className: "PartnerNamespaceSharedAccessKeys", - modelProperties: { - key1: { - serializedName: "key1", - type: { - name: "String" - } - }, - key2: { - serializedName: "key2", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerNamespaceRegenerateKeyRequest: msRest.CompositeMapper = { - serializedName: "PartnerNamespaceRegenerateKeyRequest", - type: { - name: "Composite", - className: "PartnerNamespaceRegenerateKeyRequest", - modelProperties: { - keyName: { - required: true, - serializedName: "keyName", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerRegistration: msRest.CompositeMapper = { - serializedName: "PartnerRegistration", - type: { - name: "Composite", - className: "PartnerRegistration", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - partnerName: { - serializedName: "properties.partnerName", - type: { - name: "String" - } - }, - partnerResourceTypeName: { - serializedName: "properties.partnerResourceTypeName", - type: { - name: "String" - } - }, - partnerResourceTypeDisplayName: { - serializedName: "properties.partnerResourceTypeDisplayName", - type: { - name: "String" - } - }, - partnerResourceTypeDescription: { - serializedName: "properties.partnerResourceTypeDescription", - type: { - name: "String" - } - }, - longDescription: { - serializedName: "properties.longDescription", - type: { - name: "String" - } - }, - partnerCustomerServiceNumber: { - serializedName: "properties.partnerCustomerServiceNumber", - type: { - name: "String" - } - }, - partnerCustomerServiceExtension: { - serializedName: "properties.partnerCustomerServiceExtension", - type: { - name: "String" - } - }, - customerServiceUri: { - serializedName: "properties.customerServiceUri", - type: { - name: "String" - } - }, - setupUri: { - serializedName: "properties.setupUri", - type: { - name: "String" - } - }, - logoUri: { - serializedName: "properties.logoUri", - type: { - name: "String" - } - }, - visibilityState: { - serializedName: "properties.visibilityState", - type: { - name: "String" - } - }, - authorizedAzureSubscriptionIds: { - serializedName: "properties.authorizedAzureSubscriptionIds", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PartnerRegistrationUpdateParameters: msRest.CompositeMapper = { - serializedName: "PartnerRegistrationUpdateParameters", - type: { - name: "Composite", - className: "PartnerRegistrationUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - partnerTopicTypeName: { - serializedName: "partnerTopicTypeName", - type: { - name: "String" - } - }, - partnerTopicTypeDisplayName: { - serializedName: "partnerTopicTypeDisplayName", - type: { - name: "String" - } - }, - partnerTopicTypeDescription: { - serializedName: "partnerTopicTypeDescription", - type: { - name: "String" - } - }, - setupUri: { - serializedName: "setupUri", - type: { - name: "String" - } - }, - logoUri: { - serializedName: "logoUri", - type: { - name: "String" - } - }, - authorizedAzureSubscriptionIds: { - serializedName: "authorizedAzureSubscriptionIds", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const EventType: msRest.CompositeMapper = { - serializedName: "EventType", - type: { - name: "Composite", - className: "EventType", - modelProperties: { - ...Resource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - schemaUrl: { - serializedName: "properties.schemaUrl", - type: { - name: "String" - } - }, - isInDefaultSet: { - serializedName: "properties.isInDefaultSet", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PartnerRegistrationEventTypesListResult: msRest.CompositeMapper = { - serializedName: "PartnerRegistrationEventTypesListResult", - type: { - name: "Composite", - className: "PartnerRegistrationEventTypesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventType" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerTopicUpdateParameters: msRest.CompositeMapper = { - serializedName: "PartnerTopicUpdateParameters", - type: { - name: "Composite", - className: "PartnerTopicUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PartnerTopic: msRest.CompositeMapper = { - serializedName: "PartnerTopic", - type: { - name: "Composite", - className: "PartnerTopic", - modelProperties: { - ...TrackedResource.type.modelProperties, - source: { - serializedName: "properties.source", - type: { - name: "String" - } - }, - expirationTimeIfNotActivatedUtc: { - serializedName: "properties.expirationTimeIfNotActivatedUtc", - type: { - name: "DateTime" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - activationState: { - serializedName: "properties.activationState", - type: { - name: "String" - } - }, - partnerTopicFriendlyDescription: { - serializedName: "properties.partnerTopicFriendlyDescription", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerTopicType: msRest.CompositeMapper = { - serializedName: "PartnerTopicType", - type: { - name: "Composite", - className: "PartnerTopicType", - modelProperties: { - ...Resource.type.modelProperties, - partnerName: { - serializedName: "properties.partnerName", - type: { - name: "String" - } - }, - topicTypeName: { - serializedName: "properties.topicTypeName", - type: { - name: "String" - } - }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - setupUri: { - serializedName: "properties.setupUri", - type: { - name: "String" - } - }, - authorizationState: { - serializedName: "properties.authorizationState", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerTopicTypesListResult: msRest.CompositeMapper = { - serializedName: "PartnerTopicTypesListResult", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "PartnerTopicTypesListResult", + className: "Operation", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PartnerTopicType" - } - } + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationInfo" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Object" } } } @@ -2137,64 +1366,6 @@ export const PrivateLinkResource: msRest.CompositeMapper = { } }; -export const SystemTopic: msRest.CompositeMapper = { - serializedName: "SystemTopic", - type: { - name: "Composite", - className: "SystemTopic", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - source: { - serializedName: "properties.source", - type: { - name: "String" - } - }, - topicType: { - serializedName: "properties.topicType", - type: { - name: "String" - } - }, - metricResourceId: { - readOnly: true, - serializedName: "properties.metricResourceId", - type: { - name: "String" - } - } - } - } -}; - -export const SystemTopicUpdateParameters: msRest.CompositeMapper = { - serializedName: "SystemTopicUpdateParameters", - type: { - name: "Composite", - className: "SystemTopicUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - export const Topic: msRest.CompositeMapper = { serializedName: "Topic", type: { @@ -2266,20 +1437,6 @@ export const Topic: msRest.CompositeMapper = { } } } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "IdentityInfo" - } } } } @@ -2302,13 +1459,6 @@ export const TopicUpdateParameters: msRest.CompositeMapper = { } } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "IdentityInfo" - } - }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { @@ -2326,13 +1476,6 @@ export const TopicUpdateParameters: msRest.CompositeMapper = { } } } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } } } } @@ -2377,24 +1520,36 @@ export const TopicRegenerateKeyRequest: msRest.CompositeMapper = { } }; -export const ExtensionTopic: msRest.CompositeMapper = { - serializedName: "ExtensionTopic", +export const EventType: msRest.CompositeMapper = { + serializedName: "EventType", type: { name: "Composite", - className: "ExtensionTopic", + className: "EventType", modelProperties: { ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, description: { serializedName: "properties.description", type: { name: "String" } }, - systemTopic: { - serializedName: "properties.systemTopic", + schemaUrl: { + serializedName: "properties.schemaUrl", type: { name: "String" } + }, + isInDefaultSet: { + serializedName: "properties.isInDefaultSet", + type: { + name: "Boolean" + } } } } @@ -2514,34 +1669,6 @@ export const DomainTopicsListResult: msRest.CompositeMapper = { } }; -export const EventChannelsListResult: msRest.CompositeMapper = { - serializedName: "EventChannelsListResult", - type: { - name: "Composite", - className: "EventChannelsListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventChannel" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - export const EventSubscriptionsListResult: msRest.CompositeMapper = { serializedName: "EventSubscriptionsListResult", type: { @@ -2592,39 +1719,11 @@ export const OperationsListResult: msRest.CompositeMapper = { } }; -export const PartnerNamespacesListResult: msRest.CompositeMapper = { - serializedName: "PartnerNamespacesListResult", - type: { - name: "Composite", - className: "PartnerNamespacesListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PartnerNamespace" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const PartnerRegistrationsListResult: msRest.CompositeMapper = { - serializedName: "PartnerRegistrationsListResult", +export const TopicsListResult: msRest.CompositeMapper = { + serializedName: "TopicsListResult", type: { name: "Composite", - className: "PartnerRegistrationsListResult", + className: "TopicsListResult", modelProperties: { value: { serializedName: "", @@ -2633,7 +1732,7 @@ export const PartnerRegistrationsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PartnerRegistration" + className: "Topic" } } } @@ -2648,11 +1747,11 @@ export const PartnerRegistrationsListResult: msRest.CompositeMapper = { } }; -export const PartnerTopicsListResult: msRest.CompositeMapper = { - serializedName: "PartnerTopicsListResult", +export const EventTypesListResult: msRest.CompositeMapper = { + serializedName: "EventTypesListResult", type: { name: "Composite", - className: "PartnerTopicsListResult", + className: "EventTypesListResult", modelProperties: { value: { serializedName: "", @@ -2661,16 +1760,10 @@ export const PartnerTopicsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PartnerTopic" + className: "EventType" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } @@ -2732,84 +1825,6 @@ export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { } }; -export const SystemTopicsListResult: msRest.CompositeMapper = { - serializedName: "SystemTopicsListResult", - type: { - name: "Composite", - className: "SystemTopicsListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SystemTopic" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const TopicsListResult: msRest.CompositeMapper = { - serializedName: "TopicsListResult", - type: { - name: "Composite", - className: "TopicsListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Topic" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const EventTypesListResult: msRest.CompositeMapper = { - serializedName: "EventTypesListResult", - type: { - name: "Composite", - className: "EventTypesListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventType" - } - } - } - } - } - } -}; - export const TopicTypesListResult: msRest.CompositeMapper = { serializedName: "TopicTypesListResult", type: { @@ -2835,8 +1850,11 @@ export const TopicTypesListResult: msRest.CompositeMapper = { export const discriminators = { 'InputSchemaMapping' : InputSchemaMapping, 'InputSchemaMapping.Json' : JsonInputSchemaMapping, + 'EventSubscriptionDestination' : EventSubscriptionDestination, 'AdvancedFilter' : AdvancedFilter, + 'DeadLetterDestination' : DeadLetterDestination, 'AdvancedFilter.NumberIn' : NumberInAdvancedFilter, + 'DeadLetterDestination.StorageBlob' : StorageBlobDeadLetterDestination, 'AdvancedFilter.NumberNotIn' : NumberNotInAdvancedFilter, 'AdvancedFilter.NumberLessThan' : NumberLessThanAdvancedFilter, 'AdvancedFilter.NumberGreaterThan' : NumberGreaterThanAdvancedFilter, @@ -2848,9 +1866,6 @@ export const discriminators = { 'AdvancedFilter.StringBeginsWith' : StringBeginsWithAdvancedFilter, 'AdvancedFilter.StringEndsWith' : StringEndsWithAdvancedFilter, 'AdvancedFilter.StringContains' : StringContainsAdvancedFilter, - 'EventSubscriptionDestination' : EventSubscriptionDestination, - 'DeadLetterDestination' : DeadLetterDestination, - 'DeadLetterDestination.StorageBlob' : StorageBlobDeadLetterDestination, 'EventSubscriptionDestination.WebHook' : WebHookEventSubscriptionDestination, 'EventSubscriptionDestination.EventHub' : EventHubEventSubscriptionDestination, 'EventSubscriptionDestination.StorageQueue' : StorageQueueEventSubscriptionDestination, diff --git a/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts index 54e90851d4be..377771904a1b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts @@ -50,16 +50,6 @@ export const domainTopicName: msRest.OperationURLParameter = { } } }; -export const eventChannelName: msRest.OperationURLParameter = { - parameterPath: "eventChannelName", - mapper: { - required: true, - serializedName: "eventChannelName", - type: { - name: "String" - } - } -}; export const eventSubscriptionName: msRest.OperationURLParameter = { parameterPath: "eventSubscriptionName", mapper: { @@ -123,36 +113,6 @@ export const parentType: msRest.OperationURLParameter = { } } }; -export const partnerNamespaceName: msRest.OperationURLParameter = { - parameterPath: "partnerNamespaceName", - mapper: { - required: true, - serializedName: "partnerNamespaceName", - type: { - name: "String" - } - } -}; -export const partnerRegistrationName: msRest.OperationURLParameter = { - parameterPath: "partnerRegistrationName", - mapper: { - required: true, - serializedName: "partnerRegistrationName", - type: { - name: "String" - } - } -}; -export const partnerTopicName: msRest.OperationURLParameter = { - parameterPath: "partnerTopicName", - mapper: { - required: true, - serializedName: "partnerTopicName", - type: { - name: "String" - } - } -}; export const privateEndpointConnectionName: msRest.OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { @@ -213,7 +173,7 @@ export const resourceTypeName: msRest.OperationURLParameter = { } } }; -export const scope0: msRest.OperationURLParameter = { +export const scope: msRest.OperationURLParameter = { parameterPath: "scope", mapper: { required: true, @@ -224,16 +184,6 @@ export const scope0: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const scope1: msRest.OperationURLParameter = { - parameterPath: "scope", - mapper: { - required: true, - serializedName: "scope", - type: { - name: "String" - } - } -}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -244,16 +194,6 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const systemTopicName: msRest.OperationURLParameter = { - parameterPath: "systemTopicName", - mapper: { - required: true, - serializedName: "systemTopicName", - type: { - name: "String" - } - } -}; export const top: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/eventgrid/arm-eventgrid/src/models/partnerNamespacesMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/partnerNamespacesMappers.ts deleted file mode 100644 index c4912cd60125..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/partnerNamespacesMappers.ts +++ /dev/null @@ -1,74 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionIdentity, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerNamespaceRegenerateKeyRequest, - PartnerNamespaceSharedAccessKeys, - PartnerNamespacesListResult, - PartnerNamespaceUpdateParameters, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/partnerRegistrationsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/partnerRegistrationsMappers.ts deleted file mode 100644 index b46930ddb076..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/partnerRegistrationsMappers.ts +++ /dev/null @@ -1,72 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionIdentity, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerRegistrationsListResult, - PartnerRegistrationUpdateParameters, - PartnerTopic, - PartnerTopicType, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicEventSubscriptionsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicEventSubscriptionsMappers.ts deleted file mode 100644 index ff55e6bb5f66..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicEventSubscriptionsMappers.ts +++ /dev/null @@ -1,73 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionFullUrl, - EventSubscriptionIdentity, - EventSubscriptionsListResult, - EventSubscriptionUpdateParameters, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicsMappers.ts deleted file mode 100644 index 5c93dfe30da1..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/partnerTopicsMappers.ts +++ /dev/null @@ -1,72 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionIdentity, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicsListResult, - PartnerTopicType, - PartnerTopicUpdateParameters, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/privateEndpointConnectionsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/privateEndpointConnectionsMappers.ts index 2a8759c158da..1cd7557c6ae2 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/privateEndpointConnectionsMappers.ts @@ -15,23 +15,14 @@ export { CloudError, ConnectionState, DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, Domain, DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, EventHubEventSubscriptionDestination, EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - EventSubscriptionIdentity, EventType, - ExtensionTopic, HybridConnectionEventSubscriptionDestination, - IdentityInfo, InboundIpRule, InputSchemaMapping, JsonField, @@ -43,15 +34,10 @@ export { NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, Resource, - ResourceSku, RetryPolicy, ServiceBusQueueEventSubscriptionDestination, ServiceBusTopicEventSubscriptionDestination, @@ -62,10 +48,8 @@ export { StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotInAdvancedFilter, - SystemTopic, Topic, TopicTypeInfo, TrackedResource, - UserIdentityProperties, WebHookEventSubscriptionDestination } from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/systemTopicEventSubscriptionsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/systemTopicEventSubscriptionsMappers.ts deleted file mode 100644 index ff55e6bb5f66..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/systemTopicEventSubscriptionsMappers.ts +++ /dev/null @@ -1,73 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionFullUrl, - EventSubscriptionIdentity, - EventSubscriptionsListResult, - EventSubscriptionUpdateParameters, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/systemTopicsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/systemTopicsMappers.ts deleted file mode 100644 index f0e7102aa561..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/models/systemTopicsMappers.ts +++ /dev/null @@ -1,72 +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 { - discriminators, - AdvancedFilter, - AzureFunctionEventSubscriptionDestination, - BaseResource, - BoolEqualsAdvancedFilter, - CloudError, - ConnectionState, - DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, - Domain, - DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, - EventHubEventSubscriptionDestination, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - EventSubscriptionIdentity, - EventType, - ExtensionTopic, - HybridConnectionEventSubscriptionDestination, - IdentityInfo, - InboundIpRule, - InputSchemaMapping, - JsonField, - JsonFieldWithDefault, - JsonInputSchemaMapping, - NumberGreaterThanAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - NumberInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, - PrivateEndpoint, - PrivateEndpointConnection, - Resource, - ResourceSku, - RetryPolicy, - ServiceBusQueueEventSubscriptionDestination, - ServiceBusTopicEventSubscriptionDestination, - StorageBlobDeadLetterDestination, - StorageQueueEventSubscriptionDestination, - StringBeginsWithAdvancedFilter, - StringContainsAdvancedFilter, - StringEndsWithAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - SystemTopic, - SystemTopicsListResult, - SystemTopicUpdateParameters, - Topic, - TopicTypeInfo, - TrackedResource, - UserIdentityProperties, - WebHookEventSubscriptionDestination -} from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/topicTypesMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/topicTypesMappers.ts index 6b0089d19dd1..521d7fbead01 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/topicTypesMappers.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/topicTypesMappers.ts @@ -15,24 +15,15 @@ export { CloudError, ConnectionState, DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, Domain, DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, EventHubEventSubscriptionDestination, EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - EventSubscriptionIdentity, EventType, EventTypesListResult, - ExtensionTopic, HybridConnectionEventSubscriptionDestination, - IdentityInfo, InboundIpRule, InputSchemaMapping, JsonField, @@ -44,14 +35,9 @@ export { NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, PrivateEndpoint, PrivateEndpointConnection, Resource, - ResourceSku, RetryPolicy, ServiceBusQueueEventSubscriptionDestination, ServiceBusTopicEventSubscriptionDestination, @@ -62,11 +48,9 @@ export { StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotInAdvancedFilter, - SystemTopic, Topic, TopicTypeInfo, TopicTypesListResult, TrackedResource, - UserIdentityProperties, WebHookEventSubscriptionDestination } from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/topicsMappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/topicsMappers.ts index 9446ebab98fa..c8bc4d81a7cd 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/topicsMappers.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/topicsMappers.ts @@ -15,24 +15,15 @@ export { CloudError, ConnectionState, DeadLetterDestination, - DeadLetterWithResourceIdentity, - DeliveryWithResourceIdentity, Domain, DomainTopic, - EventChannel, - EventChannelDestination, - EventChannelFilter, - EventChannelSource, EventHubEventSubscriptionDestination, EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - EventSubscriptionIdentity, EventType, EventTypesListResult, - ExtensionTopic, HybridConnectionEventSubscriptionDestination, - IdentityInfo, InboundIpRule, InputSchemaMapping, JsonField, @@ -44,14 +35,9 @@ export { NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, - PartnerNamespace, - PartnerRegistration, - PartnerTopic, - PartnerTopicType, PrivateEndpoint, PrivateEndpointConnection, Resource, - ResourceSku, RetryPolicy, ServiceBusQueueEventSubscriptionDestination, ServiceBusTopicEventSubscriptionDestination, @@ -62,7 +48,6 @@ export { StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotInAdvancedFilter, - SystemTopic, Topic, TopicRegenerateKeyRequest, TopicSharedAccessKeys, @@ -70,6 +55,5 @@ export { TopicTypeInfo, TopicUpdateParameters, TrackedResource, - UserIdentityProperties, WebHookEventSubscriptionDestination } from "../models/mappers"; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/eventChannels.ts b/sdk/eventgrid/arm-eventgrid/src/operations/eventChannels.ts deleted file mode 100644 index b8e773ce01ba..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/eventChannels.ts +++ /dev/null @@ -1,339 +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. - */ - -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/eventChannelsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a EventChannels. */ -export class EventChannels { - private readonly client: EventGridManagementClientContext; - - /** - * Create a EventChannels. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of an event channel. - * @summary Get an event channel. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param callback The callback - */ - get(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - eventChannelName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new event channel with the specified parameters. - * @summary Create an event channel. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param eventChannelInfo EventChannel information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, eventChannelInfo: Models.EventChannel, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param eventChannelInfo EventChannel information. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, eventChannelInfo: Models.EventChannel, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param eventChannelInfo EventChannel information. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, eventChannelInfo: Models.EventChannel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, eventChannelInfo: Models.EventChannel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - eventChannelName, - eventChannelInfo, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Delete existing event channel. - * @summary Delete an event channel. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,partnerNamespaceName,eventChannelName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * List all the event channels in a partner namespace. - * @summary List event channels. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param [options] The optional parameters - * @returns Promise - */ - listByPartnerNamespace(resourceGroupName: string, partnerNamespaceName: string, options?: Models.EventChannelsListByPartnerNamespaceOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param callback The callback - */ - listByPartnerNamespace(resourceGroupName: string, partnerNamespaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param options The optional parameters - * @param callback The callback - */ - listByPartnerNamespace(resourceGroupName: string, partnerNamespaceName: string, options: Models.EventChannelsListByPartnerNamespaceOptionalParams, callback: msRest.ServiceCallback): void; - listByPartnerNamespace(resourceGroupName: string, partnerNamespaceName: string, options?: Models.EventChannelsListByPartnerNamespaceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - options - }, - listByPartnerNamespaceOperationSpec, - callback) as Promise; - } - - /** - * Delete existing event channel. - * @summary Delete an event channel. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param eventChannelName Name of the event channel. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, partnerNamespaceName: string, eventChannelName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerNamespaceName, - eventChannelName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * List all the event channels in a partner namespace. - * @summary List event channels. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByPartnerNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByPartnerNamespaceNext(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 - */ - listByPartnerNamespaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByPartnerNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByPartnerNamespaceNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName, - Parameters.eventChannelName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventChannel - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName, - Parameters.eventChannelName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "eventChannelInfo", - mapper: { - ...Mappers.EventChannel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EventChannel - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByPartnerNamespaceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventChannelsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName, - Parameters.eventChannelName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByPartnerNamespaceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventChannelsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts index 1863e4521819..715e24921409 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts @@ -918,7 +918,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.eventSubscriptionName ], queryParameters: [ @@ -942,7 +942,7 @@ const getFullUrlOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.eventSubscriptionName ], queryParameters: [ @@ -1235,7 +1235,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.eventSubscriptionName ], queryParameters: [ @@ -1266,7 +1266,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.eventSubscriptionName ], queryParameters: [ @@ -1290,7 +1290,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.eventSubscriptionName ], queryParameters: [ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts deleted file mode 100644 index 16f1afa83766..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts +++ /dev/null @@ -1,97 +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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/extensionTopicsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a ExtensionTopics. */ -export class ExtensionTopics { - private readonly client: EventGridManagementClientContext; - - /** - * Create a ExtensionTopics. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get the properties of an extension topic. - * @summary Get properties of an extension topic. - * @param scope The identifier of the resource to which extension topic is queried. The scope can - * be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(scope: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param scope The identifier of the resource to which extension topic is queried. The scope can - * be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. - * @param callback The callback - */ - get(scope: string, callback: msRest.ServiceCallback): void; - /** - * @param scope The identifier of the resource to which extension topic is queried. The scope can - * be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. - * @param options The optional parameters - * @param callback The callback - */ - get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - scope, - options - }, - getOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{scope}/providers/Microsoft.EventGrid/extensionTopics/default", - urlParameters: [ - Parameters.scope1 - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ExtensionTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/index.ts b/sdk/eventgrid/arm-eventgrid/src/operations/index.ts index 7cbbe88f8399..45156665bc0a 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/index.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/index.ts @@ -10,17 +10,9 @@ export * from "./domains"; export * from "./domainTopics"; -export * from "./eventChannels"; export * from "./eventSubscriptions"; -export * from "./systemTopicEventSubscriptions"; -export * from "./partnerTopicEventSubscriptions"; export * from "./operations"; -export * from "./partnerNamespaces"; -export * from "./partnerRegistrations"; -export * from "./partnerTopics"; +export * from "./topics"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; -export * from "./systemTopics"; -export * from "./topics"; -export * from "./extensionTopics"; export * from "./topicTypes"; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts deleted file mode 100644 index 7d26e63ce12f..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts +++ /dev/null @@ -1,612 +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. - */ - -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/partnerNamespacesMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a PartnerNamespaces. */ -export class PartnerNamespaces { - private readonly client: EventGridManagementClientContext; - - /** - * Create a PartnerNamespaces. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of a partner namespace. - * @summary Get a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param callback The callback - */ - get(resourceGroupName: string, partnerNamespaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, partnerNamespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new partner namespace with the specified parameters. - * @summary Create a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceInfo: Models.PartnerNamespace, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,partnerNamespaceName,partnerNamespaceInfo,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete existing partner namespace. - * @summary Delete a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,partnerNamespaceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Asynchronously updates a partner namespace with the specified parameters. - * @summary Update a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceUpdateParameters: Models.PartnerNamespaceUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,partnerNamespaceName,partnerNamespaceUpdateParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * List all the partner namespaces under an Azure subscription. - * @summary List partner namespaces under an Azure subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.PartnerNamespacesListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.PartnerNamespacesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.PartnerNamespacesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List all the partner namespaces under a resource group. - * @summary List partner namespaces under a resource group. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerNamespacesListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.PartnerNamespacesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerNamespacesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * List the two keys used to publish to a partner namespace. - * @summary List keys for a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param [options] The optional parameters - * @returns Promise - */ - listSharedAccessKeys(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param callback The callback - */ - listSharedAccessKeys(resourceGroupName: string, partnerNamespaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param options The optional parameters - * @param callback The callback - */ - listSharedAccessKeys(resourceGroupName: string, partnerNamespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSharedAccessKeys(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - options - }, - listSharedAccessKeysOperationSpec, - callback) as Promise; - } - - /** - * Regenerate a shared access key for a partner namespace. - * @summary Regenerate key for a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param [options] The optional parameters - * @returns Promise - */ - regenerateKey(resourceGroupName: string, partnerNamespaceName: string, regenerateKeyRequest: Models.PartnerNamespaceRegenerateKeyRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, partnerNamespaceName: string, regenerateKeyRequest: Models.PartnerNamespaceRegenerateKeyRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param options The optional parameters - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, partnerNamespaceName: string, regenerateKeyRequest: Models.PartnerNamespaceRegenerateKeyRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - regenerateKey(resourceGroupName: string, partnerNamespaceName: string, regenerateKeyRequest: Models.PartnerNamespaceRegenerateKeyRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerNamespaceName, - regenerateKeyRequest, - options - }, - regenerateKeyOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new partner namespace with the specified parameters. - * @summary Create a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceInfo: Models.PartnerNamespace, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerNamespaceName, - partnerNamespaceInfo, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete existing partner namespace. - * @summary Delete a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, partnerNamespaceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerNamespaceName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Asynchronously updates a partner namespace with the specified parameters. - * @summary Update a partner namespace. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceUpdateParameters: Models.PartnerNamespaceUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerNamespaceName, - partnerNamespaceUpdateParameters, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * List all the partner namespaces under an Azure subscription. - * @summary List partner namespaces under an Azure subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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 - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } - - /** - * List all the partner namespaces under a resource group. - * @summary List partner namespaces under 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespace - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespacesListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespacesListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listSharedAccessKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespaceSharedAccessKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const regenerateKeyOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "regenerateKeyRequest", - mapper: { - ...Mappers.PartnerNamespaceRegenerateKeyRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespaceSharedAccessKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "partnerNamespaceInfo", - mapper: { - ...Mappers.PartnerNamespace, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.PartnerNamespace - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerNamespaceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "partnerNamespaceUpdateParameters", - mapper: { - ...Mappers.PartnerNamespaceUpdateParameters, - required: true - } - }, - responses: { - 200: {}, - 201: { - bodyMapper: Mappers.PartnerNamespace - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespacesListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerNamespacesListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts deleted file mode 100644 index c0da0c3b8a7a..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts +++ /dev/null @@ -1,538 +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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/partnerRegistrationsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a PartnerRegistrations. */ -export class PartnerRegistrations { - private readonly client: EventGridManagementClientContext; - - /** - * Create a PartnerRegistrations. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Gets a partner registration with the specified parameters. - * @summary Get a partner registration. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, partnerRegistrationName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param callback The callback - */ - get(resourceGroupName: string, partnerRegistrationName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, partnerRegistrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, partnerRegistrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerRegistrationName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates a new partner registration with the specified parameters. - * @summary Create a partner registration. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: Models.PartnerRegistration, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: Models.PartnerRegistration, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: Models.PartnerRegistration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: Models.PartnerRegistration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerRegistrationName, - partnerRegistrationInfo, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Deletes a partner registration with the specified parameters. - * @summary Delete a partner registration. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, partnerRegistrationName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, partnerRegistrationName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, partnerRegistrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, partnerRegistrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerRegistrationName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Updates a partner registration with the specified parameters. - * @summary Update a partner registration. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: Models.PartnerRegistrationUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @param callback The callback - */ - update(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: Models.PartnerRegistrationUpdateParameters, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: Models.PartnerRegistrationUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: Models.PartnerRegistrationUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerRegistrationName, - partnerRegistrationUpdateParameters, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * List all the partner registrations under an Azure subscription. - * @summary List partner registrations under an Azure subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.PartnerRegistrationsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.PartnerRegistrationsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.PartnerRegistrationsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List all the partner registrations under a resource group. - * @summary List partner registrations under a resource group. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerRegistrationsListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.PartnerRegistrationsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerRegistrationsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * List all partners registrations. - * @summary List all available partners registrations. - * @param [options] The optional parameters - * @returns Promise - */ - 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 - }, - listOperationSpec, - callback) as Promise; - } - - /** - * List all the partner registrations under an Azure subscription. - * @summary List partner registrations under an Azure subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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 - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } - - /** - * List all the partner registrations under a resource group. - * @summary List partner registrations under 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerRegistrationName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistration - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerRegistrationName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "partnerRegistrationInfo", - mapper: { - ...Mappers.PartnerRegistration, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistration - }, - 202: { - bodyMapper: Mappers.PartnerRegistration - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerRegistrationName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerRegistrationName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "partnerRegistrationUpdateParameters", - mapper: { - ...Mappers.PartnerRegistrationUpdateParameters, - required: true - } - }, - responses: { - 200: {}, - 201: { - bodyMapper: Mappers.PartnerRegistration - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistrationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistrationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.EventGrid/partnerRegistrations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistrationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistrationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerRegistrationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts deleted file mode 100644 index c67dafbb27de..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts +++ /dev/null @@ -1,485 +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. - */ - -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/partnerTopicEventSubscriptionsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a PartnerTopicEventSubscriptions. */ -export class PartnerTopicEventSubscriptions { - private readonly client: EventGridManagementClientContext; - - /** - * Create a PartnerTopicEventSubscriptions. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get an event subscription of a partner topic. - * @summary Get an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param callback The callback - */ - get(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - eventSubscriptionName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified - * parameters. Existing event subscriptions will be updated with this API. - * @summary Create or update an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter - * information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: Models.EventSubscription, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,partnerTopicName,eventSubscriptionName,eventSubscriptionInfo,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete an event subscription of a partner topic. - * @summary Delete an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,partnerTopicName,eventSubscriptionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Update event subscription of a partner topic. - * @summary Update event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: Models.EventSubscriptionUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,partnerTopicName,eventSubscriptionName,eventSubscriptionUpdateParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Get the full endpoint URL for an event subscription of a partner topic. - * @summary Get full URL of an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - getFullUrl(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param callback The callback - */ - getFullUrl(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param options The optional parameters - * @param callback The callback - */ - getFullUrl(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getFullUrl(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - eventSubscriptionName, - options - }, - getFullUrlOperationSpec, - callback) as Promise; - } - - /** - * List event subscriptions that belong to a specific partner topic. - * @summary List event subscriptions of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - listByPartnerTopic(resourceGroupName: string, partnerTopicName: string, options?: Models.PartnerTopicEventSubscriptionsListByPartnerTopicOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param callback The callback - */ - listByPartnerTopic(resourceGroupName: string, partnerTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param options The optional parameters - * @param callback The callback - */ - listByPartnerTopic(resourceGroupName: string, partnerTopicName: string, options: Models.PartnerTopicEventSubscriptionsListByPartnerTopicOptionalParams, callback: msRest.ServiceCallback): void; - listByPartnerTopic(resourceGroupName: string, partnerTopicName: string, options?: Models.PartnerTopicEventSubscriptionsListByPartnerTopicOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - options - }, - listByPartnerTopicOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified - * parameters. Existing event subscriptions will be updated with this API. - * @summary Create or update an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter - * information. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: Models.EventSubscription, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerTopicName, - eventSubscriptionName, - eventSubscriptionInfo, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete an event subscription of a partner topic. - * @summary Delete an event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerTopicName, - eventSubscriptionName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Update event subscription of a partner topic. - * @summary Update event subscription of a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: Models.EventSubscriptionUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerTopicName, - eventSubscriptionName, - eventSubscriptionUpdateParameters, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * List event subscriptions that belong to a specific partner topic. - * @summary List event subscriptions of a partner topic. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByPartnerTopicNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByPartnerTopicNext(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 - */ - listByPartnerTopicNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByPartnerTopicNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByPartnerTopicNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getFullUrlOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionFullUrl - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByPartnerTopicOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "eventSubscriptionInfo", - mapper: { - ...Mappers.EventSubscription, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "eventSubscriptionUpdateParameters", - mapper: { - ...Mappers.EventSubscriptionUpdateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByPartnerTopicNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts deleted file mode 100644 index 034b46a09cb5..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts +++ /dev/null @@ -1,537 +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. - */ - -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/partnerTopicsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a PartnerTopics. */ -export class PartnerTopics { - private readonly client: EventGridManagementClientContext; - - /** - * Create a PartnerTopics. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of a partner topic. - * @summary Get a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param callback The callback - */ - get(resourceGroupName: string, partnerTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, partnerTopicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Delete existing partner topic. - * @summary Delete a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,partnerTopicName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Asynchronously updates a partner topic with the specified parameters. - * @summary Update a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, partnerTopicName: string, partnerTopicUpdateParameters: Models.PartnerTopicUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param callback The callback - */ - update(resourceGroupName: string, partnerTopicName: string, partnerTopicUpdateParameters: Models.PartnerTopicUpdateParameters, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, partnerTopicName: string, partnerTopicUpdateParameters: Models.PartnerTopicUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, partnerTopicName: string, partnerTopicUpdateParameters: Models.PartnerTopicUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - partnerTopicUpdateParameters, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * List all the partner topics under an Azure subscription. - * @summary List partner topics under an Azure subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.PartnerTopicsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.PartnerTopicsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.PartnerTopicsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List all the partner topics under a resource group. - * @summary List partner topics under a resource group. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerTopicsListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.PartnerTopicsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.PartnerTopicsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Activate a newly created partner topic. - * @summary Activate a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - activate(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param callback The callback - */ - activate(resourceGroupName: string, partnerTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param options The optional parameters - * @param callback The callback - */ - activate(resourceGroupName: string, partnerTopicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - activate(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - options - }, - activateOperationSpec, - callback) as Promise; - } - - /** - * Deactivate specific partner topic. - * @summary Deactivate a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - deactivate(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param callback The callback - */ - deactivate(resourceGroupName: string, partnerTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param options The optional parameters - * @param callback The callback - */ - deactivate(resourceGroupName: string, partnerTopicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deactivate(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - partnerTopicName, - options - }, - deactivateOperationSpec, - callback) as Promise; - } - - /** - * Delete existing partner topic. - * @summary Delete a partner topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, partnerTopicName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - partnerTopicName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * List all the partner topics under an Azure subscription. - * @summary List partner topics under an Azure subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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 - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } - - /** - * List all the partner topics under a resource group. - * @summary List partner topics under 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "partnerTopicUpdateParameters", - mapper: { - ...Mappers.PartnerTopicUpdateParameters, - required: true - } - }, - responses: { - 200: {}, - 201: { - bodyMapper: Mappers.PartnerTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const activateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const deactivateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.partnerTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PartnerTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts index 799e13c95650..a31f3267dc45 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts @@ -32,33 +32,36 @@ export class PrivateEndpointConnections { * @summary Get a specific private endpoint connection. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, parentType: Models.ParentType, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param callback The callback */ - get(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, parentType: Models.ParentType, parentName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, parentType: Models.ParentType, parentName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, parentType: Models.ParentType, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -76,6 +79,7 @@ export class PrivateEndpointConnections { * @summary Update a specific private endpoint connection. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -83,7 +87,7 @@ export class PrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + update(resourceGroupName: string, parentType: Models.ParentType1, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { return this.beginUpdate(resourceGroupName,parentType,parentName,privateEndpointConnectionName,privateEndpointConnection,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -93,13 +97,14 @@ export class PrivateEndpointConnections { * @summary Delete a specific private endpoint connection. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, parentType: Models.ParentType2, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,parentType,parentName,privateEndpointConnectionName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } @@ -109,30 +114,33 @@ export class PrivateEndpointConnections { * @summary Lists all private endpoint connections under a resource. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param [options] The optional parameters * @returns Promise */ - listByResource(resourceGroupName: string, parentType: string, parentName: string, options?: Models.PrivateEndpointConnectionsListByResourceOptionalParams): Promise; + listByResource(resourceGroupName: string, parentType: Models.ParentType3, parentName: string, options?: Models.PrivateEndpointConnectionsListByResourceOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param callback The callback */ - listByResource(resourceGroupName: string, parentType: string, parentName: string, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, parentType: Models.ParentType3, parentName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param options The optional parameters * @param callback The callback */ - listByResource(resourceGroupName: string, parentType: string, parentName: string, options: Models.PrivateEndpointConnectionsListByResourceOptionalParams, callback: msRest.ServiceCallback): void; - listByResource(resourceGroupName: string, parentType: string, parentName: string, options?: Models.PrivateEndpointConnectionsListByResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResource(resourceGroupName: string, parentType: Models.ParentType3, parentName: string, options: Models.PrivateEndpointConnectionsListByResourceOptionalParams, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, parentType: Models.ParentType3, parentName: string, options?: Models.PrivateEndpointConnectionsListByResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -149,6 +157,7 @@ export class PrivateEndpointConnections { * @summary Update a specific private endpoint connection. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -156,7 +165,7 @@ export class PrivateEndpointConnections { * @param [options] The optional parameters * @returns Promise */ - beginUpdate(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(resourceGroupName: string, parentType: Models.ParentType1, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -175,13 +184,14 @@ export class PrivateEndpointConnections { * @summary Delete a specific private endpoint connection. * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\' or \'domains\'. + * Possible values include: 'topics', 'domains' * @param parentName The name of the parent resource (namely, either, the topic name or domain * name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, parentType: string, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod(resourceGroupName: string, parentType: Models.ParentType2, parentName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts deleted file mode 100644 index af3d930445c8..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts +++ /dev/null @@ -1,485 +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. - */ - -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/systemTopicEventSubscriptionsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a SystemTopicEventSubscriptions. */ -export class SystemTopicEventSubscriptions { - private readonly client: EventGridManagementClientContext; - - /** - * Create a SystemTopicEventSubscriptions. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get an event subscription. - * @summary Get an event subscription of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param callback The callback - */ - get(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - systemTopicName, - eventSubscriptionName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing - * event subscriptions will be updated with this API. - * @summary Create or update an event subscription for a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter - * information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: Models.EventSubscription, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,systemTopicName,eventSubscriptionName,eventSubscriptionInfo,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete an event subscription of a system topic. - * @summary Delete an event subscription of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,systemTopicName,eventSubscriptionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Update event subscription of a system topic. - * @summary Update event subscription of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: Models.EventSubscriptionUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,systemTopicName,eventSubscriptionName,eventSubscriptionUpdateParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Get the full endpoint URL for an event subscription of a system topic. - * @summary Get full URL of an event subscription of a system topic - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - getFullUrl(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param callback The callback - */ - getFullUrl(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param options The optional parameters - * @param callback The callback - */ - getFullUrl(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getFullUrl(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - systemTopicName, - eventSubscriptionName, - options - }, - getFullUrlOperationSpec, - callback) as Promise; - } - - /** - * List event subscriptions that belong to a specific system topic. - * @summary List event subscriptions of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param [options] The optional parameters - * @returns Promise - */ - listBySystemTopic(resourceGroupName: string, systemTopicName: string, options?: Models.SystemTopicEventSubscriptionsListBySystemTopicOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param callback The callback - */ - listBySystemTopic(resourceGroupName: string, systemTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param options The optional parameters - * @param callback The callback - */ - listBySystemTopic(resourceGroupName: string, systemTopicName: string, options: Models.SystemTopicEventSubscriptionsListBySystemTopicOptionalParams, callback: msRest.ServiceCallback): void; - listBySystemTopic(resourceGroupName: string, systemTopicName: string, options?: Models.SystemTopicEventSubscriptionsListBySystemTopicOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - systemTopicName, - options - }, - listBySystemTopicOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing - * event subscriptions will be updated with this API. - * @summary Create or update an event subscription for a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter - * information. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: Models.EventSubscription, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - eventSubscriptionName, - eventSubscriptionInfo, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete an event subscription of a system topic. - * @summary Delete an event subscription of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - eventSubscriptionName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Update event subscription of a system topic. - * @summary Update event subscription of a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription - * names must be between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: Models.EventSubscriptionUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - eventSubscriptionName, - eventSubscriptionUpdateParameters, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * List event subscriptions that belong to a specific system topic. - * @summary List event subscriptions of a system topic. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySystemTopicNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySystemTopicNext(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 - */ - listBySystemTopicNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySystemTopicNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySystemTopicNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getFullUrlOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionFullUrl - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySystemTopicOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "eventSubscriptionInfo", - mapper: { - ...Mappers.EventSubscription, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName, - Parameters.eventSubscriptionName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "eventSubscriptionUpdateParameters", - mapper: { - ...Mappers.EventSubscriptionUpdateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.EventSubscription - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySystemTopicNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts deleted file mode 100644 index 8cb320b46b85..000000000000 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts +++ /dev/null @@ -1,490 +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. - */ - -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/systemTopicsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a SystemTopics. */ -export class SystemTopics { - private readonly client: EventGridManagementClientContext; - - /** - * Create a SystemTopics. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of a system topic. - * @summary Get a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, systemTopicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param callback The callback - */ - get(resourceGroupName: string, systemTopicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, systemTopicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, systemTopicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - systemTopicName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new system topic with the specified parameters. - * @summary Create a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, systemTopicName: string, systemTopicInfo: Models.SystemTopic, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,systemTopicName,systemTopicInfo,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete existing system topic. - * @summary Delete a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, systemTopicName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,systemTopicName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Asynchronously updates a system topic with the specified parameters. - * @summary Update a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, systemTopicName: string, systemTopicUpdateParameters: Models.SystemTopicUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,systemTopicName,systemTopicUpdateParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * List all the system topics under an Azure subscription. - * @summary List system topics under an Azure subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.SystemTopicsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.SystemTopicsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.SystemTopicsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List all the system topics under a resource group. - * @summary List system topics under a resource group. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.SystemTopicsListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.SystemTopicsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.SystemTopicsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new system topic with the specified parameters. - * @summary Create a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, systemTopicInfo: Models.SystemTopic, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - systemTopicInfo, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete existing system topic. - * @summary Delete a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, systemTopicName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Asynchronously updates a system topic with the specified parameters. - * @summary Update a system topic. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, systemTopicName: string, systemTopicUpdateParameters: Models.SystemTopicUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - systemTopicName, - systemTopicUpdateParameters, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * List all the system topics under an Azure subscription. - * @summary List system topics under an Azure subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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 - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } - - /** - * List all the system topics under a resource group. - * @summary List system topics under 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SystemTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SystemTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SystemTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "systemTopicInfo", - mapper: { - ...Mappers.SystemTopic, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SystemTopic - }, - 201: { - bodyMapper: Mappers.SystemTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.systemTopicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "systemTopicUpdateParameters", - mapper: { - ...Mappers.SystemTopicUpdateParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.SystemTopic - }, - 201: { - bodyMapper: Mappers.SystemTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SystemTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SystemTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/eventgrid/ci.yml b/sdk/eventgrid/ci.yml deleted file mode 100644 index 61f74338864e..000000000000 --- a/sdk/eventgrid/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/eventgrid/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/eventgrid/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: eventgrid - Artifacts: - - name: azure-eventgrid - safeName: azureeventgrid diff --git a/sdk/eventhub/ThirdPartyNotices b/sdk/eventhub/ThirdPartyNotices deleted file mode 100644 index a0bd09d68f8e..000000000000 --- a/sdk/eventhub/ThirdPartyNotices +++ /dev/null @@ -1,15 +0,0 @@ -##Legal Notices -Microsoft and any contributors grant you a license to the Microsoft documentation and other content -in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode), -see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the -[LICENSE-CODE](LICENSE-CODE) file. - -Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation -may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. -The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. -Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653. - -Privacy information can be found at https://privacy.microsoft.com/en-us/ - -Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents, -or trademarks, whether by implication, estoppel or otherwise. \ No newline at end of file diff --git a/sdk/eventhub/ci.yml b/sdk/eventhub/ci.yml index d532adb927a5..00599d79766e 100644 --- a/sdk/eventhub/ci.yml +++ b/sdk/eventhub/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,15 +22,15 @@ pr: include: - sdk/eventhub/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: eventhub - RunUnitTests: false - Artifacts: - - name: azure-event-hubs - safeName: azureeventhubs - - name: azure-eventhubs-checkpointstore-blob - safeName: azureeventhubscheckpointstoreblob - - name: azure-event-processor-host - safename: azureeventprocessorhost +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: eventhub + RunUnitTests: false + Artifacts: + - name: azure-event-hubs + safeName: azureeventhubs + - name: azure-eventhubs-checkpointstore-blob + safeName: azureeventhubscheckpointstoreblob + - name: azure-event-processor-host + safename: azureeventprocessorhost diff --git a/sdk/eventhub/event-hubs/CHANGELOG.md b/sdk/eventhub/event-hubs/CHANGELOG.md index 080b5ed54afd..46598ff05d1f 100644 --- a/sdk/eventhub/event-hubs/CHANGELOG.md +++ b/sdk/eventhub/event-hubs/CHANGELOG.md @@ -1,6 +1,25 @@ # Release History -## 5.2.1 (Unreleased) +## 5.2.2 (Unreleased) + +- Fixes issue [#9289](https://github.com/Azure/azure-sdk-for-js/issues/9289) + where calling `await subscription.close()` inside of a subscription's `processError` + handler would cause the subscription to deadlock. +- Fixes issue [#9083](https://github.com/Azure/azure-sdk-for-js/issues/9083) + where calling `EventHubConsumerClient.close()` would not stop any actively + running `Subscriptions`. +- Fixes issue [8598](https://github.com/Azure/azure-sdk-for-js/issues/8598) + where the EventHubConsumerClient would remain open in the background beyond + when `subscription.close()` was called. This would prevent the process from + exiting until the `maxWaitTimeInSeconds` (default 60) was reached. + +## 5.2.1 (2020-06-08) + +- Fixes issue [#8584](https://github.com/Azure/azure-sdk-for-js/issues/8584) + where attempting to create AMQP links when the AMQP connection was in the + process of closing resulted in a `TypeError` in an uncaught exception. + ([PR 8884](https://github.com/Azure/azure-sdk-for-js/pull/8884)) +- Fixes reconnection issues by creating a new connection object rather than re-using the existing one. ([PR 8884](https://github.com/Azure/azure-sdk-for-js/pull/8884)) ### Tracing updates: @@ -13,7 +32,7 @@ changes between patch and minor updates. - Adds a new attribute - `enqueuedTime` - to the links on "Azure.EventHubs.process" spans. `enqueuedTime` maps to the enqueuedTimeUtc field from received events, represented as - Unix epoch time in millseconds. + Unix epoch time in milliseconds. Address [#7112](https://github.com/Azure/azure-sdk-for-js/issues/7112) ## 5.2.0 (2020-05-05) @@ -187,36 +206,32 @@ Construction of both objects is the same as it was for the previous client. Version 5.0.0-preview.1 is a preview of our efforts to create a client library that is user friendly and idiomatic to the Javascript ecosystem. The reasons for most of the changes in this update can be found in the -[Azure SDK Design Guidelines for TypeScript](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html). -For more information, please visit https://aka.ms/azure-sdk-preview1-js +[Azure SDK Design Guidelines for TypeScript](https://azure.github.io/azure-sdk/typescript_introduction.html). +For more information, please visit https://aka.ms/azsdk/releases/july2019preview ### Breaking changes -- Creating an instance of [EventHubClient](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html) - is now done using construtor overloads instead of static helpers. - If you previously used the `createFromTokenProvider` static helper to provide your own custom token provider, - you will now need to update the provider to follow the new `TokenCredential` interface instead. - If you previously used the `@azure/ms-rest-nodeauth` library to provide AAD credentials, you will now need to use the new - [@azure/identity](https://www.npmjs.com/package/@azure/identity) library instead. -- The send methods are moved from the `EventHubClient` class to the new [EventHubProducer](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubproducer.html) class. - - Use the [createProducer()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#createproducer) - function on the `EventHubClient` to create an instance of a `EventHubProducer`. +- Creating an instance of `EventHubClient` is now done using constructor overloads instead of static helpers. + - If you previously used the `createFromTokenProvider` static helper to provide your own custom token provider, + you will now need to update the provider to follow the new `TokenCredential` interface instead. + - If you previously used the `@azure/ms-rest-nodeauth` library to provide AAD credentials, you will now need to use the new + [@azure/identity](https://www.npmjs.com/package/@azure/identity) library instead. +- The send methods are moved from the `EventHubClient` class to the new `EventHubProducer` class. + - Use the `createProducer()` function on the `EventHubClient` to create an instance of a `EventHubProducer`. - Each producer represents a dedicated AMQP sender link to Azure Event Hubs. - - The [EventData](https://azure.github.io/azure-sdk-for-js/event-hubs/interfaces/eventdata.html) type used for - the data being sent only supports a `body` for the content being sent and a + - The `EventData` type used for the data being sent only supports a `body` for the content being sent and a `properties` bag to hold any custom metadata you want to send. The properties corresponding to a received event are - removed from this type and a separate type [ReceivedEventData](https://azure.github.io/azure-sdk-for-js/event-hubs/interfaces/receivedeventdata.html) - is used for received events. -- The receive methods are moved from the `EventHubClient` class to the new [EventHubConsumer](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubconsumer.html) class. - - Use the [createConsumer()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#createconsumer) - function on the `EventHubClient` to create an instance of a `EventHubConsumer`. + removed from this type and a separate type ReceivedEventData is used for received events. +- The receive methods are moved from the `EventHubClient` class to the new `EventHubConsumer` class. + - Use the `createConsumer()` function on the `EventHubClient` to create an instance of a `EventHubConsumer`. - Each consumer represents a dedicated AMQP receiver link to Azure Event Hubs based on the flavor of receive function being used i.e `receiveBatch()` that receives events in a batch vs `receive()` that provides a streaming receiver. - The static methods `EventPosition.fromStart()` and `EventPosition.fromEnd()` are renamed to `EventPosition.earliest()` and `EventPosition.latest()` respectively. - Inspecting Event Hub - The methods `getHubRuntimeInformation()` and `getPartitionInformation()` on the `EventHubClient` are renamed to - [getProperties()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#getproperties) and - [getPartitionProperties()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#getpartitionproperties) - respectively. Please refer to the return types of these functions to ensure you are using the right property names. + `getProperties()` and `getPartitionProperties()` respectively. Please refer to the return types of these functions + to ensure you are using the right property names. ### New features @@ -225,12 +240,12 @@ For more information, please visit https://aka.ms/azure-sdk-preview1-js - You can now pass an abort signal to any of the async operations. This signal can be used to cancel such operations. Use the package [@azure/abort-controller](https://www.npmjs.com/package/@azure/abort-controller) to create such abort signals. - An async iterator is now available to receive events after you create an instance of `EventHubConsumer`. Use the function - [getEventIterator()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubconsumer.html#geteventiterator) on the consumer to get a `AsyncIterableIterator` which you can then use in a loop or use it's `next()` function to receive events. + `getEventIterator()` on the consumer to get a `AsyncIterableIterator` which you can then use in a loop or use it's `next()` + function to receive events. ### Next Steps -- Refer to the [API reference documentation](https://azure.github.io/azure-sdk-for-js/event-hubs/index.html) to get - an overview of the entire API surface. +- Refer to the `API reference documentation` to get an overview of the entire API surface. - Refer to our [samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-hubs/samples) to understand the usage of the new APIs. ## 2.1.0 (2019-06-10) diff --git a/sdk/eventhub/event-hubs/README.md b/sdk/eventhub/event-hubs/README.md index b53c9b423143..11e650db9ba7 100644 --- a/sdk/eventhub/event-hubs/README.md +++ b/sdk/eventhub/event-hubs/README.md @@ -399,7 +399,7 @@ hence sending events is not possible. - Please notice that the connection string needs to be for an [Event Hub-compatible endpoint](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-read-builtin) - e.g. "Endpoint=sb://my-iothub-namespace-[uid].servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-iot-hub-name" + (e.g. "Endpoint=sb://my-iothub-namespace-[uid].servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-iot-hub-name") ```javascript const { EventHubConsumerClient } = require("@azure/event-hubs"); diff --git a/sdk/eventhub/event-hubs/migrationguide.md b/sdk/eventhub/event-hubs/migrationguide.md index 5db07a8a8b7a..4813fef27c97 100644 --- a/sdk/eventhub/event-hubs/migrationguide.md +++ b/sdk/eventhub/event-hubs/migrationguide.md @@ -1,6 +1,6 @@ # Guide to migrate from @azure/event-hubs v2 to v5 -This document is intended for users that are familiar with V2 of the JavaScript SDK for Event Hubs library (`@azure/event-hubs@2.x.x` & `@azure/event-processor-host@2.x.x`) and wish +This document is intended for users that are familiar with V2 of the JavaScript SDK for Event Hubs library (`@azure/event-hubs@2.x.x` & `@azure/event-processor-host@2.x.x`) and wish to migrate their application to V5 of the same library. For users new to the JavaScript SDK for Event Hubs, please see the [readme file for the @azure/event-hubs package](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/README.md). @@ -16,28 +16,34 @@ the latest version improves on several areas from V2: ### Handling backpressure -Prior to V5, events were delivered as they were received with no ability +Prior to V5, events were delivered as they were received with no ability for the user to control the pace. This could result in flooding of downstream -dependencies as well as confusion about which events had been consumed in +dependencies as well as confusion about which events had been consumed in what order, making checkpointing difficult to do correctly. -In V5 the model has been simplified so new events are not delivered until the -previous batch has been consumed by your event handler. You can see a sample +In V5 the model has been simplified so new events are not delivered until the +previous batch has been consumed by your event handler. You can see a sample demonstrating this [here](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts) ### Specific clients for sending vs receiving -In V5 we've simplified the API surface, making two distinct clients, rather +In V5 we've simplified the API surface, making two distinct clients, rather than having a single `EventHubClient`: -* [EventHubProducerClient](https://docs.microsoft.com/en-us/javascript/api/@azure/event-hubs/eventhubproducerclient) + +- [EventHubProducerClient](https://docs.microsoft.com/en-us/javascript/api/@azure/event-hubs/eventhubproducerclient) for sending messages. -* [EventHubConsumerClient](https://docs.microsoft.com/en-us/javascript/api/@azure/event-hubs/eventhubconsumerclient) +- [EventHubConsumerClient](https://docs.microsoft.com/en-us/javascript/api/@azure/event-hubs/eventhubconsumerclient) for receiving messages. -We've also merged the functionality from `EventProcessorHost` from the `@azure/event-processor-host` package into +We've also merged the functionality from `EventProcessorHost` from the `@azure/event-processor-host` package into `EventHubConsumerClient` in the `@azure/event-hubs` package, allowing `EventHubConsumerClient` to be the single point of entry for receiving of any type (from single partition, all partitions, or with load balancing and checkpointing features) within Event Hubs. +Important note on checkpoints: `EventHubConsumerClient` does not support legacy checkpoint data. +i.e. the checkpoints made using the package `@azure/event-processor-host`. +In order to support interopability between different programming languages, a unifying checkpoint format was needed. +This and the need to support improvements to the algorithm used for managing partition ownership made breaking changes necessary. + ### Granular control over retries Retry logic and tuning has been externalized, allowing for better configuration @@ -47,77 +53,80 @@ More information about configuring and tuning retries can be found [here](https: ### Unified logging and diagnostics -With V5 we've unified the Azure SDK logging to work in a uniform way, making +With V5 we've unified the Azure SDK logging to work in a uniform way, making troubleshooting simpler. Documentation for enabling logging in EventHubs is [here](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-hubs#enable-logs). ### Client constructors -| In v2 | Equivalent in v5 | Sample | -|------------------------------------------------|------------------------------------------------------------------|--------| -| `EventHubClient.createFromConnectionString()` | `new EventHubProducerClient()` or `new EventHubConsumerClient()` | [receiveEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts), [sendEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/sendEvents.ts) | -| `EventHubClient.createFromAadTokenCredentials()` | `new EventHubProducerClient()` or `new EventHubConsumerClient()` | [usingAadAuth](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/usingAadAuth.ts) -| `EventProcessorHost.createFromConnectionString()` | `new EventHubConsumerClient(..., checkpointStore)` | [receiveEventsUsingCheckpointStore](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts) | +| In v2 | Equivalent in v5 | Sample | +| ------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `EventHubClient.createFromConnectionString()` | `new EventHubProducerClient()` or `new EventHubConsumerClient()` | [receiveEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts), [sendEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/sendEvents.ts) | +| `EventHubClient.createFromAadTokenCredentials()` | `new EventHubProducerClient()` or `new EventHubConsumerClient()` | [usingAadAuth](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/usingAadAuth.ts) | +| `EventProcessorHost.createFromConnectionString()` | `new EventHubConsumerClient(..., checkpointStore)` | [receiveEventsUsingCheckpointStore](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/eventhubs-checkpointstore-blob/samples/typescript/src/receiveEventsUsingCheckpointStore.ts) | Other noteworthy changes: + - In v5, the `EventHubConsumerClient` class takes the consumer group name as a mandatory argument in its constructor. -If you havent created any consumer groups explicitly, then use the name of the default consumer group which is `$Default`. -- For a checkpoint store implementation using Azure Storage Blobs, use the -[@azure/eventhubs-checkpointstore-blob](https://www.npmjs.com/package/@azure/eventhubs-checkpointstore-blob) package. + If you havent created any consumer groups explicitly, then use the name of the default consumer group which is `$Default`. +- For a checkpoint store implementation using Azure Storage Blobs, use the + [@azure/eventhubs-checkpointstore-blob](https://www.npmjs.com/package/@azure/eventhubs-checkpointstore-blob) package. -### Receiving events +### Receiving events -| In v2 | Equivalent in v5 | Sample | -|------------------------------------------------|------------------------------------------------------------------|--------| -| `EventHubClient.receive()` and `EventHubClient.receiveBatch()` | `EventHubConsumerClient.subscribe()` | [receiveEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts) | +| In v2 | Equivalent in v5 | Sample | +| -------------------------------------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | +| `EventHubClient.receive()` and `EventHubClient.receiveBatch()` | `EventHubConsumerClient.subscribe()` | [receiveEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts) | Other noteworthy changes: + - Use the `options` parameter to the `subscribe()` method to specify starting position to receive events from. - The `subscribe()` method allows you to receive events in batches whose size can be configured using the `options` parameter. - The user provided `processEvents` function to process events will be invoked only after the previous invocation completes. -This is different from v2 where the function was invoked for each event without waiting for the previous call to complete. + This is different from v2 where the function was invoked for each event without waiting for the previous call to complete. ### Sending events -| In v2 | Equivalent in v5 | Sample | -|------------------------------------------------|------------------------------------------------------------------|--------| -| `EventHubClient.sendBatch(events)` | `EventHubProducerClient.sendBatch(eventBatch)` | [sendEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/sendEvents.ts) | +| In v2 | Equivalent in v5 | Sample | +| ---------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `EventHubClient.sendBatch(events)` | `EventHubProducerClient.sendBatch(eventBatch)` | [sendEvents](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/sendEvents.ts) | Other noteworthy changes: + - The `send` method on the client is deprecated in favor of the `sendBatch` to encourage sending -events in batches for better throughput. + events in batches for better throughput. - The `sendBatch` method on the client takes a object of type `EventDataBatch` that should be created -using the `createBatch` method on the client. + using the `createBatch` method on the client. ### Creating EventPosition -| In v2 | Equivalent in v5 | -|------------------------------------------------|-----------------------------| -| `EventPosition.fromStart()` | `earliestEventPosition` | -| `EventPosition.fromEnd()` | `latestEventPosition` | -| `EventPosition.fromOffset(value)` | `{ offset: value }` | -| `EventPosition.fromSequenceNumber(value)` | `{ sequenceNumber: value }`| -| `EventPosition.fromEnqueuedTime(value)` | `{ enqueuedOn: value }` | +| In v2 | Equivalent in v5 | +| ----------------------------------------- | --------------------------- | +| `EventPosition.fromStart()` | `earliestEventPosition` | +| `EventPosition.fromEnd()` | `latestEventPosition` | +| `EventPosition.fromOffset(value)` | `{ offset: value }` | +| `EventPosition.fromSequenceNumber(value)` | `{ sequenceNumber: value }` | +| `EventPosition.fromEnqueuedTime(value)` | `{ enqueuedOn: value }` | ### Handling errors - In v2, the `name` property on an error of class `MessagingError` was used to reflect the different -error types like `InternalServerError`, `ServiceUnavailableError`, `OperationTimeoutError` etc. In v5, -the `name` property will always have the value "MessagingError". The new `code` property will contain -the different error types instead. + error types like `InternalServerError`, `ServiceUnavailableError`, `OperationTimeoutError` etc. In v5, + the `name` property will always have the value "MessagingError". The new `code` property will contain + the different error types instead. - In v2, network related system errors with `code` ENOTFOUND, ECONNREFUSED were passed to the user after -getting converted to a `MessagingError` with custom names. In v5, such errors will retain their `code`. + getting converted to a `MessagingError` with custom names. In v5, such errors will retain their `code`. - In v2, when receiving events, after calling the user-provided error callback, the `receive()` method -would stop receiving events and the user was expected to call it again. -In v5, after calling the user-provided error callback, the `subscribe()` method will resume receiving -events from the last checkpointed position. + would stop receiving events and the user was expected to call it again. + In v5, after calling the user-provided error callback, the `subscribe()` method will resume receiving + events from the last checkpointed position. ## Migration samples -* [Receiving events](#migrating-code-from-eventhubclient-to-eventhubconsumerclient-for-receiving-events) -* [Receiving events with checkpointing](#migrating-code-from-eventprocessorhost-to-eventhubconsumerclient-for-receiving-events) -* [Sending events](#migrating-code-from-eventhubclient-to-eventhubproducerclient-for-sending-events) +- [Receiving events](#migrating-code-from-eventhubclient-to-eventhubconsumerclient-for-receiving-events) +- [Receiving events with checkpointing](#migrating-code-from-eventprocessorhost-to-eventhubconsumerclient-for-receiving-events) +- [Sending events](#migrating-code-from-eventhubclient-to-eventhubproducerclient-for-sending-events) ### Migrating code from `EventHubClient` to `EventHubConsumerClient` for receiving events @@ -141,30 +150,30 @@ Becomes this in V5: ```typescript const eventHubConsumerClient = new EventHubConsumerClient(consumerGroupName, connectionString); -const subscription = eventHubConsumerClient.subscribe( - partitionId, { - processInitialize: (initContext) => { - initContext.setStartingPosition(earliestEventPosition); - }, - processEvents: onMessageHandler, - processError: onErrorHandler +const subscription = eventHubConsumerClient.subscribe(partitionId, { + processInitialize: (initContext) => { + initContext.setStartingPosition(earliestEventPosition); + }, + processEvents: onMessageHandler, + processError: onErrorHandler }); - + await subscription.close(); ``` -See [`receiveEvents.ts`](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts) +See [`receiveEvents.ts`](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts) for a sample program demonstrating this. ### Migrating code from `EventHubClient` to `EventHubProducerClient` for sending events In V2, there were multiple options on how to send data. -In V5, this has been consolidated into a more efficient `sendBatch` method. +In V5, this has been consolidated into a more efficient `sendBatch` method. Batching merges information from multiple messages into a single send, reducing the amount of network communication needed vs sending messages one at a time. So in V2: + ```typescript const eventsToSend = [ // events go here @@ -177,6 +186,7 @@ await client.sendBatch(eventsToSend, partitionId); ``` In V5: + ```typescript const producer = new EventHubProducerClient(connectionString); @@ -197,7 +207,7 @@ while (i < eventsToSend.length) { ++i; continue; } - + if (batch.count === 0) { // If we can't add it and the batch is empty that means the message we're trying to send // is too large, even when it would be the _only_ message in the batch. @@ -219,20 +229,21 @@ while (i < eventsToSend.length) { // send any remaining messages, if any. if (batch.count > 0) { - console.log(`Sending remaining ${batch.count} messages as a single batch.`) + console.log(`Sending remaining ${batch.count} messages as a single batch.`); await producer.sendBatch(batch); } ``` ### Migrating code from `EventProcessorHost` to `EventHubConsumerClient` for receiving events -In V2, `EventProcessorHost` allowed you to balance the load between multiple instances of +In V2, `EventProcessorHost` allowed you to balance the load between multiple instances of your program when receiving events. In V5, `EventHubConsumerClient` allows you to do the same with the `subscribe()` method if you pass a `CheckpointStore` to the constructor. So in V2: + ```typescript const eph = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(ephName), @@ -250,7 +261,9 @@ const eph = EventProcessorHost.createFromConnectionString( // In V2, you get a single event passed to your callback. If you had asynchronous code running in your callback, // it is not awaited before the callback is called for the next event. -const onMessage = (context, event) => { /** your code here **/ } +const onMessage = (context, event) => { + /** your code here **/ +}; // This is your error handler for errors occuring when receiving events. const onError = (error) => { @@ -261,37 +274,43 @@ await eph.start(onMessage, onError); ``` And in V5: + ```typescript import { EventHubConsumerClient, CheckpointStore } from "@azure/event-hubs"; import { ContainerClient } from "@azure/storage-blob"; import { BlobCheckpointStore } from "@azure/eventhubs-checkpointstore-blob"; const containerClient = new ContainerClient(storageConnectionString, storageContainerName); -const checkpointStore : CheckpointStore = new BlobCheckpointStore(containerClient); -const eventHubConsumerClient = new EventHubConsumerClient(consumerGroupName, ehConnectionString, eventHubName); +const checkpointStore: CheckpointStore = new BlobCheckpointStore(containerClient); +const eventHubConsumerClient = new EventHubConsumerClient( + consumerGroupName, + ehConnectionString, + eventHubName +); -const subscription = eventHubConsumerClient.subscribe( - partitionId, { - // In V5 we deliver events in batches, rather than a single message at a time. - // You can control the batch size via the options passed to the client. - // - // If your callback is an async function or returns a promise, it will be awaited before the - // callback is called for the next batch of events. - processEvents: (events, context) => { /** your code here **/ }, - - // Prior to V5 errors were handled by separate callbacks depending - // on where they were thrown i.e when managing different partitions vs receiving from each partition. - // - // In V5 you only need a single error handler for all of those cases. - processError: (error, context) => { - if (context.partitionId) { - console.log("Error when receiving events from partition %s: %O", context.partitionId, error) - } else { - console.log("Error from the consumer client: %O", error); - } +const subscription = eventHubConsumerClient.subscribe(partitionId, { + // In V5 we deliver events in batches, rather than a single message at a time. + // You can control the batch size via the options passed to the client. + // + // If your callback is an async function or returns a promise, it will be awaited before the + // callback is called for the next batch of events. + processEvents: (events, context) => { + /** your code here **/ + }, + + // Prior to V5, errors were handled by separate callbacks depending + // on where they were thrown i.e when managing different partitions vs receiving from each partition. + // + // In V5, you only need a single error handler for all of those cases. + processError: (error, context) => { + if (context.partitionId) { + console.log("Error when receiving events from partition %s: %O", context.partitionId, error); + } else { + console.log("Error from the consumer client: %O", error); } + } }); - + await subscription.close(); ``` diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index ecfddba54c98..5b5f57ddbe03 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -1,7 +1,7 @@ { "name": "@azure/event-hubs", "sdk-type": "client", - "version": "5.2.1", + "version": "5.2.2", "description": "Azure Event Hubs SDK for JS.", "author": "Microsoft Corporation", "license": "MIT", @@ -81,20 +81,16 @@ }, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-amqp": "^1.1.1", + "@azure/core-amqp": "^1.1.3", "@azure/core-asynciterator-polyfill": "^1.0.0", "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "async-lock": "^1.1.3", "buffer": "^5.2.1", - "debug": "^4.1.1", - "is-buffer": "^2.0.3", - "jssha": "^2.3.1", "process": "^0.11.10", "rhea-promise": "^1.0.0", - "tslib": "^1.10.0", - "uuid": "^3.3.2" + "tslib": "^2.0.0", + "uuid": "^8.1.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -104,7 +100,7 @@ "@rollup/plugin-inject": "^4.0.0", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/async-lock": "^1.1.0", "@types/chai": "^4.1.6", @@ -114,16 +110,17 @@ "@types/long": "^4.0.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", - "@types/uuid": "^3.4.3", - "@types/ws": "^6.0.1", + "@types/sinon": "^9.0.4", + "@types/uuid": "^8.0.0", + "@types/ws": "^7.2.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-string": "^1.5.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", + "debug": "^4.1.1", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "eslint": "^6.1.0", @@ -132,7 +129,6 @@ "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", "esm": "^3.2.18", - "https-proxy-agent": "^3.0.1", "karma": "^4.0.1", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", @@ -148,15 +144,15 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "sinon": "^7.1.0", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "ws": "^7.1.1" } } diff --git a/sdk/eventhub/event-hubs/samples/javascript/package.json b/sdk/eventhub/event-hubs/samples/javascript/package.json index d1f3593c5285..d8ba73b23959 100644 --- a/sdk/eventhub/event-hubs/samples/javascript/package.json +++ b/sdk/eventhub/event-hubs/samples/javascript/package.json @@ -25,12 +25,12 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", "sideEffects": false, "dependencies": { - "@azure/core-amqp": "next", - "@azure/event-hubs": "next", + "@azure/core-amqp": "latest", + "@azure/event-hubs": "latest", "@types/dotenv": "^8.2.0", "@types/ws": "^6.0.4", "dotenv": "^8.2.0", - "https-proxy-agent": "^3.0.1", + "https-proxy-agent": "^5.0.0", "rhea-promise": "^1.0.0", "tslib": "^1.9.3", "ws": "^7.2.0" diff --git a/sdk/eventhub/event-hubs/samples/javascript/receiveEvents.js b/sdk/eventhub/event-hubs/samples/javascript/receiveEvents.js index 3420e6493d57..07a6b0790c45 100644 --- a/sdk/eventhub/event-hubs/samples/javascript/receiveEvents.js +++ b/sdk/eventhub/event-hubs/samples/javascript/receiveEvents.js @@ -35,6 +35,12 @@ async function main() { { // The callback where you add your code to process incoming events processEvents: async (events, context) => { + // Note: It is possible for `events` to be an empty array. + // This can happen if there were no new events to receive + // in the `maxWaitTimeInSeconds`, which is defaulted to + // 60 seconds. + // The `maxWaitTimeInSeconds` can be changed by setting + // it in the `options` passed to `subscribe()`. for (const event of events) { console.log( `Received event: '${event.body}' from partition: '${context.partitionId}' and consumer group: '${context.consumerGroup}'` diff --git a/sdk/eventhub/event-hubs/samples/typescript/package.json b/sdk/eventhub/event-hubs/samples/typescript/package.json index f4caec61273f..e507d0f01f23 100644 --- a/sdk/eventhub/event-hubs/samples/typescript/package.json +++ b/sdk/eventhub/event-hubs/samples/typescript/package.json @@ -29,12 +29,11 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", "sideEffects": false, "dependencies": { - "@azure/core-amqp": "next", - "@azure/event-hubs": "next", - "@types/dotenv": "^8.2.0", + "@azure/core-amqp": "latest", + "@azure/event-hubs": "latest", "@types/ws": "^6.0.4", "dotenv": "^8.2.0", - "https-proxy-agent": "^3.0.1", + "https-proxy-agent": "^5.0.0", "rhea-promise": "^1.0.0", "tslib": "^1.9.3", "ws": "^7.2.0" diff --git a/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts b/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts index 9498174a8720..ee4bfbdd30c4 100644 --- a/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts +++ b/sdk/eventhub/event-hubs/samples/typescript/src/receiveEvents.ts @@ -36,6 +36,12 @@ export async function main() { { // The callback where you add your code to process incoming events processEvents: async (events, context) => { + // Note: It is possible for `events` to be an empty array. + // This can happen if there were no new events to receive + // in the `maxWaitTimeInSeconds`, which is defaulted to + // 60 seconds. + // The `maxWaitTimeInSeconds` can be changed by setting + // it in the `options` passed to `subscribe()`. for (const event of events) { console.log( `Received event: '${event.body}' from partition: '${context.partitionId}' and consumer group: '${context.consumerGroup}'` diff --git a/sdk/eventhub/event-hubs/samples/typescript/src/websockets.ts b/sdk/eventhub/event-hubs/samples/typescript/src/websockets.ts index 05dfab71f295..ac0a53d88d77 100644 --- a/sdk/eventhub/event-hubs/samples/typescript/src/websockets.ts +++ b/sdk/eventhub/event-hubs/samples/typescript/src/websockets.ts @@ -16,7 +16,7 @@ import WebSocket from "ws"; const url = require("url"); -const httpsProxyAgent = require("https-proxy-agent"); +import { HttpsProxyAgent } from "https-proxy-agent"; import { EventHubConsumerClient } from "@azure/event-hubs"; @@ -34,7 +34,7 @@ const consumerGroup = process.env["CONSUMER_GROUP_NAME"] || ""; // Skip this section if you are not behind a proxy server const urlParts = url.parse("http://localhost:3128"); urlParts.auth = "username:password"; // Skip this if proxy server does not need authentication. -const proxyAgent = new httpsProxyAgent(urlParts); +const proxyAgent = new HttpsProxyAgent(urlParts); export async function main(): Promise { console.log(`Running websockets sample`); diff --git a/sdk/eventhub/event-hubs/samples/typescript/tsconfig.json b/sdk/eventhub/event-hubs/samples/typescript/tsconfig.json index a59211e46b06..a6e49e6c1884 100644 --- a/sdk/eventhub/event-hubs/samples/typescript/tsconfig.json +++ b/sdk/eventhub/event-hubs/samples/typescript/tsconfig.json @@ -4,6 +4,7 @@ "moduleResolution": "node", "allowSyntheticDefaultImports": true, + "esModuleInterop": true, "outDir": "dist", "rootDir": "src" diff --git a/sdk/eventhub/event-hubs/src/connectionContext.ts b/sdk/eventhub/event-hubs/src/connectionContext.ts index 6fc44dd7f98d..f6c61591dc0d 100644 --- a/sdk/eventhub/event-hubs/src/connectionContext.ts +++ b/sdk/eventhub/event-hubs/src/connectionContext.ts @@ -1,22 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { logger } from "./log"; +/* eslint-disable @azure/azure-sdk/ts-no-namespaces */ +/* eslint-disable no-inner-declarations */ + +import { logger, logErrorStackTrace } from "./log"; import { getRuntimeInfo } from "./util/runtimeInfo"; import { packageJsonInfo } from "./util/constants"; import { EventHubReceiver } from "./eventHubReceiver"; import { EventHubSender } from "./eventHubSender"; import { - Constants, ConnectionContextBase, + Constants, CreateConnectionContextBaseParameters, EventHubConnectionConfig, - TokenCredential, - SharedKeyCredential + SharedKeyCredential, + TokenCredential } from "@azure/core-amqp"; import { ManagementClient, ManagementClientOptions } from "./managementClient"; import { EventHubClientOptions } from "./models/public"; -import { Dictionary, OnAmqpEvent, EventContext, ConnectionEvents } from "rhea-promise"; +import { Connection, ConnectionEvents, Dictionary, EventContext, OnAmqpEvent } from "rhea-promise"; /** * @internal @@ -48,6 +51,45 @@ export interface ConnectionContext extends ConnectionContextBase { * the underlying amqp connection for the EventHub Client. */ managementSession?: ManagementClient; + /** + * Function returning a promise that resolves once the connectionContext is ready to open an AMQP link. + * ConnectionContext will be ready to open an AMQP link when: + * - The AMQP connection is already open on both sides. + * - The AMQP connection has been closed or disconnected. In this case, a new AMQP connection is expected + * to be created first. + * An AMQP link cannot be opened if the AMQP connection + * is in the process of closing or disconnecting. + */ + readyToOpenLink(): Promise; + /** + * Closes all AMQP links, sessions and connection. + */ + close(): Promise; +} + +/** + * Describes the members on the ConnectionContext that are only + * used by it internally. + * @ignore + * @internal + */ +export interface ConnectionContextInternalMembers extends ConnectionContext { + /** + * Indicates whether the connection is in the process of closing. + * When this returns `true`, a `disconnected` event will be received + * after the connection is closed. + * + */ + isConnectionClosing(): boolean; + /** + * Resolves once the context's connection emits a `disconnected` event. + */ + waitForDisconnectedEvent(): Promise; + /** + * Resolves once the connection has finished being reset. + * Connections are reset as part of reacting to a `disconnected` event. + */ + waitForConnectionReset(): Promise; } /** @@ -59,6 +101,26 @@ export interface ConnectionContextOptions extends EventHubClientOptions { managementSessionAudience?: string; } +/** + * Helper type to get the names of all the functions on an object. + */ +type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]; +/** + * Helper type to get the types of all the functions on an object. + */ +type FunctionProperties = Pick>; +/** + * Helper type to get the types of all the functions on ConnectionContext + * and the internal methods from ConnectionContextInternalMembers. + * Note that this excludes the functions that ConnectionContext inherits. + * Each function also has its `this` type set as `ConnectionContext`. + */ +type ConnectionContextMethods = Omit< + FunctionProperties, + FunctionPropertyNames +> & + ThisType; + /** * @internal * @ignore @@ -118,9 +180,78 @@ export namespace ConnectionContext { }; connectionContext.managementSession = new ManagementClient(connectionContext, mOptions); + let waitForDisconnectResolve: () => void; + let waitForDisconnectPromise: Promise | undefined; + + Object.assign(connectionContext, { + isConnectionClosing() { + // When the connection is not open, but the remote end is open, + // then the rhea connection is in the process of terminating. + return Boolean(!this.connection.isOpen() && this.connection.isRemoteOpen()); + }, + async readyToOpenLink() { + // Check that the connection isn't in the process of closing. + // This can happen when the idle timeout has been reached but + // the underlying socket is waiting to be destroyed. + if (this.isConnectionClosing()) { + // Wait for the disconnected event that indicates the underlying socket has closed. + await this.waitForDisconnectedEvent(); + } + // Check if the connection is currently in the process of disconnecting. + if (waitForDisconnectPromise) { + // Wait for the connection to be reset. + await this.waitForConnectionReset(); + } + }, + waitForDisconnectedEvent() { + return new Promise((resolve) => { + logger.verbose( + `[${this.connectionId}] Attempting to reinitialize connection` + + ` but the connection is in the process of closing.` + + ` Waiting for the disconnect event before continuing.` + ); + this.connection.once(ConnectionEvents.disconnected, resolve); + }); + }, + waitForConnectionReset() { + if (waitForDisconnectPromise) { + return waitForDisconnectPromise; + } + return Promise.resolve(); + }, + async close() { + try { + if (this.connection.isOpen()) { + // Close all the senders. + for (const senderName of Object.keys(this.senders)) { + await this.senders[senderName].close(); + } + // Close all the receivers. + for (const receiverName of Object.keys(this.receivers)) { + await this.receivers[receiverName].close(); + } + // Close the cbs session; + await this.cbsSession.close(); + // Close the management session + await this.managementSession!.close(); + await this.connection.close(); + this.wasConnectionCloseCalled = true; + logger.info("Closed the amqp connection '%s' on the client.", this.connectionId); + } + } catch (err) { + err = err instanceof Error ? err : JSON.stringify(err); + logger.warning( + `An error occurred while closing the connection "${this.connectionId}":\n${err}` + ); + logErrorStackTrace(err); + throw err; + } + } + }); + // Define listeners to be added to the connection object for // "connection_open" and "connection_error" events. - const onConnectionOpen: OnAmqpEvent = (context: EventContext) => { + const onConnectionOpen: OnAmqpEvent = () => { connectionContext.wasConnectionCloseCalled = false; logger.verbose( "[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.", @@ -129,7 +260,14 @@ export namespace ConnectionContext { ); }; - const disconnected: OnAmqpEvent = async (context: EventContext) => { + const onDisconnected: OnAmqpEvent = async (context: EventContext) => { + if (waitForDisconnectPromise) { + return; + } + waitForDisconnectPromise = new Promise((resolve) => { + waitForDisconnectResolve = resolve; + }); + logger.verbose( "[%s] 'disconnected' event occurred on the amqp connection.", connectionContext.connection.id @@ -169,39 +307,33 @@ export namespace ConnectionContext { connectionContext.connection.removeAllSessions(); // Close the cbs session to ensure all the event handlers are released. - await connectionContext.cbsSession.close(); + await connectionContext.cbsSession.close().catch(() => { + /* error already logged, swallow it here */ + }); // Close the management session to ensure all the event handlers are released. - await connectionContext.managementSession!.close(); + await connectionContext.managementSession!.close().catch(() => { + /* error already logged, swallow it here */ + }); // Close all senders and receivers to ensure clean up of timers & other resources. if (state.numSenders || state.numReceivers) { for (const senderName of Object.keys(connectionContext.senders)) { const sender = connectionContext.senders[senderName]; - if (!sender.isConnecting) { - await sender.close().catch((err) => { - logger.verbose( - "[%s] Error when closing sender [%s] after disconnected event: %O", - connectionContext.connection.id, - senderName, - err - ); - }); - } + await sender.close().catch(() => { + /* error already logged, swallow it here */ + }); } for (const receiverName of Object.keys(connectionContext.receivers)) { const receiver = connectionContext.receivers[receiverName]; - if (!receiver.isConnecting) { - await receiver.close().catch((err) => { - logger.verbose( - "[%s] Error when closing sender [%s] after disconnected event: %O", - connectionContext.connection.id, - receiverName, - err - ); - }); - } + await receiver.close().catch(() => { + /* error already logged, swallow it here */ + }); } } + + await refreshConnection(connectionContext); + waitForDisconnectResolve(); + waitForDisconnectPromise = undefined; }; const protocolError: OnAmqpEvent = async (context: EventContext) => { @@ -248,11 +380,47 @@ export namespace ConnectionContext { } }; - // Add listeners on the connection object. - connectionContext.connection.on(ConnectionEvents.connectionOpen, onConnectionOpen); - connectionContext.connection.on(ConnectionEvents.disconnected, disconnected); - connectionContext.connection.on(ConnectionEvents.protocolError, protocolError); - connectionContext.connection.on(ConnectionEvents.error, error); + function addConnectionListeners(connection: Connection) { + // Add listeners on the connection object. + connection.on(ConnectionEvents.connectionOpen, onConnectionOpen); + connection.on(ConnectionEvents.disconnected, onDisconnected); + connection.on(ConnectionEvents.protocolError, protocolError); + connection.on(ConnectionEvents.error, error); + } + + function cleanConnectionContext(connectionContext: ConnectionContext) { + // Remove listeners from the connection object. + connectionContext.connection.removeListener( + ConnectionEvents.connectionOpen, + onConnectionOpen + ); + connectionContext.connection.removeListener(ConnectionEvents.disconnected, onDisconnected); + connectionContext.connection.removeListener(ConnectionEvents.protocolError, protocolError); + connectionContext.connection.removeListener(ConnectionEvents.error, error); + // Close the connection + return connectionContext.connection.close(); + } + + async function refreshConnection(connectionContext: ConnectionContext) { + const originalConnectionId = connectionContext.connectionId; + try { + await cleanConnectionContext(connectionContext); + } catch (err) { + logger.verbose( + `[${connectionContext.connectionId}] There was an error closing the connection before reconnecting: %O`, + err + ); + } + + // Create a new connection, id, locks, and cbs client. + connectionContext.refreshConnection(); + addConnectionListeners(connectionContext.connection); + logger.verbose( + `The connection "${originalConnectionId}" has been updated to "${connectionContext.connectionId}".` + ); + } + + addConnectionListeners(connectionContext.connection); logger.verbose("[%s] Created connection context successfully.", connectionContext.connectionId); return connectionContext; diff --git a/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts b/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts index 9f6909da5138..e6fd67991cbe 100644 --- a/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts +++ b/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { getTraceParentHeader, extractSpanContextFromTraceParentHeader } from "@azure/core-tracing"; +import { extractSpanContextFromTraceParentHeader, getTraceParentHeader } from "@azure/core-tracing"; import { Span, SpanContext } from "@opentelemetry/api"; import { EventData } from "../eventData"; diff --git a/sdk/eventhub/event-hubs/src/eventData.ts b/sdk/eventhub/event-hubs/src/eventData.ts index 7a404c034b76..32887edf158f 100644 --- a/sdk/eventhub/event-hubs/src/eventData.ts +++ b/sdk/eventhub/event-hubs/src/eventData.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Message, MessageAnnotations, DeliveryAnnotations } from "rhea-promise"; +import { DeliveryAnnotations, Message, MessageAnnotations } from "rhea-promise"; import { Constants } from "@azure/core-amqp"; /** diff --git a/sdk/eventhub/event-hubs/src/eventDataBatch.ts b/sdk/eventhub/event-hubs/src/eventDataBatch.ts index 8666916238d7..5299b3370519 100644 --- a/sdk/eventhub/event-hubs/src/eventDataBatch.ts +++ b/sdk/eventhub/event-hubs/src/eventDataBatch.ts @@ -4,10 +4,10 @@ import { EventData, toAmqpMessage } from "./eventData"; import { ConnectionContext } from "./connectionContext"; import { AmqpMessage } from "@azure/core-amqp"; -import { message, MessageAnnotations } from "rhea-promise"; +import { MessageAnnotations, message } from "rhea-promise"; import { throwTypeErrorIfParameterMissing } from "./util/error"; import { Span, SpanContext } from "@opentelemetry/api"; -import { instrumentEventData, TRACEPARENT_PROPERTY } from "./diagnostics/instrumentEventData"; +import { TRACEPARENT_PROPERTY, instrumentEventData } from "./diagnostics/instrumentEventData"; import { createMessageSpan } from "./diagnostics/messageSpan"; /** @@ -138,10 +138,15 @@ export class EventDataBatchImpl implements EventDataBatch { * @property Describes the amqp connection context for the Client. */ private _context: ConnectionContext; + /** + * @property The Id of the partition to which the batch is expected to be sent to. + * Specifying this will throw an error if the batch was created using a `paritionKey`. + */ + private _partitionId?: string; /** * @property A value that is hashed to produce a partition assignment. * It guarantees that messages with the same partitionKey end up in the same partition. - * Specifying this will throw an error if the producer was created using a `paritionId`. + * Specifying this will throw an error if the batch was created using a `paritionId`. */ private _partitionKey?: string; /** @@ -183,11 +188,12 @@ export class EventDataBatchImpl implements EventDataBatch { context: ConnectionContext, maxSizeInBytes: number, partitionKey?: string, - private _partitionId?: string + partitionId?: string ) { this._context = context; this._maxSizeInBytes = maxSizeInBytes; - this._partitionKey = partitionKey; + this._partitionKey = partitionKey != undefined ? String(partitionKey) : partitionKey; + this._partitionId = partitionId != undefined ? String(partitionId) : partitionId; this._sizeInBytes = 0; this._count = 0; } diff --git a/sdk/eventhub/event-hubs/src/eventHubConsumerClient.ts b/sdk/eventhub/event-hubs/src/eventHubConsumerClient.ts index c2f1ad26e5e0..5069ef75098e 100644 --- a/sdk/eventhub/event-hubs/src/eventHubConsumerClient.ts +++ b/sdk/eventhub/event-hubs/src/eventHubConsumerClient.ts @@ -4,14 +4,14 @@ import { EventHubClient } from "./impl/eventHubClient"; import { EventHubClientOptions, - GetPartitionPropertiesOptions, GetEventHubPropertiesOptions, - GetPartitionIdsOptions + GetPartitionIdsOptions, + GetPartitionPropertiesOptions } from "./models/public"; import { InMemoryCheckpointStore } from "./inMemoryCheckpointStore"; -import { EventProcessor, CheckpointStore, FullEventProcessorOptions } from "./eventProcessor"; +import { CheckpointStore, EventProcessor, FullEventProcessorOptions } from "./eventProcessor"; import { GreedyPartitionLoadBalancer } from "./partitionLoadBalancer"; -import { TokenCredential, Constants } from "@azure/core-amqp"; +import { Constants, TokenCredential } from "@azure/core-amqp"; import { logger } from "./log"; import { @@ -20,9 +20,9 @@ import { SubscriptionEventHandlers } from "./eventHubConsumerClientModels"; import { isTokenCredential } from "@azure/core-amqp"; -import { PartitionProperties, EventHubProperties } from "./managementClient"; +import { EventHubProperties, PartitionProperties } from "./managementClient"; import { PartitionGate } from "./impl/partitionGate"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { validateEventPositions } from "./eventPosition"; const defaultConsumerClientOptions: Required(); + /** * @property * The name of the default consumer group in the Event Hubs service. @@ -309,7 +316,15 @@ export class EventHubConsumerClient { * @returns Promise * @throws Error if the underlying connection encounters an error while closing. */ - close(): Promise { + async close(): Promise { + // Stop all the actively running subscriptions. + const activeSubscriptions = Array.from(this._subscriptions); + await Promise.all( + activeSubscriptions.map((subscription) => { + return subscription.close(); + }) + ); + // Close the connection via the client. return this._eventHubClient.close(); } @@ -407,7 +422,6 @@ export class EventHubConsumerClient { options )); } else if ( - typeof handlersOrPartitionId1 === "string" && isSubscriptionEventHandlers(optionsOrHandlers2) ) { // #2: subscribe overload (read from specific partition IDs), don't coordinate @@ -416,7 +430,9 @@ export class EventHubConsumerClient { validateEventPositions(options.startPosition); } ({ targetedPartitionId, eventProcessor } = this.createEventProcessorForSinglePartition( - handlersOrPartitionId1, + // cast to string as downstream code expects partitionId to be string, but JS users could have given us anything. + // we don't validate the user input and instead rely on service throwing errors if any + String(handlersOrPartitionId1), optionsOrHandlers2, possibleOptions3 )); @@ -426,15 +442,18 @@ export class EventHubConsumerClient { eventProcessor.start(); - return { + const subscription = { get isRunning() { return eventProcessor.isRunning(); }, close: () => { this._partitionGate.remove(targetedPartitionId); + this._subscriptions.delete(subscription); return eventProcessor.stop(); } }; + this._subscriptions.add(subscription); + return subscription; } private createEventProcessorForAllPartitions( diff --git a/sdk/eventhub/event-hubs/src/eventHubConsumerClientModels.ts b/sdk/eventhub/event-hubs/src/eventHubConsumerClientModels.ts index df7a33308345..90aad9f221dd 100644 --- a/sdk/eventhub/event-hubs/src/eventHubConsumerClientModels.ts +++ b/sdk/eventhub/event-hubs/src/eventHubConsumerClientModels.ts @@ -117,6 +117,12 @@ export interface SubscriptionEventHandlers { * The `updateCheckpoint()` method on the context can be used to update checkpoints in the `CheckpointStore` * (if one was provided to the client). Use this in frequent intervals to mark events that have been processed * so that the client can restart from such checkpoints in the event of a restart or error recovery. + * + * Note: It is possible for received events to be an empty array. + * This can happen if there are no new events to receive + * in the `maxWaitTimeInSeconds`, which is defaulted to 60 seconds. + * The `maxWaitTimeInSeconds` can be changed by setting + * it in the `options` passed to `subscribe()`. */ processEvents: ProcessEventsHandler; /** diff --git a/sdk/eventhub/event-hubs/src/eventHubProducerClient.ts b/sdk/eventhub/event-hubs/src/eventHubProducerClient.ts index f3c2336556bd..25a3f5facdcb 100644 --- a/sdk/eventhub/event-hubs/src/eventHubProducerClient.ts +++ b/sdk/eventhub/event-hubs/src/eventHubProducerClient.ts @@ -2,20 +2,27 @@ // Licensed under the MIT license. import { isTokenCredential, TokenCredential } from "@azure/core-amqp"; -import { EventDataBatch, isEventDataBatch } from "./eventDataBatch"; -import { EventHubClient } from "./impl/eventHubClient"; +import { getTracer } from "@azure/core-tracing"; +import { CanonicalCode, Link, Span, SpanContext, SpanKind } from "@opentelemetry/api"; +import { ConnectionContext } from "./connectionContext"; +import { instrumentEventData, TRACEPARENT_PROPERTY } from "./diagnostics/instrumentEventData"; +import { createMessageSpan } from "./diagnostics/messageSpan"; +import { EventData } from "./eventData"; +import { EventDataBatch, EventDataBatchImpl, isEventDataBatch } from "./eventDataBatch"; +import { EventHubSender } from './eventHubSender'; +import { createConnectionContext } from "./impl/eventHubClient"; +import { logErrorStackTrace, logger } from './log'; import { EventHubProperties, PartitionProperties } from "./managementClient"; -import { EventHubProducer } from "./sender"; import { - SendBatchOptions, + CreateBatchOptions, + EventHubClientOptions, GetEventHubPropertiesOptions, GetPartitionIdsOptions, GetPartitionPropertiesOptions, - EventHubClientOptions, - CreateBatchOptions + SendBatchOptions } from "./models/public"; -import { EventData } from "./eventData"; -import { OperationOptions } from "./util/operationOptions"; +import { throwErrorIfConnectionClosed, throwTypeErrorIfParameterMissing } from "./util/error"; +import { getParentSpan, OperationOptions } from "./util/operationOptions"; /** * The `EventHubProducerClient` class is used to send events to an Event Hub. @@ -30,17 +37,26 @@ import { OperationOptions } from "./util/operationOptions"; * */ export class EventHubProducerClient { - private _client: EventHubClient; - - private _producersMap: Map; + /** + * Describes the amqp connection context for the client. + */ + private _context: ConnectionContext; + /** + * The options passed by the user when creating the EventHubClient instance. + */ + private _clientOptions: EventHubClientOptions; + /** + * Map of partitionId to senders + */ + private _sendersMap: Map; /** * @property * @readonly * The name of the Event Hub instance for which this client is created. */ get eventHubName(): string { - return this._client.eventHubName; + return this._context.config.entityPath; } /** @@ -50,7 +66,7 @@ export class EventHubProducerClient { * This is likely to be similar to .servicebus.windows.net. */ get fullyQualifiedNamespace(): string { - return this._client.fullyQualifiedNamespace; + return this._context.config.host; } /** @@ -109,27 +125,21 @@ export class EventHubProducerClient { credentialOrOptions3?: TokenCredential | EventHubClientOptions, options4?: EventHubClientOptions ) { + this._context = createConnectionContext( + fullyQualifiedNamespaceOrConnectionString1, + eventHubNameOrOptions2, + credentialOrOptions3, + options4 + ); if (typeof eventHubNameOrOptions2 !== "string") { - this._client = new EventHubClient( - fullyQualifiedNamespaceOrConnectionString1, - eventHubNameOrOptions2 - ); + this._clientOptions = eventHubNameOrOptions2 || {}; } else if (!isTokenCredential(credentialOrOptions3)) { - this._client = new EventHubClient( - fullyQualifiedNamespaceOrConnectionString1, - eventHubNameOrOptions2, - credentialOrOptions3 - ); + this._clientOptions = credentialOrOptions3 || {}; } else { - this._client = new EventHubClient( - fullyQualifiedNamespaceOrConnectionString1, - eventHubNameOrOptions2, - credentialOrOptions3, - options4 - ); + this._clientOptions = options4 || {}; } - this._producersMap = new Map(); + this._sendersMap = new Map(); } /** @@ -146,19 +156,43 @@ export class EventHubProducerClient { * @throws Error if the underlying connection has been closed, create a new EventHubProducerClient. * @throws AbortError if the operation is cancelled via the abortSignal in the options. */ - async createBatch(options?: CreateBatchOptions): Promise { - if (options && options.partitionId && options.partitionKey) { + async createBatch(options: CreateBatchOptions = {}): Promise { + throwErrorIfConnectionClosed(this._context); + + if (options.partitionId != undefined && options.partitionKey != undefined) { throw new Error("partitionId and partitionKey cannot both be set when creating a batch"); } - let producer = this._producersMap.get(""); - - if (!producer) { - producer = this._client.createProducer(); - this._producersMap.set("", producer); + let sender = this._sendersMap.get(""); + if (!sender) { + sender = EventHubSender.create(this._context); + this._sendersMap.set("", sender); } - return producer.createBatch(options); + let maxMessageSize = await sender.getMaxMessageSize({ + retryOptions: this._clientOptions.retryOptions, + abortSignal: options.abortSignal + }); + + if (options.maxSizeInBytes) { + if (options.maxSizeInBytes > maxMessageSize) { + const error = new Error( + `Max message size (${options.maxSizeInBytes} bytes) is greater than maximum message size (${maxMessageSize} bytes) on the AMQP sender link.` + ); + logger.warning( + `[${this._context.connectionId}] ${error.message}` + ); + logErrorStackTrace(error); + throw error; + } + maxMessageSize = options.maxSizeInBytes; + } + return new EventDataBatchImpl( + this._context, + maxMessageSize, + options.partitionKey, + options.partitionId + ); } /** @@ -195,8 +229,15 @@ export class EventHubProducerClient { batch: EventDataBatch | EventData[], options: SendBatchOptions | OperationOptions = {} ): Promise { + throwErrorIfConnectionClosed(this._context); + throwTypeErrorIfParameterMissing(this._context.connectionId, "sendBatch", "batch", batch); + let partitionId: string | undefined; let partitionKey: string | undefined; + + // link message span contexts + let spanContextsToLink: SpanContext[] = []; + if (isEventDataBatch(batch)) { // For batches, partitionId and partitionKey would be set on the batch. partitionId = batch.partitionId; @@ -212,31 +253,72 @@ export class EventHubProducerClient { `The partitionId (${unexpectedOptions.partitionId}) set on sendBatch does not match the partitionId (${partitionId}) set when creating the batch.` ); } + + spanContextsToLink = batch._messageSpanContexts; } else { + if (!Array.isArray(batch)) { + batch = [batch]; + } + // For arrays of events, partitionId and partitionKey would be set in the options. const expectedOptions = options as SendBatchOptions; partitionId = expectedOptions.partitionId; partitionKey = expectedOptions.partitionKey; + + for (let i = 0; i < batch.length; i++) { + const event = batch[i]; + if (!event.properties || !event.properties[TRACEPARENT_PROPERTY]) { + const messageSpan = createMessageSpan(getParentSpan(options.tracingOptions)); + // since these message spans are created from same context as the send span, + // these message spans don't need to be linked. + // replace the original event with the instrumented one + batch[i] = instrumentEventData(batch[i], messageSpan); + messageSpan.end(); + } + } } - if (partitionId && partitionKey) { + if (partitionId != undefined && partitionKey != undefined) { throw new Error( `The partitionId (${partitionId}) and partitionKey (${partitionKey}) cannot both be specified.` ); } - if (!partitionId) { - // The producer map requires that partitionId be a string. - partitionId = ""; + if (partitionId != undefined) { + partitionId = String(partitionId) + } + if (partitionKey != undefined) { + partitionKey = String(partitionKey) + } + + let sender = this._sendersMap.get(partitionId || ""); + if (!sender) { + sender = EventHubSender.create(this._context, partitionId); + this._sendersMap.set(partitionId || "", sender); } - let producer = this._producersMap.get(partitionId); - if (!producer) { - producer = this._client.createProducer({ - partitionId: partitionId === "" ? undefined : partitionId + const sendSpan = this._createSendSpan( + getParentSpan(options.tracingOptions), + spanContextsToLink + ); + + try { + const result = await sender.send(batch, { + ...options, + partitionId, + partitionKey, + retryOptions: this._clientOptions.retryOptions + }); + sendSpan.setStatus({ code: CanonicalCode.OK }); + return result; + } catch (error) { + sendSpan.setStatus({ + code: CanonicalCode.UNKNOWN, + message: error.message }); - this._producersMap.set(partitionId, producer); + throw error; + } finally { + sendSpan.end(); } - return producer.send(batch, options); } /** @@ -246,12 +328,12 @@ export class EventHubProducerClient { * @throws Error if the underlying connection encounters an error while closing. */ async close(): Promise { - await this._client.close(); + await this._context.close(); - for (const pair of this._producersMap) { + for (const pair of this._sendersMap) { await pair[1].close(); } - this._producersMap.clear(); + this._sendersMap.clear(); } /** @@ -261,8 +343,13 @@ export class EventHubProducerClient { * @throws Error if the underlying connection has been closed, create a new EventHubProducerClient. * @throws AbortError if the operation is cancelled via the abortSignal. */ - getEventHubProperties(options: GetEventHubPropertiesOptions = {}): Promise { - return this._client.getProperties(options); + getEventHubProperties( + options: GetEventHubPropertiesOptions = {} + ): Promise { + return this._context.managementSession!.getEventHubProperties({ + ...options, + retryOptions: this._clientOptions.retryOptions + }); } /** @@ -274,7 +361,12 @@ export class EventHubProducerClient { * @throws AbortError if the operation is cancelled via the abortSignal. */ getPartitionIds(options: GetPartitionIdsOptions = {}): Promise> { - return this._client.getPartitionIds(options); + return this._context.managementSession!.getEventHubProperties({ + ...options, + retryOptions: this._clientOptions.retryOptions + }).then(eventHubProperties => { + return eventHubProperties.partitionIds; + }); } /** @@ -289,6 +381,32 @@ export class EventHubProducerClient { partitionId: string, options: GetPartitionPropertiesOptions = {} ): Promise { - return this._client.getPartitionProperties(partitionId, options); + return this._context.managementSession!.getPartitionProperties(partitionId, { + ...options, + retryOptions: this._clientOptions.retryOptions + }); + } + + private _createSendSpan( + parentSpan?: Span | SpanContext | null, + spanContextsToLink: SpanContext[] = [] + ): Span { + const links: Link[] = spanContextsToLink.map((context) => { + return { + context + }; + }); + const tracer = getTracer(); + const span = tracer.startSpan("Azure.EventHubs.send", { + kind: SpanKind.CLIENT, + parent: parentSpan, + links + }); + + span.setAttribute("az.namespace", "Microsoft.EventHub"); + span.setAttribute("message_bus.destination", this._context.config.entityPath); + span.setAttribute("peer.address", this._context.config.host); + + return span; } } diff --git a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts index 448aa96f3fca..1a48c5b859bd 100644 --- a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts +++ b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; -import { logger, logErrorStackTrace } from "./log"; +import { v4 as uuid } from "uuid"; +import { logErrorStackTrace, logger } from "./log"; import { - Receiver, - OnAmqpEvent, EventContext, + OnAmqpEvent, + Receiver, ReceiverOptions as RheaReceiverOptions, types } from "rhea-promise"; -import { delay, translate, Constants, MessagingError } from "@azure/core-amqp"; -import { ReceivedEventData, EventDataInternal, fromAmqpMessage } from "./eventData"; +import { Constants, MessagingError, delay, translate } from "@azure/core-amqp"; +import { EventDataInternal, ReceivedEventData, fromAmqpMessage } from "./eventData"; import { EventHubConsumerOptions } from "./impl/eventHubClient"; import { ConnectionContext } from "./connectionContext"; import { LinkEntity } from "./linkEntity"; import { EventPosition, getEventPositionFilter } from "./eventPosition"; -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; /** * @ignore @@ -358,15 +358,22 @@ export class EventHubReceiver extends LinkEntity { * @returns */ async close(): Promise { - this.clearHandlers(); + try { + this.clearHandlers(); - if (!this._receiver) { - return; - } + if (!this._receiver) { + return; + } - const receiverLink = this._receiver; - this._deleteFromCache(); - await this._closeLink(receiverLink); + const receiverLink = this._receiver; + this._deleteFromCache(); + await this._closeLink(receiverLink); + } catch (err) { + const msg = `[${this._context.connectionId}] An error occurred while closing receiver ${this.name}: ${err}`; + logger.warning(msg); + logErrorStackTrace(err); + throw err; + } } /** @@ -511,6 +518,9 @@ export class EventHubReceiver extends LinkEntity { try { if (!this.isOpen() && !this.isConnecting) { this.isConnecting = true; + + // Wait for the connectionContext to be ready to open the link. + await this._context.readyToOpenLink(); await this._negotiateClaim(); const receiverOptions: CreateReceiverOptions = { diff --git a/sdk/eventhub/event-hubs/src/eventHubSender.ts b/sdk/eventhub/event-hubs/src/eventHubSender.ts index c8fb9f62dd1b..5ef7ac5ddbef 100644 --- a/sdk/eventhub/event-hubs/src/eventHubSender.ts +++ b/sdk/eventhub/event-hubs/src/eventHubSender.ts @@ -1,26 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; -import { logger, logErrorStackTrace } from "./log"; +import { v4 as uuid } from "uuid"; +import { logErrorStackTrace, logger } from "./log"; import { + AmqpError, AwaitableSender, + AwaitableSenderOptions, EventContext, OnAmqpEvent, - AwaitableSenderOptions, - message, - AmqpError + message } from "rhea-promise"; import { - defaultLock, - retry, - translate, AmqpMessage, + Constants, ErrorNameConditionMapper, RetryConfig, RetryOperationType, RetryOptions, - Constants + defaultLock, + retry, + translate } from "@azure/core-amqp"; import { EventData, toAmqpMessage } from "./eventData"; import { ConnectionContext } from "./connectionContext"; @@ -29,7 +29,7 @@ import { EventHubProducerOptions } from "./models/private"; import { SendOptions } from "./models/public"; import { getRetryAttemptTimeoutInMs } from "./util/retries"; -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; import { EventDataBatch, isEventDataBatch } from "./eventDataBatch"; /** @@ -171,15 +171,22 @@ export class EventHubSender extends LinkEntity { * @returns Promise */ async close(): Promise { - if (this._sender) { - logger.info( - "[%s] Closing the Sender for the entity '%s'.", - this._context.connectionId, - this._context.config.entityPath - ); - const senderLink = this._sender; - this._deleteFromCache(); - await this._closeLink(senderLink); + try { + if (this._sender) { + logger.info( + "[%s] Closing the Sender for the entity '%s'.", + this._context.connectionId, + this._context.config.entityPath + ); + const senderLink = this._sender; + this._deleteFromCache(); + await this._closeLink(senderLink); + } + } catch (err) { + const msg = `[${this._context.connectionId}] An error occurred while closing sender ${this.name}: ${err}`; + logger.warning(msg); + logErrorStackTrace(err); + throw err; } } @@ -290,38 +297,6 @@ export class EventHubSender extends LinkEntity { options?: SendOptions & EventHubProducerOptions ): Promise { try { - // throw an error if partition key and partition id are both defined - if ( - options && - typeof options.partitionKey === "string" && - typeof options.partitionId === "string" - ) { - const error = new Error( - "Partition key is not supported when using producers that were created using a partition id." - ); - logger.warning( - "[%s] Partition key is not supported when using producers that were created using a partition id. %O", - this._context.connectionId, - error - ); - logErrorStackTrace(error); - throw error; - } - - // throw an error if partition key is different than the one provided in the options. - if (isEventDataBatch(events) && options && options.partitionKey) { - const error = new Error( - "Partition key is not supported when sending a batch message. Pass the partition key when creating the batch message instead." - ); - logger.warning( - "[%s] Partition key is not supported when sending a batch message. Pass the partition key when creating the batch message instead. %O", - this._context.connectionId, - error - ); - logErrorStackTrace(error); - throw error; - } - logger.info( "[%s] Sender '%s', trying to send EventData[].", this._context.connectionId, @@ -330,8 +305,16 @@ export class EventHubSender extends LinkEntity { let encodedBatchMessage: Buffer | undefined; if (isEventDataBatch(events)) { + if (events.count === 0) { + logger.info(`[${this._context.connectionId}] Empty batch was passsed. No events to send.`); + return; + } encodedBatchMessage = events._generateMessage(); } else { + if (events.length === 0) { + logger.info(`[${this._context.connectionId}] Empty array was passed. No events to send.`); + return; + } const partitionKey = (options && options.partitionKey) || undefined; const messages: AmqpMessage[] = []; // Convert EventData to AmqpMessage. @@ -412,7 +395,8 @@ export class EventHubSender extends LinkEntity { ): Promise { const abortSignal: AbortSignalLike | undefined = options.abortSignal; const retryOptions = options.retryOptions || {}; - retryOptions.timeoutInMs = getRetryAttemptTimeoutInMs(retryOptions); + const timeoutInMs = getRetryAttemptTimeoutInMs(retryOptions); + retryOptions.timeoutInMs = timeoutInMs; const sendEventPromise = () => new Promise(async (resolve, reject) => { const rejectOnAbort = () => { @@ -459,7 +443,7 @@ export class EventHubSender extends LinkEntity { return reject(translate(e)); }; - const waitTimer = setTimeout(actionAfterTimeout, retryOptions.timeoutInMs); + const waitTimer = setTimeout(actionAfterTimeout, timeoutInMs); const initStartTime = Date.now(); if (!this.isOpen()) { logger.verbose( @@ -469,7 +453,7 @@ export class EventHubSender extends LinkEntity { ); try { - const senderOptions = this._createSenderOptions(retryOptions.timeoutInMs!); + const senderOptions = this._createSenderOptions(timeoutInMs); await defaultLock.acquire(this.senderLock, () => { return this._init(senderOptions); }); @@ -501,13 +485,12 @@ export class EventHubSender extends LinkEntity { this._context.connectionId, this.name ); - if (retryOptions.timeoutInMs! <= timeTakenByInit) { + if (timeoutInMs <= timeTakenByInit) { actionAfterTimeout(); return; } try { - this._sender!.sendTimeoutInSeconds = - (retryOptions.timeoutInMs! - timeTakenByInit) / 1000; + this._sender!.sendTimeoutInSeconds = (timeoutInMs - timeTakenByInit) / 1000; const delivery = await this._sender!.send(message, undefined, 0x80013700); logger.info( "[%s] Sender '%s', sent message with delivery id: %d", @@ -561,6 +544,9 @@ export class EventHubSender extends LinkEntity { try { if (!this.isOpen() && !this.isConnecting) { this.isConnecting = true; + + // Wait for the connectionContext to be ready to open the link. + await this._context.readyToOpenLink(); await this._negotiateClaim(); logger.verbose( diff --git a/sdk/eventhub/event-hubs/src/eventPosition.ts b/sdk/eventhub/event-hubs/src/eventPosition.ts index 29c7efafc9d7..08b6fb376896 100644 --- a/sdk/eventhub/event-hubs/src/eventPosition.ts +++ b/sdk/eventhub/event-hubs/src/eventPosition.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { translate, Constants, ErrorNameConditionMapper } from "@azure/core-amqp"; +import { Constants, ErrorNameConditionMapper, translate } from "@azure/core-amqp"; /** * Represents the position of an event in an Event Hub partition, typically used when calling the `subscribe()` diff --git a/sdk/eventhub/event-hubs/src/eventProcessor.ts b/sdk/eventhub/event-hubs/src/eventProcessor.ts index 45ae583fa225..e27a63f6db50 100644 --- a/sdk/eventhub/event-hubs/src/eventProcessor.ts +++ b/sdk/eventhub/event-hubs/src/eventProcessor.ts @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { EventHubClient } from "./impl/eventHubClient"; import { PumpManager, PumpManagerImpl } from "./pumpManager"; import { AbortController, AbortSignalLike } from "@azure/abort-controller"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { FairPartitionLoadBalancer, PartitionLoadBalancer } from "./partitionLoadBalancer"; -import { PartitionProcessor, Checkpoint } from "./partitionProcessor"; +import { Checkpoint, PartitionProcessor } from "./partitionProcessor"; import { SubscriptionEventHandlers } from "./eventHubConsumerClientModels"; -import { EventPosition, latestEventPosition, isEventPosition } from "./eventPosition"; +import { EventPosition, isEventPosition, latestEventPosition } from "./eventPosition"; import { delayWithoutThrow } from "./util/delayWithoutThrow"; import { CommonEventProcessorOptions } from "./models/private"; import { CloseReason } from "./models/public"; @@ -386,6 +386,18 @@ export class EventProcessor { loadBalancer: PartitionLoadBalancer, abortSignal: AbortSignalLike ): Promise { + let cancelLoopResolver; + // This provides a mechanism for exiting the loop early + // if the subscription has had `close` called. + const cancelLoopPromise = new Promise((resolve) => { + cancelLoopResolver = resolve; + if (abortSignal.aborted) { + return resolve(); + } + + abortSignal.addEventListener("abort", resolve); + }); + // periodically check if there is any partition not being processed and process it while (!abortSignal.aborted) { try { @@ -444,7 +456,8 @@ export class EventProcessor { } catch (err) { logger.warning(`[${this._id}] An error occured within the EventProcessor loop: ${err}`); logErrorStackTrace(err); - await this._handleSubscriptionError(err); + // Protect against the scenario where the user awaits on subscription.close() from inside processError. + await Promise.race([this._handleSubscriptionError(err), cancelLoopPromise]); } finally { // sleep for some time, then continue the loop again. logger.verbose( @@ -454,6 +467,10 @@ export class EventProcessor { await delayWithoutThrow(this._loopIntervalInMs, abortSignal); } } + + if (cancelLoopResolver) { + abortSignal.removeEventListener("abort", cancelLoopResolver); + } this._isRunning = false; } diff --git a/sdk/eventhub/event-hubs/src/impl/eventHubClient.ts b/sdk/eventhub/event-hubs/src/impl/eventHubClient.ts index 87b0b665500a..cbae69adeda9 100644 --- a/sdk/eventhub/event-hubs/src/impl/eventHubClient.ts +++ b/sdk/eventhub/event-hubs/src/impl/eventHubClient.ts @@ -1,34 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { logger, logErrorStackTrace } from "../log"; import { - TokenCredential, + ConnectionConfig, EventHubConnectionConfig, + EventHubConnectionStringModel, + RetryOptions, SharedKeyCredential, - ConnectionConfig, + TokenCredential, isTokenCredential, - RetryOptions, - Constants, - parseConnectionString, - EventHubConnectionStringModel + parseConnectionString } from "@azure/core-amqp"; import { ConnectionContext } from "../connectionContext"; -import { PartitionProperties, EventHubProperties } from "../managementClient"; +import { EventHubProperties, PartitionProperties } from "../managementClient"; import { EventPosition } from "../eventPosition"; -import { EventHubProducer } from "../sender"; import { EventHubConsumer } from "../receiver"; -import { throwTypeErrorIfParameterMissing, throwErrorIfConnectionClosed } from "../util/error"; -import { getTracer } from "@azure/core-tracing"; -import { SpanContext, Span, SpanKind, CanonicalCode } from "@opentelemetry/api"; -import { getParentSpan } from "../util/operationOptions"; -import { OperationNames, EventHubProducerOptions } from "../models/private"; +import { throwErrorIfConnectionClosed } from "../util/error"; import { + EventHubClientOptions, GetEventHubPropertiesOptions, GetPartitionIdsOptions, - GetPartitionPropertiesOptions, - EventHubClientOptions + GetPartitionPropertiesOptions } from "../models/public"; /** @@ -148,86 +141,20 @@ export class EventHubClient { credentialOrOptions?: TokenCredential | EventHubClientOptions, options?: EventHubClientOptions ) { - let connectionString; - let config; - let credential: TokenCredential | SharedKeyCredential; - hostOrConnectionString = String(hostOrConnectionString); - - if (!isTokenCredential(credentialOrOptions)) { - const parsedCS = parseConnectionString(hostOrConnectionString); - if ( - !( - parsedCS.EntityPath || - (typeof eventHubNameOrOptions === "string" && eventHubNameOrOptions) - ) - ) { - throw new TypeError( - `Either provide "eventHubName" or the "connectionString": "${hostOrConnectionString}", ` + - `must contain "EntityPath=".` - ); - } - if ( - parsedCS.EntityPath && - typeof eventHubNameOrOptions === "string" && - eventHubNameOrOptions && - parsedCS.EntityPath !== eventHubNameOrOptions - ) { - throw new TypeError( - `The entity path "${parsedCS.EntityPath}" in connectionString: "${hostOrConnectionString}" ` + - `doesn't match with eventHubName: "${eventHubNameOrOptions}".` - ); - } - connectionString = hostOrConnectionString; - if (typeof eventHubNameOrOptions !== "string") { - // connectionstring and/or options were passed to constructor - config = EventHubConnectionConfig.create(connectionString); - options = eventHubNameOrOptions; - } else { - // connectionstring, eventHubName and/or options were passed to constructor - const eventHubName = eventHubNameOrOptions; - config = EventHubConnectionConfig.create(connectionString, eventHubName); - options = credentialOrOptions; - } - // Since connectionstring was passed, create a SharedKeyCredential - credential = new SharedKeyCredential(config.sharedAccessKeyName, config.sharedAccessKey); + this._context = createConnectionContext( + hostOrConnectionString, + eventHubNameOrOptions, + credentialOrOptions, + options + ); + this.endpoint = this._context.config.endpoint; + if (typeof eventHubNameOrOptions !== "string") { + this._clientOptions = eventHubNameOrOptions || {}; + } else if (!isTokenCredential(credentialOrOptions)) { + this._clientOptions = credentialOrOptions || {}; } else { - // host, eventHubName, a TokenCredential and/or options were passed to constructor - const eventHubName = eventHubNameOrOptions; - let host = hostOrConnectionString; - credential = credentialOrOptions; - if (!eventHubName) { - throw new TypeError(`"eventHubName" is missing`); - } - - if (!host.endsWith("/")) host += "/"; - connectionString = `Endpoint=sb://${host};SharedAccessKeyName=defaultKeyName;SharedAccessKey=defaultKeyValue;EntityPath=${eventHubName}`; - config = EventHubConnectionConfig.create(connectionString); + this._clientOptions = options || {}; } - - ConnectionConfig.validate(config); - - this.endpoint = config.endpoint; - - this._clientOptions = options || {}; - this._context = ConnectionContext.create(config, credential, this._clientOptions); - } - - private _createClientSpan( - operationName: OperationNames, - parentSpan?: Span | SpanContext | null, - internal: boolean = false - ): Span { - const tracer = getTracer(); - const span = tracer.startSpan(`Azure.EventHubs.${operationName}`, { - kind: internal ? SpanKind.INTERNAL : SpanKind.CLIENT, - parent: parentSpan - }); - - span.setAttribute("az.namespace", "Microsoft.EventHub"); - span.setAttribute("message_bus.destination", this.eventHubName); - span.setAttribute("peer.address", this.endpoint); - - return span; } /** @@ -237,66 +164,7 @@ export class EventHubClient { * @throws Error if the underlying connection encounters an error while closing. */ async close(): Promise { - try { - if (this._context.connection.isOpen()) { - // Close all the senders. - for (const senderName of Object.keys(this._context.senders)) { - await this._context.senders[senderName].close(); - } - // Close all the receivers. - for (const receiverName of Object.keys(this._context.receivers)) { - await this._context.receivers[receiverName].close(); - } - // Close the cbs session; - await this._context.cbsSession.close(); - // Close the management session - await this._context.managementSession!.close(); - await this._context.connection.close(); - this._context.wasConnectionCloseCalled = true; - logger.info("Closed the amqp connection '%s' on the client.", this._context.connectionId); - } - } catch (err) { - err = err instanceof Error ? err : JSON.stringify(err); - logger.warning( - `An error occurred while closing the connection "${this._context.connectionId}":\n${err}` - ); - logErrorStackTrace(err); - throw err; - } - } - - /** - * Creates an Event Hub producer that can send events to the Event Hub. - * If `partitionId` is specified in the `options`, all event data sent using the producer - * will be sent to the specified partition. - * Otherwise, they are automatically routed to an available partition by the Event Hubs service. - * - * Automatic routing of partitions is recommended because: - * - The sending of events will be highly available. - * - The event data will be evenly distributed among all available partitions. - * - * @param options The set of options to apply when creating the producer. - * - `partitionId` : The identifier of the partition that the producer can be bound to. - * - `retryOptions` : The retry options used to govern retry attempts when an issue is encountered while sending events. - * A simple usage can be `{ "maxRetries": 4 }`. - * - * @throws Error if the underlying connection has been closed, create a new EventHubClient. - * @returns EventHubProducer - */ - createProducer(options?: EventHubProducerOptions): EventHubProducer { - if (!options) { - options = {}; - } - if (!options.retryOptions) { - options.retryOptions = this._clientOptions.retryOptions; - } - throwErrorIfConnectionClosed(this._context); - return new EventHubProducer( - this.eventHubName, - this.fullyQualifiedNamespace, - this._context, - options - ); + return this._context.close(); } /** @@ -335,24 +203,6 @@ export class EventHubClient { options.retryOptions = this._clientOptions.retryOptions; } throwErrorIfConnectionClosed(this._context); - throwTypeErrorIfParameterMissing( - this._context.connectionId, - "createConsumer", - "consumerGroup", - consumerGroup - ); - throwTypeErrorIfParameterMissing( - this._context.connectionId, - "createConsumer", - "partitionId", - partitionId - ); - throwTypeErrorIfParameterMissing( - this._context.connectionId, - "createConsumer", - "eventPosition", - eventPosition - ); partitionId = String(partitionId); return new EventHubConsumer(this._context, consumerGroup, partitionId, eventPosition, options); } @@ -365,29 +215,10 @@ export class EventHubClient { * @throws AbortError if the operation is cancelled via the abortSignal3. */ async getProperties(options: GetEventHubPropertiesOptions = {}): Promise { - throwErrorIfConnectionClosed(this._context); - const clientSpan = this._createClientSpan( - "getEventHubProperties", - getParentSpan(options.tracingOptions) - ); - try { - const result = await this._context.managementSession!.getHubRuntimeInformation({ - retryOptions: this._clientOptions.retryOptions, - abortSignal: options.abortSignal - }); - clientSpan.setStatus({ code: CanonicalCode.OK }); - return result; - } catch (err) { - clientSpan.setStatus({ - code: CanonicalCode.UNKNOWN, - message: err.message - }); - logger.warning("An error occurred while getting the hub runtime information: %O", err); - logErrorStackTrace(err); - throw err; - } finally { - clientSpan.end(); - } + return this._context.managementSession!.getEventHubProperties({ + retryOptions: this._clientOptions.retryOptions, + ...options + }); } /** @@ -398,34 +229,8 @@ export class EventHubClient { * @throws AbortError if the operation is cancelled via the abortSignal. */ async getPartitionIds(options: GetPartitionIdsOptions): Promise> { - throwErrorIfConnectionClosed(this._context); - const clientSpan = this._createClientSpan( - "getPartitionIds", - getParentSpan(options.tracingOptions), - true - ); - try { - const runtimeInfo = await this.getProperties({ - ...options, - tracingOptions: { - spanOptions: { - parent: clientSpan.context() - } - } - }); - clientSpan.setStatus({ code: CanonicalCode.OK }); - return runtimeInfo.partitionIds; - } catch (err) { - clientSpan.setStatus({ - code: CanonicalCode.UNKNOWN, - message: err.message - }); - logger.warning("An error occurred while getting the partition ids: %O", err); - logErrorStackTrace(err); - throw err; - } finally { - clientSpan.end(); - } + const properties = await this.getProperties(options); + return properties.partitionIds; } /** @@ -440,41 +245,73 @@ export class EventHubClient { partitionId: string, options: GetPartitionPropertiesOptions = {} ): Promise { - throwErrorIfConnectionClosed(this._context); - throwTypeErrorIfParameterMissing( - this._context.connectionId, - "getPartitionProperties", - "partitionId", - partitionId - ); - partitionId = String(partitionId); - const clientSpan = this._createClientSpan( - "getPartitionProperties", - getParentSpan(options.tracingOptions) - ); - try { - const result = await this._context.managementSession!.getPartitionProperties(partitionId, { - retryOptions: this._clientOptions.retryOptions, - abortSignal: options.abortSignal - }); - clientSpan.setStatus({ code: CanonicalCode.OK }); - return result; - } catch (err) { - clientSpan.setStatus({ - code: CanonicalCode.UNKNOWN, - message: err.message - }); - logger.warning("An error occurred while getting the partition information: %O", err); - logErrorStackTrace(err); - throw err; - } finally { - clientSpan.end(); + return this._context.managementSession!.getPartitionProperties(partitionId, { + retryOptions: this._clientOptions.retryOptions, + ...options + }); + } +} + +export function createConnectionContext( + hostOrConnectionString: string, + eventHubNameOrOptions?: string | EventHubClientOptions, + credentialOrOptions?: TokenCredential | EventHubClientOptions, + options?: EventHubClientOptions +): ConnectionContext { + let connectionString; + let config; + let credential: TokenCredential | SharedKeyCredential; + hostOrConnectionString = String(hostOrConnectionString); + + if (!isTokenCredential(credentialOrOptions)) { + const parsedCS = parseConnectionString(hostOrConnectionString); + if ( + !(parsedCS.EntityPath || (typeof eventHubNameOrOptions === "string" && eventHubNameOrOptions)) + ) { + throw new TypeError( + `Either provide "eventHubName" or the "connectionString": "${hostOrConnectionString}", ` + + `must contain "EntityPath=".` + ); + } + if ( + parsedCS.EntityPath && + typeof eventHubNameOrOptions === "string" && + eventHubNameOrOptions && + parsedCS.EntityPath !== eventHubNameOrOptions + ) { + throw new TypeError( + `The entity path "${parsedCS.EntityPath}" in connectionString: "${hostOrConnectionString}" ` + + `doesn't match with eventHubName: "${eventHubNameOrOptions}".` + ); + } + connectionString = hostOrConnectionString; + if (typeof eventHubNameOrOptions !== "string") { + // connectionstring and/or options were passed to constructor + config = EventHubConnectionConfig.create(connectionString); + options = eventHubNameOrOptions; + } else { + // connectionstring, eventHubName and/or options were passed to constructor + const eventHubName = eventHubNameOrOptions; + config = EventHubConnectionConfig.create(connectionString, eventHubName); + options = credentialOrOptions; } + // Since connectionstring was passed, create a SharedKeyCredential + credential = new SharedKeyCredential(config.sharedAccessKeyName, config.sharedAccessKey); + } else { + // host, eventHubName, a TokenCredential and/or options were passed to constructor + const eventHubName = eventHubNameOrOptions; + let host = hostOrConnectionString; + credential = credentialOrOptions; + if (!eventHubName) { + throw new TypeError(`"eventHubName" is missing`); + } + + if (!host.endsWith("/")) host += "/"; + connectionString = `Endpoint=sb://${host};SharedAccessKeyName=defaultKeyName;SharedAccessKey=defaultKeyValue;EntityPath=${eventHubName}`; + config = EventHubConnectionConfig.create(connectionString); } - /** - * @property - * The name of the default consumer group in the Event Hubs service. - */ - static defaultConsumerGroupName: string = Constants.defaultConsumerGroup; + ConnectionConfig.validate(config); + + return ConnectionContext.create(config, credential, options); } diff --git a/sdk/eventhub/event-hubs/src/impl/partitionGate.ts b/sdk/eventhub/event-hubs/src/impl/partitionGate.ts index a8cbe305a2a8..1b45e8852e00 100644 --- a/sdk/eventhub/event-hubs/src/impl/partitionGate.ts +++ b/sdk/eventhub/event-hubs/src/impl/partitionGate.ts @@ -22,8 +22,6 @@ export class PartitionGate { * @param partitionId A partition ID or the constant "all" */ add(partitionId: string | "all") { - this._validatePartitionId(partitionId); - if ( (partitionId === "all" && this._partitions.size > 0) || this._partitions.has(partitionId) || @@ -43,16 +41,4 @@ export class PartitionGate { remove(partitionId: string | "all") { this._partitions.delete(partitionId); } - - private _validatePartitionId(partitionId: string) { - if (partitionId === "all") { - return; - } - - const partitionNumber = parseInt(partitionId, 10); - - if (isNaN(partitionNumber)) { - throw new TypeError(`Invalid partition number ${partitionId}`); - } - } } diff --git a/sdk/eventhub/event-hubs/src/inMemoryCheckpointStore.ts b/sdk/eventhub/event-hubs/src/inMemoryCheckpointStore.ts index c6f64ed03e04..af72368ba776 100644 --- a/sdk/eventhub/event-hubs/src/inMemoryCheckpointStore.ts +++ b/sdk/eventhub/event-hubs/src/inMemoryCheckpointStore.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PartitionOwnership, CheckpointStore } from "./eventProcessor"; +import { CheckpointStore, PartitionOwnership } from "./eventProcessor"; import { Checkpoint } from "./partitionProcessor"; import { generate_uuid } from "rhea-promise"; import { throwTypeErrorIfParameterMissing } from "./util/error"; @@ -34,9 +34,9 @@ export class InMemoryCheckpointStore implements CheckpointStore { * @return Partition ownership details of all the partitions that have/had an owner.. */ async listOwnership( - fullyQualifiedNamespace: string, - eventHubName: string, - consumerGroup: string + _fullyQualifiedNamespace: string, + _eventHubName: string, + _consumerGroup: string ): Promise { const ownerships = []; diff --git a/sdk/eventhub/event-hubs/src/linkEntity.ts b/sdk/eventhub/event-hubs/src/linkEntity.ts index 0945e4d59124..4609945ed240 100644 --- a/sdk/eventhub/event-hubs/src/linkEntity.ts +++ b/sdk/eventhub/event-hubs/src/linkEntity.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { - defaultLock, - SharedKeyCredential, AccessToken, Constants, - TokenType + SharedKeyCredential, + TokenType, + defaultLock } from "@azure/core-amqp"; import { ConnectionContext } from "./connectionContext"; import { AwaitableSender, Receiver } from "rhea-promise"; diff --git a/sdk/eventhub/event-hubs/src/managementClient.ts b/sdk/eventhub/event-hubs/src/managementClient.ts index a967b827ed37..38523f238b22 100644 --- a/sdk/eventhub/event-hubs/src/managementClient.ts +++ b/sdk/eventhub/event-hubs/src/managementClient.ts @@ -1,33 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { - RequestResponseLink, - defaultLock, - translate, Constants, - SendRequestOptions, - retry, + RequestResponseLink, RetryConfig, - RetryOptions, RetryOperationType, - SharedKeyCredential + RetryOptions, + SendRequestOptions, + SharedKeyCredential, + defaultLock, + retry, + translate } from "@azure/core-amqp"; import { - Message, EventContext, - SenderEvents, + Message, ReceiverEvents, - SenderOptions, ReceiverOptions, + SenderEvents, + SenderOptions, generate_uuid } from "rhea-promise"; import { ConnectionContext } from "./connectionContext"; import { LinkEntity } from "./linkEntity"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { getRetryAttemptTimeoutInMs } from "./util/retries"; -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; +import { throwErrorIfConnectionClosed, throwTypeErrorIfParameterMissing } from "./util/error"; +import { OperationNames } from "./models/private"; +import { Span, SpanContext, SpanKind, CanonicalCode } from "@opentelemetry/api"; +import { getParentSpan, OperationOptions } from "./util/operationOptions"; +import { getTracer } from "@azure/core-tracing"; /** * Describes the runtime information of an Event Hub. */ @@ -155,96 +160,123 @@ export class ManagementClient extends LinkEntity { /** * Provides the eventhub runtime information. * @ignore - * @param connection - The established amqp connection - * @returns */ - async getHubRuntimeInformation(options?: { - retryOptions?: RetryOptions; - abortSignal?: AbortSignalLike; - }): Promise { - if (!options) { - options = {}; - } - const securityToken = await this.getSecurityToken(); - const request: Message = { - body: Buffer.from(JSON.stringify([])), - message_id: uuid(), - reply_to: this.replyTo, - application_properties: { - operation: Constants.readOperation, - name: this.entityPath as string, - type: `${Constants.vendorString}:${Constants.eventHub}`, - security_token: securityToken?.token - } - }; - - const info: any = await this._makeManagementRequest(request, { - ...options, - requestName: "getHubRuntimeInformation" - }); - const runtimeInfo: EventHubProperties = { - name: info.name, - createdOn: new Date(info.created_at), - partitionIds: info.partition_ids - }; - logger.verbose("[%s] The hub runtime info is: %O", this._context.connectionId, runtimeInfo); - return runtimeInfo; - } + async getEventHubProperties( + options: OperationOptions & { retryOptions?: RetryOptions } = {} + ): Promise { + throwErrorIfConnectionClosed(this._context); + const clientSpan = this._createClientSpan( + "getEventHubProperties", + getParentSpan(options.tracingOptions) + ); + try { + const securityToken = await this.getSecurityToken(); + const request: Message = { + body: Buffer.from(JSON.stringify([])), + message_id: uuid(), + reply_to: this.replyTo, + application_properties: { + operation: Constants.readOperation, + name: this.entityPath as string, + type: `${Constants.vendorString}:${Constants.eventHub}`, + security_token: securityToken?.token + } + }; - /** - * Provides an array of partitionIds. - * @ignore - * @param connection - The established amqp connection - * @returns - */ - async getPartitionIds(): Promise> { - const runtimeInfo = await this.getHubRuntimeInformation(); - return runtimeInfo.partitionIds; + const info: any = await this._makeManagementRequest(request, { + ...options, + requestName: "getHubRuntimeInformation" + }); + const runtimeInfo: EventHubProperties = { + name: info.name, + createdOn: new Date(info.created_at), + partitionIds: info.partition_ids + }; + logger.verbose("[%s] The hub runtime info is: %O", this._context.connectionId, runtimeInfo); + + clientSpan.setStatus({ code: CanonicalCode.OK }); + return runtimeInfo; + } catch (error) { + clientSpan.setStatus({ + code: CanonicalCode.UNKNOWN, + message: error.message + }); + logger.warning("An error occurred while getting the hub runtime information: %O", error); + logErrorStackTrace(error); + throw error; + } finally { + clientSpan.end(); + } } /** * Provides information about the specified partition. * @ignore - * @param connection - The established amqp connection * @param partitionId Partition ID for which partition information is required. */ async getPartitionProperties( partitionId: string, - options?: { retryOptions?: RetryOptions; abortSignal?: AbortSignalLike } + options: OperationOptions & { retryOptions?: RetryOptions } = {} ): Promise { - if (!options) { - options = {}; - } - const securityToken = await this.getSecurityToken(); - const request: Message = { - body: Buffer.from(JSON.stringify([])), - message_id: uuid(), - reply_to: this.replyTo, - application_properties: { - operation: Constants.readOperation, - name: this.entityPath as string, - type: `${Constants.vendorString}:${Constants.partition}`, - partition: `${partitionId}`, - security_token: securityToken?.token - } - }; + throwErrorIfConnectionClosed(this._context); + throwTypeErrorIfParameterMissing( + this._context.connectionId, + "getPartitionProperties", + "partitionId", + partitionId + ); + partitionId = String(partitionId); + + const clientSpan = this._createClientSpan( + "getPartitionProperties", + getParentSpan(options.tracingOptions) + ); - const info: any = await this._makeManagementRequest(request, { - ...options, - requestName: "getPartitionInformation" - }); + try { + const securityToken = await this.getSecurityToken(); + const request: Message = { + body: Buffer.from(JSON.stringify([])), + message_id: uuid(), + reply_to: this.replyTo, + application_properties: { + operation: Constants.readOperation, + name: this.entityPath as string, + type: `${Constants.vendorString}:${Constants.partition}`, + partition: `${partitionId}`, + security_token: securityToken?.token + } + }; - const partitionInfo: PartitionProperties = { - beginningSequenceNumber: info.begin_sequence_number, - eventHubName: info.name, - lastEnqueuedOffset: info.last_enqueued_offset, - lastEnqueuedOnUtc: new Date(info.last_enqueued_time_utc), - lastEnqueuedSequenceNumber: info.last_enqueued_sequence_number, - partitionId: info.partition, - isEmpty: info.is_partition_empty - }; - logger.verbose("[%s] The partition info is: %O.", this._context.connectionId, partitionInfo); - return partitionInfo; + const info: any = await this._makeManagementRequest(request, { + ...options, + requestName: "getPartitionInformation" + }); + + const partitionInfo: PartitionProperties = { + beginningSequenceNumber: info.begin_sequence_number, + eventHubName: info.name, + lastEnqueuedOffset: info.last_enqueued_offset, + lastEnqueuedOnUtc: new Date(info.last_enqueued_time_utc), + lastEnqueuedSequenceNumber: info.last_enqueued_sequence_number, + partitionId: info.partition, + isEmpty: info.is_partition_empty + }; + logger.verbose("[%s] The partition info is: %O.", this._context.connectionId, partitionInfo); + + clientSpan.setStatus({ code: CanonicalCode.OK }); + + return partitionInfo; + } catch (error) { + clientSpan.setStatus({ + code: CanonicalCode.UNKNOWN, + message: error.message + }); + logger.warning("An error occurred while getting the partition information: %O", error); + logErrorStackTrace(error); + throw error; + } finally { + clientSpan.end(); + } } /** @@ -255,10 +287,12 @@ export class ManagementClient extends LinkEntity { */ async close(): Promise { try { + // Always clear the timeout, as the isOpen check may report + // false without ever having cleared the timeout otherwise. + clearTimeout(this._tokenRenewalTimer as NodeJS.Timer); if (this._isMgmtRequestResponseLinkOpen()) { const mgmtLink = this._mgmtReqResLink; this._mgmtReqResLink = undefined; - clearTimeout(this._tokenRenewalTimer as NodeJS.Timer); await mgmtLink!.close(); logger.info("Successfully closed the management session."); } @@ -273,6 +307,8 @@ export class ManagementClient extends LinkEntity { private async _init(): Promise { try { if (!this._isMgmtRequestResponseLinkOpen()) { + // Wait for the connectionContext to be ready to open the link. + await this._context.readyToOpenLink(); await this._negotiateClaim(); const rxopt: ReceiverOptions = { source: { address: this.address }, @@ -289,7 +325,9 @@ export class ManagementClient extends LinkEntity { ); } }; - const sropt: SenderOptions = { target: { address: this.address } }; + const sropt: SenderOptions = { + target: { address: this.address } + }; logger.verbose( "[%s] Creating sender/receiver links on a session for $management endpoint with " + "srOpts: %o, receiverOpts: %O.", @@ -465,4 +503,22 @@ export class ManagementClient extends LinkEntity { private _isMgmtRequestResponseLinkOpen(): boolean { return this._mgmtReqResLink! && this._mgmtReqResLink!.isOpen(); } + + private _createClientSpan( + operationName: OperationNames, + parentSpan?: Span | SpanContext | null, + internal: boolean = false + ): Span { + const tracer = getTracer(); + const span = tracer.startSpan(`Azure.EventHubs.${operationName}`, { + kind: internal ? SpanKind.INTERNAL : SpanKind.CLIENT, + parent: parentSpan + }); + + span.setAttribute("az.namespace", "Microsoft.EventHub"); + span.setAttribute("message_bus.destination", this._context.config.entityPath); + span.setAttribute("peer.address", this._context.config.endpoint); + + return span; + } } diff --git a/sdk/eventhub/event-hubs/src/partitionLoadBalancer.ts b/sdk/eventhub/event-hubs/src/partitionLoadBalancer.ts index df336d7e6445..65d608dbd410 100644 --- a/sdk/eventhub/event-hubs/src/partitionLoadBalancer.ts +++ b/sdk/eventhub/event-hubs/src/partitionLoadBalancer.ts @@ -49,8 +49,8 @@ export class GreedyPartitionLoadBalancer implements PartitionLoadBalancer { } loadBalance( - ownerId: string, - partitionOwnershipMap: Map, + _ownerId: string, + _partitionOwnershipMap: Map, partitionsToAdd: string[] ): string[] { let potential: string[] = partitionsToAdd; diff --git a/sdk/eventhub/event-hubs/src/partitionProcessor.ts b/sdk/eventhub/event-hubs/src/partitionProcessor.ts index 5ecf7ff3c608..9060aa4d44c0 100644 --- a/sdk/eventhub/event-hubs/src/partitionProcessor.ts +++ b/sdk/eventhub/event-hubs/src/partitionProcessor.ts @@ -6,9 +6,9 @@ import { CloseReason } from "./models/public"; import { ReceivedEventData } from "./eventData"; import { LastEnqueuedEventProperties } from "./eventHubReceiver"; import { - SubscriptionEventHandlers, BasicPartitionProperties, - PartitionContext + PartitionContext, + SubscriptionEventHandlers } from "./eventHubConsumerClientModels"; import { logger } from "./log"; diff --git a/sdk/eventhub/event-hubs/src/partitionPump.ts b/sdk/eventhub/event-hubs/src/partitionPump.ts index 4bca0e9bcd8a..54c434c78e80 100644 --- a/sdk/eventhub/event-hubs/src/partitionPump.ts +++ b/sdk/eventhub/event-hubs/src/partitionPump.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { CommonEventProcessorOptions } from "./models/private"; import { CloseReason } from "./models/public"; import { EventHubClient } from "./impl/eventHubClient"; @@ -10,9 +10,9 @@ import { PartitionProcessor } from "./partitionProcessor"; import { EventHubConsumer } from "./receiver"; import { AbortController } from "@azure/abort-controller"; import { MessagingError } from "@azure/core-amqp"; -import { getParentSpan, OperationOptions } from "./util/operationOptions"; +import { OperationOptions, getParentSpan } from "./util/operationOptions"; import { getTracer } from "@azure/core-tracing"; -import { Span, SpanKind, Link, CanonicalCode } from "@opentelemetry/api"; +import { CanonicalCode, Link, Span, SpanKind } from "@opentelemetry/api"; import { extractSpanContextFromEventData } from "./diagnostics/instrumentEventData"; import { ReceivedEventData } from "./eventData"; @@ -148,10 +148,14 @@ export class PartitionPump { this._isStopped = true; this._isReceiving = false; try { + // Trigger the cancellation before closing the receiver, + // otherwise the receiver will remove the listener on the abortSignal + // before it has a chance to be emitted. + this._abortController.abort(); + if (this._receiver) { await this._receiver.close(); } - this._abortController.abort(); await this._partitionProcessor.close(reason); } catch (err) { logger.warning("An error occurred while closing the receiver.", err); diff --git a/sdk/eventhub/event-hubs/src/pumpManager.ts b/sdk/eventhub/event-hubs/src/pumpManager.ts index f8433efc9631..1215989ca806 100644 --- a/sdk/eventhub/event-hubs/src/pumpManager.ts +++ b/sdk/eventhub/event-hubs/src/pumpManager.ts @@ -7,7 +7,7 @@ import { CommonEventProcessorOptions } from "./models/private"; import { CloseReason } from "./models/public"; import { PartitionProcessor } from "./partitionProcessor"; import { PartitionPump } from "./partitionPump"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { AbortSignalLike } from "@azure/abort-controller"; /** @@ -138,8 +138,10 @@ export class PumpManagerImpl implements PumpManager { ); try { - await pump.start(); + // Set the pump before starting it in case the user + // closes the subscription while `start()` is in progress. this._partitionIdToPumps[partitionId] = pump; + await pump.start(); } catch (err) { logger.verbose( `[${this._eventProcessorName}] [${partitionId}] An error occured while adding/updating a pump: ${err}` diff --git a/sdk/eventhub/event-hubs/src/receiveHandler.ts b/sdk/eventhub/event-hubs/src/receiveHandler.ts index 7138c1de2dcc..3478bca070c4 100644 --- a/sdk/eventhub/event-hubs/src/receiveHandler.ts +++ b/sdk/eventhub/event-hubs/src/receiveHandler.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { EventHubReceiver } from "./eventHubReceiver"; -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; /** * Describes the receive handler object that is returned from the receive() method with handlers. diff --git a/sdk/eventhub/event-hubs/src/receiver.ts b/sdk/eventhub/event-hubs/src/receiver.ts index cc4fe0712c67..e2ec3f91c93c 100644 --- a/sdk/eventhub/event-hubs/src/receiver.ts +++ b/sdk/eventhub/event-hubs/src/receiver.ts @@ -1,26 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { logger, logErrorStackTrace } from "./log"; +import { logErrorStackTrace, logger } from "./log"; import { ConnectionContext } from "./connectionContext"; import { EventHubConsumerOptions } from "./impl/eventHubClient"; import { - OnMessage, - OnError, EventHubReceiver, - LastEnqueuedEventProperties + LastEnqueuedEventProperties, + OnError, + OnMessage } from "./eventHubReceiver"; import { ReceivedEventData } from "./eventData"; import { - RetryConfig, Constants, - RetryOperationType, - retry, MessagingError, - RetryOptions + RetryConfig, + RetryOperationType, + RetryOptions, + retry } from "@azure/core-amqp"; import { ReceiveHandler } from "./receiveHandler"; -import { AbortSignalLike, AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; import { throwErrorIfConnectionClosed } from "./util/error"; import { EventPosition } from "./eventPosition"; import "@azure/core-asynciterator-polyfill"; diff --git a/sdk/eventhub/event-hubs/src/sender.ts b/sdk/eventhub/event-hubs/src/sender.ts deleted file mode 100644 index 207ab4ddd414..000000000000 --- a/sdk/eventhub/event-hubs/src/sender.ts +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { EventData } from "./eventData"; -import { EventHubSender } from "./eventHubSender"; -import { EventHubProducerOptions } from "../src/models/private"; -import { SendOptions, CreateBatchOptions } from "../src/models/public"; -import { ConnectionContext } from "./connectionContext"; -import { logger, logErrorStackTrace } from "./log"; -import { throwErrorIfConnectionClosed, throwTypeErrorIfParameterMissing } from "./util/error"; -import { EventDataBatch, isEventDataBatch, EventDataBatchImpl } from "./eventDataBatch"; -import { getTracer } from "@azure/core-tracing"; -import { SpanContext, Span, SpanKind, CanonicalCode, Link } from "@opentelemetry/api"; -import { instrumentEventData, TRACEPARENT_PROPERTY } from "./diagnostics/instrumentEventData"; -import { createMessageSpan } from "./diagnostics/messageSpan"; -import { getParentSpan } from "./util/operationOptions"; - -/** - * A producer responsible for sending events to an Event Hub. - * To create a producer use the `createProducer()` method on your `EventHubClient`. - * You can pass the below in the `options` when creating a producer. - * - `partitionId` : The identifier of the partition that the producer can be bound to. - * - `retryOptions` : The retry options used to govern retry attempts when an issue is encountered while sending events. - * A simple usage can be `{ "maxRetries": 4 }`. - * - * If `partitionId` is specified when creating a producer, all event data sent using the producer - * will be sent to the specified partition. - * Otherwise, they are automatically routed to an available partition by the Event Hubs service. - * - * Automatic routing of partitions is recommended because: - * - The sending of events will be highly available. - * - The event data will be evenly distributed among all available partitions. - * - * @class - * @internal - * @ignore - */ -export class EventHubProducer { - /** - * @property Describes the amqp connection context for the Client. - */ - private _context: ConnectionContext; - /** - * @property Denotes if close() was called on this sender - */ - private _isClosed: boolean = false; - - private _senderOptions: EventHubProducerOptions; - - private _eventHubSender: EventHubSender | undefined; - - private _eventHubName: string; - private _fullyQualifiedNamespace: string; - - /** - * @property Returns `true` if either the producer or the client that created it has been closed. - * @readonly - */ - public get isClosed(): boolean { - return this._isClosed || this._context.wasConnectionCloseCalled; - } - - /** - * EventHubProducer should not be constructed using `new EventHubProduer()` - * Use the `createProducer()` method on your `EventHubClient` instead. - * @constructor - * @internal - * @ignore - */ - constructor( - eventHubName: string, - fullyQualifiedNamespace: string, - context: ConnectionContext, - options?: EventHubProducerOptions - ) { - this._context = context; - this._senderOptions = options || {}; - const partitionId = - this._senderOptions.partitionId != undefined - ? String(this._senderOptions.partitionId) - : undefined; - this._eventHubSender = EventHubSender.create(this._context, partitionId); - this._eventHubName = eventHubName; - this._fullyQualifiedNamespace = fullyQualifiedNamespace; - } - - /** - * Creates an instance of `EventDataBatch` to which one can add events until the maximum supported size is reached. - * The batch can be passed to the `send()` method of the `EventHubProducer` to be sent to Azure Event Hubs. - * @param options A set of options to configure the behavior of the batch. - * - `partitionKey` : A value that is hashed to produce a partition assignment. - * Not applicable if the `EventHubProducer` was created using a `partitionId`. - * - `maxSizeInBytes`: The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached. - * - `abortSignal` : A signal the request to cancel the send operation. - * @returns Promise - */ - async createBatch(options?: CreateBatchOptions): Promise { - this._throwIfSenderOrConnectionClosed(); - if (!options) { - options = {}; - } - // throw an error if partition key and partition id are both defined - if ( - typeof options.partitionKey === "string" && - typeof this._senderOptions.partitionId === "string" - ) { - const error = new Error( - "Creating a batch with partition key is not supported when using producers that were created using a partition id." - ); - logger.warning( - "[%s] Creating a batch with partition key is not supported when using producers that were created using a partition id. %O", - this._context.connectionId, - error - ); - logErrorStackTrace(error); - throw error; - } - - let maxMessageSize = await this._eventHubSender!.getMaxMessageSize({ - retryOptions: this._senderOptions.retryOptions, - abortSignal: options.abortSignal - }); - if (options.maxSizeInBytes) { - if (options.maxSizeInBytes > maxMessageSize) { - const error = new Error( - `Max message size (${options.maxSizeInBytes} bytes) is greater than maximum message size (${maxMessageSize} bytes) on the AMQP sender link.` - ); - logger.warning( - `[${this._context.connectionId}] Max message size (${options.maxSizeInBytes} bytes) is greater than maximum message size (${maxMessageSize} bytes) on the AMQP sender link. ${error}` - ); - logErrorStackTrace(error); - throw error; - } - maxMessageSize = options.maxSizeInBytes; - } - return new EventDataBatchImpl( - this._context, - maxMessageSize, - options.partitionKey, - options.partitionId - ); - } - - /** - * Send one or more of events to the associated Event Hub. - * - * @param eventData An individual `EventData` object, or an array of `EventData` objects or an - * instance of `EventDataBatch`. - * @param options The set of options that can be specified to influence the way in which - * events are sent to the associated Event Hub. - * - `partitionKey` : A value that is hashed to produce a partition assignment. - * Not applicable if the `EventHubProducer` was created using a `partitionId`. - * - `abortSignal` : A signal the request to cancel the send operation. - * - * @returns Promise - * @throws AbortError if the operation is cancelled via the abortSignal. - * @throws MessagingError if an error is encountered while sending a message. - * @throws TypeError if a required parameter is missing. - * @throws Error if the underlying connection or sender has been closed. - * @throws Error if a partitionKey is provided when the producer was created with a partitionId. - * @throws Error if batch was created with partitionKey different than the one provided in the options. - * Create a new producer using the EventHubClient createProducer method. - */ - async send( - eventData: EventData | EventData[] | EventDataBatch, - options: SendOptions = {} - ): Promise { - this._throwIfSenderOrConnectionClosed(); - throwTypeErrorIfParameterMissing(this._context.connectionId, "send", "eventData", eventData); - if (Array.isArray(eventData) && eventData.length === 0) { - logger.info(`[${this._context.connectionId}] Empty array was passed. No events to send.`); - return; - } - if (isEventDataBatch(eventData) && eventData.count === 0) { - logger.info(`[${this._context.connectionId}] Empty batch was passsed. No events to send.`); - return; - } - if (!Array.isArray(eventData) && !isEventDataBatch(eventData)) { - eventData = [eventData]; - } - - // link message span contexts - let spanContextsToLink: SpanContext[] = []; - if (Array.isArray(eventData)) { - for (let i = 0; i < eventData.length; i++) { - const event = eventData[i]; - if (!event.properties || !event.properties[TRACEPARENT_PROPERTY]) { - const messageSpan = createMessageSpan(getParentSpan(options.tracingOptions)); - // since these message spans are created from same context as the send span, - // these message spans don't need to be linked. - // replace the original event with the instrumented one - eventData[i] = instrumentEventData(eventData[i], messageSpan); - messageSpan.end(); - } - } - } else if (isEventDataBatch(eventData)) { - spanContextsToLink = eventData._messageSpanContexts; - } - - const sendSpan = this._createSendSpan( - getParentSpan(options.tracingOptions), - spanContextsToLink - ); - - try { - const result = await this._eventHubSender!.send(eventData, { - ...this._senderOptions, - ...options - }); - sendSpan.setStatus({ code: CanonicalCode.OK }); - return result; - } catch (err) { - sendSpan.setStatus({ - code: CanonicalCode.UNKNOWN, - message: err.message - }); - throw err; - } finally { - sendSpan.end(); - } - } - - /** - * Closes the underlying AMQP sender link. - * Once closed, the producer cannot be used for any further operations. - * Use the `createProducer` function on the EventHubClient to instantiate a new EventHubProducer. - * - * @returns - * @throws Error if the underlying connection encounters an error while closing. - */ - async close(): Promise { - try { - if (this._context.connection && this._context.connection.isOpen() && this._eventHubSender) { - await this._eventHubSender.close(); - this._eventHubSender = undefined; - } - this._isClosed = true; - } catch (err) { - logger.warning( - "[%s] An error occurred while closing the Sender for %s: %O", - this._context.connectionId, - this._context.config.entityPath, - err - ); - logErrorStackTrace(err); - throw err; - } - } - - private _createSendSpan( - parentSpan?: Span | SpanContext | null, - spanContextsToLink: SpanContext[] = [] - ): Span { - const links: Link[] = spanContextsToLink.map((context) => { - return { - context - }; - }); - const tracer = getTracer(); - const span = tracer.startSpan("Azure.EventHubs.send", { - kind: SpanKind.CLIENT, - parent: parentSpan, - links - }); - - span.setAttribute("az.namespace", "Microsoft.EventHub"); - span.setAttribute("message_bus.destination", this._eventHubName); - span.setAttribute("peer.address", this._fullyQualifiedNamespace); - - return span; - } - - private _throwIfSenderOrConnectionClosed(): void { - throwErrorIfConnectionClosed(this._context); - if (this.isClosed) { - const errorMessage = - `The EventHubProducer for "${this._context.config.entityPath}" has been closed and can no longer be used. ` + - `Please create a new EventHubProducer using the "createProducer" function on the EventHubClient.`; - const error = new Error(errorMessage); - logger.warning(`[${this._context.connectionId}] %O`, error); - logErrorStackTrace(error); - throw error; - } - } -} diff --git a/sdk/eventhub/event-hubs/src/util/constants.ts b/sdk/eventhub/event-hubs/src/util/constants.ts index 35f09db5c3f9..e9da46faef1f 100644 --- a/sdk/eventhub/event-hubs/src/util/constants.ts +++ b/sdk/eventhub/event-hubs/src/util/constants.ts @@ -6,5 +6,5 @@ */ export const packageJsonInfo = { name: "@azure/event-hubs", - version: "5.2.1" + version: "5.2.2" }; diff --git a/sdk/eventhub/event-hubs/src/util/error.ts b/sdk/eventhub/event-hubs/src/util/error.ts index 526163c4b7f7..c2d9f4b203f0 100644 --- a/sdk/eventhub/event-hubs/src/util/error.ts +++ b/sdk/eventhub/event-hubs/src/util/error.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { logger, logErrorStackTrace } from "../log"; +import { logErrorStackTrace, logger } from "../log"; import { ConnectionContext } from "../connectionContext"; /** diff --git a/sdk/eventhub/event-hubs/test/client.spec.ts b/sdk/eventhub/event-hubs/test/client.spec.ts index 8db24f31041d..de37e5515afc 100644 --- a/sdk/eventhub/event-hubs/test/client.spec.ts +++ b/sdk/eventhub/event-hubs/test/client.spec.ts @@ -10,19 +10,18 @@ import chaiString from "chai-string"; chai.use(chaiString); import debugModule from "debug"; const debug = debugModule("azure:event-hubs:client-spec"); -import { TokenCredential, earliestEventPosition } from "../src"; -import { EventHubClient } from "../src/impl/eventHubClient"; +import { TokenCredential, EventHubProducerClient, EventHubConsumerClient, Subscription } from "../src"; import { packageJsonInfo } from "../src/util/constants"; import { EnvVarKeys, getEnvVars, isNode } from "./utils/testUtils"; -import { EventHubConsumer } from "../src/receiver"; -import { EventHubProducer } from "../src/sender"; +import { MessagingError } from "@azure/core-amqp"; +import { ConnectionContext } from "../src/connectionContext"; const env = getEnvVars(); -describe("Create EventHubClient using connection string", function(): void { - it("throws when it cannot find the Event Hub name", function(): void { +describe("Create EventHubConsumerClient", function(): void { + it("throws when no EntityPath in connection string", function(): void { const connectionString = "Endpoint=sb://abc"; - const test = function(): EventHubClient { - return new EventHubClient(connectionString); + const test = function(): EventHubConsumerClient { + return new EventHubConsumerClient("dummy", connectionString); }; test.should.throw( Error, @@ -31,12 +30,12 @@ describe("Create EventHubClient using connection string", function(): void { ); }); - it("throws when EntityPath in Connection string doesn't match with event hub name parameter", function(): void { + it("throws when EntityPath in connection string doesn't match with event hub name parameter", function(): void { const connectionString = "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c=;EntityPath=my-event-hub-name"; const eventHubName = "event-hub-name"; - const test = function(): EventHubClient { - return new EventHubClient(connectionString, eventHubName); + const test = function(): EventHubConsumerClient { + return new EventHubConsumerClient("dummy", connectionString, eventHubName); }; test.should.throw( Error, @@ -45,31 +44,95 @@ describe("Create EventHubClient using connection string", function(): void { ); }); - it("creates an EventHubClient from a connection string", function(): void { - const client = new EventHubClient( - "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=my-event-hub-name" + it("sets eventHubName, fullyQualifiedNamespace properties when created from a connection string", function(): void { + const client = new EventHubConsumerClient( + "dummy", + "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=my-event-hub-name" ); - client.should.be.an.instanceof(EventHubClient); + client.should.be.an.instanceof(EventHubConsumerClient); should.equal(client.eventHubName, "my-event-hub-name"); + should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); + }); + + it("sets eventHubName, fullyQualifiedNamespace properties when created from a connection string and event hub name", function(): void { + const client = new EventHubConsumerClient( + "dummy", + "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=b;SharedAccessKey=c", + "my-event-hub-name" + ); + client.should.be.an.instanceof(EventHubConsumerClient); + should.equal(client.eventHubName, "my-event-hub-name"); + should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); + }); + + it("sets eventHubName, fullyQualifiedNamespace properties when created from a token credential", function(): void { + const dummyCredential: TokenCredential = { + getToken: async () => { + return { + token: "boo", + expiresOnTimestamp: 12324 + }; + } + }; + const client = new EventHubConsumerClient( + "dummy", + "test.servicebus.windows.net", + "my-event-hub-name", + dummyCredential + ); + client.should.be.an.instanceof(EventHubConsumerClient); + should.equal(client.eventHubName, "my-event-hub-name"); + should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); + }); +}); + +describe("Create EventHubProducerClient", function(): void { + it("throws when no EntityPath in connection string ", function(): void { + const connectionString = "Endpoint=sb://abc"; + const test = function(): EventHubProducerClient { + return new EventHubProducerClient(connectionString); + }; + test.should.throw( + Error, + `Either provide "eventHubName" or the "connectionString": "${connectionString}", ` + + `must contain "EntityPath=".` + ); + }); + + it("throws when EntityPath in connection string doesn't match with event hub name parameter", function(): void { + const connectionString = + "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c=;EntityPath=my-event-hub-name"; + const eventHubName = "event-hub-name"; + const test = function(): EventHubProducerClient { + return new EventHubProducerClient(connectionString, eventHubName); + }; + test.should.throw( + Error, + `The entity path "my-event-hub-name" in connectionString: "${connectionString}" ` + + `doesn't match with eventHubName: "${eventHubName}".` + ); }); - it("Verify fullyQualifiedNamespace creating an EventHubClient using a connection string", function(): void { - const client = new EventHubClient( - "Endpoint=sb://test.servicebus.windows.net/;SharedAccessKeyName=a;SharedAccessKey=b;EntityPath=my-event-hub-name" + it("sets eventHubName, fullyQualifiedNamespace properties when created from a connection string", function(): void { + const client = new EventHubProducerClient( + "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=my-event-hub-name" ); + client.should.be.an.instanceof(EventHubProducerClient); + should.equal(client.eventHubName, "my-event-hub-name"); should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); }); - it("creates an EventHubClient from a connection string and an Event Hub name", function(): void { - const client = new EventHubClient( - "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c", + it("sets eventHubName, fullyQualifiedNamespace properties when created from a connection string and event hub name", function(): void { + const client = new EventHubProducerClient( + "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=b;SharedAccessKey=c", "my-event-hub-name" ); - client.should.be.an.instanceof(EventHubClient); + client.should.be.an.instanceof(EventHubProducerClient); should.equal(client.eventHubName, "my-event-hub-name"); + should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); }); - it("creates an EventHubClient from a custom TokenCredential", function(): void { + it("sets eventHubName, fullyQualifiedNamespace properties when created from a token credential", function(): void { const dummyCredential: TokenCredential = { getToken: async () => { return { @@ -78,17 +141,23 @@ describe("Create EventHubClient using connection string", function(): void { }; } }; - const client = new EventHubClient("abc", "my-event-hub-name", dummyCredential); - client.should.be.an.instanceof(EventHubClient); + const client = new EventHubProducerClient( + "test.servicebus.windows.net", + "my-event-hub-name", + dummyCredential + ); + client.should.be.an.instanceof(EventHubProducerClient); should.equal(client.eventHubName, "my-event-hub-name"); + should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); }); }); -describe("ServiceCommunicationError for non existent namespace", function(): void { - let client: EventHubClient; +describe("EventHubConsumerClient with non existent namespace", function(): void { + let client: EventHubConsumerClient; const expectedErrCode = isNode ? "ENOTFOUND" : "ServiceCommunicationError"; beforeEach(() => { - client = new EventHubClient( + client = new EventHubConsumerClient( + "$Default", "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=d" ); }); @@ -97,11 +166,11 @@ describe("ServiceCommunicationError for non existent namespace", function(): voi return client.close(); }); - it("should throw ServiceCommunicationError while getting hub runtime info", async function(): Promise< + it("should throw ServiceCommunicationError for getEventHubProperties", async function(): Promise< void > { try { - await client.getProperties(); + await client.getEventHubProperties(); throw new Error("Test failure"); } catch (err) { debug(err); @@ -109,7 +178,7 @@ describe("ServiceCommunicationError for non existent namespace", function(): voi } }); - it("should throw ServiceCommunicationError while getting partition runtime info", async function(): Promise< + it("should throw ServiceCommunicationError for getPartitionProperties", async function(): Promise< void > { try { @@ -121,12 +190,53 @@ describe("ServiceCommunicationError for non existent namespace", function(): voi } }); - it("should throw ServiceCommunicationError while creating a sender", async function(): Promise< + it("should throw ServiceCommunicationError for getPartitionIds", async function(): Promise { + try { + await client.getPartitionIds(); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw ServiceCommunicationError while subscribe()", async function(): Promise { + let subscription: Subscription | undefined; + const caughtErr = await new Promise((resolve) => { + subscription = client.subscribe({ + processEvents: async () => {}, + processError: async (err) => { + resolve(err); + } + }); + }); + if (subscription) { + await subscription.close(); + } + debug(caughtErr); + should.equal(caughtErr instanceof MessagingError && caughtErr.code, expectedErrCode); + await client.close(); + }); +}); + +describe("EventHubProducerClient with non existent namespace", function(): void { + let client: EventHubProducerClient; + const expectedErrCode = isNode ? "ENOTFOUND" : "ServiceCommunicationError"; + beforeEach(() => { + client = new EventHubProducerClient( + "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=d" + ); + }); + + afterEach(() => { + return client.close(); + }); + + it("should throw ServiceCommunicationError for getEventHubProperties", async function(): Promise< void > { try { - const sender = client.createProducer({ partitionId: "0" }); - await sender.send([{ body: "Hello World" }]); + await client.getEventHubProperties(); throw new Error("Test failure"); } catch (err) { debug(err); @@ -134,16 +244,43 @@ describe("ServiceCommunicationError for non existent namespace", function(): voi } }); - it("should throw ServiceCommunicationError while creating a receiver", async function(): Promise< + it("should throw ServiceCommunicationError for getPartitionProperties", async function(): Promise< void > { try { - const receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, - "0", - earliestEventPosition - ); - await receiver.receiveBatch(10, 5); + await client.getPartitionProperties("0"); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw ServiceCommunicationError for getPartitionIds", async function(): Promise { + try { + await client.getPartitionIds(); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw ServiceCommunicationError while sending", async function(): Promise { + try { + await client.sendBatch([{ body: "Hello World" }]); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw ServiceCommunicationError while creating a batch", async function(): Promise< + void + > { + try { + await client.createBatch(); throw new Error("Test failure"); } catch (err) { debug(err); @@ -152,34 +289,36 @@ describe("ServiceCommunicationError for non existent namespace", function(): voi }); }); -describe("MessagingEntityNotFoundError for non existent eventhub", function(): void { - let client: EventHubClient; +describe("EventHubConsumerClient with non existent event hub", function(): void { + let client: EventHubConsumerClient; + const expectedErrCode = "MessagingEntityNotFoundError"; beforeEach(() => { should.exist( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." ); - client = new EventHubClient(env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "bad" + Math.random()); + + client = new EventHubConsumerClient("dummy", env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "bad"); }); afterEach(() => { return client.close(); }); - it("should throw MessagingEntityNotFoundError while getting hub runtime info", async function(): Promise< + it("should throw MessagingEntityNotFoundError for getEventHubProperties", async function(): Promise< void > { try { - await client.getProperties(); + await client.getEventHubProperties(); throw new Error("Test failure"); } catch (err) { debug(err); - should.equal(err.code, "MessagingEntityNotFoundError"); + should.equal(err.code, expectedErrCode); } }); - it("should throw MessagingEntityNotFoundError while getting partition runtime info", async function(): Promise< + it("should throw MessagingEntityNotFoundError for getPartitionProperties", async function(): Promise< void > { try { @@ -187,114 +326,210 @@ describe("MessagingEntityNotFoundError for non existent eventhub", function(): v throw new Error("Test failure"); } catch (err) { debug(err); - should.equal(err.code, "MessagingEntityNotFoundError"); + should.equal(err.code, expectedErrCode); } }); - it("should throw MessagingEntityNotFoundError while creating a sender", async function(): Promise< + it("should throw MessagingEntityNotFoundError for getPartitionIds", async function(): Promise< void > { try { - const sender = client.createProducer({ partitionId: "0" }); - await sender.send([{ body: "Hello World" }]); + await client.getPartitionIds(); throw new Error("Test failure"); } catch (err) { debug(err); - should.equal(err.code, "MessagingEntityNotFoundError"); + should.equal(err.code, expectedErrCode); } }); - it("should throw MessagingEntityNotFoundError while creating a receiver", async function(): Promise< + it("should throw MessagingEntityNotFoundError while subscribe()", async function(): Promise< + void + > { + let subscription: Subscription | undefined; + const caughtErr = await new Promise((resolve) => { + subscription = client.subscribe({ + processEvents: async () => {}, + processError: async (err) => { + resolve(err); + } + }); + }); + if (subscription) { + await subscription.close(); + } + debug(caughtErr); + should.equal(caughtErr instanceof MessagingError && caughtErr.code, expectedErrCode); + await client.close(); + }); +}); + +describe("EventHubProducerClient with non existent event hub", function(): void { + let client: EventHubProducerClient; + const expectedErrCode = "MessagingEntityNotFoundError"; + + beforeEach(() => { + should.exist( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." + ); + client = new EventHubProducerClient(env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "bad"); + }); + + afterEach(() => { + return client.close(); + }); + + it("should throw MessagingEntityNotFoundError for getEventHubProperties", async function(): Promise< void > { try { - const receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, - "0", - earliestEventPosition - ); - await receiver.receiveBatch(10, 5); + await client.getEventHubProperties(); throw new Error("Test failure"); } catch (err) { debug(err); - should.equal(err.code, "MessagingEntityNotFoundError"); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw MessagingEntityNotFoundError for getPartitionProperties", async function(): Promise< + void + > { + try { + await client.getPartitionProperties("0"); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw MessagingEntityNotFoundError for getPartitionIds", async function(): Promise< + void + > { + try { + await client.getPartitionIds(); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); } }); -}); -describe("User Agent on EventHubClient on", function(): void { - let client: EventHubClient; + it("should throw MessagingEntityNotFoundError while sending", async function(): Promise { + try { + await client.sendBatch([{ body: "Hello World" }]); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); + + it("should throw MessagingEntityNotFoundError while creating a batch", async function(): Promise< + void + > { + try { + await client.createBatch(); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.code, expectedErrCode); + } + }); +}); +describe("EventHubConsumerClient User Agent String", function(): void { beforeEach(() => { should.exist( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." ); + should.exist( env[EnvVarKeys.EVENTHUB_NAME], "define EVENTHUB_NAME in your environment before running integration tests." ); }); - afterEach(() => { - return client.close(); + it("should correctly populate the default user agent", async function(): Promise { + const consumerClient = new EventHubConsumerClient( + "$Default", + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + env[EnvVarKeys.EVENTHUB_NAME] + ); + testUserAgentString(consumerClient["_eventHubClient"]["_context"]); + await consumerClient.close(); }); - it("should correctly populate the default user agent", function(done: Mocha.Done): void { - client = new EventHubClient( + it("should correctly populate the custom user agent", async function(): Promise { + const customUserAgent = "boo"; + const consumerClient = new EventHubConsumerClient( + "$Default", env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], - env[EnvVarKeys.EVENTHUB_NAME] + env[EnvVarKeys.EVENTHUB_NAME], + { userAgent: customUserAgent } + ); + testUserAgentString(consumerClient["_eventHubClient"]["_context"], customUserAgent); + await consumerClient.close(); + }); +}); + +describe("EventHubProducerClient User Agent String", function(): void { + beforeEach(() => { + should.exist( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." + ); + + should.exist( + env[EnvVarKeys.EVENTHUB_NAME], + "define EVENTHUB_NAME in your environment before running integration tests." ); - const packageVersion = packageJsonInfo.version; - const properties = client["_context"].connection.options.properties; - properties!["user-agent"].should.startWith(`azsdk-js-azureeventhubs/${packageVersion}`); - should.equal(properties!.product, "MSJSClient"); - should.equal(properties!.version, packageVersion); - if (isNode) { - should.equal(properties!.framework, `Node/${process.version}`); - } else { - should.equal(properties!.framework.startsWith("Browser/"), true); - } - should.equal(properties!.platform, `(${os.arch()}-${os.type()}-${os.release()})`); - done(); }); - it("should correctly populate the custom user agent", function(done: Mocha.Done): void { - const customua = "/js-event-processor-host=0.2.0"; + it("should correctly populate the default user agent", async function(): Promise { + const producerClient = new EventHubProducerClient( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + env[EnvVarKeys.EVENTHUB_NAME] + ); + testUserAgentString(producerClient["_context"]); + await producerClient.close(); + }); - client = new EventHubClient( + it("should correctly populate the custom user agent", async function(): Promise { + const customUserAgent = "boo"; + const producerClient = new EventHubProducerClient( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], env[EnvVarKeys.EVENTHUB_NAME], - { - userAgent: customua - } + { userAgent: customUserAgent } ); - const packageVersion = packageJsonInfo.version; - const properties = client["_context"].connection.options.properties; - properties!["user-agent"].should.startWith(`azsdk-js-azureeventhubs/${packageVersion}`); - properties!["user-agent"].should.endWith(customua); - should.equal(properties!.product, "MSJSClient"); - should.equal(properties!.version, packageVersion); - if (isNode) { - should.equal(properties!.framework, `Node/${process.version}`); - } else { - should.equal(properties!.framework.startsWith("Browser/"), true); - } - should.equal(properties!.platform, `(${os.arch()}-${os.type()}-${os.release()})`); - done(); + testUserAgentString(producerClient["_context"], customUserAgent); + await producerClient.close(); }); }); -describe("Errors after close()", function(): void { - let client: EventHubClient; - let sender: EventHubProducer; - let receiver: EventHubConsumer; +function testUserAgentString(context: ConnectionContext, customValue?: string) { + const packageVersion = packageJsonInfo.version; + const properties = context.connection.options.properties; + properties!["user-agent"].should.startWith(`azsdk-js-azureeventhubs/${packageVersion}`); + should.equal(properties!.product, "MSJSClient"); + should.equal(properties!.version, packageVersion); + if (isNode) { + should.equal(properties!.framework, `Node/${process.version}`); + } else { + should.equal(properties!.framework.startsWith("Browser/"), true); + } + should.equal(properties!.platform, `(${os.arch()}-${os.type()}-${os.release()})`); + if (customValue) { + properties!["user-agent"].should.endWith(customValue); + } +} - afterEach(() => { - return client.close(); - }); +describe("EventHubConsumerClient after close()", function(): void { + let client: EventHubConsumerClient; + const expectedErrorMsg = "The underlying AMQP connection is closed."; - async function beforeEachTest(entityToClose: string): Promise { + async function beforeEachTest(): Promise { should.exist( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." @@ -303,167 +538,158 @@ describe("Errors after close()", function(): void { env[EnvVarKeys.EVENTHUB_NAME], "define EVENTHUB_NAME in your environment before running integration tests." ); - client = new EventHubClient( + client = new EventHubConsumerClient( + "$Default", env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], env[EnvVarKeys.EVENTHUB_NAME] ); - const timeNow = Date.now(); - - // Ensure sender link is opened - sender = client.createProducer({ partitionId: "0" }); - await sender.send({ body: "dummy send to ensure AMQP connection is opened" }); - - // Ensure receiver link is opened - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, "0", { - enqueuedOn: timeNow - }); - const msgs = await receiver.receiveBatch(1, 10); - should.equal(msgs.length, 1); + // Ensure that the connection is opened + await client.getPartitionIds(); // close(), so that we can then test the resulting error. - switch (entityToClose) { - case "client": - await client.close(); - break; - case "sender": - await sender.close(); - break; - case "receiver": - await receiver.close(); - break; - default: - break; - } - } - - /** - * Tests that each feature of the sender throws expected error - */ - async function testSender(expectedErrorMsg: string): Promise { - should.equal(sender.isClosed, true, "Sender is not marked as closed."); - - const testMessage = { body: "test" }; - let errorSend: string = ""; - await sender.send(testMessage).catch((err) => { - errorSend = err.message; - }); - should.equal(errorSend, expectedErrorMsg, "Expected error not thrown for send()"); + await client.close(); } - /** - * Tests that each feature of the receiver throws expected error - */ - async function testReceiver(expectedErrorMsg: string): Promise { - should.equal(receiver.isClosed, true, "Receiver is not marked as closed."); - - let errorReceiveBatch: string = ""; - await receiver.receiveBatch(1, 1).catch((err) => { - errorReceiveBatch = err.message; - }); - should.equal( - errorReceiveBatch, - expectedErrorMsg, - "Expected error not thrown for receiveMessages()" - ); - - let errorReceiveStream: string = ""; + it("should throw connection closed error for getEventHubProperties", async function(): Promise< + void + > { + await beforeEachTest(); try { - receiver.receive( - () => Promise.resolve(), - (e) => console.log(e) - ); + await client.getEventHubProperties(); + throw new Error("Test failure"); } catch (err) { - errorReceiveStream = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); } - should.equal( - errorReceiveStream, - expectedErrorMsg, - "Expected error not thrown for registerMessageHandler()" - ); - } - - it("errors after close() on client", async function(): Promise { - await beforeEachTest("client"); - const expectedErrorMsg = "The underlying AMQP connection is closed."; - - await testSender(expectedErrorMsg); - await testReceiver(expectedErrorMsg); + }); - let errorNewSender: string = ""; + it("should throw connection closed error for getPartitionProperties", async function(): Promise< + void + > { + await beforeEachTest(); try { - client.createProducer(); + await client.getPartitionProperties("0"); + throw new Error("Test failure"); } catch (err) { - errorNewSender = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); } - should.equal(errorNewSender, expectedErrorMsg, "Expected error not thrown for createSender()"); + }); - let errorNewReceiver: string = ""; + it("should throw connection closed error for getPartitionIds", async function(): Promise { + await beforeEachTest(); try { - receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, - "0", - earliestEventPosition - ); + await client.getPartitionIds(); + throw new Error("Test failure"); } catch (err) { - errorNewReceiver = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); + } + }); + + it("should throw connection closed error while subscribe()", async function(): Promise { + await beforeEachTest(); + let subscription: Subscription | undefined; + const caughtErr = await new Promise((resolve) => { + subscription = client.subscribe({ + processEvents: async () => {}, + processError: async (err) => { + resolve(err); + } + }); + }); + if (subscription) { + await subscription.close(); } - should.equal( - errorNewReceiver, - expectedErrorMsg, - "Expected error not thrown for createReceiver()" + debug(caughtErr); + should.equal(caughtErr.message, expectedErrorMsg); + }); +}); + +describe("EventHubProducerClient after close()", function(): void { + let client: EventHubProducerClient; + const expectedErrorMsg = "The underlying AMQP connection is closed."; + + async function beforeEachTest(): Promise { + should.exist( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." + ); + should.exist( + env[EnvVarKeys.EVENTHUB_NAME], + "define EVENTHUB_NAME in your environment before running integration tests." ); + client = new EventHubProducerClient( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + env[EnvVarKeys.EVENTHUB_NAME] + ); + + // Ensure that the connection is opened + await client.getPartitionIds(); - let errorGetPartitionIds: string = ""; + // close(), so that we can then test the resulting error. + await client.close(); + } + + it("should throw connection closed error for getEventHubProperties", async function(): Promise< + void + > { + await beforeEachTest(); try { - await client.getPartitionIds({}); + await client.getEventHubProperties(); + throw new Error("Test failure"); } catch (err) { - errorGetPartitionIds = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); } - should.equal( - errorGetPartitionIds, - expectedErrorMsg, - "Expected error not thrown for getPartitionIds()" - ); + }); - let errorGetPartitionProperties: string = ""; + it("should throw connection closed error for getPartitionProperties", async function(): Promise< + void + > { + await beforeEachTest(); try { await client.getPartitionProperties("0"); + throw new Error("Test failure"); } catch (err) { - errorGetPartitionProperties = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); } - should.equal( - errorGetPartitionProperties, - expectedErrorMsg, - "Expected error not thrown for getPartitionProperties()" - ); + }); - let errorGetProperties: string = ""; + it("should throw connection closed error for getPartitionIds", async function(): Promise { + await beforeEachTest(); try { - await client.getProperties(); + await client.getPartitionIds(); + throw new Error("Test failure"); } catch (err) { - errorGetProperties = err.message; + debug(err); + should.equal(err.message, expectedErrorMsg); } - should.equal( - errorGetProperties, - expectedErrorMsg, - "Expected error not thrown for getProperties()" - ); }); - it("errors after close() on sender", async function(): Promise { - const senderErrorMsg = - `The EventHubProducer for "${client.eventHubName}" has been closed and can no longer be used. ` + - `Please create a new EventHubProducer using the "createProducer" function on the EventHubClient.`; - await beforeEachTest("sender"); - await testSender(senderErrorMsg); + it("should throw connection closed error while sending", async function(): Promise { + await beforeEachTest(); + try { + await client.sendBatch([{ body: "Hello World" }]); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.message, expectedErrorMsg); + } }); - it("errors after close() on receiver", async function(): Promise { - const receiverErrorMsg = - `The EventHubConsumer for "${client.eventHubName}" has been closed and can no longer be used. ` + - `Please create a new EventHubConsumer using the "createConsumer" function on the EventHubClient.`; - await beforeEachTest("receiver"); - await testReceiver(receiverErrorMsg); + it("should throw connection closed error while creating a batch", async function(): Promise< + void + > { + await beforeEachTest(); + try { + await client.createBatch(); + throw new Error("Test failure"); + } catch (err) { + debug(err); + should.equal(err.message, expectedErrorMsg); + } }); }); diff --git a/sdk/eventhub/event-hubs/test/eventHubConsumerClient.spec.ts b/sdk/eventhub/event-hubs/test/eventHubConsumerClient.spec.ts index d9c2ef093745..f1224903b384 100644 --- a/sdk/eventhub/event-hubs/test/eventHubConsumerClient.spec.ts +++ b/sdk/eventhub/event-hubs/test/eventHubConsumerClient.spec.ts @@ -2,21 +2,22 @@ // Licensed under the MIT license. import { + CheckpointStore, EventHubProducerClient, Subscription, SubscriptionEventHandlers, - CheckpointStore, latestEventPosition, - logger + logger, + CloseReason } from "../src"; import { EventHubClient } from "../src/impl/eventHubClient"; import { EventHubConsumerClient, isCheckpointStore } from "../src/eventHubConsumerClient"; -import { EnvVarKeys, getEnvVars, loopUntil } from "./utils/testUtils"; +import { EnvVarKeys, getEnvVars, loopUntil, getStartingPositionsForTests } from "./utils/testUtils"; import chai from "chai"; import { ReceivedMessagesTester } from "./utils/receivedMessagesTester"; import { LogTester } from "./utils/logHelpers"; import { InMemoryCheckpointStore } from "../src/inMemoryCheckpointStore"; -import { FullEventProcessorOptions, EventProcessor } from "../src/eventProcessor"; +import { EventProcessor, FullEventProcessorOptions } from "../src/eventProcessor"; import { SinonStubbedInstance, createStubInstance } from "sinon"; const should = chai.should(); @@ -63,13 +64,13 @@ describe("EventHubConsumerClient", () => { fakeEventProcessor = createStubInstance(EventProcessor); client = new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path ); clientWithCheckpointStore = new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path, // it doesn't actually matter _what_ checkpoint store gets passed in @@ -88,7 +89,7 @@ describe("EventHubConsumerClient", () => { checkpointStore: CheckpointStore, options: FullEventProcessorOptions ) => { - consumerGroup.should.equal(EventHubClient.defaultConsumerGroupName); + consumerGroup.should.equal(EventHubConsumerClient.defaultConsumerGroupName); subscriptionEventHandlers.should.equal(subscriptionHandlers); (typeof eventHubClient.createConsumer).should.equal("function"); isCheckpointStore(checkpointStore).should.be.ok; @@ -225,6 +226,122 @@ describe("EventHubConsumerClient", () => { await producerClient.close(); }); + describe("#close()", function(): void { + it("stops any actively running subscriptions", async function(): Promise { + const subscriptions: Subscription[] = []; + const client = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + + // Spin up multiple subscriptions. + for (const partitionId of partitionIds) { + subscriptions.push( + client.subscribe(partitionId, { + async processError() { + /* no-op for test */ + }, + async processEvents() { + /* no-op for test */ + } + }) + ); + } + + // Assert that the subscriptions are all running. + for (const subscription of subscriptions) { + subscription.isRunning.should.equal(true, "The subscription should be running."); + } + + // Stop the client, which should stop the subscriptions. + await client.close(); + + // Assert that the subscriptions are all not running. + for (const subscription of subscriptions) { + subscription.isRunning.should.equal(false, "The subscription should not be running."); + } + + client["_subscriptions"].size.should.equal( + 0, + "Some dangling subscriptions are still hanging around!" + ); + }); + + it("gracefully stops running subscriptions", async function(): Promise { + const client = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + + const startingPositions = await getStartingPositionsForTests(client); + + let waitForInitializeResolver: () => void; + const waitForInitialize = new Promise( + (resolve) => (waitForInitializeResolver = resolve) + ); + let waitForCloseResolver: (reason: CloseReason) => void; + const waitForClose = new Promise( + (resolve) => (waitForCloseResolver = resolve) + ); + let unexpectedError: Error | undefined; + let eventsWereReceived = false; + + const subscription = client.subscribe( + partitionIds[0], + { + async processInitialize() { + waitForInitializeResolver(); + }, + async processError(err) { + unexpectedError = err; + }, + async processEvents() { + eventsWereReceived = true; + }, + async processClose(reason) { + waitForCloseResolver(reason); + } + }, + { + startPosition: startingPositions + } + ); + + // Assert that the subscription is running. + subscription.isRunning.should.equal(true, "The subscription should be running."); + + // Wait until we see a `processInitialze` handler get invoked. + // This lets us know that the subscription is starting to read from a partition. + await waitForInitialize; + + // Stop the client, which should stop the subscriptions. + await client.close(); + + // Ensure that the `processClose` handler was invoked with the expected reason. + const closeReason = await waitForClose; + closeReason.should.equal( + CloseReason.Shutdown, + "Subscription closed for an unexpected reason." + ); + + // Ensure no errors were thrown. + should.not.exist(unexpectedError, "Did not expect to observe an error."); + + // Ensure the event handler wasn't called. + eventsWereReceived.should.equal(false, "Should not have received events."); + + // Assert that the subscription is not running. + subscription.isRunning.should.equal(false, "The subscription should not be running."); + + client["_subscriptions"].size.should.equal( + 0, + "Some dangling subscriptions are still hanging around!" + ); + }); + }); + describe("Reinitialize partition processing after error", function(): void { it("when subscribed to single partition", async function(): Promise { const partitionId = "0"; @@ -440,7 +557,7 @@ describe("EventHubConsumerClient", () => { clients.push( new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path ) @@ -475,7 +592,7 @@ describe("EventHubConsumerClient", () => { clients.push( new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path ) @@ -514,7 +631,7 @@ describe("EventHubConsumerClient", () => { clients.push( new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path ) @@ -552,7 +669,7 @@ describe("EventHubConsumerClient", () => { clients.push( new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path, // specifying your own checkpoint store activates the "production ready" code path that @@ -570,7 +687,7 @@ describe("EventHubConsumerClient", () => { clients.push( new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path, // specifying your own checkpoint store activates the "production ready" code path that @@ -681,5 +798,64 @@ describe("EventHubConsumerClient", () => { "processClose was not called the same number of times as processInitialize." ); }); + + describe("processError", function(): void { + it("supports awaiting subscription.close on non partition-specific errors", async function(): Promise< + void + > { + // Use an invalid Event Hub name to trigger a non partition-specific error. + const client = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + "Fake-Hub" + ); + + let subscription: Subscription; + const caughtErr: Error = await new Promise((resolve) => { + subscription = client.subscribe({ + processEvents: async () => {}, + processError: async (err, context) => { + if (!context.partitionId) { + await subscription.close(); + resolve(err); + } + } + }); + }); + + should.exist(caughtErr); + + await client.close(); + }); + + it("supports awaiting subscription.close on partition-specific errors", async function(): Promise< + void + > { + // Use an invalid Event Hub name to trigger a non partition-specific error. + const client = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + + let subscription: Subscription; + const caughtErr: Error = await new Promise((resolve) => { + // Subscribe to an invalid partition id to trigger a partition-specific error. + subscription = client.subscribe("-1", { + processEvents: async () => {}, + processError: async (err, context) => { + if (context.partitionId) { + await subscription.close(); + resolve(err); + } + } + }); + }); + + should.exist(caughtErr); + + await client.close(); + }); + }); }); }); diff --git a/sdk/eventhub/event-hubs/test/eventPosition.spec.ts b/sdk/eventhub/event-hubs/test/eventPosition.spec.ts index dcbc466d7175..903be65937f6 100644 --- a/sdk/eventhub/event-hubs/test/eventPosition.spec.ts +++ b/sdk/eventhub/event-hubs/test/eventPosition.spec.ts @@ -4,7 +4,7 @@ import chai from "chai"; chai.should(); -import { latestEventPosition, earliestEventPosition } from "../src"; +import { earliestEventPosition, latestEventPosition } from "../src"; import { getEventPositionFilter, validateEventPositions } from "../src/eventPosition"; describe("EventPosition", function(): void { diff --git a/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts b/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts index 2628057d8c46..d684bd4ce4d4 100644 --- a/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts +++ b/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts @@ -8,19 +8,21 @@ chai.use(chaiAsPromised); import debugModule from "debug"; const debug = debugModule("azure:event-hubs:partitionPump"); import { + CheckpointStore, + CloseReason, EventData, + LastEnqueuedEventProperties, PartitionOwnership, - CloseReason, ReceivedEventData, - LastEnqueuedEventProperties, SubscriptionEventHandlers, earliestEventPosition, latestEventPosition, - CheckpointStore + EventHubConsumerClient, + EventHubProducerClient } from "../src"; import { EventHubClient } from "../src/impl/eventHubClient"; import { EnvVarKeys, getEnvVars, loopUntil } from "./utils/testUtils"; -import { generate_uuid, Dictionary } from "rhea-promise"; +import { Dictionary, generate_uuid } from "rhea-promise"; import { EventProcessor, FullEventProcessorOptions } from "../src/eventProcessor"; import { Checkpoint } from "../src/partitionProcessor"; import { delay } from "@azure/core-amqp"; @@ -32,7 +34,7 @@ import { sendOneMessagePerPartition } from "./utils/subscriptionHandlerForTests"; import { GreedyPartitionLoadBalancer, PartitionLoadBalancer } from "../src/partitionLoadBalancer"; -import { AbortError } from "@azure/abort-controller"; +import { AbortError, AbortSignal } from "@azure/abort-controller"; import { FakeSubscriptionEventHandlers } from "./utils/fakeSubscriptionEventHandlers"; import sinon from "sinon"; import { isLatestPosition } from "../src/eventPosition"; @@ -51,6 +53,8 @@ describe("Event Processor", function(): void { path: env[EnvVarKeys.EVENTHUB_NAME] }; let client: EventHubClient; + let producerClient: EventHubProducerClient; + before("validate environment", async function(): Promise { should.exist( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], @@ -64,10 +68,12 @@ describe("Event Processor", function(): void { beforeEach("create the client", function() { client = new EventHubClient(service.connectionString, service.path, {}); + producerClient = new EventHubProducerClient(service.connectionString, service.path); }); afterEach("close the connection", async function(): Promise { await client.close(); + await producerClient.close(); }); describe("unit tests", () => { @@ -149,7 +155,7 @@ describe("Event Processor", function(): void { startPosition?: FullEventProcessorOptions["startPosition"] ) { return new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -207,7 +213,7 @@ describe("Event Processor", function(): void { // note: we're not starting this event processor so there's nothing to stop() // it's only here so we can call a few private methods on it. eventProcessor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -286,7 +292,7 @@ describe("Event Processor", function(): void { }; const eventProcessor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -474,7 +480,7 @@ describe("Event Processor", function(): void { }; const eventProcessor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -518,7 +524,7 @@ describe("Event Processor", function(): void { const errors = new Set(); const eventProcessor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processClose: async () => { @@ -570,7 +576,7 @@ describe("Event Processor", function(): void { it("should expose an id", async function(): Promise { const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -589,7 +595,7 @@ describe("Event Processor", function(): void { it("id can be forced to be a specific value", async function(): Promise { const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { processEvents: async () => {}, @@ -611,10 +617,10 @@ describe("Event Processor", function(): void { const { subscriptionEventHandler, startPosition - } = await SubscriptionHandlerForTests.startingFromHere(client); + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, subscriptionEventHandler, new InMemoryCheckpointStore(), @@ -629,7 +635,7 @@ describe("Event Processor", function(): void { processor.start(); processor.start(); - const expectedMessages = await sendOneMessagePerPartition(partitionIds, client); + const expectedMessages = await sendOneMessagePerPartition(partitionIds, producerClient); const receivedEvents = await subscriptionEventHandler.waitForEvents(partitionIds); // shutdown the processor @@ -645,13 +651,13 @@ describe("Event Processor", function(): void { let didPartitionProcessorStart = false; const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, { - processInitialize: async (context) => { + processInitialize: async () => { didPartitionProcessorStart = true; }, - processEvents: async (event, context) => {}, + processEvents: async () => {}, processError: async () => {} }, new InMemoryCheckpointStore(), @@ -676,11 +682,11 @@ describe("Event Processor", function(): void { const { subscriptionEventHandler, startPosition - } = await SubscriptionHandlerForTests.startingFromHere(client); + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); const partitionLoadBalancer = new GreedyPartitionLoadBalancer(); const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, subscriptionEventHandler, new InMemoryCheckpointStore(), @@ -694,7 +700,7 @@ describe("Event Processor", function(): void { loggerForTest(`Starting processor for the first time`); processor.start(); - const expectedMessages = await sendOneMessagePerPartition(partitionIds, client); + const expectedMessages = await sendOneMessagePerPartition(partitionIds, producerClient); const receivedEvents = await subscriptionEventHandler.waitForEvents(partitionIds); loggerForTest(`Stopping processor for the first time`); @@ -730,10 +736,10 @@ describe("Event Processor", function(): void { const { subscriptionEventHandler, startPosition - } = await SubscriptionHandlerForTests.startingFromHere(client); + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, subscriptionEventHandler, new InMemoryCheckpointStore(), @@ -746,7 +752,7 @@ describe("Event Processor", function(): void { processor.start(); - const expectedMessages = await sendOneMessagePerPartition(partitionIds, client); + const expectedMessages = await sendOneMessagePerPartition(partitionIds, producerClient); const receivedEvents = await subscriptionEventHandler.waitForEvents(partitionIds); // shutdown the processor @@ -767,14 +773,14 @@ describe("Event Processor", function(): void { const partitionOwnership1: PartitionOwnership = { fullyQualifiedNamespace: "myNamespace.servicebus.windows.net", eventHubName: "myEventHub", - consumerGroup: EventHubClient.defaultConsumerGroupName, + consumerGroup: EventHubConsumerClient.defaultConsumerGroupName, ownerId: generate_uuid(), partitionId: "0" }; const partitionOwnership2: PartitionOwnership = { fullyQualifiedNamespace: "myNamespace.servicebus.windows.net", eventHubName: "myEventHub", - consumerGroup: EventHubClient.defaultConsumerGroupName, + consumerGroup: EventHubConsumerClient.defaultConsumerGroupName, ownerId: generate_uuid(), partitionId: "1" }; @@ -786,14 +792,14 @@ describe("Event Processor", function(): void { const ownershiplist = await inMemoryCheckpointStore.listOwnership( "myNamespace.servicebus.windows.net", "myEventHub", - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); ownershiplist.length.should.equals(2); const checkpoint: Checkpoint = { fullyQualifiedNamespace: "myNamespace.servicebus.windows.net", eventHubName: "myEventHub", - consumerGroup: EventHubClient.defaultConsumerGroupName, + consumerGroup: EventHubConsumerClient.defaultConsumerGroupName, partitionId: "0", sequenceNumber: 10, offset: 50 @@ -803,7 +809,7 @@ describe("Event Processor", function(): void { const partitionOwnershipList = await inMemoryCheckpointStore.listOwnership( "myNamespace.servicebus.windows.net", "myEventHub", - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); partitionOwnershipList[0].partitionId.should.equals(checkpoint.partitionId); partitionOwnershipList[0].fullyQualifiedNamespace!.should.equals( @@ -811,7 +817,7 @@ describe("Event Processor", function(): void { ); partitionOwnershipList[0].eventHubName!.should.equals("myEventHub"); partitionOwnershipList[0].consumerGroup!.should.equals( - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); }); @@ -850,14 +856,14 @@ describe("Event Processor", function(): void { } } } - async processError(err: Error) { + async processError() { didError = true; } } const inMemoryCheckpointStore = new InMemoryCheckpointStore(); const processor1 = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new FooPartitionProcessor(), inMemoryCheckpointStore, @@ -875,12 +881,10 @@ describe("Event Processor", function(): void { const events: EventData[] = []; for (const partitionId of partitionIds) { - const producer = client.createProducer({ partitionId }); for (let index = 1; index <= 100; index++) { events.push({ body: `${expectedMessagePrefix} ${index} ${partitionId}` }); } - await producer.send(events); - await producer.close(); + await producerClient.sendBatch(events, { partitionId }); } // set a delay to give a consumers a chance to receive a message @@ -905,7 +909,7 @@ describe("Event Processor", function(): void { processedAtLeastOneEvent = new Set(); const processor2 = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new FooPartitionProcessor(), inMemoryCheckpointStore, @@ -915,7 +919,7 @@ describe("Event Processor", function(): void { const checkpoints = await inMemoryCheckpointStore.listCheckpoints( client.fullyQualifiedNamespace, client.eventHubName, - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); checkpoints.sort((a, b) => a.partitionId.localeCompare(b.partitionId)); @@ -1088,9 +1092,7 @@ describe("Event Processor", function(): void { // create messages const expectedMessagePrefix = "EventProcessor test - multiple partitions - "; for (const partitionId of partitionIds) { - const producer = client.createProducer({ partitionId }); - await producer.send({ body: expectedMessagePrefix + partitionId }); - await producer.close(); + await producerClient.sendBatch([{ body: expectedMessagePrefix + partitionId }], { partitionId }); } const processor1LoadBalancingInterval = { @@ -1105,7 +1107,7 @@ describe("Event Processor", function(): void { }; processorByName[`processor-1`] = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new FooPartitionProcessor(), checkpointStore, @@ -1127,7 +1129,7 @@ describe("Event Processor", function(): void { }); processorByName[`processor-2`] = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new FooPartitionProcessor(), checkpointStore, @@ -1157,7 +1159,7 @@ describe("Event Processor", function(): void { const partitionOwnership = await checkpointStore.listOwnership( client.fullyQualifiedNamespace, client.eventHubName, - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); // map of ownerId as a key and partitionIds as a value @@ -1210,7 +1212,7 @@ describe("Event Processor", function(): void { // The partitionProcess will need to add events to the partitionResultsMap as they are received class FooPartitionProcessor { - async processEvents(events: ReceivedEventData[], context: PartitionContext) { + async processEvents(_events: ReceivedEventData[], context: PartitionContext) { partitionOwnershipArr.add(context.partitionId); } async processError() { @@ -1221,15 +1223,13 @@ describe("Event Processor", function(): void { // create messages const expectedMessagePrefix = "EventProcessor test - multiple partitions - "; for (const partitionId of partitionIds) { - const producer = client.createProducer({ partitionId }); - await producer.send({ body: expectedMessagePrefix + partitionId }); - await producer.close(); + await producerClient.sendBatch([{ body: expectedMessagePrefix + partitionId }], { partitionId }); } for (let i = 0; i < 2; i++) { const processorName = `processor-${i}`; processorByName[processorName] = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new FooPartitionProcessor(), checkpointStore, @@ -1252,7 +1252,7 @@ describe("Event Processor", function(): void { const partitionOwnership = await checkpointStore.listOwnership( client.fullyQualifiedNamespace, client.eventHubName, - EventHubClient.defaultConsumerGroupName + EventHubConsumerClient.defaultConsumerGroupName ); partitionOwnershipArr.size.should.equal(partitionIds.length); @@ -1336,7 +1336,7 @@ describe("Event Processor", function(): void { }; const processor1 = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, handlers, checkpointStore, @@ -1344,7 +1344,7 @@ describe("Event Processor", function(): void { ); const processor2 = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, handlers, checkpointStore, @@ -1443,29 +1443,27 @@ describe("Event Processor", function(): void { it("should have lastEnqueuedEventProperties populated when trackLastEnqueuedEventProperties is set to true", async function(): Promise< void > { - const { startPosition } = await SubscriptionHandlerForTests.startingFromHere(client); + const { startPosition } = await SubscriptionHandlerForTests.startingFromHere(producerClient); const partitionIds = await client.getPartitionIds({}); for (const partitionId of partitionIds) { - const producer = client.createProducer({ partitionId: `${partitionId}` }); - await producer.send({ body: `Hello world - ${partitionId}` }); - await producer.close(); + await producerClient.sendBatch([{ body: `Hello world - ${partitionId}` }], { partitionId }); } const partitionIdsSet = new Set(); const lastEnqueuedEventPropertiesMap: Map = new Map(); class SimpleEventProcessor implements SubscriptionEventHandlers { - async processEvents(events: ReceivedEventData[], context: PartitionContext) { + async processEvents(_events: ReceivedEventData[], context: PartitionContext) { partitionIdsSet.add(context.partitionId); lastEnqueuedEventPropertiesMap.set( context.partitionId, context.lastEnqueuedEventProperties! ); } - async processError(err: Error, context: PartitionContext) {} + async processError() {} } const processor = new EventProcessor( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, client, new SimpleEventProcessor(), new InMemoryCheckpointStore(), diff --git a/sdk/eventhub/event-hubs/test/eventdata.spec.ts b/sdk/eventhub/event-hubs/test/eventdata.spec.ts index 878538d06d3d..112c1e9be131 100644 --- a/sdk/eventhub/event-hubs/test/eventdata.spec.ts +++ b/sdk/eventhub/event-hubs/test/eventdata.spec.ts @@ -4,7 +4,7 @@ import chai from "chai"; chai.should(); -import { fromAmqpMessage, toAmqpMessage, EventData } from "../src/eventData"; +import { EventData, fromAmqpMessage, toAmqpMessage } from "../src/eventData"; import { Message } from "rhea-promise"; const testAnnotations = { diff --git a/sdk/eventhub/event-hubs/test/hubruntime.spec.ts b/sdk/eventhub/event-hubs/test/hubruntime.spec.ts index 14c6161e8ee9..04786443f7b3 100644 --- a/sdk/eventhub/event-hubs/test/hubruntime.spec.ts +++ b/sdk/eventhub/event-hubs/test/hubruntime.spec.ts @@ -10,11 +10,13 @@ const debug = debugModule("azure:event-hubs:hubruntime-spec"); import { EnvVarKeys, getEnvVars, setTracerForTest } from "./utils/testUtils"; const env = getEnvVars(); -import { EventHubClient } from "../src/impl/eventHubClient"; import { AbortController } from "@azure/abort-controller"; import { SpanGraph } from "@azure/core-tracing"; +import { EventHubProducerClient, EventHubConsumerClient, MessagingError } from "../src"; + describe("RuntimeInformation", function(): void { - let client: EventHubClient; + let producerClient: EventHubProducerClient; + let consumerClient: EventHubConsumerClient; const service = { connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], path: env[EnvVarKeys.EVENTHUB_NAME] @@ -30,29 +32,45 @@ describe("RuntimeInformation", function(): void { ); }); + beforeEach(async () => { + debug("Creating the clients.."); + producerClient = new EventHubProducerClient(service.connectionString, service.path); + consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + }); + afterEach("close the connection", async function(): Promise { - await client.close(); + await producerClient.close(); + await consumerClient.close(); }); function arrayOfIncreasingNumbersFromZero(length: any): Array { - return Array.apply(undefined, new Array(length)).map((x: any, i: any) => { - return `${i}`; - }); + const result = new Array(length); + for (let i = 0; i < length; i++) { + result[i] = `${i}`; + } + return result; } describe("getPartitionIds", function(): void { - it("returns an array of partition IDs", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path); - const ids = await client.getPartitionIds({}); + it("EventHubProducerClient returns an array of partition IDs", async function(): Promise { + const ids = await producerClient.getPartitionIds({}); + ids.should.have.members(arrayOfIncreasingNumbersFromZero(ids.length)); + }); + + it("EventHubConsumerClient returns an array of partition IDs", async function(): Promise { + const ids = await consumerClient.getPartitionIds({}); ids.should.have.members(arrayOfIncreasingNumbersFromZero(ids.length)); }); - it("respects cancellationTokens", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path); + it("EventHubProducerClient respects cancellationTokens", async function(): Promise { try { const controller = new AbortController(); setTimeout(() => controller.abort(), 1); - await client.getPartitionIds({ + await producerClient.getPartitionIds({ abortSignal: controller.signal }); throw new Error(`Test failure`); @@ -61,69 +79,97 @@ describe("RuntimeInformation", function(): void { } }); - it("can be ran in parallel without retries", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path, { - retryOptions: { - maxRetries: 0 - } - }); - const results = await Promise.all([client.getPartitionIds({}), client.getPartitionIds({})]); - - for (const result of results) { - result.should.have.members(arrayOfIncreasingNumbersFromZero(result.length)); + it("EventHubConsumerClient respects cancellationTokens", async function(): Promise { + try { + const controller = new AbortController(); + setTimeout(() => controller.abort(), 1); + await consumerClient.getPartitionIds({ + abortSignal: controller.signal + }); + throw new Error(`Test failure`); + } catch (err) { + err.message.should.match(/The [\w]+ operation has been cancelled by the user.$/gi); } }); - }); - it("can be manually traced", async function(): Promise { - const { tracer, resetTracer } = setTracerForTest(); + it("EventHubProducerClient can be manually traced", async function(): Promise { + const { tracer, resetTracer } = setTracerForTest(); - const rootSpan = tracer.startSpan("root"); - client = new EventHubClient(service.connectionString, service.path); - const ids = await client.getPartitionIds({ - tracingOptions: { - spanOptions: { - parent: rootSpan.context() + const rootSpan = tracer.startSpan("root"); + const ids = await producerClient.getPartitionIds({ + tracingOptions: { + spanOptions: { + parent: rootSpan.context() + } } - } + }); + ids.should.have.members(arrayOfIncreasingNumbersFromZero(ids.length)); + rootSpan.end(); + + const rootSpans = tracer.getRootSpans(); + rootSpans.length.should.equal(1, "Should only have one root span."); + rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); + + const expectedGraph: SpanGraph = { + roots: [ + { + name: rootSpan.name, + children: [ + { + name: "Azure.EventHubs.getEventHubProperties", + children: [] + } + ] + } + ] + }; + + tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); + tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); + resetTracer(); }); - ids.should.have.members(arrayOfIncreasingNumbersFromZero(ids.length)); - rootSpan.end(); - - const rootSpans = tracer.getRootSpans(); - rootSpans.length.should.equal(1, "Should only have one root span."); - rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); - - const expectedGraph: SpanGraph = { - roots: [ - { - name: rootSpan.name, - children: [ - { - name: "Azure.EventHubs.getPartitionIds", - children: [ - { - name: "Azure.EventHubs.getEventHubProperties", - children: [] - } - ] - } - ] + + it("EventHubConsumerClient can be manually traced", async function(): Promise { + const { tracer, resetTracer } = setTracerForTest(); + + const rootSpan = tracer.startSpan("root"); + const ids = await consumerClient.getPartitionIds({ + tracingOptions: { + spanOptions: { + parent: rootSpan.context() + } } - ] - }; + }); + ids.should.have.members(arrayOfIncreasingNumbersFromZero(ids.length)); + rootSpan.end(); - tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); - tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); - resetTracer(); + const rootSpans = tracer.getRootSpans(); + rootSpans.length.should.equal(1, "Should only have one root span."); + rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); + + const expectedGraph: SpanGraph = { + roots: [ + { + name: rootSpan.name, + children: [ + { + name: "Azure.EventHubs.getEventHubProperties", + children: [] + } + ] + } + ] + }; + + tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); + tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); + resetTracer(); + }); }); describe("hub runtime information", function(): void { - it("gets the hub runtime information", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path, { - userAgent: "/js-event-processor-host=0.2.0" - }); - const hubRuntimeInfo = await client.getProperties(); + it("EventHubProducerClient gets the hub runtime information", async function(): Promise { + const hubRuntimeInfo = await producerClient.getEventHubProperties(); debug(hubRuntimeInfo); hubRuntimeInfo.name.should.equal(service.path); @@ -133,14 +179,39 @@ describe("RuntimeInformation", function(): void { hubRuntimeInfo.createdOn.should.be.instanceof(Date); }); - it("can cancel a request for hub runtime information", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path, { - userAgent: "/js-event-processor-host=0.2.0" - }); + it("EventHubConsumerClient gets the hub runtime information", async function(): Promise { + const hubRuntimeInfo = await consumerClient.getEventHubProperties(); + debug(hubRuntimeInfo); + hubRuntimeInfo.name.should.equal(service.path); + + hubRuntimeInfo.partitionIds.should.have.members( + arrayOfIncreasingNumbersFromZero(hubRuntimeInfo.partitionIds.length) + ); + hubRuntimeInfo.createdOn.should.be.instanceof(Date); + }); + + it("EventHubProducerClient can cancel a request for hub runtime information", async function(): Promise< + void + > { + try { + const controller = new AbortController(); + setTimeout(() => controller.abort(), 1); + await producerClient.getEventHubProperties({ + abortSignal: controller.signal + }); + throw new Error(`Test failure`); + } catch (err) { + err.message.should.match(/The [\w]+ operation has been cancelled by the user.$/gi); + } + }); + + it("EventHubConsumerClient can cancel a request for hub runtime information", async function(): Promise< + void + > { try { const controller = new AbortController(); setTimeout(() => controller.abort(), 1); - await client.getProperties({ + await consumerClient.getEventHubProperties({ abortSignal: controller.signal }); throw new Error(`Test failure`); @@ -149,12 +220,50 @@ describe("RuntimeInformation", function(): void { } }); - it("can be manually traced", async function(): Promise { + it("EventHubProducerClient can be manually traced", async function(): Promise { + const { tracer, resetTracer } = setTracerForTest(); + + const rootSpan = tracer.startSpan("root"); + const hubRuntimeInfo = await producerClient.getEventHubProperties({ + tracingOptions: { + spanOptions: { + parent: rootSpan.context() + } + } + }); + hubRuntimeInfo.partitionIds.should.have.members( + arrayOfIncreasingNumbersFromZero(hubRuntimeInfo.partitionIds.length) + ); + rootSpan.end(); + + const rootSpans = tracer.getRootSpans(); + rootSpans.length.should.equal(1, "Should only have one root span."); + rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); + + const expectedGraph: SpanGraph = { + roots: [ + { + name: rootSpan.name, + children: [ + { + name: "Azure.EventHubs.getEventHubProperties", + children: [] + } + ] + } + ] + }; + + tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); + tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); + resetTracer(); + }); + + it("EventHubConsumerClient can be manually traced", async function(): Promise { const { tracer, resetTracer } = setTracerForTest(); const rootSpan = tracer.startSpan("root"); - client = new EventHubClient(service.connectionString, service.path); - const hubRuntimeInfo = await client.getProperties({ + const hubRuntimeInfo = await consumerClient.getEventHubProperties({ tracingOptions: { spanOptions: { parent: rootSpan.context() @@ -191,10 +300,11 @@ describe("RuntimeInformation", function(): void { }); describe("partition runtime information", function(): void { - it("should throw an error if partitionId is missing", async function(): Promise { + it("EventHubProducerClient should throw an error if partitionId is missing", async function(): Promise< + void + > { try { - client = new EventHubClient(service.connectionString, service.path); - await client.getPartitionProperties(undefined as any); + await producerClient.getPartitionProperties(undefined as any); throw new Error("Test failure"); } catch (err) { err.name.should.equal("TypeError"); @@ -204,11 +314,24 @@ describe("RuntimeInformation", function(): void { } }); - it("gets the partition runtime information with partitionId as a string", async function(): Promise< + it("EventHubConsumerClient should throw an error if partitionId is missing", async function(): Promise< void > { - client = new EventHubClient(service.connectionString, service.path); - const partitionRuntimeInfo = await client.getPartitionProperties("0"); + try { + await consumerClient.getPartitionProperties(undefined as any); + throw new Error("Test failure"); + } catch (err) { + err.name.should.equal("TypeError"); + err.message.should.equal( + `getPartitionProperties called without required argument "partitionId"` + ); + } + }); + + it("EventHubProducerClient gets the partition runtime information with partitionId as a string", async function(): Promise< + void + > { + const partitionRuntimeInfo = await producerClient.getPartitionProperties("0"); debug(partitionRuntimeInfo); partitionRuntimeInfo.partitionId.should.equal("0"); partitionRuntimeInfo.eventHubName.should.equal(service.path); @@ -217,11 +340,10 @@ describe("RuntimeInformation", function(): void { should.exist(partitionRuntimeInfo.lastEnqueuedOffset); }); - it("gets the partition runtime information with partitionId as a number", async function(): Promise< + it("EventHubConsumerClient gets the partition runtime information with partitionId as a string", async function(): Promise< void > { - client = new EventHubClient(service.connectionString, service.path); - const partitionRuntimeInfo = await client.getPartitionProperties(0 as any); + const partitionRuntimeInfo = await consumerClient.getPartitionProperties("0"); debug(partitionRuntimeInfo); partitionRuntimeInfo.partitionId.should.equal("0"); partitionRuntimeInfo.eventHubName.should.equal(service.path); @@ -230,29 +352,78 @@ describe("RuntimeInformation", function(): void { should.exist(partitionRuntimeInfo.lastEnqueuedOffset); }); - const invalidIds = ["XYZ", -1, 1000, "-", " ", ""]; - invalidIds.forEach(function(id: any): void { - it(`should fail the partition runtime information when partitionId is "${id}"`, async function(): Promise { - try { - client = new EventHubClient(service.connectionString, service.path); - await client.getPartitionProperties(id as any); - throw new Error("Test failure"); - } catch (err) { - debug(`>>>> Received error - `, err); - should.exist(err); - err.message.should.match( - /.*The specified partition is invalid for an EventHub partition sender or receiver.*/gi - ); - } - }); + it("EventHubProducerClient gets the partition runtime information with partitionId as a number", async function(): Promise< + void + > { + const partitionRuntimeInfo = await producerClient.getPartitionProperties(0 as any); + debug(partitionRuntimeInfo); + partitionRuntimeInfo.partitionId.should.equal("0"); + partitionRuntimeInfo.eventHubName.should.equal(service.path); + partitionRuntimeInfo.lastEnqueuedOnUtc.should.be.instanceof(Date); + should.exist(partitionRuntimeInfo.lastEnqueuedSequenceNumber); + should.exist(partitionRuntimeInfo.lastEnqueuedOffset); + }); + + it("EventHubConsumerClient gets the partition runtime information with partitionId as a number", async function(): Promise< + void + > { + const partitionRuntimeInfo = await consumerClient.getPartitionProperties(0 as any); + debug(partitionRuntimeInfo); + partitionRuntimeInfo.partitionId.should.equal("0"); + partitionRuntimeInfo.eventHubName.should.equal(service.path); + partitionRuntimeInfo.lastEnqueuedOnUtc.should.be.instanceof(Date); + should.exist(partitionRuntimeInfo.lastEnqueuedSequenceNumber); + should.exist(partitionRuntimeInfo.lastEnqueuedOffset); + }); + + it("EventHubProducerClient bubbles up error from service for invalid partitionId", async function(): Promise< + void + > { + try { + await producerClient.getPartitionProperties("boo"); + throw new Error("Test failure"); + } catch (err) { + debug(`>>>> Received error - `, err); + should.exist(err); + should.equal((err as MessagingError).code, "ArgumentOutOfRangeError"); + } + }); + + it("EventHubConsumerClient bubbles up error from service for invalid partitionId", async function(): Promise< + void + > { + try { + await consumerClient.getPartitionProperties("boo"); + throw new Error("Test failure"); + } catch (err) { + debug(`>>>> Received error - `, err); + should.exist(err); + should.equal((err as MessagingError).code, "ArgumentOutOfRangeError"); + } + }); + + it("EventHubProducerClient can cancel a request for getPartitionInformation", async function(): Promise< + void + > { + try { + const controller = new AbortController(); + setTimeout(() => controller.abort(), 1); + await producerClient.getPartitionProperties("0", { + abortSignal: controller.signal + }); + throw new Error(`Test failure`); + } catch (err) { + err.message.should.match(/The [\w]+ operation has been cancelled by the user.$/gi); + } }); - it("can cancel a request for getPartitionInformation", async function(): Promise { - client = new EventHubClient(service.connectionString, service.path); + it("EventHubConsumerClient can cancel a request for getPartitionInformation", async function(): Promise< + void + > { try { const controller = new AbortController(); setTimeout(() => controller.abort(), 1); - await client.getPartitionProperties("0", { + await consumerClient.getPartitionProperties("0", { abortSignal: controller.signal }); throw new Error(`Test failure`); @@ -261,12 +432,52 @@ describe("RuntimeInformation", function(): void { } }); - it("can be manually traced", async function(): Promise { + it("EventHubProducerClient can be manually traced", async function(): Promise { + const { tracer, resetTracer } = setTracerForTest(); + + const rootSpan = tracer.startSpan("root"); + const partitionRuntimeInfo = await producerClient.getPartitionProperties("0", { + tracingOptions: { + spanOptions: { + parent: rootSpan.context() + } + } + }); + partitionRuntimeInfo.partitionId.should.equal("0"); + partitionRuntimeInfo.eventHubName.should.equal(service.path); + partitionRuntimeInfo.lastEnqueuedOnUtc.should.be.instanceof(Date); + should.exist(partitionRuntimeInfo.lastEnqueuedSequenceNumber); + should.exist(partitionRuntimeInfo.lastEnqueuedOffset); + rootSpan.end(); + + const rootSpans = tracer.getRootSpans(); + rootSpans.length.should.equal(1, "Should only have one root span."); + rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); + + const expectedGraph: SpanGraph = { + roots: [ + { + name: rootSpan.name, + children: [ + { + name: "Azure.EventHubs.getPartitionProperties", + children: [] + } + ] + } + ] + }; + + tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); + tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); + resetTracer(); + }); + + it("EventHubConsumerClient can be manually traced", async function(): Promise { const { tracer, resetTracer } = setTracerForTest(); const rootSpan = tracer.startSpan("root"); - client = new EventHubClient(service.connectionString, service.path); - const partitionRuntimeInfo = await client.getPartitionProperties("0", { + const partitionRuntimeInfo = await consumerClient.getPartitionProperties("0", { tracingOptions: { spanOptions: { parent: rootSpan.context() diff --git a/sdk/eventhub/event-hubs/test/impl/partitionGate.spec.ts b/sdk/eventhub/event-hubs/test/impl/partitionGate.spec.ts index 10ce6f4b5c9c..5c81ce25dab0 100644 --- a/sdk/eventhub/event-hubs/test/impl/partitionGate.spec.ts +++ b/sdk/eventhub/event-hubs/test/impl/partitionGate.spec.ts @@ -23,11 +23,4 @@ describe("PartitionGate", () => { should.throw(() => gate.add("all"), /Partition already has a subscriber/); should.throw(() => gate.add("0"), /Partition already has a subscriber/); }); - - it("invalid IDs get thrown out", () => { - const gate = new PartitionGate(); - - should.throw(() => gate.add("allo"), "Invalid partition number allo"); - should.throw(() => gate.add("woo"), "Invalid partition number woo"); - }); }); diff --git a/sdk/eventhub/event-hubs/test/loadBalancer.spec.ts b/sdk/eventhub/event-hubs/test/loadBalancer.spec.ts index 62b21150e3a3..25bcd01a96d5 100644 --- a/sdk/eventhub/event-hubs/test/loadBalancer.spec.ts +++ b/sdk/eventhub/event-hubs/test/loadBalancer.spec.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import { - GreedyPartitionLoadBalancer, - FairPartitionLoadBalancer + FairPartitionLoadBalancer, + GreedyPartitionLoadBalancer } from "../src/partitionLoadBalancer"; import { PartitionOwnership } from "../src/eventProcessor"; diff --git a/sdk/eventhub/event-hubs/test/misc.spec.ts b/sdk/eventhub/event-hubs/test/misc.spec.ts index 7765463590f3..19b0cd73cac6 100644 --- a/sdk/eventhub/event-hubs/test/misc.spec.ts +++ b/sdk/eventhub/event-hubs/test/misc.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import chai from "chai"; import assert from "assert"; const should = chai.should(); @@ -11,19 +11,18 @@ import debugModule from "debug"; const debug = debugModule("azure:event-hubs:misc-spec"); import { EventData, + EventHubConsumerClient, + EventHubProducerClient, EventHubProperties, ReceivedEventData, - EventHubConsumerClient, Subscription } from "../src"; -import { EventHubClient } from "../src/impl/eventHubClient"; import { EnvVarKeys, getEnvVars } from "./utils/testUtils"; import { TRACEPARENT_PROPERTY, extractSpanContextFromEventData } from "../src/diagnostics/instrumentEventData"; import { TraceFlags } from "@opentelemetry/api"; -import { EventHubConsumer } from "../src/receiver"; import { SubscriptionHandlerForTests } from "./utils/subscriptionHandlerForTests"; const env = getEnvVars(); @@ -32,9 +31,12 @@ describe("Misc tests", function(): void { connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], path: env[EnvVarKeys.EVENTHUB_NAME] }; - const client: EventHubClient = new EventHubClient(service.connectionString, service.path); - let receiver: EventHubConsumer; + let consumerClient: EventHubConsumerClient; + let producerClient: EventHubProducerClient; let hubInfo: EventHubProperties; + let partitionId: string; + let lastEnqueuedOffset: number; + before("validate environment", async function(): Promise { should.exist( env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], @@ -44,46 +46,68 @@ describe("Misc tests", function(): void { env[EnvVarKeys.EVENTHUB_NAME], "define EVENTHUB_NAME in your environment before running integration tests." ); - hubInfo = await client.getProperties(); }); - after("close the connection", async function(): Promise { - await client.close(); + beforeEach(async () => { + debug("Creating the clients.."); + producerClient = new EventHubProducerClient(service.connectionString, service.path); + consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + hubInfo = await consumerClient.getEventHubProperties(); + partitionId = hubInfo.partitionIds[0]; + lastEnqueuedOffset = (await consumerClient.getPartitionProperties(partitionId)) + .lastEnqueuedOffset; + }); + + afterEach(async () => { + debug("Closing the clients.."); + await producerClient.close(); + await consumerClient.close(); }); it("should be able to send and receive a large message correctly", async function(): Promise< void > { const bodysize = 220 * 1024; - const partitionId = hubInfo.partitionIds[0]; const msgString = "A".repeat(220 * 1024); const msgBody = Buffer.from(msgString); const obj: EventData = { body: msgBody }; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); - debug("Sending one message with %d bytes.", bodysize); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - let data = await receiver.receiveBatch(1, 1); - should.equal(data.length, 0, "Unexpected to receive message before client sends it"); - const sender = client.createProducer({ partitionId }); - await sender.send([obj]); + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); + debug("Sending one message with %d bytes.", bodysize); + await producerClient.sendBatch([obj], { partitionId }); debug("Successfully sent the large message."); - data = await receiver.receiveBatch(1, 30); - debug("Closing the receiver.."); - await receiver.close(); - debug("received message: ", data.length); - should.exist(data); - should.equal(data.length, 1); - should.equal(data[0].body.toString(), msgString); - should.not.exist((data[0].properties || {}).message_id); + + let subscription: Subscription | undefined; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + should.exist(data); + should.equal(data.length, 1); + should.equal(data[0].body.toString(), msgString); + should.not.exist((data[0].properties || {}).message_id); + resolve(); + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); }); it("should be able to send and receive a JSON object as a message correctly", async function(): Promise< void > { - const partitionId = hubInfo.partitionIds[0]; const msgBody = { id: "123-456-789", weight: 10, @@ -97,29 +121,39 @@ describe("Misc tests", function(): void { ] }; const obj: EventData = { body: msgBody }; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); debug("Sending one message %O", obj); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - const sender = client.createProducer({ partitionId }); - await sender.send([obj]); + await producerClient.sendBatch([obj], { partitionId }); debug("Successfully sent the large message."); - const data = await receiver.receiveBatch(1, 30); - await receiver.close(); - debug("received message: ", data); - should.exist(data); - should.equal(data.length, 1); - debug("Received message: %O", data); - assert.deepEqual(data[0].body, msgBody); - should.not.exist((data[0].properties || {}).message_id); + + let subscription: Subscription | undefined; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + should.exist(data); + should.equal(data.length, 1); + assert.deepEqual(data[0].body, msgBody); + should.not.exist((data[0].properties || {}).message_id); + resolve(); + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); }); it("should be able to send and receive an array as a message correctly", async function(): Promise< void > { - const partitionId = hubInfo.partitionIds[0]; const msgBody = [ { id: "098-789-564", @@ -131,133 +165,170 @@ describe("Misc tests", function(): void { "some string" ]; const obj: EventData = { body: msgBody, properties: { message_id: uuid() } }; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); debug("Sending one message %O", obj); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - const sender = client.createProducer({ partitionId }); - await sender.send([obj]); + await producerClient.sendBatch([obj], { partitionId }); debug("Successfully sent the large message."); - const data = await receiver.receiveBatch(1, 30); - await receiver.close(); - debug("received message: ", data); - should.exist(data); - should.equal(data.length, 1); - debug("Received message: %O", data); - assert.deepEqual(data[0].body, msgBody); - assert.strictEqual(data[0].properties!.message_id, obj.properties!.message_id); + + let subscription: Subscription | undefined; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + should.exist(data); + should.equal(data.length, 1); + assert.deepEqual(data[0].body, msgBody); + assert.strictEqual(data[0].properties!.message_id, obj.properties!.message_id); + resolve(); + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); }); it("should be able to send a boolean as a message correctly", async function(): Promise { - const partitionId = hubInfo.partitionIds[0]; const msgBody = true; const obj: EventData = { body: msgBody }; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); debug("Sending one message %O", obj); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - const sender = client.createProducer({ partitionId }); - await sender.send([obj]); + await producerClient.sendBatch([obj], { partitionId }); debug("Successfully sent the large message."); - const data = await receiver.receiveBatch(1, 30); - await receiver.close(); - debug("received message: ", data); - should.exist(data); - should.equal(data.length, 1); - debug("Received message: %O", data); - assert.deepEqual(data[0].body, msgBody); - should.not.exist((data[0].properties || {}).message_id); + + let subscription: Subscription | undefined; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + should.exist(data); + should.equal(data.length, 1); + assert.deepEqual(data[0].body, msgBody); + should.not.exist((data[0].properties || {}).message_id); + resolve(); + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); }); it("should be able to send and receive batched messages correctly ", async function(): Promise< void > { - try { - const partitionId = hubInfo.partitionIds[0]; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); - const messageCount = 5; - const d: EventData[] = []; - for (let i = 0; i < messageCount; i++) { - const obj: EventData = { body: `Hello EH ${i}` }; - d.push(obj); - } + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); + const messageCount = 5; + const d: EventData[] = []; + for (let i = 0; i < messageCount; i++) { + const obj: EventData = { body: `Hello EH ${i}` }; + d.push(obj); + } - const sender = client.createProducer({ partitionId }); - await sender.send(d); - debug("Successfully sent 5 messages batched together."); + await producerClient.sendBatch(d, { partitionId }); + debug("Successfully sent 5 messages batched together."); - const receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - const data = await receiver.receiveBatch(5, 30); - await receiver.close(); - debug("received message: ", data); - should.exist(data); - data.length.should.equal(5); - for (const message of data) { - should.not.exist((message.properties || {}).message_id); - } - } catch (err) { - debug("should not have happened, uber catch....", err); - throw err; + let subscription: Subscription | undefined; + const receivedMsgs: ReceivedEventData[] = []; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + receivedMsgs.push(...data); + if (receivedMsgs.length === 5) { + resolve(); + } + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); + receivedMsgs.length.should.equal(5); + for (const message of receivedMsgs) { + should.not.exist((message.properties || {}).message_id); } }); it("should be able to send and receive batched messages as JSON objects correctly ", async function(): Promise< void > { - try { - const partitionId = hubInfo.partitionIds[0]; - const offset = (await client.getPartitionProperties(partitionId)).lastEnqueuedOffset; - debug(`Partition ${partitionId} has last message with offset ${offset}.`); - const messageCount = 5; - const d: EventData[] = []; - for (let i = 0; i < messageCount; i++) { - const obj: EventData = { - body: { - id: "123-456-789", - count: i, - weight: 10, - isBlue: true, - siblings: [ - { - id: "098-789-564", - weight: 20, - isBlue: false - } - ] - }, - properties: { - message_id: uuid() - } - }; - d.push(obj); - } + debug(`Partition ${partitionId} has last message with offset ${lastEnqueuedOffset}.`); + const messageCount = 5; + const d: EventData[] = []; + for (let i = 0; i < messageCount; i++) { + const obj: EventData = { + body: { + id: "123-456-789", + count: i, + weight: 10, + isBlue: true, + siblings: [ + { + id: "098-789-564", + weight: 20, + isBlue: false + } + ] + }, + properties: { + message_id: uuid() + } + }; + d.push(obj); + } - const sender = client.createProducer({ partitionId }); - await sender.send(d); - debug("Successfully sent 5 messages batched together."); + await producerClient.sendBatch(d, { partitionId }); + debug("Successfully sent 5 messages batched together."); - const receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - offset - }); - const data = await receiver.receiveBatch(5, 30); - await receiver.close(); - debug("received message: ", data); - should.exist(data); - should.equal(data[0].body.count, 0); - should.equal(data.length, 5); - for (const [index, message] of data.entries()) { - assert.strictEqual(message.properties!.message_id, d[index].properties!.message_id); - } - } catch (err) { - debug("should not have happened, uber catch....", err); - throw err; + let subscription: Subscription | undefined; + const receivedMsgs: ReceivedEventData[] = []; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + partitionId, + { + processEvents: async (data) => { + debug("received message: ", data.length); + receivedMsgs.push(...data); + if (receivedMsgs.length === 5) { + resolve(); + } + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { offset: lastEnqueuedOffset } + } + ); + }); + await subscription!.close(); + should.equal(receivedMsgs[0].body.count, 0); + should.equal(receivedMsgs.length, 5); + for (const [index, message] of receivedMsgs.entries()) { + assert.strictEqual(message.properties!.message_id, d[index].properties!.message_id); } }); @@ -265,7 +336,7 @@ describe("Misc tests", function(): void { void > { const consumerClient = new EventHubConsumerClient( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, service.connectionString!, service.path ); @@ -286,9 +357,8 @@ describe("Misc tests", function(): void { for (let i = 0; i < msgToSendCount; i++) { const partitionKey = getRandomInt(10); - const sender = client.createProducer(); senderPromises.push( - sender.send([{ body: "Hello EventHub " + i }], { + producerClient.sendBatch([{ body: "Hello EventHub " + i }], { partitionKey: partitionKey.toString() }) ); @@ -331,73 +401,73 @@ describe("Misc tests", function(): void { await consumerClient.close(); } }); +}).timeout(60000); - describe("extractSpanContextFromEventData", function() { - it("should extract a SpanContext from a properly instrumented EventData", function() { - const traceId = "11111111111111111111111111111111"; - const spanId = "2222222222222222"; - const flags = "00"; - const eventData: ReceivedEventData = { - body: "This is a test.", - enqueuedTimeUtc: new Date(), - offset: 0, - sequenceNumber: 0, - partitionKey: null, - properties: { - [TRACEPARENT_PROPERTY]: `00-${traceId}-${spanId}-${flags}` - } - }; +describe("extractSpanContextFromEventData", function() { + it("should extract a SpanContext from a properly instrumented EventData", function() { + const traceId = "11111111111111111111111111111111"; + const spanId = "2222222222222222"; + const flags = "00"; + const eventData: ReceivedEventData = { + body: "This is a test.", + enqueuedTimeUtc: new Date(), + offset: 0, + sequenceNumber: 0, + partitionKey: null, + properties: { + [TRACEPARENT_PROPERTY]: `00-${traceId}-${spanId}-${flags}` + } + }; - const spanContext = extractSpanContextFromEventData(eventData); + const spanContext = extractSpanContextFromEventData(eventData); - should.exist(spanContext, "Extracted spanContext should be defined."); - should.equal(spanContext!.traceId, traceId, "Extracted traceId does not match expectation."); - should.equal(spanContext!.spanId, spanId, "Extracted spanId does not match expectation."); - should.equal( - spanContext!.traceFlags, - TraceFlags.NONE, - "Extracted traceFlags do not match expectations." - ); - }); + should.exist(spanContext, "Extracted spanContext should be defined."); + should.equal(spanContext!.traceId, traceId, "Extracted traceId does not match expectation."); + should.equal(spanContext!.spanId, spanId, "Extracted spanId does not match expectation."); + should.equal( + spanContext!.traceFlags, + TraceFlags.NONE, + "Extracted traceFlags do not match expectations." + ); + }); - it("should return undefined when EventData is not properly instrumented", function() { - const traceId = "11111111111111111111111111111111"; - const spanId = "2222222222222222"; - const flags = "00"; - const eventData: ReceivedEventData = { - body: "This is a test.", - enqueuedTimeUtc: new Date(), - offset: 0, - sequenceNumber: 0, - partitionKey: null, - properties: { - [TRACEPARENT_PROPERTY]: `99-${traceId}-${spanId}-${flags}` - } - }; + it("should return undefined when EventData is not properly instrumented", function() { + const traceId = "11111111111111111111111111111111"; + const spanId = "2222222222222222"; + const flags = "00"; + const eventData: ReceivedEventData = { + body: "This is a test.", + enqueuedTimeUtc: new Date(), + offset: 0, + sequenceNumber: 0, + partitionKey: null, + properties: { + [TRACEPARENT_PROPERTY]: `99-${traceId}-${spanId}-${flags}` + } + }; - const spanContext = extractSpanContextFromEventData(eventData); + const spanContext = extractSpanContextFromEventData(eventData); - should.not.exist( - spanContext, - "Invalid diagnosticId version should return undefined spanContext." - ); - }); + should.not.exist( + spanContext, + "Invalid diagnosticId version should return undefined spanContext." + ); + }); - it("should return undefined when EventData is not instrumented", function() { - const eventData: ReceivedEventData = { - body: "This is a test.", - enqueuedTimeUtc: new Date(), - offset: 0, - sequenceNumber: 0, - partitionKey: null - }; + it("should return undefined when EventData is not instrumented", function() { + const eventData: ReceivedEventData = { + body: "This is a test.", + enqueuedTimeUtc: new Date(), + offset: 0, + sequenceNumber: 0, + partitionKey: null + }; - const spanContext = extractSpanContextFromEventData(eventData); + const spanContext = extractSpanContextFromEventData(eventData); - should.not.exist( - spanContext, - `Missing property "${TRACEPARENT_PROPERTY}" should return undefined spanContext.` - ); - }); + should.not.exist( + spanContext, + `Missing property "${TRACEPARENT_PROPERTY}" should return undefined spanContext.` + ); }); -}).timeout(60000); +}); diff --git a/sdk/eventhub/event-hubs/test/node/client.spec.ts b/sdk/eventhub/event-hubs/test/node/client.spec.ts index b0360115d419..3997955f6d1a 100644 --- a/sdk/eventhub/event-hubs/test/node/client.spec.ts +++ b/sdk/eventhub/event-hubs/test/node/client.spec.ts @@ -7,15 +7,15 @@ import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); import chaiString from "chai-string"; chai.use(chaiString); -import { EventHubClient } from "../../src/impl/eventHubClient"; import { EnvVarKeys, getEnvVars } from "../utils/testUtils"; -import { EnvironmentCredential } from "@azure/identity"; +import { EnvironmentCredential, TokenCredential } from "@azure/identity"; +import { EventHubProducerClient, EventHubConsumerClient } from "../../src"; const env = getEnvVars(); -describe("Create EventHubClient using Azure Identity", function(): void { - it("creates an EventHubClient from an Azure.Identity credential", async function(): Promise< - void - > { +describe("Create clients using Azure Identity", function(): void { + let endpoint: string; + let credential: TokenCredential; + before("validate environment", function() { should.exist( env[EnvVarKeys.AZURE_CLIENT_ID], "define AZURE_CLIENT_ID in your environment before running integration tests." @@ -32,23 +32,39 @@ describe("Create EventHubClient using Azure Identity", function(): void { env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." ); - // This is of the form .servicebus.windows.net - const endpoint = (env.EVENTHUB_CONNECTION_STRING.match("Endpoint=sb://(.*)/;") || "")[1]; + endpoint = (env.EVENTHUB_CONNECTION_STRING.match("Endpoint=sb://(.*)/;") || "")[1]; + credential = new EnvironmentCredential(); + }); - const credential = new EnvironmentCredential(); - const client = new EventHubClient(endpoint, env.EVENTHUB_NAME, credential); + it("creates an EventHubProducerClient from an Azure.Identity credential", async function(): Promise< + void + > { + const client = new EventHubProducerClient(endpoint, env.EVENTHUB_NAME, credential); + should.equal(client.fullyQualifiedNamespace, endpoint); // Extra check involving actual call to the service to ensure this works - const hubInfo = await client.getProperties(); + const hubInfo = await client.getEventHubProperties(); should.equal(hubInfo.name, client.eventHubName); + await client.close(); }); - it("Verify fullyQualifiedNamespace when creating an EventHubClient from an Azure.Identity credential", function(): void { - const endpoint = "test.servicebus.windows.net"; - const credential = new EnvironmentCredential(); - const client = new EventHubClient(endpoint, "my-event-hub-name", credential); - should.equal(client.fullyQualifiedNamespace, "test.servicebus.windows.net"); + it("creates an EventHubConsumerClient from an Azure.Identity credential", async function(): Promise< + void + > { + const client = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + endpoint, + env.EVENTHUB_NAME, + credential + ); + should.equal(client.fullyQualifiedNamespace, endpoint); + + // Extra check involving actual call to the service to ensure this works + const hubInfo = await client.getEventHubProperties(); + should.equal(hubInfo.name, client.eventHubName); + + await client.close(); }); }); diff --git a/sdk/eventhub/event-hubs/test/node/disconnects.spec.ts b/sdk/eventhub/event-hubs/test/node/disconnects.spec.ts new file mode 100644 index 000000000000..6c73c86cf384 --- /dev/null +++ b/sdk/eventhub/event-hubs/test/node/disconnects.spec.ts @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import chai from "chai"; +const should = chai.should(); +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +import { EnvVarKeys, getEnvVars } from "../utils/testUtils"; +import { EventHubConsumerClient, EventHubProducerClient, Subscription } from "../../src"; +const env = getEnvVars(); + +describe("disconnected", function() { + const service = { + connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + path: env[EnvVarKeys.EVENTHUB_NAME] + }; + before("validate environment", function(): void { + should.exist( + env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + "define EVENTHUB_CONNECTION_STRING in your environment before running integration tests." + ); + should.exist( + env[EnvVarKeys.EVENTHUB_NAME], + "define EVENTHUB_NAME in your environment before running integration tests." + ); + }); + + describe("EventHubConsumerClient", function() { + it("runtimeInfo work after disconnect", async () => { + const client = new EventHubConsumerClient(EventHubConsumerClient.defaultConsumerGroupName, service.connectionString, service.path); + const clientConnectionContext = client["_eventHubClient"]["_context"]; + + await client.getPartitionIds({}); + const originalConnectionId = clientConnectionContext.connectionId; + + // Trigger a disconnect on the underlying connection. + clientConnectionContext.connection["_connection"].idle(); + + const partitionIds = await client.getPartitionIds({}); + const newConnectionId = clientConnectionContext.connectionId; + + should.not.equal(originalConnectionId, newConnectionId); + partitionIds.length.should.greaterThan(0, "Invalid number of partition ids returned."); + + await client.close(); + }); + + it("should receive after a disconnect", async () => { + const client = new EventHubConsumerClient(EventHubConsumerClient.defaultConsumerGroupName, service.connectionString, service.path); + const partitionId = "0"; + const partitionProperties = await client.getPartitionProperties(partitionId); + const clientConnectionContext = client["_eventHubClient"]["_context"]; + + let subscription: Subscription | undefined; + let originalConnectionId: string; + + await new Promise((resolve, reject) => { + subscription = client.subscribe( + partitionId, + { + processEvents: async (data) => { + should.exist(data); + should.equal(data.length, 0); + if (!originalConnectionId) { + originalConnectionId = clientConnectionContext.connectionId; + // Trigger a disconnect on the underlying connection. + clientConnectionContext.connection["_connection"].idle(); + } else { + const newConnectionId = clientConnectionContext.connectionId; + should.not.equal(originalConnectionId, newConnectionId); + resolve(); + } + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: { sequenceNumber: partitionProperties.lastEnqueuedSequenceNumber }, + maxWaitTimeInSeconds: 2 + } + ); + }); + await subscription!.close(); + await client.close(); + }); + }); + + describe("EventHubProducerClient", function() { + it("runtimeInfo work after disconnect", async () => { + const client = new EventHubProducerClient(service.connectionString, service.path); + const clientConnectionContext = client["_context"]; + + await client.getPartitionIds({}); + const originalConnectionId = clientConnectionContext.connectionId; + + // Trigger a disconnect on the underlying connection. + clientConnectionContext.connection["_connection"].idle(); + + const partitionIds = await client.getPartitionIds({}); + const newConnectionId = clientConnectionContext.connectionId; + + should.not.equal(originalConnectionId, newConnectionId); + partitionIds.length.should.greaterThan(0, "Invalid number of partition ids returned."); + + await client.close(); + }); + + it("should send after a disconnect", async () => { + const client = new EventHubProducerClient(service.connectionString, service.path); + const clientConnectionContext = client["_context"]; + + await client.sendBatch([{ body: "test" }]); + const originalConnectionId = clientConnectionContext.connectionId; + + // Trigger a disconnect on the underlying connection. + clientConnectionContext.connection["_connection"].idle(); + + await client.sendBatch([{ body: "test2" }]); + const newConnectionId = clientConnectionContext.connectionId; + + should.not.equal(originalConnectionId, newConnectionId); + + await client.close(); + }); + + it("should not throw an uncaught exception", async () => { + const client = new EventHubProducerClient(service.connectionString, service.path); + const clientConnectionContext = client["_context"]; + + // Send an event to open the connection. + await client.sendBatch([{ body: "test" }]); + const originalConnectionId = clientConnectionContext.connectionId; + + // We need to dig deep into the internals to get the awaitable sender so that . + const awaitableSender = client["_sendersMap"].get("")!["_sender"]!; + + let thirdSend: Promise; + // Change the timeout on the awaitableSender so it forces an OperationTimeoutError + awaitableSender.sendTimeoutInSeconds = 0; + // Ensure that the connection will disconnect, and another sendBatch occurs while a sendBatch is in-flight. + setTimeout(() => { + // Trigger a disconnect on the underlying connection while the `sendBatch` is in flight. + clientConnectionContext.connection["_connection"].idle(); + // Triggering another sendBatch immediately after an idle + // used to cause the rhea connection remote state to be cleared. + // This caused the in-flight sendBatch to throw an uncaught error + // if it timed out. + thirdSend = client.sendBatch([{ body: "test3" }]); + }, 0); + + await client.sendBatch([{ body: "test2" }]); + const newConnectionId = clientConnectionContext.connectionId; + + should.not.equal(originalConnectionId, newConnectionId); + + // ensure the sendBatch from the setTimeout succeeded. + // Wait for the connectionContext to be ready for opening. + await thirdSend!; + + await client.close(); + }); + }); +}); diff --git a/sdk/eventhub/event-hubs/test/partitionPump.spec.ts b/sdk/eventhub/event-hubs/test/partitionPump.spec.ts index a225e9e39865..3925bbed66aa 100644 --- a/sdk/eventhub/event-hubs/test/partitionPump.spec.ts +++ b/sdk/eventhub/event-hubs/test/partitionPump.spec.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import { createProcessingSpan, trace } from "../src/partitionPump"; -import { TestTracer, TestSpan, NoOpSpan } from "@azure/core-tracing"; -import { CanonicalCode, SpanOptions, SpanKind } from "@opentelemetry/api"; +import { NoOpSpan, TestSpan, TestTracer } from "@azure/core-tracing"; +import { CanonicalCode, SpanKind, SpanOptions } from "@opentelemetry/api"; import chai from "chai"; import { ReceivedEventData } from "../src/eventData"; import { instrumentEventData } from "../src/diagnostics/instrumentEventData"; diff --git a/sdk/eventhub/event-hubs/test/receiver.spec.ts b/sdk/eventhub/event-hubs/test/receiver.spec.ts index 4166eb5b6d37..8380fb80e992 100644 --- a/sdk/eventhub/event-hubs/test/receiver.spec.ts +++ b/sdk/eventhub/event-hubs/test/receiver.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import chai from "chai"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); @@ -13,7 +13,10 @@ import { MessagingError, ReceivedEventData, latestEventPosition, - earliestEventPosition + earliestEventPosition, + EventHubConsumerClient, + EventHubProducerClient, + Subscription } from "../src"; import { EventHubClient } from "../src/impl/eventHubClient"; import { EnvVarKeys, getEnvVars } from "./utils/testUtils"; @@ -27,7 +30,10 @@ describe("EventHub Receiver", function(): void { connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], path: env[EnvVarKeys.EVENTHUB_NAME] }; - const client: EventHubClient = new EventHubClient(service.connectionString, service.path); + const client = new EventHubClient(service.connectionString, service.path); + let producerClient: EventHubProducerClient; + let consumerClient: EventHubConsumerClient; + let receiver: EventHubConsumer | undefined; let partitionIds: string[]; before("validate environment", async function(): Promise { @@ -44,9 +50,21 @@ describe("EventHub Receiver", function(): void { after("close the connection", async function(): Promise { await client.close(); + await producerClient.close(); + }); + + beforeEach("Creating the clients", async () => { + producerClient = new EventHubProducerClient(service.connectionString, service.path); + consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); }); - afterEach("close the receiver link", async function(): Promise { + afterEach("Closing the clients", async () => { + await producerClient.close(); + await consumerClient.close(); if (receiver && !receiver.isClosed) { await receiver.close(); debug("After each - Receiver closed."); @@ -56,10 +74,26 @@ describe("EventHub Receiver", function(): void { describe("with partitionId 0 as number", function(): void { it("should not throw an error", async function(): Promise { - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, 0 as any, { - sequenceNumber: 0 + let subscription: Subscription | undefined; + await new Promise((resolve, reject) => { + subscription = consumerClient.subscribe( + // @ts-expect-error + 0, + { + processEvents: async () => { + resolve(); + }, + processError: async (err) => { + reject(err); + } + }, + { + startPosition: latestEventPosition, + maxWaitTimeInSeconds: 0 // Set timeout of 0 to resolve the promise ASAP + } + ); }); - await receiver.receiveBatch(10, 20); + await subscription!.close(); }); }); @@ -68,7 +102,7 @@ describe("EventHub Receiver", function(): void { const partitionId = partitionIds[0]; debug("Creating new receiver with offset EndOfStream"); const receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition ); @@ -81,7 +115,7 @@ describe("EventHub Receiver", function(): void { }; events.push(ed); } - await client.createProducer({ partitionId: partitionId }).send(events); + await producerClient.sendBatch(events, { partitionId: partitionId }); debug(">>>>>>> Sent the new messages. We should only receive these messages."); const data2 = await receiver.receiveBatch(10, 20); debug("received messages: ", data2); @@ -98,7 +132,7 @@ describe("EventHub Receiver", function(): void { const partitionId = partitionIds[0]; const partitionInfo = await client.getPartitionProperties(partitionId); debug("Creating a receiver with last enqueued sequence number"); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { sequenceNumber: partitionInfo.lastEnqueuedSequenceNumber }); const data = await receiver.receiveBatch(10, 10); @@ -113,7 +147,7 @@ describe("EventHub Receiver", function(): void { }; events.push(ed); } - await client.createProducer({ partitionId: partitionId }).send(events); + await producerClient.sendBatch(events, { partitionId: partitionId }); debug(">>>>>>> Sent 10 messages. We should only receive these 10 messages."); const data2 = await receiver.receiveBatch(10, 20); debug("received messages: ", data2); @@ -136,11 +170,11 @@ describe("EventHub Receiver", function(): void { stamp: uid } }; - await client.createProducer({ partitionId: partitionId }).send([ed]); + await producerClient.sendBatch([ed], { partitionId: partitionId }); debug( "Sent the new message after creating the receiver. We should only receive this message." ); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { offset: pInfo.lastEnqueuedOffset }); const data = await receiver.receiveBatch(10, 20); @@ -165,12 +199,12 @@ describe("EventHub Receiver", function(): void { stamp: uid } }; - await client.createProducer({ partitionId: partitionId }).send([ed]); + await producerClient.sendBatch([ed], { partitionId: partitionId }); debug( "Sent the new message after creating the receiver. We should only receive this message." ); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: pInfo.lastEnqueuedOnUtc }); const data = await receiver.receiveBatch(10, 20); @@ -192,14 +226,14 @@ describe("EventHub Receiver", function(): void { stamp: uid } }; - await client.createProducer({ partitionId: partitionId }).send([ed]); + await producerClient.sendBatch([ed], { partitionId: partitionId }); debug( "Sent the new message after getting the partition runtime information. We should only receive this message." ); debug( `Creating new receiver with last enqueued sequence number: "${pInfo.lastEnqueuedSequenceNumber}".` ); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { sequenceNumber: pInfo.lastEnqueuedSequenceNumber }); const data = await receiver.receiveBatch(1, 20); @@ -222,7 +256,7 @@ describe("EventHub Receiver", function(): void { stamp: uid } }; - await client.createProducer({ partitionId: partitionId }).send([ed]); + await producerClient.sendBatch([ed], { partitionId: partitionId }); debug(`Sent message 1 with stamp: ${uid}.`); const pInfo = await client.getPartitionProperties(partitionId); const uid2 = uuid(); @@ -232,12 +266,12 @@ describe("EventHub Receiver", function(): void { stamp: uid2 } }; - await client.createProducer({ partitionId: partitionId }).send([ed2]); + await producerClient.sendBatch([ed2], { partitionId: partitionId }); debug(`Sent message 2 with stamp: ${uid}.`); debug( `Creating new receiver with last sequence number: "${pInfo.lastEnqueuedSequenceNumber}".` ); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { sequenceNumber: pInfo.lastEnqueuedSequenceNumber, isInclusive: true }); @@ -256,16 +290,13 @@ describe("EventHub Receiver", function(): void { describe("in streaming mode", function(): void { it("should receive messages correctly", async function(): Promise { const partitionId = partitionIds[0]; - const time = Date.now(); + const pInfo = await client.getPartitionProperties(partitionId); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "receive behaves correctly" }); - } finally { - await sender.close(); - } - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { - enqueuedOn: time + await producerClient.sendBatch([{ body: "receive behaves correctly" }], { partitionId }); + + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { + sequenceNumber: pInfo.lastEnqueuedSequenceNumber }); const received: ReceivedEventData[] = await new Promise((resolve, reject) => { @@ -290,15 +321,11 @@ describe("EventHub Receiver", function(): void { it("should support being cancelled", async function(): Promise { const partitionId = partitionIds[0]; const time = Date.now(); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "receive cancellation - timeout 0" }); - } finally { - await sender.close(); - } + await producerClient.sendBatch([{ body: "receive cancellation - timeout 0" }], { partitionId }); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -336,15 +363,11 @@ describe("EventHub Receiver", function(): void { > { const partitionId = partitionIds[0]; const time = Date.now(); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "receive cancellation - immediate" }); - } finally { - await sender.close(); - } + await producerClient.sendBatch([{ body: "receive cancellation - immediate" }], { partitionId }); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -384,15 +407,11 @@ describe("EventHub Receiver", function(): void { > { const partitionId = partitionIds[0]; const time = Date.now(); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "receive cancellation - immediate" }); - } finally { - await sender.close(); - } + await producerClient.sendBatch([{ body: "receive cancellation - immediate" }], { partitionId }); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -456,7 +475,7 @@ describe("EventHub Receiver", function(): void { it("should receive messages correctly", async function(): Promise { const partitionId = partitionIds[0]; receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, earliestEventPosition ); @@ -468,7 +487,7 @@ describe("EventHub Receiver", function(): void { it("should receive messages correctly with maxRetries 0", async function(): Promise { const partitionId = partitionIds[0]; receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, earliestEventPosition, { retryOptions: { maxRetries: 0 } } @@ -481,15 +500,11 @@ describe("EventHub Receiver", function(): void { it("should support being cancelled", async function(): Promise { const partitionId = partitionIds[0]; const time = Date.now(); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "batchReceiver cancellation - timeout 0" }); - } finally { - await sender.close(); - } + await producerClient.sendBatch([{ body: "batchReceiver cancellation - timeout 0" }], { partitionId }); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -509,15 +524,11 @@ describe("EventHub Receiver", function(): void { > { const partitionId = partitionIds[0]; const time = Date.now(); - // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "batchReceiver cancellation - immediate" }); - } finally { - await sender.close(); - } - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + // send a message that can be received + await producerClient.sendBatch([{ body: "batchReceiver cancellation - immediate" }], { partitionId }); + + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -538,15 +549,11 @@ describe("EventHub Receiver", function(): void { > { const partitionId = partitionIds[0]; const time = Date.now(); + // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "batchReceiver cancellation - timeout 0" }); - } finally { - await sender.close(); - } + await producerClient.sendBatch([{ body: "batchReceiver cancellation - timeout 0" }], { partitionId }); - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -568,15 +575,11 @@ describe("EventHub Receiver", function(): void { > { const partitionId = partitionIds[0]; const time = Date.now(); - // send a message that can be received - const sender = client.createProducer({ partitionId }); - try { - await sender.send({ body: "batchReceiver post-cancellation - timeout 0" }); - } finally { - await sender.close(); - } - receiver = client.createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, { + // send a message that can be received + await producerClient.sendBatch([{ body: "batchReceiver post-cancellation - timeout 0" }], { partitionId }); + + receiver = client.createConsumer(EventHubConsumerClient.defaultConsumerGroupName, partitionId, { enqueuedOn: time }); @@ -600,62 +603,14 @@ describe("EventHub Receiver", function(): void { }); }); - describe("Errors when calling createConsumer", function(): void { - it("should throw an error if EventPosition is missing", function() { - try { - client.createConsumer(EventHubClient.defaultConsumerGroupName, "0", undefined as any); - throw new Error("Test failure"); - } catch (err) { - err.name.should.equal("TypeError"); - err.message.should.equal(`createConsumer called without required argument "eventPosition"`); - } - }); - - it("should throw an error if consumerGroup is missing", function() { - try { - client.createConsumer(undefined as any, "0", earliestEventPosition); - throw new Error("Test failure"); - } catch (err) { - err.name.should.equal("TypeError"); - err.message.should.equal(`createConsumer called without required argument "consumerGroup"`); - } - }); - - it("should throw MessagingEntityNotFoundError fr non existing consumer group", function(done: Mocha.Done): void { - try { - debug(">>>>>>>> client created."); - const onMessage = (data: any) => { - debug(">>>>> data: ", data); - }; - const onError = (error: any) => { - debug(">>>>>>>> error occurred", error); - // sleep for 3 seconds so that receiver link and the session can be closed properly then - // in aftereach the connection can be closed. closing the connection while the receiver - // link and it's session are being closed (and the session being removed from rhea's - // internal map) can create havoc. - setTimeout(() => { - done(should.equal(error.code, "MessagingEntityNotFoundError")); - }, 3000); - }; - receiver = client.createConsumer("some-random-name", "0", earliestEventPosition); - receiver.receive(onMessage, onError); - debug(">>>>>>>> attached the error handler on the receiver..."); - } catch (err) { - debug(">>> Some error", err); - throw new Error("This code path must not have hit.. " + JSON.stringify(err)); - } - }); - }); - describe("with trackLastEnqueuedEventProperties", function(): void { it("should have lastEnqueuedEventProperties populated", async function(): Promise { const partitionId = partitionIds[0]; - const producer = client.createProducer({ partitionId: partitionId }); for (let i = 0; i < 10; i++) { const ed: EventData = { body: "Hello awesome world " + i }; - await producer.send(ed); + await producerClient.sendBatch([ed], { partitionId }); debug("sent message - " + i); } debug("Getting the partition information"); @@ -663,7 +618,7 @@ describe("EventHub Receiver", function(): void { debug("partition info: ", pInfo); debug("Creating new receiver with offset EndOfStream"); receiver = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, earliestEventPosition, { @@ -703,7 +658,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver 1", data); }; const receiver1 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -735,7 +690,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver 2", data); }; const receiver2 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -774,7 +729,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver 1", data); }; const receiver1 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -794,7 +749,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver 2", data); }; receiver2 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -820,7 +775,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver ", data); }; const receiver1 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -851,7 +806,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> non ownerLevel Receiver", data); }; const receiver2 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition ); @@ -887,7 +842,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> non ownerLevel Receiver", data); }; receiver1 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition ); @@ -904,7 +859,7 @@ describe("EventHub Receiver", function(): void { debug(">>>> ownerLevel Receiver ", data); }; receiver2 = client.createConsumer( - EventHubClient.defaultConsumerGroupName, + EventHubConsumerClient.defaultConsumerGroupName, partitionId, latestEventPosition, { @@ -918,123 +873,48 @@ describe("EventHub Receiver", function(): void { }); describe("Negative scenarios", function(): void { - describe("on invalid partition ids like", function(): void { - const invalidIds = ["XYZ", "-1", "1000", "-"]; - invalidIds.forEach(function(id: string): void { - it(`"${id}" should throw an error`, async function(): Promise { - try { - debug("Created receiver and will be receiving messages from partition id ...", id); - const d = await client - .createConsumer(EventHubClient.defaultConsumerGroupName, id, latestEventPosition) - .receiveBatch(10, 3); - debug("received messages ", d.length); - throw new Error("Test failure"); - } catch (err) { - debug("Receiver received an error", err); - should.exist(err); - err.message.should.match( - /.*The specified partition is invalid for an EventHub partition sender or receiver.*/gi - ); - } - }); + it("should throw MessagingEntityNotFoundError for non existing consumer group", async function(): Promise< + void + > { + const badConsumerClient = new EventHubConsumerClient( + "boo", + service.connectionString, + service.path + ); + let subscription: Subscription | undefined; + const caughtErr = await new Promise((resolve) => { + subscription = badConsumerClient.subscribe( + { + processEvents: async () => {}, + processError: async (err) => { + resolve(err); + } + }, + { maxWaitTimeInSeconds: 0 } // TODO: Remove after https://github.com/Azure/azure-sdk-for-js/pull/9543 is merged + ); }); + await subscription!.close(); + await badConsumerClient.close(); - it(`" " should throw an invalid EventHub address error`, async function(): Promise { - try { - const id = " "; - debug("Created receiver and will be receiving messages from partition id ...", id); - const d = await client - .createConsumer(EventHubClient.defaultConsumerGroupName, id, latestEventPosition) - .receiveBatch(10, 3); - debug("received messages ", d.length); - throw new Error("Test failure"); - } catch (err) { - debug("Receiver received an error", err); - should.exist(err); - err.message.should.match( - /.*Invalid EventHub address. It must be either of the following.*/gi - ); - } - }); + should.exist(caughtErr); + should.equal((caughtErr as MessagingError).code, "MessagingEntityNotFoundError"); + }); - const invalidIds2 = [""]; - invalidIds2.forEach(function(id: string): void { - it(`"${id}" should throw an error`, async function(): Promise { - try { - await client - .createConsumer(EventHubClient.defaultConsumerGroupName, id, latestEventPosition) - .receiveBatch(10, 3); - throw new Error("Test failure"); - } catch (err) { - debug(`>>>> Received error - `, err); - should.exist(err); + it(`should throw an invalid EventHub address error for invalid partition`, async function(): Promise< + void + > { + let subscription: Subscription | undefined; + const caughtErr = await new Promise((resolve) => { + subscription = consumerClient.subscribe("boo", { + processEvents: async () => {}, + processError: async (err) => { + resolve(err); } }); }); - }); - - it("should receive 'QuotaExceededError' when attempting to connect more than 5 receivers to a partition in a consumer group", function(done: Mocha.Done): void { - const partitionId = partitionIds[0]; - const rcvHndlrs: ReceiveHandler[] = []; - const rcvrs: any[] = []; - - // This test does not require recieving any messages. Just attempting to connect the 6th receiver causes - // onerr2() to be called with QuotaExceededError. So it's fastest to use latestEventPosition. - // Using EventPosition.earliestEventPosition() can cause timeouts or ServiceUnavailableException if the EventHub has - // a large number of messages. - const eventPosition = latestEventPosition; - - debug(">>> Receivers length: ", rcvHndlrs.length); - for (let i = 1; i <= 5; i++) { - const rcvrId = `rcvr-${i}`; - debug(rcvrId); - const onMsg = (data: ReceivedEventData) => { - if (!rcvrs[i]) { - rcvrs[i] = rcvrId; - debug("receiver id %s", rcvrId); - } - }; - const onError = (err: MessagingError | Error) => { - debug("@@@@ Error received by receiver %s", rcvrId); - debug(err); - }; - const rcvHndlr = client - .createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, eventPosition) - .receive(onMsg, onError); - rcvHndlrs.push(rcvHndlr); - } - debug(">>> Attached message handlers to each receiver."); - setTimeout(() => { - debug(`Created 6th receiver - "rcvr-6"`); - const onmsg2 = (data: ReceivedEventData) => { - // debug(data); - }; - const onerr2 = (err: MessagingError | Error) => { - debug("@@@@ Error received by receiver rcvr-6"); - debug(err); - should.equal((err as any).code, "QuotaExceededError"); - const promises = []; - for (const rcvr of rcvHndlrs) { - promises.push(rcvr.stop()); - } - Promise.all(promises) - .then(() => { - debug("Successfully closed all the receivers.."); - done(); - }) - .catch((err) => { - debug( - "An error occurred while closing the receiver in the 'QuotaExceededError' test.", - err - ); - done(); - }); - }; - const failedRcvHandler = client - .createConsumer(EventHubClient.defaultConsumerGroupName, partitionId, eventPosition) - .receive(onmsg2, onerr2); - rcvHndlrs.push(failedRcvHandler); - }, 5000); + await subscription!.close(); + should.exist(caughtErr); + should.equal((caughtErr as MessagingError).code, "ArgumentOutOfRangeError"); }); }); }).timeout(90000); diff --git a/sdk/eventhub/event-hubs/test/sender.spec.ts b/sdk/eventhub/event-hubs/test/sender.spec.ts index 768f8fff906a..90dc0ef3785e 100644 --- a/sdk/eventhub/event-hubs/test/sender.spec.ts +++ b/sdk/eventhub/event-hubs/test/sender.spec.ts @@ -9,13 +9,12 @@ import debugModule from "debug"; const debug = debugModule("azure:event-hubs:sender-spec"); import { EventData, - EventHubProducerClient, EventHubConsumerClient, + EventHubProducerClient, + EventPosition, ReceivedEventData, - EventPosition + SendBatchOptions } from "../src"; -import { EventHubClient } from "../src/impl/eventHubClient"; -import { SendOptions, SendBatchOptions } from "../src/models/public"; import { EnvVarKeys, getEnvVars, @@ -25,7 +24,6 @@ import { import { AbortController } from "@azure/abort-controller"; import { SpanGraph, TestSpan } from "@azure/core-tracing"; import { TRACEPARENT_PROPERTY } from "../src/diagnostics/instrumentEventData"; -import { EventHubProducer } from "../src/sender"; import { SubscriptionHandlerForTests } from "./utils/subscriptionHandlerForTests"; const env = getEnvVars(); @@ -34,8 +32,9 @@ describe("EventHub Sender", function(): void { connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], path: env[EnvVarKeys.EVENTHUB_NAME] }; - const client: EventHubClient = new EventHubClient(service.connectionString, service.path); - const producerClient = new EventHubProducerClient(service.connectionString, service.path); + let producerClient: EventHubProducerClient; + let consumerClient: EventHubConsumerClient; + let startPosition: { [partitionId: string]: EventPosition }; before("validate environment", function(): void { should.exist( @@ -48,294 +47,195 @@ describe("EventHub Sender", function(): void { ); }); - after("close the connection", async function(): Promise { - debug("Closing the client.."); - await client.close(); + beforeEach(async () => { + debug("Creating the clients.."); + producerClient = new EventHubProducerClient(service.connectionString, service.path); + consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.defaultConsumerGroupName, + service.connectionString, + service.path + ); + startPosition = await getStartingPositionsForTests(consumerClient); + }); + + afterEach(async () => { + debug("Closing the clients.."); await producerClient.close(); + await consumerClient.close(); }); - describe("Single message", function(): void { - it("should be sent successfully.", async function(): Promise { - const data: EventData = { body: "Hello World 1" }; - await client.createProducer().send(data); - }); + describe("Create batch", function(): void { + describe("tryAdd", function() { + it("doesn't grow if invalid events are added", async () => { + const batch = await producerClient.createBatch({ maxSizeInBytes: 20 }); + const event = { body: Buffer.alloc(30).toString() }; - it("with partition key should be sent successfully.", async function(): Promise { - const data: EventData = { body: "Hello World 1" }; - await client.createProducer().send(data, { partitionKey: "1" }); - }); + const numToAdd = 5; + let failures = 0; + for (let i = 0; i < numToAdd; i++) { + if (!batch.tryAdd(event)) { + failures++; + } + } - it("with partition key as a number should be sent successfully.", async function(): Promise< - void - > { - const data: EventData = { body: "Hello World 1" }; - await client.createProducer().send(data, { partitionKey: 1 as any }); + failures.should.equal(5); + batch.sizeInBytes.should.equal(0); + }); }); - it("should be sent successfully to a specific partition.", async function(): Promise { - const data: EventData = { body: "Hello World 1" }; - await client.createProducer({ partitionId: "0" }).send(data); + it("partitionId is set as expected", async () => { + const batch = await producerClient.createBatch({ + partitionId: "0" + }); + should.equal(batch.partitionId, "0"); }); - it("should support being cancelled", async function(): Promise { - try { - const data: EventData = { body: "Sender single message Cancellation Test - timeout 0" }; - const sender = client.createProducer(); - // call send() once to create a connection - await sender.send(data); - // abortSignal event listeners will be triggered after synchronous paths are executed - const abortSignal = AbortController.timeout(0); - await sender.send(data, { abortSignal }); - throw new Error(`Test failure`); - } catch (err) { - err.name.should.equal("AbortError"); - err.message.should.equal("The send operation has been cancelled by the user."); - } + it("partitionId is set as expected when it is 0 i.e. falsy", async () => { + const batch = await producerClient.createBatch({ + //@ts-expect-error + partitionId: 0 + }); + should.equal(batch.partitionId, "0"); }); - it("should support being cancelled from an already aborted AbortSignal", async function(): Promise< - void - > { - const abortController = new AbortController(); - abortController.abort(); - - try { - const data: EventData = { body: "Sender single message Cancellation Test - immediate" }; - await client.createProducer().send(data, { abortSignal: abortController.signal }); - throw new Error(`Test failure`); - } catch (err) { - err.name.should.equal("AbortError"); - err.message.should.equal("The send operation has been cancelled by the user."); - } + it("partitionKey is set as expected", async () => { + const batch = await producerClient.createBatch({ + partitionKey: "boo" + }); + should.equal(batch.partitionKey, "boo"); }); - it("should throw when partitionId and partitionKey are provided", async function(): Promise< - void - > { - try { - const data: EventData = { body: "Sender paritition id and partition key" }; - await client.createProducer({ partitionId: "0" }).send(data, { partitionKey: "1" }); - throw new Error("Test Failure"); - } catch (err) { - err.message.should.equal( - "Partition key is not supported when using producers that were created using a partition id." - ); - } + it("partitionKey is set as expected when it is 0 i.e. falsy", async () => { + const batch = await producerClient.createBatch({ + //@ts-expect-error + partitionKey: 0 + }); + should.equal(batch.partitionKey, "0"); }); - it("can be manually traced", async function(): Promise { - const { tracer, resetTracer } = setTracerForTest(); - - const rootSpan = tracer.startSpan("root"); + it("maxSizeInBytes is set as expected", async () => { + const batch = await producerClient.createBatch({ maxSizeInBytes: 30 }); + should.equal(batch.maxSizeInBytes, 30); + }) - const producer = client.createProducer({ partitionId: "0" }); - - await producer.send( - { body: "single message - manual trace propagation" }, - { - tracingOptions: { - spanOptions: { - parent: rootSpan.context() - } - } - } - ); + it("should be sent successfully", async function(): Promise { + const list = ["Albert", `${Buffer.from("Mike".repeat(1300000))}`, "Marie"]; - rootSpan.end(); + const batch = await producerClient.createBatch({ + partitionId: "0" + }); - const rootSpans = tracer.getRootSpans(); - rootSpans.length.should.equal(1, "Should only have one root spans."); - rootSpans[0].should.equal(rootSpan, "The root span should match what was passed in."); + batch.partitionId!.should.equal("0"); + should.not.exist(batch.partitionKey); + batch.maxSizeInBytes.should.be.gt(0); - const expectedGraph: SpanGraph = { - roots: [ - { - name: rootSpan.name, - children: [ - { - name: "Azure.EventHubs.message", - children: [] - }, - { - name: "Azure.EventHubs.send", - children: [] - } - ] - } - ] - }; + batch.tryAdd({ body: list[0] }).should.be.ok; + batch.tryAdd({ body: list[1] }).should.not.be.ok; // The Mike message will be rejected - it's over the limit. + batch.tryAdd({ body: list[2] }).should.be.ok; // Marie should get added"; - tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); - tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); + const { + subscriptionEventHandler, + startPosition + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); - await producer.close(); - resetTracer(); - }); - }); + const subscriber = consumerClient.subscribe("0", subscriptionEventHandler, { + startPosition + }); + await producerClient.sendBatch(batch); - describe("Batch message", function(): void { - it("should be sent successfully.", async function(): Promise { - const data: EventData[] = [ - { - body: "Hello World 1" - }, - { - body: "Hello World 2" - } - ]; - await client.createProducer().send(data); - }); - it("with partition key should be sent successfully.", async function(): Promise { - const data: EventData[] = [ - { - body: "Hello World 1" - }, - { - body: "Hello World 2" - } - ]; - await client.createProducer().send(data, { partitionKey: 1 as any }); - }); - it("should be sent successfully to a specific partition.", async function(): Promise { - const data: EventData[] = [ - { - body: "Hello World 1" - }, - { - body: "Hello World 2" - } - ]; - await client.createProducer({ partitionId: "0" }).send(data); - }); + let receivedEvents; - it("should support being cancelled", async function(): Promise { try { - const data: EventData[] = [ - { - body: "Sender Cancellation Test - timeout 0" - } - ]; - const sender = client.createProducer(); - // call send() once to create a connection - await sender.send(data); - // abortSignal event listeners will be triggered after synchronous paths are executed - const abortSignal = AbortController.timeout(0); - await sender.send(data, { abortSignal }); - throw new Error(`Test failure`); - } catch (err) { - err.name.should.equal("AbortError"); - err.message.should.equal("The send operation has been cancelled by the user."); + receivedEvents = await subscriptionEventHandler.waitForEvents(["0"], 2); + } finally { + await subscriber.close(); } + + // Mike didn't make it - the message was too big for the batch + // and was rejected above. + [list[0], list[2]].should.be.deep.eq( + receivedEvents.map((event) => event.body), + "Received messages should be equal to our sent messages" + ); }); - it("should support being cancelled from an already aborted AbortSignal", async function(): Promise< + it("should be sent successfully when partitionId is 0 i.e. falsy", async function(): Promise< void > { - const abortController = new AbortController(); - abortController.abort(); + const list = ["Albert", "Marie"]; - try { - const data: EventData[] = [ - { - body: "Sender Cancellation Test - immediate" - } - ]; - await client.createProducer().send(data, { abortSignal: abortController.signal }); - throw new Error(`Test failure`); - } catch (err) { - err.name.should.equal("AbortError"); - err.message.should.equal("The send operation has been cancelled by the user."); - } - }); + const batch = await producerClient.createBatch({ + //@ts-expect-error + partitionId: 0 + }); - it("should throw when partitionId and partitionKey are provided", async function(): Promise< - void - > { - try { - const data: EventData[] = [ - { - body: "Sender paritition id and partition key" - } - ]; - await client.createProducer({ partitionId: "0" }).send(data, { partitionKey: "1" }); - throw new Error("Test Failure"); - } catch (err) { - err.message.should.equal( - "Partition key is not supported when using producers that were created using a partition id." - ); - } - }); - }); + batch.partitionId!.should.equal("0"); + should.not.exist(batch.partitionKey); + batch.maxSizeInBytes.should.be.gt(0); - describe("Create batch", function(): void { - let consumerClient: EventHubConsumerClient; + batch.tryAdd({ body: list[0] }).should.be.ok; + batch.tryAdd({ body: list[1] }).should.be.ok; - beforeEach(() => { - consumerClient = new EventHubConsumerClient( - EventHubConsumerClient.defaultConsumerGroupName, - service.connectionString, - service.path - ); - }); + const { + subscriptionEventHandler, + startPosition + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); - afterEach(() => { - consumerClient.close(); - }); + const subscriber = consumerClient.subscribe("0", subscriptionEventHandler, { + startPosition + }); + await producerClient.sendBatch(batch); - describe("tryAdd", function() { - it("doesn't grow if invalid events are added", async () => { - const batch = await producerClient.createBatch({ maxSizeInBytes: 20 }); - const event = { body: Buffer.alloc(30).toString() }; + let receivedEvents; - const numToAdd = 5; - let failures = 0; - for (let i = 0; i < numToAdd; i++) { - if (!batch.tryAdd(event)) { - failures++; - } - } + try { + receivedEvents = await subscriptionEventHandler.waitForEvents(["0"], 2); + } finally { + await subscriber.close(); + } - failures.should.equal(5); - batch.sizeInBytes.should.equal(0); - }); + list.should.be.deep.eq( + receivedEvents.map((event) => event.body), + "Received messages should be equal to our sent messages" + ); }); - it("should be sent successfully", async function(): Promise { - const list = ["Albert", `${Buffer.from("Mike".repeat(1300000))}`, "Marie"]; + it("should be sent successfully when partitionKey is 0 i.e. falsy", async function(): Promise< + void + > { + const list = ["Albert", "Marie"]; const batch = await producerClient.createBatch({ - partitionId: "0" + //@ts-expect-error + partitionKey: 0 }); - batch.partitionId!.should.equal("0"); - should.not.exist(batch.partitionKey); + batch.partitionKey!.should.equal("0"); + should.not.exist(batch.partitionId); batch.maxSizeInBytes.should.be.gt(0); batch.tryAdd({ body: list[0] }).should.be.ok; - batch.tryAdd({ body: list[1] }).should.not.be.ok; // The Mike message will be rejected - it's over the limit. - batch.tryAdd({ body: list[2] }).should.be.ok; // Marie should get added"; + batch.tryAdd({ body: list[1] }).should.be.ok; const { subscriptionEventHandler, startPosition - } = await SubscriptionHandlerForTests.startingFromHere(client); + } = await SubscriptionHandlerForTests.startingFromHere(producerClient); - const subscriber = consumerClient.subscribe("0", subscriptionEventHandler, { + const subscriber = consumerClient.subscribe(subscriptionEventHandler, { startPosition }); await producerClient.sendBatch(batch); let receivedEvents; - + const allPartitionIds = await producerClient.getPartitionIds(); try { - receivedEvents = await subscriptionEventHandler.waitForEvents(["0"], 2); + receivedEvents = await subscriptionEventHandler.waitForEvents(allPartitionIds, 2); } finally { await subscriber.close(); } - // Mike didn't make it - the message was too big for the batch - // and was rejected above. - [list[0], list[2]].should.be.deep.eq( + list.should.be.deep.eq( receivedEvents.map((event) => event.body), "Received messages should be equal to our sent messages" ); @@ -561,10 +461,6 @@ describe("EventHub Sender", function(): void { }); it("with max message size should be sent successfully.", async function(): Promise { - const partitionInfo = await client.getPartitionProperties("0"); - const consumer = client.createConsumer(EventHubClient.defaultConsumerGroupName, "0", { - sequenceNumber: partitionInfo.lastEnqueuedSequenceNumber - }); const eventDataBatch = await producerClient.createBatch({ maxSizeInBytes: 5000, partitionId: "0" @@ -578,38 +474,15 @@ describe("EventHub Sender", function(): void { } } await producerClient.sendBatch(eventDataBatch); - const data = await consumer.receiveBatch(3, 5); - data.length.should.equal(1); - message.body.should.equal(data[0].body); - await consumer.close(); + eventDataBatch.count.should.equal(1); }); - it("should throw when maxMessageSize is greater than maximum message size on the AMQP sender link", async function(): Promise< - void - > { - const newClient: EventHubProducerClient = new EventHubProducerClient( - service.connectionString, - service.path - ); - + // TODO: Enable this test https://github.com/Azure/azure-sdk-for-js/issues/9202 is fixed + it.skip("should support being cancelled", async function(): Promise { try { - await newClient.createBatch({ maxSizeInBytes: 2046528 }); - throw new Error("Test Failure"); - } catch (err) { - err.message.should.match( - /.*Max message size \((\d+) bytes\) is greater than maximum message size \((\d+) bytes\) on the AMQP sender link.*/gi - ); - } finally { - await newClient.close(); - } - }); - - it("should support being cancelled", async function(): Promise { - try { - const producer = client.createProducer(); // abortSignal event listeners will be triggered after synchronous paths are executed const abortSignal = AbortController.timeout(0); - await producer.createBatch({ abortSignal: abortSignal }); + await producerClient.createBatch({ abortSignal: abortSignal }); throw new Error(`Test failure`); } catch (err) { err.name.should.equal("AbortError"); @@ -623,8 +496,7 @@ describe("EventHub Sender", function(): void { const abortController = new AbortController(); abortController.abort(); try { - const producer = client.createProducer(); - await producer.createBatch({ abortSignal: abortController.signal }); + await producerClient.createBatch({ abortSignal: abortController.signal }); throw new Error(`Test failure`); } catch (err) { err.name.should.equal("AbortError"); @@ -633,69 +505,16 @@ describe("EventHub Sender", function(): void { }); }); - describe("multiple producers", function(): void { - let consumerClient: EventHubConsumerClient; - - beforeEach(() => { - consumerClient = new EventHubConsumerClient( - EventHubConsumerClient.defaultConsumerGroupName, - service.connectionString, - service.path - ); - }); - - afterEach(() => { - consumerClient.close(); - }); - - it("should be isolated on same partitionId", async function(): Promise { - const producers: EventHubProducer[] = []; - - // create multiple producers with the same partition id - for (let i = 0; i < 5; i++) { - producers.push(client.createProducer({ partitionId: "0" })); - } - - // ensure all producers can send a message - for (const producer of producers) { - await producer.send({ body: "foo" }); - } - - do { - // close one of the producers and send messages with remaining senders - // also closes all of the senders by the end of the test! - await producers.pop()!.close(); - for (const producer of producers) { - await producer.send({ body: "bar" }); - } - } while (producers.length); - }); - }); - - describe("Multiple messages", function(): void { - let consumerClient: EventHubConsumerClient; - - beforeEach(() => { - consumerClient = new EventHubConsumerClient( - EventHubConsumerClient.defaultConsumerGroupName, - service.connectionString, - service.path - ); - }); - - afterEach(() => { - consumerClient.close(); - }); - + describe("Multiple sendBatch calls", function(): void { it("should be sent successfully in parallel", async function(): Promise { const { subscriptionEventHandler, startPosition - } = await SubscriptionHandlerForTests.startingFromHere(client); + } = await SubscriptionHandlerForTests.startingFromHere(consumerClient); const promises = []; for (let i = 0; i < 5; i++) { - promises.push(sendBatch([`Hello World ${i}`])); + promises.push(producerClient.sendBatch([{ body: `Hello World ${i}` }])); } await Promise.all(promises); @@ -705,7 +524,7 @@ describe("EventHub Sender", function(): void { try { const events = await subscriptionEventHandler.waitForEvents( - await client.getPartitionIds({}), + await consumerClient.getPartitionIds({}), 5 ); @@ -733,7 +552,7 @@ describe("EventHub Sender", function(): void { try { const promises = []; for (let i = 0; i < senderCount; i++) { - promises.push(sendBatch([`Hello World ${i}`])); + promises.push(producerClient.sendBatch([{ body: `Hello World ${i}` }])); } await Promise.all(promises); } catch (err) { @@ -742,7 +561,7 @@ describe("EventHub Sender", function(): void { } }); - it("should be sent successfully in parallel by multiple senders", async function(): Promise< + it("should be sent successfully in parallel by multiple clients", async function(): Promise< void > { const senderCount = 3; @@ -751,13 +570,17 @@ describe("EventHub Sender", function(): void { for (let i = 0; i < senderCount; i++) { if (i === 0) { debug(">>>>> Sending a message to partition %d", i); - promises.push(await sendBatch([`Hello World ${i}`], "0")); + promises.push( + await producerClient.sendBatch([{ body: `Hello World ${i}` }], { partitionId: "0" }) + ); } else if (i === 1) { debug(">>>>> Sending a message to partition %d", i); - promises.push(await sendBatch([`Hello World ${i}`], "1")); + promises.push( + await producerClient.sendBatch([{ body: `Hello World ${i}` }], { partitionId: "1" }) + ); } else { debug(">>>>> Sending a message to the hub when i == %d", i); - promises.push(await sendBatch([`Hello World ${i}`])); + promises.push(await producerClient.sendBatch([{ body: `Hello World ${i}` }])); } } await Promise.all(promises); @@ -775,7 +598,7 @@ describe("EventHub Sender", function(): void { }; try { debug("Sending a message of 300KB..."); - await client.createProducer({ partitionId: "0" }).send([data]); + await producerClient.sendBatch([data], { partitionId: "0" }); throw new Error("Test failure"); } catch (err) { debug(err); @@ -785,7 +608,7 @@ describe("EventHub Sender", function(): void { /.*The received message \(delivery-id:(\d+), size:(\d+) bytes\) exceeds the limit \((\d+) bytes\) currently allowed on the link\..*/gi ); } - await client.createProducer({ partitionId: "0" }).send([{ body: "Hello World EventHub!!" }]); + await producerClient.sendBatch([{ body: "Hello World EventHub!!" }], { partitionId: "0" }); debug("Sent the message successfully on the same link.."); }); @@ -794,13 +617,12 @@ describe("EventHub Sender", function(): void { const rootSpan = tracer.startSpan("root"); - const producer = client.createProducer({ partitionId: "0" }); - const events = []; for (let i = 0; i < 5; i++) { events.push({ body: `multiple messages - manual trace propgation: ${i}` }); } - await producer.send(events, { + await producerClient.sendBatch(events, { + partitionId: "0", tracingOptions: { spanOptions: { parent: rootSpan.context() @@ -850,7 +672,6 @@ describe("EventHub Sender", function(): void { tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); - await producer.close(); resetTracer(); }); @@ -859,14 +680,13 @@ describe("EventHub Sender", function(): void { const rootSpan = tracer.startSpan("root"); - const producer = client.createProducer({ partitionId: "0" }); - const events: EventData[] = []; for (let i = 0; i < 5; i++) { events.push({ body: `multiple messages - manual trace propgation: ${i}` }); } events[0].properties = { [TRACEPARENT_PROPERTY]: "foo" }; - await producer.send(events, { + await producerClient.sendBatch(events, { + partitionId: "0", tracingOptions: { spanOptions: { parent: rootSpan.context() @@ -912,29 +732,11 @@ describe("EventHub Sender", function(): void { tracer.getSpanGraph(rootSpan.context().traceId).should.eql(expectedGraph); tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); - await producer.close(); resetTracer(); }); }); describe("Array of events", function() { - let consumerClient: EventHubConsumerClient; - let startPosition: { [partitionId: string]: EventPosition }; - - beforeEach(async () => { - consumerClient = new EventHubConsumerClient( - EventHubConsumerClient.defaultConsumerGroupName, - service.connectionString, - service.path - ); - - startPosition = await getStartingPositionsForTests(consumerClient); - }); - - afterEach(() => { - return consumerClient.close(); - }); - it("should be sent successfully", async () => { const data: EventData[] = [{ body: "Hello World 1" }, { body: "Hello World 2" }]; const receivedEvents: ReceivedEventData[] = []; @@ -1156,135 +958,278 @@ describe("EventHub Sender", function(): void { tracer.getActiveSpans().length.should.equal(0, "All spans should have had end called."); resetTracer(); }); - }); - describe("Validation", function() { - describe("sendBatch", function() { - describe("with EventDataBatch", function() { - it("works if partitionKeys match", async () => { - const misconfiguredOptions: SendBatchOptions = { - partitionKey: "foo" - }; - const batch = await producerClient.createBatch({ partitionKey: "foo" }); - await producerClient.sendBatch(batch, misconfiguredOptions); - }); - it("works if partitionIds match", async () => { - const misconfiguredOptions: SendBatchOptions = { - partitionId: "0" - }; - const batch = await producerClient.createBatch({ partitionId: "0" }); - await producerClient.sendBatch(batch, misconfiguredOptions); - }); - it("throws an error if partitionKeys don't match", async () => { - const badOptions: SendBatchOptions = { - partitionKey: "bar" - }; - const batch = await producerClient.createBatch({ partitionKey: "foo" }); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.equal( - "The partitionKey (bar) set on sendBatch does not match the partitionKey (foo) set when creating the batch." - ); - } - }); - it("throws an error if partitionKeys don't match (undefined)", async () => { - const badOptions: SendBatchOptions = { - partitionKey: "bar" - }; - const batch = await producerClient.createBatch(); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.equal( - "The partitionKey (bar) set on sendBatch does not match the partitionKey (undefined) set when creating the batch." - ); - } - }); - it("throws an error if partitionIds don't match", async () => { - const badOptions: SendBatchOptions = { - partitionId: "0" - }; - const batch = await producerClient.createBatch({ partitionId: "1" }); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.equal( - "The partitionId (0) set on sendBatch does not match the partitionId (1) set when creating the batch." - ); - } - }); - it("throws an error if partitionIds don't match (undefined)", async () => { - const badOptions: SendBatchOptions = { - partitionId: "0" - }; - const batch = await producerClient.createBatch(); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.equal( - "The partitionId (0) set on sendBatch does not match the partitionId (undefined) set when creating the batch." - ); - } - }); - it("throws an error if partitionId and partitionKey are set (create, send)", async () => { - const badOptions: SendBatchOptions = { - partitionKey: "foo" - }; - const batch = await producerClient.createBatch({ partitionId: "0" }); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.not.equal("Test failure"); + it("should support being cancelled", async function(): Promise { + try { + const data: EventData[] = [ + { + body: "Sender Cancellation Test - timeout 0" } - }); - it("throws an error if partitionId and partitionKey are set (send, create)", async () => { - const badOptions: SendBatchOptions = { - partitionId: "0" - }; - const batch = await producerClient.createBatch({ partitionKey: "foo" }); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.not.equal("Test failure"); + ]; + // call send() once to create a connection + await producerClient.sendBatch(data); + // abortSignal event listeners will be triggered after synchronous paths are executed + const abortSignal = AbortController.timeout(0); + await producerClient.sendBatch(data, { abortSignal }); + throw new Error(`Test failure`); + } catch (err) { + err.name.should.equal("AbortError"); + err.message.should.equal("The send operation has been cancelled by the user."); + } + }); + + it("should support being cancelled from an already aborted AbortSignal", async function(): Promise< + void + > { + const abortController = new AbortController(); + abortController.abort(); + + try { + const data: EventData[] = [ + { + body: "Sender Cancellation Test - immediate" } - }); - it("throws an error if partitionId and partitionKey are set (send, send)", async () => { - const badOptions: SendBatchOptions = { - partitionKey: "foo", - partitionId: "0" - }; - const batch = await producerClient.createBatch(); - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.not.equal("Test failure"); + ]; + await producerClient.sendBatch(data, { abortSignal: abortController.signal }); + throw new Error(`Test failure`); + } catch (err) { + err.name.should.equal("AbortError"); + err.message.should.equal("The send operation has been cancelled by the user."); + } + }); + + it("should throw when partitionId and partitionKey are provided", async function(): Promise< + void + > { + try { + const data: EventData[] = [ + { + body: "Sender paritition id and partition key" } - }); + ]; + await producerClient.sendBatch(data, { partitionKey: "1", partitionId: "0" }); + throw new Error("Test Failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) and partitionKey (1) cannot both be specified." + ); + } + }); + }); + + describe("Validation", function() { + describe("createBatch", function() { + it("throws an error if partitionId and partitionKey are set", async () => { + try { + await producerClient.createBatch({ partitionId: "0", partitionKey: "boo" }); + throw new Error("Test failure"); + } catch (error) { + error.message.should.equal( + "partitionId and partitionKey cannot both be set when creating a batch" + ); + } }); - describe("with events array", function() { - it("throws an error if partitionId and partitionKey are set", async () => { - const badOptions: SendBatchOptions = { - partitionKey: "foo", - partitionId: "0" - }; - const batch = [{ body: "Hello 1" }, { body: "Hello 2" }]; - try { - await producerClient.sendBatch(batch, badOptions); - throw new Error("Test failure"); - } catch (err) { - err.message.should.equal( - "The partitionId (0) and partitionKey (foo) cannot both be specified." - ); - } - }); + + it("throws an error if partitionId and partitionKey are set and partitionId is 0 i.e. falsy", async () => { + try { + await producerClient.createBatch({ + //@ts-expect-error + partitionId: 0, + partitionKey: "boo" + }); + throw new Error("Test failure"); + } catch (error) { + error.message.should.equal( + "partitionId and partitionKey cannot both be set when creating a batch" + ); + } + }); + + it("throws an error if partitionId and partitionKey are set and partitionKey is 0 i.e. falsy", async () => { + try { + await producerClient.createBatch({ + partitionId: "1", + //@ts-expect-error + partitionKey: 0 + }); + throw new Error("Test failure"); + } catch (error) { + error.message.should.equal( + "partitionId and partitionKey cannot both be set when creating a batch" + ); + } + }); + + it("should throw when maxMessageSize is greater than maximum message size on the AMQP sender link", async function(): Promise< + void + > { + try { + await producerClient.createBatch({ maxSizeInBytes: 2046528 }); + throw new Error("Test Failure"); + } catch (err) { + err.message.should.match( + /.*Max message size \((\d+) bytes\) is greater than maximum message size \((\d+) bytes\) on the AMQP sender link.*/gi + ); + } + }); + }); + describe("sendBatch with EventDataBatch", function() { + it("works if partitionKeys match", async () => { + const misconfiguredOptions: SendBatchOptions = { + partitionKey: "foo" + }; + const batch = await producerClient.createBatch({ partitionKey: "foo" }); + await producerClient.sendBatch(batch, misconfiguredOptions); + }); + it("works if partitionIds match", async () => { + const misconfiguredOptions: SendBatchOptions = { + partitionId: "0" + }; + const batch = await producerClient.createBatch({ partitionId: "0" }); + await producerClient.sendBatch(batch, misconfiguredOptions); + }); + it("throws an error if partitionKeys don't match", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "bar" + }; + const batch = await producerClient.createBatch({ partitionKey: "foo" }); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionKey (bar) set on sendBatch does not match the partitionKey (foo) set when creating the batch." + ); + } + }); + it("throws an error if partitionKeys don't match (undefined)", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "bar" + }; + const batch = await producerClient.createBatch(); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionKey (bar) set on sendBatch does not match the partitionKey (undefined) set when creating the batch." + ); + } + }); + it("throws an error if partitionIds don't match", async () => { + const badOptions: SendBatchOptions = { + partitionId: "0" + }; + const batch = await producerClient.createBatch({ partitionId: "1" }); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) set on sendBatch does not match the partitionId (1) set when creating the batch." + ); + } + }); + it("throws an error if partitionIds don't match (undefined)", async () => { + const badOptions: SendBatchOptions = { + partitionId: "0" + }; + const batch = await producerClient.createBatch(); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) set on sendBatch does not match the partitionId (undefined) set when creating the batch." + ); + } + }); + it("throws an error if partitionId and partitionKey are set (create, send)", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "foo" + }; + const batch = await producerClient.createBatch({ partitionId: "0" }); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.not.equal("Test failure"); + } + }); + it("throws an error if partitionId and partitionKey are set (send, create)", async () => { + const badOptions: SendBatchOptions = { + partitionId: "0" + }; + const batch = await producerClient.createBatch({ partitionKey: "foo" }); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.not.equal("Test failure"); + } + }); + it("throws an error if partitionId and partitionKey are set (send, send)", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "foo", + partitionId: "0" + }; + const batch = await producerClient.createBatch(); + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.not.equal("Test failure"); + } + }); + }); + + describe("sendBatch with EventDataBatch with events array", function() { + it("throws an error if partitionId and partitionKey are set", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "foo", + partitionId: "0" + }; + const batch = [{ body: "Hello 1" }, { body: "Hello 2" }]; + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) and partitionKey (foo) cannot both be specified." + ); + } + }); + it("throws an error if partitionId and partitionKey are set with partitionId set to 0 i.e. falsy", async () => { + const badOptions: SendBatchOptions = { + partitionKey: "foo", + //@ts-expect-error + partitionId: 0 + }; + const batch = [{ body: "Hello 1" }, { body: "Hello 2" }]; + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) and partitionKey (foo) cannot both be specified." + ); + } + }); + it("throws an error if partitionId and partitionKey are set with partitionKey set to 0 i.e. falsy", async () => { + const badOptions: SendBatchOptions = { + //@ts-expect-error + partitionKey: 0, + partitionId: "0" + }; + const batch = [{ body: "Hello 1" }, { body: "Hello 2" }]; + try { + await producerClient.sendBatch(batch, badOptions); + throw new Error("Test failure"); + } catch (err) { + err.message.should.equal( + "The partitionId (0) and partitionKey (0) cannot both be specified." + ); + } }); }); }); @@ -1295,7 +1240,7 @@ describe("EventHub Sender", function(): void { body: Buffer.from("Z".repeat(1300000)) }; try { - await client.createProducer().send([data]); + await producerClient.sendBatch([data]); throw new Error("Test failure"); } catch (err) { debug(err); @@ -1314,9 +1259,9 @@ describe("EventHub Sender", function(): void { it(`"${id}" should throw an error`, async function(): Promise { try { debug("Created sender and will be sending a message to partition id ...", id); - await client - .createProducer({ partitionId: id as any }) - .send([{ body: "Hello world!" }]); + await producerClient.sendBatch([{ body: "Hello world!" }], { + partitionId: id as any + }); debug("sent the message."); throw new Error("Test failure"); } catch (err) { @@ -1328,60 +1273,6 @@ describe("EventHub Sender", function(): void { } }); }); - - const invalidIds2 = ["", " "]; - invalidIds2.forEach(function(id: string): void { - it(`"${id}" should throw an invalid EventHub address error`, async function(): Promise { - try { - debug("Created sender and will be sending a message to partition id ...", id); - await client - .createProducer({ partitionId: id as any }) - .send([{ body: "Hello world!" }]); - debug("sent the message."); - throw new Error("Test failure"); - } catch (err) { - debug(`>>>> Received invalid EventHub address error for partition id "${id}" - `, err); - should.exist(err); - err.message.should.match( - /.*Invalid EventHub address. It must be either of the following.*/gi - ); - } - }); - }); }); }); - - async function sendBatch( - bodies: any[], - partitionId: string, - options?: SendOptions - ): Promise; - async function sendBatch(bodies: any[], options?: SendOptions): Promise; - async function sendBatch( - bodies1: any[], - partitionIdOrOptions2: string | SendOptions | undefined, - options3?: SendOptions - ): Promise { - let sendOptions: SendOptions | undefined = options3; - - let partitionId: string | undefined = undefined; - - if (typeof partitionIdOrOptions2 !== "string") { - sendOptions = partitionIdOrOptions2 as SendOptions; - } else { - partitionId = partitionIdOrOptions2; - sendOptions = options3; - } - - const batch = await producerClient.createBatch({ - abortSignal: sendOptions && sendOptions.abortSignal, - partitionId: partitionId - }); - - for (const body of bodies1) { - batch.tryAdd({ body }).should.be.ok; - } - - await producerClient.sendBatch(batch, sendOptions); - } }).timeout(20000); diff --git a/sdk/eventhub/event-hubs/test/utils/fakeSubscriptionEventHandlers.ts b/sdk/eventhub/event-hubs/test/utils/fakeSubscriptionEventHandlers.ts index 3d8dc647f446..fe486579be14 100644 --- a/sdk/eventhub/event-hubs/test/utils/fakeSubscriptionEventHandlers.ts +++ b/sdk/eventhub/event-hubs/test/utils/fakeSubscriptionEventHandlers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { SubscriptionEventHandlers, ReceivedEventData, PartitionContext } from "../../src"; +import { PartitionContext, ReceivedEventData, SubscriptionEventHandlers } from "../../src"; export class FakeSubscriptionEventHandlers implements SubscriptionEventHandlers { public events: Map = new Map(); @@ -20,7 +20,7 @@ export class FakeSubscriptionEventHandlers implements SubscriptionEventHandlers } } - async processError(err: Error, context: PartitionContext) { + async processError(err: Error) { this.errors.push(err); } } diff --git a/sdk/eventhub/event-hubs/test/utils/receivedMessagesTester.ts b/sdk/eventhub/event-hubs/test/utils/receivedMessagesTester.ts index 2fb106c6f163..0604dbcc4a5c 100644 --- a/sdk/eventhub/event-hubs/test/utils/receivedMessagesTester.ts +++ b/sdk/eventhub/event-hubs/test/utils/receivedMessagesTester.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { CloseReason, ReceivedEventData, EventHubProducerClient } from "../../src/"; +import { CloseReason, EventHubProducerClient, ReceivedEventData } from "../../src/"; import { - SubscriptionEventHandlers, - PartitionContext + PartitionContext, + SubscriptionEventHandlers } from "../../src/eventHubConsumerClientModels"; import chai from "chai"; import { delay } from "@azure/core-amqp"; diff --git a/sdk/eventhub/event-hubs/test/utils/subscriptionHandlerForTests.ts b/sdk/eventhub/event-hubs/test/utils/subscriptionHandlerForTests.ts index 5f92e5f0626b..61d1a93401b8 100644 --- a/sdk/eventhub/event-hubs/test/utils/subscriptionHandlerForTests.ts +++ b/sdk/eventhub/event-hubs/test/utils/subscriptionHandlerForTests.ts @@ -1,18 +1,21 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { delay } from "@azure/core-amqp"; +import chai from "chai"; +import { + CloseReason, + EventHubConsumerClient, + EventHubProducerClient, + EventPosition, + ReceivedEventData +} from "../../src"; import { - SubscriptionEventHandlers, - PartitionContext + PartitionContext, + SubscriptionEventHandlers } from "../../src/eventHubConsumerClientModels"; -import { EventHubConsumerClient } from "../../src/eventHubConsumerClient"; -import { EventHubProducerClient } from "../../src/eventHubProducerClient"; -import { EventHubClient } from "../../src/impl/eventHubClient"; -import { CloseReason, EventPosition, ReceivedEventData } from "../../src"; import { loggerForTest } from "./logHelpers"; import { loopUntil } from "./testUtils"; -import { delay } from "@azure/core-amqp"; -import chai from "chai"; const should = chai.should(); export interface HandlerAndPositions { @@ -25,7 +28,7 @@ export class SubscriptionHandlerForTests implements Required { const partitionIds = await client.getPartitionIds({}); const startPosition: { [partitionId: string]: EventPosition } = {}; @@ -173,16 +176,14 @@ export class SubscriptionHandlerForTests implements Required { const expectedMessagePrefix = "EventProcessor test - multiple partitions - "; const sentMessages = []; for (const partitionId of partitionIds) { - const producer = client.createProducer({ partitionId }); const body = expectedMessagePrefix + partitionId; - await producer.send({ body }); - await producer.close(); + await producerClient.sendBatch([{ body }], { partitionId }); sentMessages.push({ body, partitionId diff --git a/sdk/eventhub/event-hubs/test/utils/testUtils.ts b/sdk/eventhub/event-hubs/test/utils/testUtils.ts index b9343796aec4..cf30d8c8aa55 100644 --- a/sdk/eventhub/event-hubs/test/utils/testUtils.ts +++ b/sdk/eventhub/event-hubs/test/utils/testUtils.ts @@ -7,7 +7,7 @@ import { delay } from "@azure/core-amqp"; import { EventHubConsumerClient } from "../../src/eventHubConsumerClient"; import { EventHubProducerClient } from "../../src/eventHubProducerClient"; import { EventPosition } from "../../src/eventPosition"; -import { setTracer, TestTracer, NoOpTracer } from "@azure/core-tracing"; +import { NoOpTracer, TestTracer, setTracer } from "@azure/core-tracing"; dotenv.config(); diff --git a/sdk/eventhub/event-hubs/tests.yml b/sdk/eventhub/event-hubs/tests.yml index d83fa05446d8..80b16bfc6915 100644 --- a/sdk/eventhub/event-hubs/tests.yml +++ b/sdk/eventhub/event-hubs/tests.yml @@ -1,22 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/event-hubs" - ResourceServiceDirectory: eventhub - TestSamples: false - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/event-hubs" + ResourceServiceDirectory: eventhub + TestSamples: false + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) diff --git a/sdk/eventhub/event-hubs/tsconfig.json b/sdk/eventhub/event-hubs/tsconfig.json index 654c911f3f12..efaf33325bf0 100644 --- a/sdk/eventhub/event-hubs/tsconfig.json +++ b/sdk/eventhub/event-hubs/tsconfig.json @@ -1,40 +1,10 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - /* Basic Options */ - "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - - "declaration": true /* Generates corresponding '.d.ts' file. */, - "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, - "sourceMap": true /* Generates corresponding '.map' file. */, - "inlineSources": true, - - "outDir": "./dist-esm" /* Redirect output structure to the directory. */, - "declarationDir": "./types" /* Output directory for generated declaration files.*/, - - "importHelpers": true /* Import emit helpers from 'tslib'. */, - - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - - /* Additional Checks */ - "noUnusedLocals": true /* Report errors on unused locals. */, - - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - - /* Experimental Options */ - "forceConsistentCasingInFileNames": true, - - /* Other options */ - "newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, - "allowJs": false /* Don't allow JavaScript files to be compiled.*/, - "resolveJsonModule": true + "declarationDir": "./types", + "outDir": "./dist-esm", + "downlevelIteration": true }, - "compileOnSave": true, - "exclude": ["node_modules", "types/**", "./samples/**/*.ts"], + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/eventhub/event-processor-host/package.json b/sdk/eventhub/event-processor-host/package.json index ac3b64779c25..ea57f904789c 100644 --- a/sdk/eventhub/event-processor-host/package.json +++ b/sdk/eventhub/event-processor-host/package.json @@ -72,8 +72,8 @@ "azure-storage": "^2.10.2", "debug": "^4.1.1", "path-browserify": "^1.0.0", - "tslib": "^1.10.0", - "uuid": "^3.3.2" + "tslib": "^2.0.0", + "uuid": "^8.1.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^2.0.1", @@ -81,7 +81,7 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/async-lock": "^1.1.0", "@types/chai": "^4.1.6", @@ -90,14 +90,14 @@ "@types/debug": "^4.1.4", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/uuid": "^3.4.3", - "@types/ws": "^6.0.1", + "@types/uuid": "^8.0.0", + "@types/ws": "^7.2.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-string": "^1.5.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -105,7 +105,7 @@ "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", "esm": "^3.2.18", - "https-proxy-agent": "^3.0.1", + "https-proxy-agent": "^5.0.0", "mocha": "^7.1.1", "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", @@ -115,7 +115,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-uglify": "^6.0.0", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "ws": "^7.1.1" } } diff --git a/sdk/eventhub/event-processor-host/src/azureStorageCheckpointLeaseManager.ts b/sdk/eventhub/event-processor-host/src/azureStorageCheckpointLeaseManager.ts index 1b6589218252..0506cd495bf8 100644 --- a/sdk/eventhub/event-processor-host/src/azureStorageCheckpointLeaseManager.ts +++ b/sdk/eventhub/event-processor-host/src/azureStorageCheckpointLeaseManager.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { CheckpointInfo } from "./checkpointInfo"; import { CheckpointManager } from "./checkpointManager"; import { LeaseManager } from "./leaseManager"; diff --git a/sdk/eventhub/event-processor-host/src/blobService.ts b/sdk/eventhub/event-processor-host/src/blobService.ts index 6ac3b1eb0b16..f272af9cbca1 100644 --- a/sdk/eventhub/event-processor-host/src/blobService.ts +++ b/sdk/eventhub/event-processor-host/src/blobService.ts @@ -407,32 +407,27 @@ export class BlobService { partitionId, blobPath ); - this._storageBlobService.getBlobToText( - containerName, - blobPath, - options, - (error, text, result) => { - if (error) { - log.error( - "[%s] [%s] An error occurred while getting content from blobPath '%s': %O.", - this._hostName, - partitionId, - blobPath, - getStorageError(error) - ); - reject(error); - } else { - log.blobService( - "[%s] [%s] Successfully, fetched blob content '%s' for blobPath '%s'.", - this._hostName, - partitionId, - text, - blobPath - ); - resolve(text); - } + this._storageBlobService.getBlobToText(containerName, blobPath, options, (error, text) => { + if (error) { + log.error( + "[%s] [%s] An error occurred while getting content from blobPath '%s': %O.", + this._hostName, + partitionId, + blobPath, + getStorageError(error) + ); + reject(error); + } else { + log.blobService( + "[%s] [%s] Successfully, fetched blob content '%s' for blobPath '%s'.", + this._hostName, + partitionId, + text, + blobPath + ); + resolve(text); } - ); + }); }); } diff --git a/sdk/eventhub/event-processor-host/src/eventProcessorHost.ts b/sdk/eventhub/event-processor-host/src/eventProcessorHost.ts index 64f59adb64a6..3af48bf2f339 100644 --- a/sdk/eventhub/event-processor-host/src/eventProcessorHost.ts +++ b/sdk/eventhub/event-processor-host/src/eventProcessorHost.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { TokenProvider, EventHubRuntimeInformation, diff --git a/sdk/eventhub/event-processor-host/src/hostContext.ts b/sdk/eventhub/event-processor-host/src/hostContext.ts index 799ffb0c523e..1e634054a3e1 100644 --- a/sdk/eventhub/event-processor-host/src/hostContext.ts +++ b/sdk/eventhub/event-processor-host/src/hostContext.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import os from "os"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import { EventHubClient, EventPosition, diff --git a/sdk/eventhub/event-processor-host/test/eph.spec.ts b/sdk/eventhub/event-processor-host/test/eph.spec.ts index 25025fe6ec83..88eec21df207 100644 --- a/sdk/eventhub/event-processor-host/test/eph.spec.ts +++ b/sdk/eventhub/event-processor-host/test/eph.spec.ts @@ -3,7 +3,7 @@ import chai from "chai"; import os from "os"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); import chaiString from "chai-string"; diff --git a/sdk/eventhub/event-processor-host/test/iothub.spec.ts b/sdk/eventhub/event-processor-host/test/iothub.spec.ts index 6e941efcfa68..7df35fab23ee 100644 --- a/sdk/eventhub/event-processor-host/test/iothub.spec.ts +++ b/sdk/eventhub/event-processor-host/test/iothub.spec.ts @@ -48,7 +48,7 @@ describe("EPH with iothub connection string", function(): void { const onMessage: OnReceivedMessage = (context: PartitionContext, data: EventData) => { debug(">>> [%s] Rx message from '%s': '%O'", hostName, context.partitionId, data); }; - const onError: OnReceivedError = err => { + const onError: OnReceivedError = (err) => { debug("An error occurred while receiving the message: %O", err); throw err; }; @@ -68,7 +68,7 @@ describe("EPH with iothub connection string", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); diff --git a/sdk/eventhub/event-processor-host/test/negative.spec.ts b/sdk/eventhub/event-processor-host/test/negative.spec.ts index 9ed168afbcc2..a8185450e132 100644 --- a/sdk/eventhub/event-processor-host/test/negative.spec.ts +++ b/sdk/eventhub/event-processor-host/test/negative.spec.ts @@ -53,7 +53,7 @@ describe("negative", function(): void { const onMessage: OnReceivedMessage = (context: PartitionContext, data: EventData) => { debug(">>> [%s] Rx message from '%s': '%O'", hostName, context.partitionId, data); }; - const onError: OnReceivedError = err => { + const onError: OnReceivedError = (err) => { debug("An error occurred while receiving the message: %O", err); throw err; }; @@ -73,7 +73,7 @@ describe("negative", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); @@ -92,7 +92,7 @@ describe("negative", function(): void { const onMessage: OnReceivedMessage = (context: PartitionContext, data: EventData) => { debug(">>> [%s] Rx message from '%s': '%O'", hostName, context.partitionId, data); }; - const onError: OnReceivedError = err => { + const onError: OnReceivedError = (err) => { debug("An error occurred while receiving the message: %O", err); throw err; }; @@ -101,7 +101,7 @@ describe("negative", function(): void { .then(() => { return Promise.reject(new Error("This statement should not have executed.")); }) - .catch(err => { + .catch((err) => { debug(">>>>>>> %s", err.action); err.action.should.equal("Getting PartitionIds"); done(); @@ -122,7 +122,7 @@ describe("negative", function(): void { const onMessage: OnReceivedMessage = (context: PartitionContext, data: EventData) => { debug(">>> [%s] Rx message from '%s': '%O'", hostName, context.partitionId, data); }; - const onError: OnReceivedError = err => { + const onError: OnReceivedError = (err) => { debug("An error occurred while receiving the message: %O", err); throw err; }; @@ -131,7 +131,7 @@ describe("negative", function(): void { .then(() => { return Promise.reject(new Error("This statement should not have executed.")); }) - .catch(err => { + .catch((err) => { debug(">>>>>>> %s", err.action); err.action.should.equal("Getting PartitionIds"); done(); diff --git a/sdk/eventhub/event-processor-host/test/retry.spec.ts b/sdk/eventhub/event-processor-host/test/retry.spec.ts index 774b0deb585d..9abcf5fd9b5c 100644 --- a/sdk/eventhub/event-processor-host/test/retry.spec.ts +++ b/sdk/eventhub/event-processor-host/test/retry.spec.ts @@ -43,7 +43,7 @@ describe("retry function", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); @@ -81,7 +81,7 @@ describe("retry function", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); @@ -126,7 +126,7 @@ describe("retry function", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); @@ -166,7 +166,7 @@ describe("retry function", function(): void { .then(() => { done(); }) - .catch(err => { + .catch((err) => { done(err); }); }); diff --git a/sdk/eventhub/event-processor-host/tests.yml b/sdk/eventhub/event-processor-host/tests.yml index 7fdcf0238192..0700be8be086 100644 --- a/sdk/eventhub/event-processor-host/tests.yml +++ b/sdk/eventhub/event-processor-host/tests.yml @@ -1,18 +1,10 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/event-processor-host" - ResourceServiceDirectory: eventhub - TimeoutInMinutes: 90 - TestBrowser: false - TestSamples: false + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/event-processor-host" + ResourceServiceDirectory: eventhub + TimeoutInMinutes: 90 + TestBrowser: false + TestSamples: false diff --git a/sdk/eventhub/event-processor-host/tsconfig.json b/sdk/eventhub/event-processor-host/tsconfig.json index d0215dcc7094..38efe6fdebcd 100644 --- a/sdk/eventhub/event-processor-host/tsconfig.json +++ b/sdk/eventhub/event-processor-host/tsconfig.json @@ -1,39 +1,10 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - /* Basic Options */ - "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - - "declaration": true /* Generates corresponding '.d.ts' file. */, - "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, - "sourceMap": true /* Generates corresponding '.map' file. */, - "inlineSources": true, - - "outDir": "./dist-esm" /* Redirect output structure to the directory. */, - "declarationDir": "./typings" /* Output directory for generated declaration files.*/, - - "importHelpers": true /* Import emit helpers from 'tslib'. */, - - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - - /* Additional Checks */ - "noUnusedLocals": true /* Report errors on unused locals. */, - - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - - /* Experimental Options */ - "forceConsistentCasingInFileNames": true, - - /* Other options */ - "newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, - "allowJs": false /* Don't allow JavaScript files to be compiled.*/ + "declarationDir": "./typings", + "outDir": "./dist-esm", + "downlevelIteration": true }, - "compileOnSave": true, - "exclude": ["node_modules", "typings/**", "./samples/**/*.ts"], + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json index a3e5dac9c14d..427a4f1c9da9 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/package.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/package.json @@ -62,9 +62,8 @@ "@azure/event-hubs": "^5.0.0", "@azure/logger": "^1.0.0", "@azure/storage-blob": "^12.1.2", - "debug": "^4.1.1", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@microsoft/api-extractor": "7.7.11", @@ -72,7 +71,7 @@ "@rollup/plugin-inject": "^4.0.0", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", @@ -86,7 +85,8 @@ "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-string": "^1.5.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", + "debug": "^4.1.1", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -116,9 +116,9 @@ "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/tsconfig.json b/sdk/eventhub/eventhubs-checkpointstore-blob/tsconfig.json index bda27729f70b..38efe6fdebcd 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/tsconfig.json +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/tsconfig.json @@ -1,40 +1,10 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - /* Basic Options */ - "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - - "declaration": true /* Generates corresponding '.d.ts' file. */, - "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, - "sourceMap": true /* Generates corresponding '.map' file. */, - "inlineSources": true, - - "outDir": "./dist-esm" /* Redirect output structure to the directory. */, - "declarationDir": "./typings" /* Output directory for generated declaration files.*/, - - "importHelpers": true /* Import emit helpers from 'tslib'. */, - - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - - /* Additional Checks */ - "noUnusedLocals": true /* Report errors on unused locals. */, - - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - - /* Experimental Options */ - "forceConsistentCasingInFileNames": true, - - /* Other options */ - "newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, - "allowJs": false /* Don't allow JavaScript files to be compiled.*/, - "resolveJsonModule": true + "declarationDir": "./typings", + "outDir": "./dist-esm", + "downlevelIteration": true }, - "compileOnSave": true, - "exclude": ["node_modules", "typings/**", "./samples/**/*.ts"], + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/eventhub/testhub/commands/sendReceive.ts b/sdk/eventhub/testhub/commands/sendReceive.ts index 9cd0ac33ae22..51f8377cc7cd 100644 --- a/sdk/eventhub/testhub/commands/sendReceive.ts +++ b/sdk/eventhub/testhub/commands/sendReceive.ts @@ -3,7 +3,7 @@ import { CommandBuilder } from "yargs"; import { EventHubClient, EventPosition, EventData, delay } from "@azure/event-hubs"; import { log, setCurrentCommand, randomNumberFromInterval } from "../utils/util"; -import uuid from "uuid/v4"; +import { v4 as uuid } from "uuid"; export const command = "send-receive"; diff --git a/sdk/eventhub/testhub/package.json b/sdk/eventhub/testhub/package.json index 08095bd7a8c3..689631e49da1 100644 --- a/sdk/eventhub/testhub/package.json +++ b/sdk/eventhub/testhub/package.json @@ -36,16 +36,16 @@ "@azure/event-hubs": "^2.1.4", "@azure/event-processor-host": "^2.0.0", "@types/node": "^8.0.0", - "@types/uuid": "^3.4.3", - "@types/yargs": "^13.0.0", + "@types/uuid": "^8.0.0", + "@types/yargs": "^15.0.5", "async-lock": "^1.1.3", "death": "^1.1.0", "debug": "^4.1.1", "rhea": "^1.0.21", "rimraf": "^3.0.0", - "tslib": "^1.10.0", - "typescript": "~3.8.3", - "uuid": "^3.3.2", + "tslib": "^2.0.0", + "typescript": "~3.9.3", + "uuid": "^8.1.0", "yargs": "^15.0.0" } } diff --git a/sdk/eventhub/testhub/tsconfig.json b/sdk/eventhub/testhub/tsconfig.json index 2c1eeea2c079..dedbe0fcf364 100644 --- a/sdk/eventhub/testhub/tsconfig.json +++ b/sdk/eventhub/testhub/tsconfig.json @@ -43,7 +43,6 @@ "es2015.iterable" ] }, - "compileOnSave": true, "exclude": ["node_modules"], "include": ["cli.ts", "./commands"] } diff --git a/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md b/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md index 8e756082c36b..aa2515c43458 100644 --- a/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md +++ b/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md @@ -1,8 +1,48 @@ # Release History -## 1.0.0-preview.3 (Unreleased) +## 1.0.0-preview.4 (Unreleased) + +- [Breaking] Rename `includeTextDetails` to `includeTextContent` in custom form and receipt recognition options to be consistent with other languages. + +## 1.0.0-preview.3 (2020-06-10) - Blank pages in receipt recognition are now handled properly. +- Support Azure Active Directory credential. +- Support to copy a custom model from one Form Recognizer resource to another. +- Headers and query parameters which don't contain sensitive information are no longer redacted in logging output. +- Refactoring for cross-language consistency: + - [Breaking] Rename `beginRecognizeForms()` to `beginRecognizeCustomForms()` in `FormRecognizerClient`. + - [Breaking] Rename `listModels()` to `listCustomModels()` in `FormTrainingClient`. + - [Breaking] Rename `count` to `customModelCount` and `limit` to `customModelLimit` in `AccountProperties`. + - [Breaking] Rename type `ErrorInformation` to `FormRecognizerError`. + - [Breaking] Rename type `ModelStatus` to `CustomFormModelStatus`. + - [Breaking] Rename type `CustomFormSubModelField` to `CustomFormField`. + - [Breaking] Rename type `FormElement` to `FormContent` and `FormElementCommon` to `FormContentCommon`. + - [Breaking] Rename property `fieldLabel` to `labelText` in `FormField` type. + - [Breaking] Rename type `ModelInfo` to `CustomFormModelInfo`. + - [Breaking] Rename properties `createdOn` to `requestedOn` and `lastModified` to `completedOn` in `CustomModelInfo` type. + - [Breaking] Rename type `TrainModelOptions` to `TrainingFileFilter`. + - [Breaking] Rename type `TrainStatus` to `TrainingStatus`. + - [Breaking] Rename type `ContentType` to `FormContentType`. + - [Breaking] Rename type `FormText` to `FieldText`. + - [Breaking] Rename type `CustomFormSubModel` to `CustomFormSubmodel`. + - [Breaking] Rename `models` to `submodels` in `CustomFormModel`. + - [Breaking] Recognition methods and training methods now return the result directly, instead of wrapping them in a response object. Specifically, + - `beginTraining` now returns `CustomFormModel` instead of `FormModelResponse` from the poller. + - `beginRecognizeContent` and `beginRecognizeContentFromUrl` now return `FormPageArray` instead of `RecognizeContentResultResponse` from the poller. + - `beginRecognizeForms` and `beginRecognizeFormsFromUrl` now return `RecognizedFormArray` instead of `RecognizeFormResultResponse` from the poller. + - `beginRecognizeReceipts` and `beginRecognizeReceiptsFromUrl` now return `RecognizedReceiptArray` instead of `RecognizeReceiptResultResponse` from the poller. + - [Breaking] Remove `getFormTrainingClient()` from `FormRecognizerClient`. A new method `getFormRecognizerClient()` is added to `FormTrainingClient` + - [Breaking] `useTrainingLabels` parameter is now required for `beginTraining()` method. + - [Breaking] Rename `intervalInMs` to `updateIntervalInMs` for all LRO poller options. + - [Breaking] Remove `USReceipt` and assoicated types. + - Rename the first parameter of `beginRecognizeContent()` from `data` to `form`. + - Rename the second parameter of `beginRecognizeForms()` from `data` to `form`. + - Rename the first parameter of `beginRecognizeReceipts()` from `data` to `receipt`. + - Rename the first parameter of `beginRecognizeContentFromUrl()` from `documentUrl` to `formUrl`. + - Rename the second parameter of `beginRecognizeFormsFromUrl()` from `documentUrl` to `formUrl`. + - Rename the first parameter of `beginRecognizeReceiptsFromUrl()` from `documentUrl` to `receiptUrl`. + - Rename the first parameter of `beginTraining` from `blobContainerUrl` to `trainingFilesUrl`. ## 1.0.0-preview.2 (2020-05-06) @@ -13,7 +53,7 @@ - This release is a preview of our efforts to create a client library that is user friendly and idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the - [Azure SDK Design Guidelines for TypeScript](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html). + [Azure SDK Design Guidelines for TypeScript](https://azure.github.io/azure-sdk/typescript_introduction.html). - Differences from previous public package `@azure/cognitiveservices-formrecognizer` - Package name changed from `@azure/cognitiveservices-formrecognizer` to `@azure/ai-form-recognizer`. - Package targets version `2.0` of the service API. diff --git a/sdk/formrecognizer/ai-form-recognizer/README.md b/sdk/formrecognizer/ai-form-recognizer/README.md index 78df0f619fce..c057d857f505 100644 --- a/sdk/formrecognizer/ai-form-recognizer/README.md +++ b/sdk/formrecognizer/ai-form-recognizer/README.md @@ -1,17 +1,15 @@ # Azure Form Recognizer client library for JavaScript -**Note:** This preview version targets Azure Form Recognizer service API version v2.0-preview. - Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/) is a cloud service that uses machine learning to recognize text and table data from form documents. It includes the following main functionalities: * Custom models - Recognize field values and table data from forms. These models are trained with your own data, so they're tailored to your forms. You can then take these custom models and recognize forms. You can also manage the custom models you've created and see how close you are to the limit of custom models your account can hold. * Content API - Recognize text and table structures, along with their bounding box coordinates, from documents. Corresponds to the REST service's Layout API. -* Prebuilt receipt model - Recognize data from USA sales receipts using a prebuilt model. +* Prebuilt receipt model - Recognize data from sales receipts using a prebuilt model. [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/formrecognizer/ai-form-recognizer/) | [Package (NPM)](https://www.npmjs.com/package/@azure/ai-form-recognizer) | -[API reference documentation](https://aka.ms/azsdk-js-formrecognizer-ref-docs) | +[API reference documentation](https://aka.ms/azsdk/js/formrecognizer/docs) | [Product documentation](https://docs.microsoft.com/azure/cognitive-services/form-recognizer/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples) @@ -24,7 +22,7 @@ from form documents. It includes the following main functionalities: - An [Azure subscription][azure_sub]. - A [Cognitive Services or Form Recognizer resource][FR_or_CS_resource] If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. -### Create a Form Recognizer resource +#### Create a Form Recognizer resource Form Recognizer supports both [multi-service and single-service access][multi_and_single_service]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint/key. For Form Recognizer access only, create a Form Recognizer resource. @@ -55,6 +53,8 @@ Install the Azure Form Recognizer client library for JavaScript with `npm`: npm install @azure/ai-form-recognizer ``` +**Note:** This preview version targets Azure Form Recognizer service API version v2.0-preview. + ### Create and authenticate a client In order to interact with the Form Recognizer service, you'll need to select either a `FormRecognizerClient` or a `FormTrainingClient`, and create an instance of this type. In the following samples, we will use `FormRecognizerClient` as an example. To create a client instance to access the Form Recognizer API, you will need the `endpoint` of your Form Recognizer resource and a `credential`. The Form Recognizer client use an API key credential to authenticate. @@ -83,6 +83,28 @@ const { FormRecognizerClient, AzureKeyCredential } = require("@azure/ai-form-rec const client = new FormRecognizerClient("", new AzureKeyCredential("")); ``` +#### Using an Azure Active Directory Credential + +Client API key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] \ +provider shown below, +or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to [register a new AAD application][register_aad_app] and grant access to Form Recognizer by assigning the `"Cognitive Services User"` role to your service principal (note: other roles such as `"Owner"` will not gra\ +nt the necessary permissions, only `"Cognitive Services User"` will suffice to run the examples and the sample code). + +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`. + +```js +const { FormRecognizerClient } = require("@azure/ai-form-recognizer"); +const { DefaultAzureCredential } = require("@azure/identity"); + +const client = new FormRecognizerClient("", new DefaultAzureCredential()); +``` + ## Key concepts @@ -91,7 +113,7 @@ const client = new FormRecognizerClient("", new AzureKeyCredential("", new AzureKeyCredential(""}`; + const receipt = receipts[0]; + console.log("First receipt:"); + // For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + if (receiptTypeField.valueType === "string") { + console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + } + const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + if (merchantNameField.valueType === "string") { + console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + } + const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + if (transactionDate.valueType === "date") { + console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + } + const itemsField = receipt.recognizedForm.fields["Items"]; + if (itemsField.valueType === "array") { + for (const itemField of itemsField.value || []) { + if (itemField.valueType === "object") { + const itemNameField = itemField.value["Name"]; + if (itemNameField.valueType === "string") { + console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + } + } + } + } + const totalField = receipt.recognizedForm.fields["Total"]; + if (totalField.valueType === "number") { + console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); + } } -main(); +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); ``` ### Recognize content @@ -180,14 +216,13 @@ async function main() { const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await client.beginRecognizeContent(readStream); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); + if (!pages || pages.length === 0) { + throw new Error("Expecting non-empty list of pages!"); } - console.log(response.status); - for (const page of response.pages) { + for (const page of pages) { console.log( `Page ${page.pageNumber}: width ${page.width} and height ${page.height} with unit ${page.unit}` ); @@ -201,7 +236,9 @@ async function main() { } } -main(); +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); ``` ### Train model @@ -209,15 +246,14 @@ main(); Train a machine-learned model on your own form type. The resulting model will be able to recognize values from the types of forms it was trained on. Provide a container SAS url to your Azure Storage Blob container where you're storing the training documents. See details on setting this up in the [service quickstart documentation][quickstart_training]. This sample creates and trains a custom model without using labels. ```javascript -const { FormRecognizerClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); +const { FormTrainingClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); async function main() { const endpoint = ""; const apiKey = ""; const containerSasUrl = ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await trainingClient.beginTraining(containerSasUrl, false, { onProgress: (state) => { console.log(`training status: ${state.status}`); } @@ -225,20 +261,27 @@ async function main() { await poller.pollUntilDone(); const response = poller.getResult(); + + if (!response) { + throw new Error("Expecting valid response!"); + } + console.log(`Model ID: ${response.modelId}`); console.log(`Status: ${response.status}`); - console.log(`Created on: ${response.createdOn}`); - console.log(`Last modified: ${response.lastModified}`); + console.log(`Requested on: ${response.requestedOn}`); + console.log(`Completed on: ${response.completedOn}`); - if (response.models) { - for (const submodel of response.models) { + if (response.submodels) { + for (const submodel of response.submodels) { + // since the training data is unlabeled, we are unable to return the accuracy of this model console.log("We have recognized the following fields"); for (const key in submodel.fields) { const field = submodel.fields[key]; - console.log(`The model found field '${field.name}'`) + console.log(`The model found field '${field.name}'`); } } } + // Training document information if (response.trainingDocuments) { for (const doc of response.trainingDocuments) { console.log(`Document name: ${doc.documentName}`); @@ -249,7 +292,9 @@ async function main() { } } -main(); +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); ``` ### Recognize forms using a custom model @@ -270,13 +315,12 @@ async function main() { onProgress: (state) => { console.log(`status: ${state.status}`); } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - console.log(response.status); - console.log("Forms:") - for (const form of response.forms || []) { + console.log("Forms:"); + for (const form of forms || []) { console.log(`${form.formType}, page range: ${form.pageRange}`); - console.log("Pages:") + console.log("Pages:"); for (const page of form.pages || []) { console.log(`Page number: ${page.pageNumber}`); console.log("Tables"); @@ -293,12 +337,16 @@ async function main() { for (const fieldName in form.fields) { // each field is of type FormField const field = form.fields[fieldName]; - console.log(`Field ${fieldName} has value '${field.value}' with a confidence score of ${field.confidence}`) + console.log( + `Field ${fieldName} has value '${field.value}' with a confidence score of ${field.confidence}` + ); } } } -main() +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); ``` ### Listing all models @@ -306,16 +354,15 @@ main() Listing custom models in the current cognitive service account. This sample shows several ways to iterate through the result. ```javascript -const { FormRecognizerClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); +const { FormTrainingClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); async function main() { const endpoint = ""; const apiKey = ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const client = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); // returns an async iteratable iterator that supports paging - const result = trainingClient.listCustomModels(); + const result = client.listCustomModels(); let i = 0; for await (const modelInfo of result) { console.log(`model ${i++}:`); @@ -324,7 +371,7 @@ async function main() { // using `iter.next()` i = 1; - let iter = trainingClient.listCustomModels(); + let iter = client.listCustomModels(); let modelItem = await iter.next(); while (!modelItem.done) { console.log(`model ${i++}: ${modelItem.value.modelId}`); @@ -333,14 +380,17 @@ async function main() { // using `byPage()` i = 1; - for await (const response of trainingClient.listCustomModels().byPage()) { + for await (const response of client.listCustomModels().byPage()) { for (const modelInfo of response.modelList) { console.log(`model ${i++}: ${modelInfo.modelId}`); } } } -main(); +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); + ``` ## Troubleshooting @@ -373,10 +423,13 @@ If you'd like to contribute to this library, please read the [contributing guide [azure_sub]: https://azure.microsoft.com/free/ [FR_or_CS_resource]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows [azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity +[register_aad_app]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential [quickstart_training]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/quickstarts/curl-train-extract#train-a-form-recognizer-model [multi_and_single_service]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows [azure_portal_create_FR_resource]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesFormRecognizer [azure_cli_create_FR_resource]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows -[fr-labeling-tool]: https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/quickstarts/label-tool -[fr-train-without-labels]: https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/overview#train-without-labels -[fr-train-with-labels]: https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/overview#train-with-labels +[fr-labeling-tool]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/quickstarts/label-tool +[fr-train-without-labels]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview#train-without-labels +[fr-train-with-labels]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview#train-with-labels diff --git a/sdk/formrecognizer/ai-form-recognizer/karma.conf.js b/sdk/formrecognizer/ai-form-recognizer/karma.conf.js index 5b70b5d33229..267391db2096 100644 --- a/sdk/formrecognizer/ai-form-recognizer/karma.conf.js +++ b/sdk/formrecognizer/ai-form-recognizer/karma.conf.js @@ -39,9 +39,7 @@ module.exports = function(config) { files: [ "test-browser/index.js", { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } - ].concat( - isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : [] - ), + ].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []), // list of files / patterns to exclude exclude: [], diff --git a/sdk/formrecognizer/ai-form-recognizer/package.json b/sdk/formrecognizer/ai-form-recognizer/package.json index 0ae27ada552c..2b817931fb71 100644 --- a/sdk/formrecognizer/ai-form-recognizer/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "description": "An isomorphic client library for the Azure Form Recognizer service.", - "version": "1.0.0-preview.3", + "version": "1.0.0-preview.4", "keywords": [ "node", "azure", @@ -84,7 +84,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -94,17 +94,17 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -133,10 +133,10 @@ "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "sinon": "^7.1.0", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "source-map-support": "^0.5.9", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "fs-extra": "^8.1.0", "@types/fs-extra": "^8.0.0" } diff --git a/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md b/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md index 367ec28f8330..3b24209c880a 100644 --- a/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md +++ b/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md @@ -31,80 +31,179 @@ export interface AnalyzeOperationResultModel { status: OperationStatus; } +export { AzureKeyCredential } + // @public -export interface ArrayFieldValue { - // (undocumented) - type: "array"; - // (undocumented) - value?: FieldValue[]; -} +export type BeginCopyModelOptions = FormRecognizerOperationOptions & { + updateIntervalInMs?: number; + onProgress?: (state: BeginCopyModelPollState) => void; + resumeFrom?: string; +}; -export { AzureKeyCredential } +// @public +export interface BeginCopyModelPollState extends PollOperationState { + readonly client: CopyModelPollerClient; + copyAuthorization: CopyAuthorization; + readonly copyModelOptions?: CopyModelOptions; + modelId: string; + resultId?: string; + status: OperationStatus; + targetResourceId: string; + targetResourceRegion: string; +} // @public export type BeginRecognizeContentOptions = RecognizeContentOptions & { - intervalInMs?: number; - onProgress?: (state: BeginRecognizePollState) => void; + updateIntervalInMs?: number; + onProgress?: (state: BeginRecognizeContentPollState) => void; resumeFrom?: string; }; +// @public (undocumented) +export interface BeginRecognizeContentPollState extends PollOperationState { + // (undocumented) + readonly analyzeOptions?: RecognizeContentOptions; + // (undocumented) + readonly client: RecognizeContentPollerClient; + // (undocumented) + contentType?: FormContentType; + // (undocumented) + resultId?: string; + // (undocumented) + source?: FormRecognizerRequestBody | string; + // (undocumented) + status: OperationStatus; +} + +// @public (undocumented) +export interface BeginRecognizeCustomFormPollState extends PollOperationState { + // (undocumented) + readonly analyzeOptions?: RecognizeFormsOptions; + // (undocumented) + readonly client: RecognizeCustomFormPollerClient; + // (undocumented) + contentType?: FormContentType; + // (undocumented) + modelId: string; + // (undocumented) + resultId?: string; + // (undocumented) + source?: FormRecognizerRequestBody | string; + // (undocumented) + status: OperationStatus; +} + // @public export type BeginRecognizeFormsOptions = RecognizeFormsOptions & { - intervalInMs?: number; - onProgress?: (state: BeginRecognizePollState) => void; + updateIntervalInMs?: number; + onProgress?: (state: BeginRecognizeCustomFormPollState) => void; resumeFrom?: string; }; +// @public (undocumented) +export interface BeginRecognizeReceiptPollState extends PollOperationState { + // (undocumented) + readonly analyzeOptions?: RecognizeReceiptsOptions; + // (undocumented) + readonly client: RecognizeReceiptPollerClient; + // (undocumented) + contentType?: FormContentType; + // (undocumented) + resultId?: string; + // (undocumented) + source?: FormRecognizerRequestBody | string; + // (undocumented) + status: OperationStatus; +} + // @public export type BeginRecognizeReceiptsOptions = RecognizeReceiptsOptions & { - intervalInMs?: number; - onProgress?: (state: BeginRecognizePollState) => void; + updateIntervalInMs?: number; + onProgress?: (state: BeginRecognizeReceiptPollState) => void; resumeFrom?: string; }; // @public -export type BeginTrainingOptions = TrainModelOptions & { - intervalInMs?: number; - onProgress?: (state: BeginTrainingPollState) => void; +export type BeginTrainingOptions = TrainingFileFilter & { + updateIntervalInMs?: number; + onProgress?: (state: BeginTrainingPollState) => void; resumeFrom?: string; }; // @public -export type ContentPollerLike = PollerLike, RecognizeContentResultResponse>; +export interface BeginTrainingPollState extends PollOperationState { + readonly client: TrainPollerClient; + modelId?: string; + source: string; + status: CustomFormModelStatus; + readonly trainModelOptions?: TrainingFileFilter; +} + +// @public +export interface CommonFieldValue { + boundingBox?: Point2D[]; + confidence?: number; + pageNumber?: number; + text?: string; + textContent?: FormContent[]; +} + +// @public +export type ContentPollerLike = PollerLike, FormPageArray>; + +// @public +export interface CopyAuthorization extends CopyAuthorizationResultModel { + resourceId: string; + resourceRegion: string; +} + +// @public +export interface CopyAuthorizationResultModel { + accessToken: string; + expirationDateTimeTicks: number; + modelId: string; +} + +// @public +export type CopyModelOptions = FormRecognizerOperationOptions; // @public -export type ContentType = "application/pdf" | "image/jpeg" | "image/png" | "image/tiff"; +export type CopyModelPollerClient = { + beginCopyModel: (modelId: string, copyAuthorization: CopyAuthorization, copyModelOptions?: CopyModelOptions) => Promise; + getCopyModelResult: (modelId: string, resultId: string, options: GetCopyModelResultOptions) => Promise; +}; // @public (undocumented) export interface CustomFormField { accuracy?: number; + label: string | null; name: string; } // @public export interface CustomFormModel { - createdOn: Date; + completedOn: Date; errors?: FormRecognizerError[]; - lastModified: Date; modelId: string; - models?: CustomFormSubModel[]; + requestedOn: Date; status: CustomFormModelStatus; + submodels?: CustomFormSubmodel[]; trainingDocuments?: TrainingDocumentInfo[]; } // @public export interface CustomFormModelInfo { - createdOn: Date; - lastModified: Date; + completedOn: Date; modelId: string; + requestedOn: Date; status: CustomFormModelStatus; } // @public export type CustomFormModelStatus = "creating" | "ready" | "invalid"; -// @public (undocumented) -export interface CustomFormSubModel { +// @public +export interface CustomFormSubmodel { accuracy?: number; fields: { [propertyName: string]: CustomFormField; @@ -112,24 +211,16 @@ export interface CustomFormSubModel { formType: string; } -// Warning: (ae-forgotten-export) The symbol "CommonFieldValue" needs to be exported by the entry point index.d.ts -// -// @public -export type DateFieldValue = { - type: "date"; - value?: Date; -} & CommonFieldValue; - // @public export type DeleteModelOptions = FormRecognizerOperationOptions; // @public -export type FieldValue = StringFieldValue | DateFieldValue | TimeFieldValue | PhoneNumberFieldValue | NumberFieldValue | IntegerFieldValue | ArrayFieldValue | ObjectFieldValue; - -// @public (undocumented) -export type FieldValueTypes = string | Date | number | FieldValue[] | { - [propertyName: string]: FieldValue; -}; +export interface FieldText { + boundingBox?: Point2D[]; + pageNumber: number; + text?: string; + textContent?: FormContent[]; +} // @public export type FormContent = FormWord | FormLine; @@ -142,14 +233,41 @@ export interface FormContentCommon { } // @public -export interface FormField { +export type FormContentType = "application/pdf" | "image/jpeg" | "image/png" | "image/tiff"; + +// @public +export type FormField = { confidence?: number; - labelText?: FormText; + labelText?: FieldText; name?: string; - value?: FieldValueTypes; - valueText?: FormText; - valueType?: ValueTypes; -} + valueText?: FieldText; +} & ({ + value?: string; + valueType?: "string"; +} | { + value?: number; + valueType?: "number"; +} | { + value?: Date; + valueType?: "date"; +} | { + value?: string; + valueType?: "time"; +} | { + value?: string; + valueType?: "phoneNumber"; +} | { + value?: number; + valueType?: "integer"; +} | { + value?: FormField[]; + valueType?: "array"; +} | { + value?: { + [propertyName: string]: FormField; + }; + valueType?: "object"; +}); // @public export interface FormFieldsReport { @@ -163,13 +281,6 @@ export interface FormLine extends FormContentCommon { words: FormWord[]; } -// @public -export interface FormModel { - keys: KeysResult; - modelInfo: CustomFormModelInfo; - trainResult?: FormTrainResult; -} - // @public export type FormModelResponse = CustomFormModel & { _response: coreHttp.HttpResponse & { @@ -189,6 +300,10 @@ export interface FormPage { width: number; } +// @public +export interface FormPageArray extends Array { +} + // @public export interface FormPageRange { firstPageNumber: number; @@ -196,19 +311,18 @@ export interface FormPageRange { } // @public -export type FormPollerLike = PollerLike, RecognizeFormResultResponse>; +export type FormPollerLike = PollerLike, RecognizedFormArray>; // @public export class FormRecognizerClient { constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: FormRecognizerClientOptions); - beginRecognizeContent(data: FormRecognizerRequestBody, contentType?: ContentType, options?: BeginRecognizeContentOptions): Promise; - beginRecognizeContentFromUrl(formFileUrl: string, options?: BeginRecognizeContentOptions): Promise; - beginRecognizeCustomForms(modelId: string, data: FormRecognizerRequestBody, contentType?: ContentType, options?: BeginRecognizeFormsOptions): Promise; - beginRecognizeCustomFormsFromUrl(modelId: string, formFileUrl: string, options?: BeginRecognizeFormsOptions): Promise, RecognizeFormResultResponse>>; - beginRecognizeReceipts(data: FormRecognizerRequestBody, contentType?: ContentType, options?: BeginRecognizeReceiptsOptions): Promise; - beginRecognizeReceiptsFromUrl(receiptFileUrl: string, options?: BeginRecognizeReceiptsOptions): Promise; + beginRecognizeContent(form: FormRecognizerRequestBody, contentType?: FormContentType, options?: BeginRecognizeContentOptions): Promise; + beginRecognizeContentFromUrl(formUrl: string, options?: BeginRecognizeContentOptions): Promise; + beginRecognizeCustomForms(modelId: string, form: FormRecognizerRequestBody, contentType?: FormContentType, options?: BeginRecognizeFormsOptions): Promise; + beginRecognizeCustomFormsFromUrl(modelId: string, formUrl: string, options?: BeginRecognizeFormsOptions): Promise; + beginRecognizeReceipts(receipt: FormRecognizerRequestBody, contentType?: FormContentType, options?: BeginRecognizeReceiptsOptions): Promise; + beginRecognizeReceiptsFromUrl(receiptUrl: string, options?: BeginRecognizeReceiptsOptions): Promise; readonly endpointUrl: string; - getFormTrainingClient(): FormTrainingClient; } // @public @@ -228,13 +342,6 @@ export interface FormRecognizerOperationOptions extends OperationOptions { // @public export type FormRecognizerRequestBody = Blob | ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream; -// @public -export interface FormResult { - errors?: FormRecognizerError[]; - forms?: RecognizedForm[]; - version: string; -} - // @public export interface FormTable { columnCount: number; @@ -261,30 +368,20 @@ export interface FormTableRow { cells: FormTableCell[]; } -// @public -export interface FormText { - boundingBox?: Point2D[]; - text?: string; - textContent?: FormContent[]; -} - // @public export class FormTrainingClient { constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: FormRecognizerClientOptions); - beginTraining(trainingFilesUrl: string, useTrainingLabels?: boolean, options?: BeginTrainingOptions): Promise, FormModelResponse>>; + beginCopyModel(modelId: string, target: CopyAuthorization, options?: BeginCopyModelOptions): Promise, CustomFormModelInfo>>; + beginTraining(trainingFilesUrl: string, useTrainingLabels: boolean, options?: BeginTrainingOptions): Promise, CustomFormModel>>; deleteModel(modelId: string, options?: DeleteModelOptions): Promise; readonly endpointUrl: string; getAccountProperties(options?: GetAccountPropertiesOptions): Promise; + getCopyAuthorization(resourceId: string, resourceRegion: string, options?: GetCopyAuthorizationOptions): Promise; getCustomModel(modelId: string, options?: GetModelOptions): Promise; - listCustomModels(options?: ListModelsOptions): PagedAsyncIterableIterator; + getFormRecognizerClient(): FormRecognizerClient; + listCustomModels(options?: ListModelsOptions): PagedAsyncIterableIterator; } -// @public -export interface FormTrainResult { - errors?: FormRecognizerError[]; - trainingDocuments: TrainingDocumentInfo[]; -} - // @public export interface FormWord extends FormContentCommon { confidence?: number; @@ -296,13 +393,13 @@ export interface FormWord extends FormContentCommon { export type GetAccountPropertiesOptions = FormRecognizerOperationOptions; // @public -export type GetModelOptions = FormRecognizerOperationOptions; +export type GetCopyAuthorizationOptions = FormRecognizerOperationOptions; // @public -export type IntegerFieldValue = { - type: "integer"; - value?: number; -} & CommonFieldValue; +export type GetCopyModelResultOptions = FormRecognizerOperationOptions; + +// @public +export type GetModelOptions = FormRecognizerOperationOptions; // @public export interface KeysResult { @@ -333,37 +430,26 @@ export type Language = "en" | "es"; export type LengthUnit = "pixel" | "inch"; // @public -export type ListModelsOptions = FormRecognizerOperationOptions; - -// @public -export type ListModelsResponseModel = Models & { +export type ListCustomModelsResponse = Models & { _response: coreHttp.HttpResponse & { bodyAsText: string; parsedBody: Models; }; }; -// @public (undocumented) -export type Locale = "US" | "UK"; +// @public +export type ListModelsOptions = FormRecognizerOperationOptions; // @public export interface Model { keys?: KeysResult; - modelInfo: ModelInfo; + modelInfo: CustomFormModelInfo; trainResult?: TrainResult; } -// @public -export interface ModelInfo { - createdOn: Date; - lastModified: Date; - modelId: string; - status: CustomFormModelStatus; -} - // @public export interface Models { - modelList?: ModelInfo[]; + modelList?: CustomFormModelInfo[]; nextLink?: string; summary?: ModelsSummary; } @@ -375,31 +461,9 @@ export interface ModelsSummary { limit: number; } -// @public -export type NumberFieldValue = { - type: "number"; - value?: number; -} & CommonFieldValue; - -// @public -export interface ObjectFieldValue { - // (undocumented) - type: "object"; - // (undocumented) - value?: { - [propertyName: string]: FieldValue; - }; -} - // @public export type OperationStatus = "notStarted" | "running" | "succeeded" | "failed"; -// @public -export type PhoneNumberFieldValue = { - type: "phoneNumber"; - value?: string; -} & CommonFieldValue; - // @public export interface Point2D { x: number; @@ -411,55 +475,26 @@ export { PollerLike } export { PollOperationState } // @public -export interface ReceiptItemArrayField { - // (undocumented) - type: "array"; - // (undocumented) - value: ReceiptItemField[]; -} - -// @public -export type ReceiptItemField = { - type: "object"; - value: { - Name?: StringFieldValue; - Quantity?: NumberFieldValue; - Price?: NumberFieldValue; - TotalPrice?: NumberFieldValue; - }; -} & CommonFieldValue; - -// @public -export type ReceiptPollerLike = PollerLike, RecognizeReceiptResultResponse>; - -// @public (undocumented) -export type ReceiptWithLocale = { - locale: "US"; -} & USReceipt; - -// @public -export type RecognizeContentOperationResult = Partial & { - status: OperationStatus; - createdOn: Date; - lastModified: Date; -}; +export type ReceiptPollerLike = PollerLike, RecognizedReceiptArray>; // @public export type RecognizeContentOptions = FormRecognizerOperationOptions; // @public -export type RecognizeContentResultResponse = RecognizeContentOperationResult & { - _response: coreHttp.HttpResponse & { - bodyAsText: string; - parsedBody: AnalyzeOperationResultModel; - }; +export type RecognizeContentPollerClient = { + beginRecognize: (source: FormRecognizerRequestBody | string, contentType?: FormContentType, analyzeOptions?: RecognizeContentOptions) => Promise; + getRecognizeResult: (resultId: string, options: { + abortSignal?: AbortSignalLike; + }) => Promise; }; // @public -export interface RecognizedContent { - pages: FormPage[]; - version: string; -} +export type RecognizeCustomFormPollerClient = { + beginRecognize: (source: FormRecognizerRequestBody | string, modelId: string, contentType?: FormContentType, analyzeOptions?: RecognizeFormsOptions) => Promise; + getRecognizeResult: (resultId: string, options: { + abortSignal?: AbortSignalLike; + }) => Promise; +}; // @public export interface RecognizedForm { @@ -471,73 +506,39 @@ export interface RecognizedForm { pages: FormPage[]; } -// @public (undocumented) -export interface RecognizedReceipt { - locale?: string; - // (undocumented) - recognizedForm: RecognizedForm; +// @public +export interface RecognizedFormArray extends Array { } // @public -export type RecognizeFormOperationResult = Partial & { - status: OperationStatus; - createdOn: Date; - lastModified: Date; +export type RecognizedReceipt = { + recognizedForm: RecognizedForm; }; -// @public -export type RecognizeFormResultResponse = RecognizeFormOperationResult & { - _response: coreHttp.HttpResponse & { - bodyAsText: string; - parsedBody: AnalyzeOperationResultModel; - }; -}; +// @public (undocumented) +export interface RecognizedReceiptArray extends Array { +} // @public export type RecognizeFormsOptions = FormRecognizerOperationOptions & { - includeTextDetails?: boolean; + includeTextContent?: boolean; }; // @public -export type RecognizeReceiptOperationResult = Partial & { - status: OperationStatus; - createdOn: Date; - lastModified: Date; -}; - -// @public -export interface RecognizeReceiptResult { - receipts?: ReceiptWithLocale[]; - version: string; -} - -// @public -export type RecognizeReceiptResultResponse = RecognizeReceiptOperationResult & { - _response: coreHttp.HttpResponse & { - bodyAsText: string; - parsedBody: AnalyzeOperationResultModel; - }; +export type RecognizeReceiptPollerClient = { + beginRecognize: (source: FormRecognizerRequestBody | string, contentType?: FormContentType, analyzeOptions?: RecognizeReceiptsOptions) => Promise; + getRecognizeResult: (resultId: string, options: { + abortSignal?: AbortSignalLike; + }) => Promise; }; // @public export type RecognizeReceiptsOptions = FormRecognizerOperationOptions & { - includeTextDetails?: boolean; + includeTextContent?: boolean; }; export { RestResponse } -// @public -export type StringFieldValue = { - type: "string"; - value?: string; -} & CommonFieldValue; - -// @public -export type TimeFieldValue = { - type: "time"; - value?: string; -} & CommonFieldValue; - // @public export interface TrainingDocumentInfo { documentName: string; @@ -546,13 +547,19 @@ export interface TrainingDocumentInfo { status: TrainingStatus; } +// @public +export type TrainingFileFilter = FormRecognizerOperationOptions & { + prefix?: string; + includeSubFolders?: boolean; +}; + // @public export type TrainingStatus = "succeeded" | "partiallySucceeded" | "failed"; // @public -export type TrainModelOptions = FormRecognizerOperationOptions & { - prefix?: string; - includeSubFolders?: boolean; +export type TrainPollerClient = { + getCustomModel: (modelId: string, options: GetModelOptions) => Promise; + trainCustomModelInternal: (source: string, useLabelFile?: boolean, options?: TrainingFileFilter) => Promise; }; // @public @@ -563,43 +570,18 @@ export interface TrainResult { trainingDocuments: TrainingDocumentInfo[]; } -// @public -export interface USReceipt extends RecognizedReceipt { - items: USReceiptItem[]; - merchantAddress: FormField; - merchantName: FormField; - merchantPhoneNumber: FormField; - receiptType: USReceiptType; - subtotal: FormField; - tax: FormField; - tip: FormField; - total: FormField; - transactionDate: FormField; - transactionTime: FormField; -} - -// @public (undocumented) -export interface USReceiptItem { - name?: FormField; - price?: FormField; - quantity?: FormField; - totalPrice?: FormField; -} - -// @public (undocumented) -export type USReceiptType = { - type: "Unrecognized" | "Itemized" | "CreditCard" | "Gas" | "Parking"; - confidence?: number; -}; - -// @public (undocumented) -export type ValueTypes = "string" | "date" | "time" | "phoneNumber" | "number" | "integer" | "array" | "object"; - // Warnings were encountered during analysis: // -// src/formRecognizerClient.ts:73:3 - (ae-forgotten-export) The symbol "BeginRecognizePollState" needs to be exported by the entry point index.d.ts -// src/formTrainingClient.ts:69:3 - (ae-forgotten-export) The symbol "BeginTrainingPollState" needs to be exported by the entry point index.d.ts +// src/lro/analyze/contentPoller.ts:40:3 - (ae-forgotten-export) The symbol "GeneratedClientAnalyzeLayoutAsyncResponse" needs to be exported by the entry point index.d.ts +// src/lro/analyze/contentPoller.ts:46:3 - (ae-forgotten-export) The symbol "RecognizeContentResultResponse" needs to be exported by the entry point index.d.ts +// src/lro/analyze/customFormPoller.ts:40:3 - (ae-forgotten-export) The symbol "GeneratedClientAnalyzeWithCustomModelResponse" needs to be exported by the entry point index.d.ts +// src/lro/analyze/customFormPoller.ts:47:3 - (ae-forgotten-export) The symbol "RecognizeFormResultResponse" needs to be exported by the entry point index.d.ts +// src/lro/analyze/receiptPoller.ts:40:3 - (ae-forgotten-export) The symbol "GeneratedClientAnalyzeReceiptAsyncResponse" needs to be exported by the entry point index.d.ts +// src/lro/analyze/receiptPoller.ts:46:3 - (ae-forgotten-export) The symbol "RecognizeReceiptResultResponse" needs to be exported by the entry point index.d.ts +// src/lro/copy/poller.ts:37:3 - (ae-forgotten-export) The symbol "GeneratedClientCopyCustomModelResponse" needs to be exported by the entry point index.d.ts +// src/lro/copy/poller.ts:43:3 - (ae-forgotten-export) The symbol "GeneratedClientGetCustomModelCopyResultResponse" needs to be exported by the entry point index.d.ts +// src/lro/train/poller.ts:21:3 - (ae-forgotten-export) The symbol "GeneratedClientTrainCustomModelAsyncResponse" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/README.md b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/README.md index 054fe9bc0d9f..efe5992d097e 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/README.md +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/README.md @@ -24,6 +24,7 @@ These sample programs show how to use the JavaScript client libraries for Azure |[iteratorModels.js][iteratorModels]|List custom models using different ways| |[getBoundingBoxes.js][getBoundingBoxes]|Get information to to visualize outlines of form content and field.| |[differentiateLabeledUnlabeled.js][differentiateLabeledUnlabeled]|See the differences in output when using a custom model trained with labeled data and one trained with unlabeled data| +|[copyModel.js][copyModel]|Copy a custom model from one Form Recognizer resource to another| ## Prerequisites @@ -66,6 +67,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [iteratorModels]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/javascript/iteratorModels.js [getBoundingBoxes]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/javascript/getBoundingBoxes.js [differentiateLabeledUnlabeled]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/javascript/differentiateLabeledUnlabeled.js +[copyModel]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/javascript/copyModel.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/ai-form-recognizer [azcogsvc]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/copyModel.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/copyModel.js new file mode 100644 index 000000000000..bc6491f4a054 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/copyModel.js @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to copy a model from a source Form Recognizer resource + * to a target Form Recognizer resource. + */ + +const { FormTrainingClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); + +// Load the .env file if it exists +require("dotenv").config(); + +export async function main() { + // You will need to set these environment variables or edit the following values + // information about the source Form Recognizer resource + const endpoint = process.env["FORM_RECOGNIZER_SOURCE_ENDPOINT"] || ""; + const apiKey = process.env["FORM_RECOGNIZER_SOURCE_API_KEY"] || ""; + const sourceModelId = process.env["FORM_RECOGNIZER_SOURCE_MODEL_ID"] || "" + // information about the target Form Recognizer resource + const targetEndpoint = process.env["FORM_RECOGNIZER_TARGET_ENDPOINT"] || ""; + const targetApiKey = process.env["FORM_RECOGNIZER_TARGET_API_KEY"] || ""; + const targetResourceRegion = process.env["FORM_RECOGNIZER_TARGET_REGION"] || "" + const targetResourceId = process.env["FORM_RECOGNIZER_TARGET_RESOURCE_ID"] || "" + + const targetClient = new FormTrainingClient(targetEndpoint, new AzureKeyCredential(targetApiKey)); + const authorization = await targetClient.getCopyAuthorization(targetResourceId, targetResourceRegion); + + const sourceClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); + const poller = await sourceClient.beginCopyModel(sourceModelId, authorization, { + onProgress: (state) => { + console.log(`Copy model status: ${state.status}`); + } + }); + await poller.pollUntilDone(); + const result = poller.getResult(); + + if (!result) { + throw new Error("Expecting valid result from copy model operation"); + } + + // now verify that the copy in the target Form Recognizer resource + console.log(`Model id: ${result.modelId}`); + console.log(`Status: ${result.status}`); + + const model = await targetClient.getCustomModel(result.modelId); + console.log(model); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/differentiateLabeledUnlabeled.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/differentiateLabeledUnlabeled.js index 954d4ceff52a..88925769535e 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/differentiateLabeledUnlabeled.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/differentiateLabeledUnlabeled.js @@ -25,14 +25,14 @@ async function main() { throw new Error(`Expecting file ${path} exists`); } - const labeledResponse = await recognizeCustomForm(path, endpoint, apiKey, labeledModelId); - const unlabeledResponse = await recognizeCustomForm(path, endpoint, apiKey, unlabeledModelId); + const formsWithLabels = await recognizeCustomForm(path, endpoint, apiKey, labeledModelId); + const forms = await recognizeCustomForm(path, endpoint, apiKey, unlabeledModelId); // The main difference is found in the labels of its fields // The form recognized with a model from training with labels will have the labels it was trained with, // The form recognized with a model from training without labels will be denoted with indices console.log("# Recognized fields using labeled custom model"); - for (const form of labeledResponse.forms || []) { + for (const form of formsWithLabels || []) { for (const fieldName in form.fields) { // With your labeled custom model, you will not get back label data but will get back value data // This is because your custom model didn't have to use any machine learning to deduce the label, @@ -45,7 +45,7 @@ async function main() { } console.log("# Recognized fields using unlabeled custom model"); - for (const form of unlabeledResponse.forms || []) { + for (const form of forms || []) { for (const fieldName in form.fields) { // The recognized form fields with a custom model from training without labels will also include data about recognized labels. const field = form.fields[fieldName]; @@ -69,11 +69,11 @@ async function recognizeCustomForm(path, endpoint, apiKey, labeledModelId) { } }); await poller.pollUntilDone(); - const response = poller.getResult(); - if (!response) { + const forms = poller.getResult(); + if (!forms || forms.length <= 0) { throw new Error("Expecting valid response!"); } - return response; + return forms; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/getBoundingBoxes.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/getBoundingBoxes.js index 17d9d712b671..51aa0afa91c3 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/getBoundingBoxes.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/getBoundingBoxes.js @@ -33,16 +33,11 @@ async function main() { } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - - console.log(response.status); console.log("Forms:"); let i = 0; - for (const form of response.forms || []) { + for (const form of forms || []) { console.log(` Form #${i++} has type ${form.formType}`); console.log(" Fields:"); for (const fieldName in form.fields) { @@ -79,9 +74,6 @@ async function main() { } } } - - console.log("Errors:"); - console.log(response.errors); } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeContent.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeContent.js index 3556b27f19d7..77e47e7c0e30 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeContent.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeContent.js @@ -26,15 +26,13 @@ async function main() { const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await client.beginRecognizeContent(readStream); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); + if (!pages || pages.length === 0) { + throw new Error("Expecting non-empty list of pages!"); } - console.log(response.status); - - for (const page of response.pages) { + for (const page of pages) { console.log( `Page ${page.pageNumber}: width ${page.width} and height ${page.height} with unit ${page.unit}` ); diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeCustomForm.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeCustomForm.js index d68072a1af18..16e52df6c983 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeCustomForm.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeCustomForm.js @@ -31,15 +31,10 @@ async function main() { } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - - console.log(response.status); console.log("Forms:"); - for (const form of response.forms || []) { + for (const form of forms || []) { console.log(`${form.formType}, page range: ${form.pageRange}`); console.log("Pages:"); for (const page of form.pages || []) { @@ -63,9 +58,6 @@ async function main() { ); } } - - console.log("Errors:"); - console.log(response.errors); } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceipt.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceipt.js index da6adf2f2b26..962464130850 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceipt.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceipt.js @@ -31,51 +31,42 @@ async function main() { }); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - console.log(`### Response status ${response.status}`); - - if (!response.receipts || response.receipts.length <= 0) { + if (!receipts || receipts.length <= 0) { throw new Error("Expecting at lease one receipt in analysis result"); } - const usReceipt = response.receipts[0]; + const receipt = receipts[0]; console.log("First receipt:"); - console.log(`Receipt type: ${usReceipt.receiptType.type} with confidence ${usReceipt.receiptType.confidence}`); - console.log( - `Merchant Name: ${usReceipt.merchantName.value} (confidence: ${usReceipt.merchantName.confidence})` - ); - console.log( - `Transaction Date: ${usReceipt.transactionDate.value} (confidence: ${usReceipt.transactionDate.confidence})` - ); - console.log("Receipt items:"); - console.log(` name\tprice\tquantity\ttotalPrice`); - for (const item of usReceipt.items) { - const name = `${optionalToString(item.name.value)} (confidence: ${optionalToString( - item.name.confidence - )})`; - const price = `${optionalToString(item.price.value)} (confidence: ${optionalToString( - item.price.confidence - )})`; - const quantity = `${optionalToString(item.quantity.value)} (confidence: ${optionalToString( - item.quantity.confidence - )})`; - const totalPrice = `${optionalToString(item.totalPrice.value)} (confidence: ${optionalToString( - item.totalPrice.confidence - )})`; - console.log(` ${name}\t${price}\t${quantity}\t${totalPrice}`); + // For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + if (receiptTypeField.valueType === "string") { + console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + } + const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + if (merchantNameField.valueType === "string") { + console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + } + const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + if (transactionDate.valueType === "date") { + console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + } + const itemsField = receipt.recognizedForm.fields["Items"]; + if (itemsField.valueType === "array") { + for (const itemField of itemsField.value || []) { + if (itemField.valueType === "object") { + const itemNameField = itemField.value["Name"]; + if (itemNameField.valueType === "string") { + console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + } + } + } + } + const totalField = receipt.recognizedForm.fields["Total"]; + if (totalField.valueType === "number") { + console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); } - - // raw fields are also included in the result - console.log("Raw 'MerchantAddress' field:"); - console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); -} - -function optionalToString(value) { - return `${value || ""}`; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceiptFromUrl.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceiptFromUrl.js index 11c0cbcdfbba..427c1d17894b 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceiptFromUrl.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/recognizeReceiptFromUrl.js @@ -20,61 +20,48 @@ async function main() { "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/contoso-allinone.jpg"; const poller = await client.beginRecognizeReceiptsFromUrl(url, { - includeTextDetails: true, + includeTextContent: true, onProgress: (state) => { console.log(`analyzing status: ${state.status}`); } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - console.log(`### Response status ${response.status}`); - - if (!response) { - throw new Error("Expecting analysis result"); - } - - if (!response.receipts || response.receipts.length <= 0) { + if (!receipts || receipts.length <= 0) { throw new Error("Expecting at lease one receipt in analysis result"); } - const usReceipt = response.receipts[0]; + const receipt = receipts[0]; console.log("First receipt:"); - console.log(`Receipt type: ${usReceipt.receiptType.type} with confidence ${usReceipt.receiptType.confidence}`); - console.log( - `Merchant Name: ${usReceipt.merchantName.value} (confidence: ${usReceipt.merchantName.confidence})` - ); - console.log( - `Transaction Date: ${usReceipt.transactionDate.value} (confidence: ${usReceipt.transactionDate.confidence})` - ); - console.log("Receipt items:"); - console.log(` name\tprice\tquantity\ttotalPrice`); - for (const item of usReceipt.items) { - const name = `${optionalToString(item.name.value)} (confidence: ${optionalToString( - item.name.confidence - )})`; - const price = `${optionalToString(item.price.value)} (confidence: ${optionalToString( - item.price.confidence - )})`; - const quantity = `${optionalToString(item.quantity.value)} (confidence: ${optionalToString( - item.quantity.confidence - )})`; - const totalPrice = `${optionalToString(item.totalPrice.value)} (confidence: ${optionalToString( - item.totalPrice.confidence - )})`; - console.log(` ${name}\t${price}\t${quantity}\t${totalPrice}`); + // For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + if (receiptTypeField.valueType === "string") { + console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + } + const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + if (merchantNameField.valueType === "string") { + console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + } + const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + if (transactionDate.valueType === "date") { + console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + } + const itemsField = receipt.recognizedForm.fields["Items"]; + if (itemsField.valueType === "array") { + for (const itemField of itemsField.value || []) { + if (itemField.valueType === "object") { + const itemNameField = itemField.value["Name"]; + if (itemNameField.valueType === "string") { + console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + } + } + } + } + const totalField = receipt.recognizedForm.fields["Total"]; + if (totalField.valueType === "number") { + console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); } - - // raw fields are also included in the result - console.log("Raw 'MerchantAddress' field:"); - console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); -} - -function optionalToString(value) { - return `${value || ""}`; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainLabeledModel.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainLabeledModel.js index 59cae6a26ad2..d3120c0390c7 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainLabeledModel.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainLabeledModel.js @@ -6,7 +6,7 @@ * See recognizeForm.ts to recognize forms using a custom model. */ -const { FormRecognizerClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); +const { FormTrainingClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); // Load the .env file if it exists require("dotenv").config(); @@ -17,8 +17,7 @@ async function main() { const apiKey = process.env["FORM_RECOGNIZER_API_KEY"] || ""; const containerSasUrl = process.env["LABELED_CONTAINER_SAS_URL"] || ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await trainingClient.beginTraining(containerSasUrl, true, { onProgress: (state) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainUnlabeledModel.js b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainUnlabeledModel.js index b7ff282e7b1a..d6cf80a1464c 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainUnlabeledModel.js +++ b/sdk/formrecognizer/ai-form-recognizer/samples/javascript/trainUnlabeledModel.js @@ -6,7 +6,7 @@ * See recognizeForm.js to recognize forms using a custom model. */ -const { FormRecognizerClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); +const { FormTrainingClient, AzureKeyCredential } = require("@azure/ai-form-recognizer"); // Load the .env file if it exists require("dotenv").config(); @@ -18,8 +18,7 @@ async function main() { const containerSasUrl = process.env["UNLABELED_CONTAINER_SAS_URL"] || ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await trainingClient.beginTraining(containerSasUrl, false, { onProgress: (state) => { @@ -35,11 +34,11 @@ async function main() { console.log(`Model ID: ${response.modelId}`); console.log(`Status: ${response.status}`); - console.log(`Created on: ${response.createdOn}`); - console.log(`Last modified: ${response.lastModified}`); + console.log(`Requested on: ${response.requestedOn}`); + console.log(`Completed on: ${response.completedOn}`); - if (response.models) { - for (const submodel of response.models) { + if (response.submodels) { + for (const submodel of response.submodels) { // since the training data is unlabeled, we are unable to return the accuracy of this model console.log("We have recognized the following fields"); for (const key in submodel.fields) { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/README.md b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/README.md index 32f764a4961e..8db4ad9913c8 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/README.md +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/README.md @@ -25,6 +25,7 @@ These sample programs show how to use the TypeScript client libraries for Azure |[iteratorModels.ts][iteratorModels]|List custom models using different ways| |[getBoundingBoxes.ts][getBoundingBoxes]|Get information to to visualize outlines of form content and field.| |[differentiateLabeledUnlabeled.ts][differentiateLabeledUnlabeled]|See the differences in output when using a custom model trained with labeled data and one trained with unlabeled data| | +|[copyModel.ts][copyModel]|Copy a custom model from one Form Recognizer resource to another| ## Prerequisites @@ -86,6 +87,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [iteratorModels]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/iteratorModels.ts [getBoundingBoxes]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/getBoundingBoxes.ts [differentiateLabeledUnlabeled]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/differentiateLabeledUnlabeled.ts +[copyModel]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/copyModel.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/ai-text-analytics [azcogsvc]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/copyModel.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/copyModel.ts new file mode 100644 index 000000000000..99390e3ec899 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/copyModel.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * This sample demonstrates how to copy a model from a source Form Recognizer resource + * to a target Form Recognizer resource. + */ + +import { FormTrainingClient, AzureKeyCredential } from "@azure/ai-form-recognizer"; + +// Load the .env file if it exists +require("dotenv").config(); + +export async function main() { + // You will need to set these environment variables or edit the following values + // information about the source Form Recognizer resource + const endpoint = process.env["FORM_RECOGNIZER_SOURCE_ENDPOINT"] || ""; + const apiKey = process.env["FORM_RECOGNIZER_SOURCE_API_KEY"] || ""; + const sourceModelId = process.env["FORM_RECOGNIZER_SOURCE_MODEL_ID"] || "" + // information about the target Form Recognizer resource + const targetEndpoint = process.env["FORM_RECOGNIZER_TARGET_ENDPOINT"] || ""; + const targetApiKey = process.env["FORM_RECOGNIZER_TARGET_API_KEY"] || ""; + const targetResourceRegion = process.env["FORM_RECOGNIZER_TARGET_REGION"] || "" + const targetResourceId = process.env["FORM_RECOGNIZER_TARGET_RESOURCE_ID"] || "" + + const targetClient = new FormTrainingClient(targetEndpoint, new AzureKeyCredential(targetApiKey)); + const authorization = await targetClient.getCopyAuthorization(targetResourceId, targetResourceRegion); + + const sourceClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); + const poller = await sourceClient.beginCopyModel(sourceModelId, authorization, { + onProgress: (state) => { + console.log(`Copy model status: ${state.status}`); + } + }); + await poller.pollUntilDone(); + const result = poller.getResult(); + + if (!result) { + throw new Error("Expecting valid result from copy model operation"); + } + + // now verify that the copy in the target Form Recognizer resource + console.log(`Model id: ${result.modelId}`); + console.log(`Status: ${result.status}`); + + const model = await targetClient.getCustomModel(result.modelId); + console.log(model); +} + +main().catch((err) => { + console.error("The sample encountered an error:", err); +}); diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/customModelManagement.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/customModelManagement.ts index 540bdab7abfc..9aa159019bd6 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/customModelManagement.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/customModelManagement.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * TThis sample demonstrates how to manage the custom models in + * This sample demonstrates how to manage the custom models in * a cognitive service account. */ diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/differentiateLabeledUnlabeled.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/differentiateLabeledUnlabeled.ts index d47a1c9eaa36..b9574e0b9be9 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/differentiateLabeledUnlabeled.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/differentiateLabeledUnlabeled.ts @@ -9,7 +9,7 @@ import { FormRecognizerClient, AzureKeyCredential, - RecognizeFormResultResponse + RecognizedForm } from "@azure/ai-form-recognizer"; import * as fs from "fs"; @@ -30,14 +30,14 @@ export async function main() { throw new Error(`Expecting file ${path} exists`); } - const labeledResponse = await recognizeCustomForm(path, endpoint, apiKey, labeledModelId); - const unlabeledResponse = await recognizeCustomForm(path, endpoint, apiKey, unlabeledModelId); + const formsWithLabels = await recognizeCustomForm(path, endpoint, apiKey, labeledModelId); + const forms = await recognizeCustomForm(path, endpoint, apiKey, unlabeledModelId); // The main difference is found in the labels of its fields // The form recognized with a labeled model will have the labels it was trained with, // the unlabeled one will be denoted with indices console.log("# Recognized fields using labeled custom model"); - for (const form of labeledResponse.forms || []) { + for (const form of formsWithLabels || []) { for (const fieldName in form.fields) { // With your labeled custom model, you will not get back label data but will get back value data // This is because your custom model didn't have to use any machine learning to deduce the label, @@ -50,7 +50,7 @@ export async function main() { } console.log("# Recognized fields using unlabeled custom model"); - for (const form of unlabeledResponse.forms || []) { + for (const form of forms || []) { for (const fieldName in form.fields) { // The recognized form fields with an unlabeled custom model will also include data about recognized labels. const field = form.fields[fieldName]; @@ -69,7 +69,7 @@ async function recognizeCustomForm( endpoint: string, apiKey: string, labeledModelId: string -): Promise { +): Promise { console.log("# Recognizing..."); const readStream = fs.createReadStream(path); const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); @@ -79,11 +79,11 @@ async function recognizeCustomForm( } }); await poller.pollUntilDone(); - const response = poller.getResult(); - if (!response) { + const forms = poller.getResult(); + if (!forms || forms?.length <= 0) { throw new Error("Expecting valid response!"); } - return response; + return forms; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/getBoundingBoxes.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/getBoundingBoxes.ts index ee0812f00512..f30b9a993db7 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/getBoundingBoxes.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/getBoundingBoxes.ts @@ -33,16 +33,11 @@ export async function main() { } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - - console.log(response.status); console.log("Forms:"); let i = 0; - for (const form of response.forms || []) { + for (const form of forms || []) { console.log(` Form #${i++} has type ${form.formType}`); console.log(" Fields:"); for (const fieldName in form.fields) { @@ -79,9 +74,6 @@ export async function main() { } } } - - console.log("Errors:"); - console.log(response.errors); } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeContent.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeContent.ts index 56ff8be3fac0..6ddc28575351 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeContent.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeContent.ts @@ -26,15 +26,13 @@ export async function main() { const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await client.beginRecognizeContent(readStream); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); + if (!pages || pages.length === 0) { + throw new Error("Expecting non-empty list of pages!"); } - console.log(response.status); - - for (const page of response.pages!) { + for (const page of pages!) { console.log( `Page ${page.pageNumber}: width ${page.width} and height ${page.height} with unit ${page.unit}` ); diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeCustomForm.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeCustomForm.ts index 0199dd8aac32..85b0219922e8 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeCustomForm.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeCustomForm.ts @@ -35,15 +35,10 @@ export async function main() { } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - - console.log(response.status); console.log("Forms:"); - for (const form of response.forms || []) { + for (const form of forms || []) { console.log(`${form.formType}, page range: ${form.pageRange}`); console.log("Pages:"); for (const page of form.pages || []) { @@ -67,9 +62,6 @@ export async function main() { ); } } - - console.log("Errors:"); - console.log(response.errors); } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceipt.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceipt.ts index 182850da6c10..fd476e012876 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceipt.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceipt.ts @@ -32,51 +32,42 @@ export async function main() { }); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - console.log(`Response status ${response.status}`); - - if (!response.receipts || response.receipts.length <= 0) { + if (!receipts || receipts.length <= 0) { throw new Error("Expecting at lease one receipt in analysis result"); } - const usReceipt = response.receipts[0]; + const receipt = receipts[0]; console.log("First receipt:"); - console.log(`Receipt type: ${usReceipt.receiptType.type} with confidence ${usReceipt.receiptType.confidence}`); - console.log( - `Merchant Name: ${usReceipt.merchantName.value} (confidence: ${usReceipt.merchantName.confidence})` - ); - console.log( - `Transaction Date: ${usReceipt.transactionDate.value} (confidence: ${usReceipt.transactionDate.confidence})` - ); - console.log("Receipt items:"); - console.log(` name\tprice\tquantity\ttotalPrice`); - for (const item of usReceipt.items) { - const name = `${optionalToString(item.name?.value)} (confidence: ${optionalToString( - item.name?.confidence - )})`; - const price = `${optionalToString(item.price?.value)} (confidence: ${optionalToString( - item.price?.confidence - )})`; - const quantity = `${optionalToString(item.quantity?.value)} (confidence: ${optionalToString( - item.quantity?.confidence - )})`; - const totalPrice = `${optionalToString(item.totalPrice?.value)} (confidence: ${optionalToString( - item.totalPrice?.confidence - )})`; - console.log(` ${name}\t${price}\t${quantity}\t${totalPrice}`); + // For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + if (receiptTypeField.valueType === "string") { + console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + } + const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + if (merchantNameField.valueType === "string") { + console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + } + const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + if (transactionDate.valueType === "date") { + console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + } + const itemsField = receipt.recognizedForm.fields["Items"]; + if (itemsField.valueType === "array") { + for (const itemField of itemsField.value || []) { + if (itemField.valueType === "object") { + const itemNameField = itemField.value!["Name"]; + if (itemNameField.valueType === "string") { + console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + } + } + } + } + const totalField = receipt.recognizedForm.fields["Total"]; + if (totalField.valueType === "number") { + console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); } - - // raw fields are also included in the result - console.log("Raw 'MerchantAddress' field:"); - console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); -} - -function optionalToString(value: unknown = undefined) { - return `${value || ""}`; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceiptFromUrl.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceiptFromUrl.ts index b8e492412621..7143f757a897 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceiptFromUrl.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/recognizeReceiptFromUrl.ts @@ -20,57 +20,48 @@ export async function main() { "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/contoso-allinone.jpg"; const poller = await client.beginRecognizeReceiptsFromUrl(url, { - includeTextDetails: true, + includeTextContent: true, onProgress: (state) => { console.log(`analyzing status: ${state.status}`); } }); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - if (!response) { - throw new Error("Expecting valid response!"); - } - console.log(`Response status ${response.status}`); - - if (!response.receipts || response.receipts.length <= 0) { + if (!receipts || receipts.length <= 0) { throw new Error("Expecting at lease one receipt in analysis result"); } - const usReceipt = response.receipts[0]; + const receipt = receipts[0]; console.log("First receipt:"); - console.log(`Receipt type: ${usReceipt.receiptType.type} with confidence ${usReceipt.receiptType.confidence}`); - console.log( - `Merchant Name: ${usReceipt.merchantName.value} (confidence: ${usReceipt.merchantName.confidence})` - ); - console.log( - `Transaction Date: ${usReceipt.transactionDate.value} (confidence: ${usReceipt.transactionDate.confidence})` - ); - console.log("Receipt items:"); - console.log(` name\tprice\tquantity\ttotalPrice`); - for (const item of usReceipt.items) { - const name = `${optionalToString(item.name?.value)} (confidence: ${optionalToString( - item.name?.confidence - )})`; - const price = `${optionalToString(item.price?.value)} (confidence: ${optionalToString( - item.price?.confidence - )})`; - const quantity = `${optionalToString(item.quantity?.value)} (confidence: ${optionalToString( - item.quantity?.confidence - )})`; - const totalPrice = `${optionalToString(item.totalPrice?.value)} (confidence: ${optionalToString( - item.totalPrice?.confidence - )})`; - console.log(` ${name}\t${price}\t${quantity}\t${totalPrice}`); + // For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + if (receiptTypeField.valueType === "string") { + console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + } + const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + if (merchantNameField.valueType === "string") { + console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + } + const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + if (transactionDate.valueType === "date") { + console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + } + const itemsField = receipt.recognizedForm.fields["Items"]; + if (itemsField.valueType === "array") { + for (const itemField of itemsField.value || []) { + if (itemField.valueType === "object") { + const itemNameField = itemField.value!["Name"]; + if (itemNameField.valueType === "string") { + console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + } + } + } + } + const totalField = receipt.recognizedForm.fields["Total"]; + if (totalField.valueType === "number") { + console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); } - - // raw fields are also included in the result - console.log("Raw 'MerchantAddress' field:"); - console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); -} - -function optionalToString(value: unknown = undefined) { - return `${value || ""}`; } main().catch((err) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainLabeledModel.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainLabeledModel.ts index 61bd4b17b644..79c4a19f3528 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainLabeledModel.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainLabeledModel.ts @@ -6,7 +6,7 @@ * See recognizeForm.ts to recognize forms using a custom model. */ -import { FormRecognizerClient, AzureKeyCredential } from "@azure/ai-form-recognizer"; +import { FormTrainingClient, AzureKeyCredential } from "@azure/ai-form-recognizer"; // Load the .env file if it exists require("dotenv").config(); @@ -17,8 +17,7 @@ export async function main() { const apiKey = process.env["FORM_RECOGNIZER_API_KEY"] || ""; const containerSasUrl = process.env["LABELED_CONTAINER_SAS_URL"] || ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await trainingClient.beginTraining(containerSasUrl, true, { onProgress: (state) => { diff --git a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainUnlabeledModel.ts b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainUnlabeledModel.ts index e4e00c8fdb0b..87dd40b0c57d 100644 --- a/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainUnlabeledModel.ts +++ b/sdk/formrecognizer/ai-form-recognizer/samples/typescript/src/trainUnlabeledModel.ts @@ -6,7 +6,7 @@ * See recognizeForm.ts to recognize forms using a custom model. */ -import { FormRecognizerClient, AzureKeyCredential } from "@azure/ai-form-recognizer"; +import { FormTrainingClient, AzureKeyCredential } from "@azure/ai-form-recognizer"; // Load the .env file if it exists require("dotenv").config(); @@ -19,8 +19,7 @@ export async function main() { process.env["UNLABELED_CONTAINER_SAS_URL"] || ""; - const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - const trainingClient = client.getFormTrainingClient(); + const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); const poller = await trainingClient.beginTraining(containerSasUrl, false, { onProgress: (state) => { @@ -37,11 +36,11 @@ export async function main() { console.log(`Model ID: ${response.modelId}`); console.log(`Status: ${response.status}`); - console.log(`Created on: ${response.createdOn}`); - console.log(`Last modified: ${response.lastModified}`); + console.log(`Requested on: ${response.requestedOn}`); + console.log(`Completed on: ${response.completedOn}`); - if (response.models) { - for (const submodel of response.models) { + if (response.submodels) { + for (const submodel of response.submodels) { // since the training data is unlabeled, we are unable to return the accuracy of this model console.log("We have recognized the following fields"); for (const key in submodel.fields) { diff --git a/sdk/formrecognizer/ai-form-recognizer/src/common.ts b/sdk/formrecognizer/ai-form-recognizer/src/common.ts index 3169789e4501..4861b79b25c5 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/common.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/common.ts @@ -3,10 +3,20 @@ import { PipelineOptions, OperationOptions } from "@azure/core-http"; import { FormRecognizerRequestBody } from "./models"; -import { ContentType, SourcePath } from "./generated/models"; +import { SourcePath } from "./generated/models"; import { getFirstFourBytesFromBlob, streamToBuffer } from "./utils/utils.node"; import { MAX_INPUT_DOCUMENT_SIZE } from "./constants"; + +/** + * Content types supported by Form Recognizer service. + */ +export type FormContentType = + | "application/pdf" + | "image/jpeg" + | "image/png" + | "image/tiff"; + /** * Client options used to configure Form Recognizer API requests. */ @@ -65,7 +75,7 @@ function isSourcePath(data: FormRecognizerRequestBody | SourcePath): data is Sou */ export async function getContentType( data: Blob | ArrayBuffer | ArrayBufferView | SourcePath -): Promise { +): Promise { if (isSourcePath(data)) { return undefined; } diff --git a/sdk/formrecognizer/ai-form-recognizer/src/constants.ts b/sdk/formrecognizer/ai-form-recognizer/src/constants.ts index b53024082df2..c1c91fb801d1 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/constants.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/constants.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "1.0.0-preview.3"; +export const SDK_VERSION: string = "1.0.0-preview.4"; export const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default"; @@ -12,3 +12,18 @@ export const LIB_INFO = `azsdk-js-ai-formrecognizer/${SDK_VERSION}`; * @internal */ export const MAX_INPUT_DOCUMENT_SIZE = 50 * 1024 * 1024; // 50 MB + +export const FormRecognizerLoggingAllowedHeaderNames = [ + "apim-request-id", + "Location", + "Operation-Location", + "Strict-Transport-Security", + "X-Content-Type-Options", + "x-envoy-upstream-service-time" +]; + +export const FormRecognizerLoggingAllowedQueryParameters = [ + "includeTextDetails", + "includeKeys", + "op" +]; diff --git a/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts b/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts index b3f9a4a2bcfe..d07d00fde718 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts @@ -10,12 +10,18 @@ import { AbortSignalLike, ServiceClientCredentials } from "@azure/core-http"; -import { TokenCredential } from '@azure/identity'; +import { TokenCredential } from "@azure/identity"; import { KeyCredential } from "@azure/core-auth"; -import { SDK_VERSION, DEFAULT_COGNITIVE_SCOPE } from "./constants"; +import { + SDK_VERSION, + DEFAULT_COGNITIVE_SCOPE, + FormRecognizerLoggingAllowedHeaderNames, + FormRecognizerLoggingAllowedQueryParameters +} from "./constants"; import { logger } from "./logger"; import { createSpan } from "./tracing"; import { + FormContentType, FormRecognizerClientOptions, FormRecognizerOperationOptions, toRequestBody, @@ -28,31 +34,52 @@ import { GeneratedClientAnalyzeWithCustomModelResponse as AnalyzeWithCustomModelResponseModel, GeneratedClientAnalyzeLayoutAsyncResponse as AnalyzeLayoutAsyncResponseModel, GeneratedClientAnalyzeReceiptAsyncResponse as AnalyzeReceiptAsyncResponseModel, - ContentType, SourcePath } from "./generated/models"; import { PollOperationState, PollerLike } from "@azure/core-lro"; import { - RecognizePollerClient, - BeginRecognizePoller, - BeginRecognizePollState, - RecognizeOptions -} from "./lro/analyze/poller"; + RecognizeContentPollerClient, + BeginRecognizeContentPoller, + BeginRecognizeContentPollState +} from "./lro/analyze/contentPoller"; +import { + RecognizeCustomFormPollerClient, + BeginRecognizeCustomFormPoller, + BeginRecognizeCustomFormPollState +} from "./lro/analyze/customFormPoller"; +import { + RecognizeReceiptPollerClient, + BeginRecognizeReceiptPoller, + BeginRecognizeReceiptPollState +} from "./lro/analyze/receiptPoller"; +import { + FormRecognizerRequestBody, + RecognizedFormArray, + FormPageArray, + RecognizedReceiptArray +} from "./models"; import { RecognizeContentResultResponse, RecognizeFormResultResponse, - RecognizeReceiptResultResponse, - FormRecognizerRequestBody -} from "./models"; + RecognizeReceiptResultResponse +} from "./internalModels"; import { toRecognizeFormResultResponse, toRecognizeContentResultResponse, toReceiptResultResponse } from "./transforms"; -import { FormTrainingClient } from "./formTrainingClient"; import { createFormRecognizerAzureKeyCredentialPolicy } from "./azureKeyCredentialPolicy"; -export { ContentType, PollOperationState, PollerLike }; +export { + PollOperationState, + PollerLike, + BeginRecognizeCustomFormPollState, + BeginRecognizeContentPollState, + BeginRecognizeReceiptPollState, + RecognizeContentPollerClient, + RecognizeCustomFormPollerClient, + RecognizeReceiptPollerClient +}; /** * Options for content/layout recognition. @@ -66,11 +93,11 @@ export type BeginRecognizeContentOptions = RecognizeContentOptions & { /** * Delay to wait until next poll, in milliseconds */ - intervalInMs?: number; + updateIntervalInMs?: number; /** * Callback to progress events triggered in the content recognition Long-Running-Operation (LRO) */ - onProgress?: (state: BeginRecognizePollState) => void; + onProgress?: (state: BeginRecognizeContentPollState) => void; /** * A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -81,8 +108,8 @@ export type BeginRecognizeContentOptions = RecognizeContentOptions & { * The Long-Running-Operation (LRO) poller that allows you to wait until form content is recognized. */ export type ContentPollerLike = PollerLike< - PollOperationState, - RecognizeContentResultResponse + PollOperationState, + FormPageArray >; /** @@ -97,7 +124,7 @@ export type RecognizeFormsOptions = FormRecognizerOperationOptions & { /** * Specifies whether to include text lines and element references in the result */ - includeTextDetails?: boolean; + includeTextContent?: boolean; }; /** @@ -107,11 +134,11 @@ export type BeginRecognizeFormsOptions = RecognizeFormsOptions & { /** * Delay to wait until next poll, in milliseconds */ - intervalInMs?: number; + updateIntervalInMs?: number; /** * Callback to progress events triggered in the Recognize Form Long-Running-Operation (LRO) */ - onProgress?: (state: BeginRecognizePollState) => void; + onProgress?: (state: BeginRecognizeCustomFormPollState) => void; /** * A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -122,8 +149,8 @@ export type BeginRecognizeFormsOptions = RecognizeFormsOptions & { * Result type of the Recognize Form Long-Running-Operation (LRO) */ export type FormPollerLike = PollerLike< - PollOperationState, - RecognizeFormResultResponse + PollOperationState, + RecognizedFormArray >; /** @@ -138,7 +165,7 @@ export type RecognizeReceiptsOptions = FormRecognizerOperationOptions & { /** * Specifies whether to include text lines and element references in the result */ - includeTextDetails?: boolean; + includeTextContent?: boolean; }; /** @@ -153,11 +180,11 @@ export type BeginRecognizeReceiptsOptions = RecognizeReceiptsOptions & { /** * Delay to wait until next poll, in milliseconds */ - intervalInMs?: number; + updateIntervalInMs?: number; /** * Callback to progress events triggered in the receipt recognition Long-Running-Operation (LRO) */ - onProgress?: (state: BeginRecognizePollState) => void; + onProgress?: (state: BeginRecognizeReceiptPollState) => void; /** * A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -168,8 +195,8 @@ export type BeginRecognizeReceiptsOptions = RecognizeReceiptsOptions & { * The Long-Running-Operation (LRO) poller that allows you to wait until receipt(s) are recognized. */ export type ReceiptPollerLike = PollerLike< - PollOperationState, - RecognizeReceiptResultResponse + PollOperationState, + RecognizedReceiptArray >; /** @@ -181,12 +208,6 @@ export class FormRecognizerClient { */ public readonly endpointUrl: string; - /** - * @internal - * @ignore - */ - private readonly credential: TokenCredential | KeyCredential; - /** * @internal * @ignore @@ -216,7 +237,6 @@ export class FormRecognizerClient { options: FormRecognizerClientOptions = {} ) { this.endpointUrl = endpointUrl; - this.credential = credential; const { ...pipelineOptions } = options; const libInfo = `azsdk-js-ai-formrecognizer/${SDK_VERSION}`; @@ -238,7 +258,8 @@ export class FormRecognizerClient { ...{ loggingOptions: { logger: logger.info, - allowedHeaderNames: ["x-ms-correlation-request-id", "x-ms-request-id"] + allowedHeaderNames: FormRecognizerLoggingAllowedHeaderNames, + allowedQueryParameters: FormRecognizerLoggingAllowedQueryParameters } } }; @@ -259,20 +280,11 @@ export class FormRecognizerClient { this.client = new GeneratedClient(dummyCredential, this.endpointUrl, pipeline); } - /** - * Creates an instance of {@link FormTrainingClient} to perform training operations - * and to manage trained custom form models. - */ - public getFormTrainingClient(): FormTrainingClient { - return new FormTrainingClient(this.endpointUrl, this.credential); - } - /** * Recognizes content, including text and table structure from a form document. * * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -287,29 +299,26 @@ export class FormRecognizerClient { * }); * * await poller.pollUntilDone(); - * const response = poller.getResult(); - * - * console.log(response.status); - * console.log(response.pages); + * const pages = poller.getResult(); * ``` * @summary Recognizes content/layout information from a given document - * @param {FormRecognizerRequestBody} data Input document - * @param {ContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; + * @param {FormRecognizerRequestBody} form Input document + * @param {FormContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; * @param {BeginRecognizeContentOptions} [options] Options to start content recognition operation */ public async beginRecognizeContent( - data: FormRecognizerRequestBody, - contentType?: ContentType, + form: FormRecognizerRequestBody, + contentType?: FormContentType, options: BeginRecognizeContentOptions = {} ): Promise { - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeContentPollerClient = { beginRecognize: (...args) => recognizeLayoutInternal(this.client, ...args), getRecognizeResult: (...args) => this.getRecognizedContent(...args) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeContentPoller({ client: analyzePollerClient, - source: data, + source: form, contentType, ...options }); @@ -322,8 +331,7 @@ export class FormRecognizerClient { * Recognizes content, including text and table structure from a url to a form document. * * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -337,28 +345,25 @@ export class FormRecognizerClient { * }); * * await poller.pollUntilDone(); - * const response = poller.getResult(); - * - * console.log(response.status); - * console.log(response.pages); + * const pages = poller.getResult(); * ``` * @summary Recognizes content/layout information from a url to a form document - * @param {string} formFileUrl Url to an accessible form document + * @param {string} formUrl Url to an accessible form document ng", and "image/tiff"; * @param {BeginRecognizeContentOptions} [options] Options to start content recognition operation */ public async beginRecognizeContentFromUrl( - formFileUrl: string, + formUrl: string, options: BeginRecognizeContentOptions = {} ): Promise { - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeContentPollerClient = { beginRecognize: (...args) => recognizeLayoutInternal(this.client, ...args), getRecognizeResult: (...args) => this.getRecognizedContent(...args) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeContentPoller({ client: analyzePollerClient, - source: formFileUrl, + source: formUrl, contentType: undefined, ...options }); @@ -399,8 +404,7 @@ ng", and "image/tiff"; /** * Recognizes forms from a given document using a custom form model from training. * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -414,39 +418,38 @@ ng", and "image/tiff"; * onProgress: (state) => { console.log(`status: ${state.status}`); } * }); * await poller.pollUntilDone(); - * const response = poller.getResult(); - * console.log(response.status); + * const forms = poller.getResult(); * ``` * @summary Recognizes form information from a given document using a custom form model. * @param {string} modelId Id of the custom form model to use - * @param {FormRecognizerRequestBody} data Input form document - * @param {ContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; + * @param {FormRecognizerRequestBody} form Input form document + * @param {FormContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; * @param {BeginRecognizeFormsOptions} [options] Options to start the form recognition operation */ public async beginRecognizeCustomForms( modelId: string, - data: FormRecognizerRequestBody, - contentType?: ContentType, + form: FormRecognizerRequestBody, + contentType?: FormContentType, options: BeginRecognizeFormsOptions = {} ): Promise { if (!modelId) { throw new RangeError("Invalid model id"); } - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeCustomFormPollerClient = { beginRecognize: ( body: FormRecognizerRequestBody | string, - contentType?: ContentType, - analyzeOptions: RecognizeOptions = {}, - modelId?: string + modelId: string, + contentType?: FormContentType, + analyzeOptions: RecognizeFormsOptions = {} ) => recognizeCustomFormInternal(this.client, body, contentType, analyzeOptions, modelId!), getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => this.getRecognizedForm(modelId, resultId, options) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeCustomFormPoller({ client: analyzePollerClient, modelId, - source: data, + source: form, contentType, ...options }); @@ -458,8 +461,7 @@ ng", and "image/tiff"; /** * Recognizes forms from a url to a form document using a custom form model from training. * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -472,40 +474,37 @@ ng", and "image/tiff"; * onProgress: (state) => { console.log(`status: ${state.status}`); } * }); * await poller.pollUntilDone(); - * const response = poller.getResult(); - * console.log(response.status); + * const forms = poller.getResult(); * ``` * @summary Recognizes form information from a url to a form document using a custom form model. * @param {string} modelId Id of the custom form model to use - * @param {string} formFileUrl Url to an accessible form document + * @param {string} formUrl Url to an accessible form document ng", and "image/tiff"; * @param {BeginRecognizeFormsOptions} [options] Options to start the form recognition operation */ public async beginRecognizeCustomFormsFromUrl( modelId: string, - formFileUrl: string, + formUrl: string, options: BeginRecognizeFormsOptions = {} - ): Promise< - PollerLike, RecognizeFormResultResponse> - > { + ): Promise { if (!modelId) { throw new RangeError("Invalid modelId"); } - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeCustomFormPollerClient = { beginRecognize: ( body: FormRecognizerRequestBody | string, - contentType?: ContentType, - analyzeOptions: RecognizeOptions = {}, - modelId?: string + modelId: string, + contentType?: FormContentType, + analyzeOptions: RecognizeFormsOptions = {} ) => recognizeCustomFormInternal(this.client, body, contentType, analyzeOptions, modelId!), getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => this.getRecognizedForm(modelId, resultId, options) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeCustomFormPoller({ client: analyzePollerClient, modelId, - source: formFileUrl, + source: formUrl, contentType: undefined, ...options }); @@ -551,9 +550,10 @@ ng", and "image/tiff"; * Recognizes data from receipts using pre-built receipt model, enabling you to extract structure data * from receipts such as merchant name, merchant phone number, transaction date, and more. * + * For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + * * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -568,35 +568,59 @@ ng", and "image/tiff"; * }); * * await poller.pollUntilDone(); - * const response = poller.getResult(); + * const receipts = poller.getResult(); + * if (!receipts || receipts.length <= 0) { + * throw new Error("Expecting at lease one receipt in analysis result"); + * } * - * console.log(`Response status ${response.status}`); - * console.log("First receipt:") - * console.log(response.receipts[0]); - * console.log("Items:") - * const usReceipt = toUSReceipt(response.receipts[0]); - * console.table(usReceipt.items, ["name", "quantity", "price", "totalPrice"]); - * console.log("Raw 'MerchantAddress' fields:"); - * console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); + * const receipt = receipts[0]; + * console.log("First receipt:"); + * const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + * if (receiptTypeField.valueType === "string") { + * console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + * } + * const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + * if (merchantNameField.valueType === "string") { + * console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + * } + * const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + * if (transactionDate.valueType === "date") { + * console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + * } + * const itemsField = receipt.recognizedForm.fields["Items"]; + * if (itemsField.valueType === "array") { + * for (const itemField of itemsField.value || []) { + * if (itemField.valueType === "object") { + * const itemNameField = itemField.value!["Name"]; + * if (itemNameField.valueType === "string") { + * console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + * } + * } + * } + * } + * const totalField = receipt.recognizedForm.fields["Total"]; + * if (totalField.valueType === "number") { + * console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); + * } * ``` * @summary Recognizes receipt information from a given document - * @param {FormRecognizerRequestBody} data Input document - * @param {ContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; + * @param {FormRecognizerRequestBody} receipt Input document + * @param {FormContentType} contentType Content type of the input. Supported types are "application/pdf", "image/jpeg", "image/png", and "image/tiff"; * @param {BeginRecognizeReceiptsOptions} [options] Options to start the receipt recognition operation */ public async beginRecognizeReceipts( - data: FormRecognizerRequestBody, - contentType?: ContentType, + receipt: FormRecognizerRequestBody, + contentType?: FormContentType, options: BeginRecognizeReceiptsOptions = {} ): Promise { - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeReceiptPollerClient = { beginRecognize: (...args) => recognizeReceiptInternal(this.client, ...args), - getRecognizeResult: (...args) => this.getreceipts(...args) + getRecognizeResult: (...args) => this.getReceipts(...args) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeReceiptPoller({ client: analyzePollerClient, - source: data, + source: receipt, contentType, ...options }); @@ -609,9 +633,10 @@ ng", and "image/tiff"; * Recognizes receipt information from a url using pre-built receipt model, enabling you to extract structure data * from receipts such as merchant name, merchant phone number, transaction date, and more. * + * For supported fields recognized by the service, please refer to https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/GetAnalyzeReceiptResult. + * * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * @@ -621,37 +646,61 @@ ng", and "image/tiff"; * const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); * const poller = await client.beginRecognizeReceiptsFromUrl( * url, { - * includeTextDetails: true, + * includeTextContent: true, * onProgress: (state) => { console.log(`analyzing status: ${state.status}`); } * }); * await poller.pollUntilDone(); - * const response = poller.getResult(); + * const receipts = poller.getResult(); + * if (!receipts || receipts.length <= 0) { + * throw new Error("Expecting at lease one receipt in analysis result"); + * } * - * console.log(`Response status ${response.status}`); - * console.log("First receipt:") - * console.log(response.receipts[0]); - * console.log("Items:") - * const usReceipt = toUSReceipt(response.receipts[0]); - * console.table(usReceipt.items, ["name", "quantity", "price", "totalPrice"]); - * console.log("Raw 'MerchantAddress' fields:"); - * console.log(usReceipt.recognizedForm.fields["MerchantAddress"]); + * const receipt = receipts[0]; + * console.log("First receipt:"); + * const receiptTypeField = receipt.recognizedForm.fields["ReceiptType"]; + * if (receiptTypeField.valueType === "string") { + * console.log(` Receipt Type: '${receiptTypeField.value || ""}', with confidence of ${receiptTypeField.confidence}`); + * } + * const merchantNameField = receipt.recognizedForm.fields["MerchantName"]; + * if (merchantNameField.valueType === "string") { + * console.log(` Merchant Name: '${merchantNameField.value || ""}', with confidence of ${merchantNameField.confidence}`); + * } + * const transactionDate = receipt.recognizedForm.fields["TransactionDate"]; + * if (transactionDate.valueType === "date") { + * console.log(` Transaction Date: '${transactionDate.value || ""}', with confidence of ${transactionDate.confidence}`); + * } + * const itemsField = receipt.recognizedForm.fields["Items"]; + * if (itemsField.valueType === "array") { + * for (const itemField of itemsField.value || []) { + * if (itemField.valueType === "object") { + * const itemNameField = itemField.value!["Name"]; + * if (itemNameField.valueType === "string") { + * console.log(` Item Name: '${itemNameField.value || ""}', with confidence of ${itemNameField.confidence}`); + * } + * } + * } + * } + * const totalField = receipt.recognizedForm.fields["Total"]; + * if (totalField.valueType === "number") { + * console.log(` Total: '${totalField.value || ""}', with confidence of ${totalField.confidence}`); + * } * ``` * @summary Recognizes receipt information from a given accessible url to input document - * @param {string} receiptFileUrl url to the input receipt document + * @param {string} receiptUrl url to the input receipt document * @param {BeginRecognizeReceiptsOptions} [options] Options to start receipt recognition operation */ public async beginRecognizeReceiptsFromUrl( - receiptFileUrl: string, + receiptUrl: string, options: BeginRecognizeReceiptsOptions = {} ): Promise { - const analyzePollerClient: RecognizePollerClient = { + const analyzePollerClient: RecognizeReceiptPollerClient = { beginRecognize: (...args) => recognizeReceiptInternal(this.client, ...args), - getRecognizeResult: (...args) => this.getreceipts(...args) + getRecognizeResult: (...args) => this.getReceipts(...args) }; - const poller = new BeginRecognizePoller({ + const poller = new BeginRecognizeReceiptPoller({ client: analyzePollerClient, - source: receiptFileUrl, + source: receiptUrl, contentType: undefined, ...options }); @@ -664,7 +713,7 @@ ng", and "image/tiff"; * Retrieves result of a receipt recognition operation. * @private */ - private async getreceipts( + private async getReceipts( resultId: string, options?: GetReceiptsOptions ): Promise { @@ -698,7 +747,7 @@ ng", and "image/tiff"; async function recognizeLayoutInternal( client: GeneratedClient, body: FormRecognizerRequestBody | string, - contentType?: ContentType, + contentType?: FormContentType, options?: RecognizeContentOptions, _modelId?: string ): Promise { @@ -715,11 +764,10 @@ async function recognizeLayoutInternal( operationOptionsToRequestOptionsBase(finalOptions) ); } - return await client.analyzeLayoutAsync( - "application/json", { + return await client.analyzeLayoutAsync("application/json", { fileStream: requestBody as SourcePath, - ...operationOptionsToRequestOptionsBase(finalOptions) - }); + ...operationOptionsToRequestOptionsBase(finalOptions) + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -737,11 +785,14 @@ async function recognizeLayoutInternal( async function recognizeCustomFormInternal( client: GeneratedClient, body: FormRecognizerRequestBody | string, - contentType?: ContentType, + contentType?: FormContentType, options: RecognizeFormsOptions = {}, modelId?: string ): Promise { - const { span, updatedOptions: finalOptions } = createSpan("analyzeCustomFormInternal", options); + const { span, updatedOptions: finalOptions } = createSpan("analyzeCustomFormInternal", { + ...options, + includeTextDetails: options.includeTextContent + }); const requestBody = await toRequestBody(body); const requestContentType = contentType ? contentType : await getContentType(requestBody); @@ -754,11 +805,9 @@ async function recognizeCustomFormInternal( operationOptionsToRequestOptionsBase(finalOptions) ); } - return await client.analyzeWithCustomModel( - modelId!, - "application/json", { - fileStream: requestBody as SourcePath, - ...operationOptionsToRequestOptionsBase(finalOptions) + return await client.analyzeWithCustomModel(modelId!, "application/json", { + fileStream: requestBody as SourcePath, + ...operationOptionsToRequestOptionsBase(finalOptions) }); } catch (e) { span.setStatus({ @@ -777,12 +826,15 @@ async function recognizeCustomFormInternal( async function recognizeReceiptInternal( client: GeneratedClient, body: FormRecognizerRequestBody | string, - contentType?: ContentType, + contentType?: FormContentType, options?: RecognizeReceiptsOptions, _modelId?: string ): Promise { - const realOptions = options || { includeTextDetails: false }; - const { span, updatedOptions: finalOptions } = createSpan("analyzeReceiptInternal", realOptions); + const realOptions = options || { includeTextContent: false }; + const { span, updatedOptions: finalOptions } = createSpan("analyzeReceiptInternal", { + ...realOptions, + includeTextDetails: realOptions.includeTextContent + }); const requestBody = await toRequestBody(body); const requestContentType = contentType !== undefined ? contentType : await getContentType(requestBody); @@ -795,10 +847,9 @@ async function recognizeReceiptInternal( operationOptionsToRequestOptionsBase(finalOptions) ); } - return await client.analyzeReceiptAsync( - "application/json", { - fileStream: requestBody as SourcePath, - ...operationOptionsToRequestOptionsBase(finalOptions) + return await client.analyzeReceiptAsync("application/json", { + fileStream: requestBody as SourcePath, + ...operationOptionsToRequestOptionsBase(finalOptions) }); } catch (e) { span.setStatus({ diff --git a/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts b/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts index 5240382cb06a..b1b529721a5c 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts @@ -12,27 +12,53 @@ import { RestResponse, ServiceClientCredentials } from "@azure/core-http"; -import { TokenCredential } from '@azure/identity'; +import { TokenCredential } from "@azure/identity"; import { KeyCredential } from "@azure/core-auth"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import "@azure/core-paging"; -import { SDK_VERSION, DEFAULT_COGNITIVE_SCOPE } from "./constants"; +import { + SDK_VERSION, + DEFAULT_COGNITIVE_SCOPE, + FormRecognizerLoggingAllowedHeaderNames, + FormRecognizerLoggingAllowedQueryParameters +} from "./constants"; import { logger } from "./logger"; import { createSpan } from "./tracing"; import { CanonicalCode } from "@opentelemetry/api"; import { GeneratedClient } from "./generated/generatedClient"; import { - GeneratedClientGetCustomModelsResponse as ListModelsResponseModel, + GeneratedClientGetCustomModelCopyResultResponse as GetCustomModelCopyResultResponseModel, + GeneratedClientCopyCustomModelResponse as CopyCustomModelResponseModel, GeneratedClientTrainCustomModelAsyncResponse } from "./generated/models"; import { TrainPollerClient, BeginTrainingPoller, BeginTrainingPollState } from "./lro/train/poller"; import { PollOperationState, PollerLike } from "@azure/core-lro"; import { FormRecognizerClientOptions, FormRecognizerOperationOptions } from "./common"; -import { FormModelResponse, AccountProperties, CustomFormModelInfo } from "./models"; +import { + FormModelResponse, + AccountProperties, + CustomFormModel, + CustomFormModelInfo, + CopyAuthorization, + CopyAuthorizationResultModel, + ListCustomModelsResponse +} from "./models"; import { createFormRecognizerAzureKeyCredentialPolicy } from "./azureKeyCredentialPolicy"; import { toFormModelResponse } from "./transforms"; +import { + CopyModelPollerClient, + BeginCopyModelPoller, + BeginCopyModelPollState +} from "./lro/copy/poller"; +import { FormRecognizerClient } from "./formRecognizerClient"; -export { ListModelsResponseModel, RestResponse }; +export { + RestResponse, + TrainPollerClient, + BeginTrainingPollState, + BeginCopyModelPollState, + CopyModelPollerClient +}; /** * Options for model listing operation. */ @@ -53,10 +79,34 @@ export type DeleteModelOptions = FormRecognizerOperationOptions; */ export type GetModelOptions = FormRecognizerOperationOptions; +/** + * Options for the generate copy model authorization operation. + */ +export type GetCopyAuthorizationOptions = FormRecognizerOperationOptions; + +/** + * Options for the copy custom model operation. + */ +export type CopyModelOptions = FormRecognizerOperationOptions; + +/** + * Options for the get copy model result operation. + */ +export type GetCopyModelResultOptions = FormRecognizerOperationOptions; + +/** + * Options for begin copy model operation + */ +export type BeginCopyModelOptions = FormRecognizerOperationOptions & { + updateIntervalInMs?: number; + onProgress?: (state: BeginCopyModelPollState) => void; + resumeFrom?: string; +}; + /** * Options for training models */ -export type TrainModelOptions = FormRecognizerOperationOptions & { +export type TrainingFileFilter = FormRecognizerOperationOptions & { prefix?: string; includeSubFolders?: boolean; }; @@ -64,9 +114,9 @@ export type TrainModelOptions = FormRecognizerOperationOptions & { /** * Options for starting model training operation. */ -export type BeginTrainingOptions = TrainModelOptions & { - intervalInMs?: number; - onProgress?: (state: BeginTrainingPollState) => void; +export type BeginTrainingOptions = TrainingFileFilter & { + updateIntervalInMs?: number; + onProgress?: (state: BeginTrainingPollState) => void; resumeFrom?: string; }; @@ -79,6 +129,18 @@ export class FormTrainingClient { */ public readonly endpointUrl: string; + /** + * @internal + * @ignore + */ + private readonly credential: TokenCredential | KeyCredential; + + /** + * @internal + * @ignore + */ + private readonly clientOptions: FormRecognizerClientOptions; + /** * @internal * @ignore @@ -108,6 +170,8 @@ export class FormTrainingClient { options: FormRecognizerClientOptions = {} ) { this.endpointUrl = endpointUrl; + this.credential = credential; + this.clientOptions = options; const { ...pipelineOptions } = options; const libInfo = `azsdk-js-ai-formrecognizer/${SDK_VERSION}`; @@ -129,7 +193,8 @@ export class FormTrainingClient { ...{ loggingOptions: { logger: logger.info, - allowedHeaderNames: ["x-ms-correlation-request-id", "x-ms-request-id"] + allowedHeaderNames: FormRecognizerLoggingAllowedHeaderNames, + allowedQueryParameters: FormRecognizerLoggingAllowedQueryParameters } } }; @@ -149,6 +214,7 @@ export class FormTrainingClient { this.client = new GeneratedClient(dummyCredential, this.endpointUrl, pipeline); } + /** * Retrieves summary information about the cognitive service account * @@ -157,7 +223,7 @@ export class FormTrainingClient { public async getAccountProperties( options?: GetAccountPropertiesOptions ): Promise { - const realOptions: ListModelsOptions = options || {}; + const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( "FormTrainingClient-listCustomModels", realOptions @@ -183,6 +249,14 @@ export class FormTrainingClient { } } + /** + * Creates an instance of {@link FormTrainingClient} to perform training operations + * and to manage trained custom form models. + */ + public getFormRecognizerClient(): FormRecognizerClient { + return new FormRecognizerClient(this.endpointUrl, this.credential, this.clientOptions); + } + /** * Mark model for deletion. Model artifacts will be permanently removed within 48 hours. * @@ -250,7 +324,7 @@ export class FormTrainingClient { private async *listModelsPage( _settings: PageSettings, options: ListModelsOptions = {} - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result = await this.list(options); yield result; @@ -313,7 +387,7 @@ export class FormTrainingClient { */ public listCustomModels( options: ListModelsOptions = {} - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listModelsAll({}, options); return { @@ -331,7 +405,7 @@ export class FormTrainingClient { }; } - private async list(options?: ListModelsOptions): Promise { + private async list(options?: ListModelsOptions): Promise { const realOptions: ListModelsOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( "FormTrainingClient-list", @@ -358,7 +432,7 @@ export class FormTrainingClient { private async listNextPage( nextLink: string, options?: ListModelsOptions - ): Promise { + ): Promise { const realOptions: ListModelsOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( "FormTrainingClient-listNextPage", @@ -385,47 +459,46 @@ export class FormTrainingClient { /** * Creates and trains a custom form model. * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * indefinitely until the operation is completed. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * + * Note that when training operation fails, a model is still created in Azure Form Recognizer resource. + * * Example usage: * ```ts * const trainingFilesUrl = ""; - * const client = new FormRecognizerClient(endpoint, new AzureKeyCredential(apiKey)); - * const trainingClient = client.getFormTrainingClient(); + * const trainingClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); * - * const poller = await trainingClient.beginTraining(trainingFilesUrl, { + * const poller = await trainingClient.beginTraining(trainingFilesUrl, false, { * onProgress: (state) => { console.log("training status: "); console.log(state); } * }); * await poller.pollUntilDone(); * const response = poller.getResult(); - * console.log(response) * ``` - * @summary Creats and trains a model + * @summary Creates and trains a model * @param {string} trainingFilesUrl Accessible url to an Azure Storage Blob container storing the training documents * @param {boolean} useTrainingLabels specifies whether to training the model using label files * @param {BeginTrainingOptions} [options] Options to start model training operation */ public async beginTraining( trainingFilesUrl: string, - useTrainingLabels: boolean = false, - options: BeginTrainingOptions = {} - ): Promise, FormModelResponse>> { - const trainPollerClient: TrainPollerClient = { + useTrainingLabels: boolean, + options: BeginTrainingOptions = {} + ): Promise, CustomFormModel>> { + const trainPollerClient: TrainPollerClient = { getCustomModel: (modelId: string, options: GetModelOptions) => this.getCustomModel(modelId, options), trainCustomModelInternal: ( source: string, _useLabelFile?: boolean, - options?: TrainModelOptions + options?: TrainingFileFilter ) => trainCustomModelInternal(this.client, source, useTrainingLabels, options) }; const poller = new BeginTrainingPoller({ client: trainPollerClient, source: trainingFilesUrl, - intervalInMs: options.intervalInMs, + updateIntervalInMs: options.updateIntervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, trainModelOptions: options @@ -434,6 +507,154 @@ export class FormTrainingClient { await poller.poll(); return poller; } + + /** + * Generates authorization for copying a custom model into this Azure Form Recognizer resource. + * + * @param {string} resourceId Id of the Azure Form Recognizer resource where a custom model will be copied to + * @param {string} resourceRegion Location of the Azure Form Recognizer resource + * @param {GetCopyAuthorizationOptions} [options={}] Options to get copy authorization operation + * @returns {Promise} The authorization to copy a custom model + */ + public async getCopyAuthorization( + resourceId: string, + resourceRegion: string, + options: GetCopyAuthorizationOptions = {} + ): Promise { + const { span, updatedOptions: finalOptions } = createSpan( + "FormTrainingClient-getCopyAuthorization", + options + ); + + try { + const response = await this.client.generateModelCopyAuthorization( + operationOptionsToRequestOptionsBase(finalOptions) + ); + return { + resourceId: resourceId, + resourceRegion: resourceRegion, + //expiresOn: new Date(response.expirationDateTimeTicks), + ...(response as CopyAuthorizationResultModel) + }; + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Copies a custom model from this resource (the source) to the specified target Form Recognizer resource. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the operation is completed. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * Example usage: + * ```ts + * const targetClient = new FormTrainingClient(targetEndpoint, new AzureKeyCredential(targetApiKey)); + * const authorization = await targetClient.getCopyAuthorization(targetResourceId, targetResourceRegion); + * + * const sourceClient = new FormTrainingClient(endpoint, new AzureKeyCredential(apiKey)); + * const poller = await sourceClient.beginCopyModel(sourceModelId, authorization, { + * onProgress: (state) => { + * console.log(`Copy model status: ${state.status}`); + * } + * }); + * await poller.pollUntilDone(); + * const result = poller.getResult(); + * ``` + * @summary Copies custom model to target resource + * @param {string} modelId Id of the custom model in this resource to be copied to the target Form Recognizer resource + * @param {CopyAuthorization} target Copy authorization produced by calling `targetTrainingClient.getCopyAuthorization()` + * @param {BeginTrainingOptions} [options] Options to copy model operation + */ + public async beginCopyModel( + modelId: string, + target: CopyAuthorization, + options: BeginCopyModelOptions = {} + ): Promise, CustomFormModelInfo>> { + const copyModelClient: CopyModelPollerClient = { + beginCopyModel: (...args) => this.beginCopyModelInternal(...args), + getCopyModelResult: (...args) => this.getCopyModelResult(...args) + }; + + const poller = new BeginCopyModelPoller({ + client: copyModelClient, + modelId, + targetResourceId: target.resourceId, + targetResourceRegion: target.resourceRegion, + copyAuthorization: target, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + ...options + }); + + await poller.poll(); + return poller; + } + + private async beginCopyModelInternal( + modelId: string, + copyAuthorization: CopyAuthorization, + options: BeginCopyModelOptions = {} + ): Promise { + const { span, updatedOptions: finalOptions } = createSpan( + "FormTrainingClient-beginCopyModelInternal", + options + ); + + try { + return await this.client.copyCustomModel( + modelId, + { + targetResourceId: copyAuthorization.resourceId, + targetResourceRegion: copyAuthorization.resourceRegion, + copyAuthorization: copyAuthorization + }, + operationOptionsToRequestOptionsBase(finalOptions) + ); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + private async getCopyModelResult( + modelId: string, + resultId: string, + options: GetCopyModelResultOptions = {} + ): Promise { + const { span, updatedOptions: finalOptions } = createSpan( + "FormTrainingClient-getCopyModelResult", + options + ); + + try { + return await this.client.getCustomModelCopyResult( + modelId, + resultId, + operationOptionsToRequestOptionsBase(finalOptions) + ); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } } /** @@ -443,7 +664,7 @@ async function trainCustomModelInternal( client: GeneratedClient, source: string, useLabelFile?: boolean, - options?: TrainModelOptions + options?: TrainingFileFilter ): Promise { const realOptions = options || {}; const { span, updatedOptions: finalOptions } = createSpan( diff --git a/sdk/formrecognizer/ai-form-recognizer/src/generated/generatedClientContext.ts b/sdk/formrecognizer/ai-form-recognizer/src/generated/generatedClientContext.ts index 2abfc815a80a..6644fc9925e1 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/generated/generatedClientContext.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/generated/generatedClientContext.ts @@ -10,7 +10,7 @@ import * as coreHttp from "@azure/core-http"; import * as Models from "./models"; const packageName = "@azure/ai-form-recognizer"; -const packageVersion = "1.0.0-preview.3"; +const packageVersion = "1.0.0-preview.4"; export class GeneratedClientContext extends coreHttp.ServiceClient { endpoint: string; diff --git a/sdk/formrecognizer/ai-form-recognizer/src/generated/models/index.ts b/sdk/formrecognizer/ai-form-recognizer/src/generated/models/index.ts index 82c8499b6a07..5533a0ac7e3f 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/generated/models/index.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/generated/models/index.ts @@ -82,11 +82,11 @@ export interface ModelInfo { /** * Date and time (UTC) when the model was created. */ - createdOn: Date; + requestedOn: Date; /** * Date and time (UTC) when the status was last updated. */ - lastModified: Date; + completedOn: Date; } /** diff --git a/sdk/formrecognizer/ai-form-recognizer/src/generated/models/mappers.ts b/sdk/formrecognizer/ai-form-recognizer/src/generated/models/mappers.ts index 96ac8bd366db..46b227a9229b 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/generated/models/mappers.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/generated/models/mappers.ts @@ -153,14 +153,14 @@ export const ModelInfo: coreHttp.CompositeMapper = { allowedValues: ["creating", "ready", "invalid"] } }, - createdOn: { + requestedOn: { serializedName: "createdDateTime", required: true, type: { name: "DateTime" } }, - lastModified: { + completedOn: { serializedName: "lastUpdatedDateTime", required: true, type: { diff --git a/sdk/formrecognizer/ai-form-recognizer/src/index.ts b/sdk/formrecognizer/ai-form-recognizer/src/index.ts index 34b893a7f66d..6fc8b9fe845e 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/index.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/index.ts @@ -5,8 +5,10 @@ export { AzureKeyCredential } from "@azure/core-auth"; -export { FormRecognizerClientOptions, FormRecognizerOperationOptions } from "./common"; +export { + FormContentType, + FormRecognizerClientOptions, + FormRecognizerOperationOptions } from "./common"; export * from "./formRecognizerClient"; export * from "./formTrainingClient"; - export * from "./models"; diff --git a/sdk/formrecognizer/ai-form-recognizer/src/internalModels.ts b/sdk/formrecognizer/ai-form-recognizer/src/internalModels.ts new file mode 100644 index 000000000000..68e876d0a499 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/src/internalModels.ts @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as coreHttp from "@azure/core-http"; +import { + AnalyzeOperationResult as AnalyzeOperationResultModel, + ErrorInformation, + OperationStatus +} from "./generated/models"; +import { + RecognizedForm, RecognizedReceipt, FormPage +} from "./models"; + +/** + * Represents the result from an Recognize Content operation + */ +export interface RecognizedContent { + /** + * Version of schema used for this result. + */ + version?: string; + /** + * Texts and tables extracted from a page in the input + */ + pages?: FormPage[]; + /** + * Operation status. + */ + status: OperationStatus; // 'notStarted' | 'running' | 'succeeded' | 'failed'; + /** + * Date and time (UTC) when the recognition operation was submitted. + */ + createdOn: Date; + /** + * Date and time (UTC) when the status was last updated. + */ + lastModified: Date; + /** + * List of errors reported during the content recognition operation. + */ + errors?: ErrorInformation[]; +}; + +/** + * Contains response data for the Recognize Content operation. + */ +export type RecognizeContentResultResponse = RecognizedContent & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalyzeOperationResultModel; + }; +}; + +/** + * Results of a Recognize Receipt operation + */ +export interface RecognizedReceipts { + /** + * Version of schema used for this result. + */ + version?: string; + /** + * List of receipts recognized from input document + */ + receipts?: RecognizedReceipt[]; + /** + * Operation status. + */ + status: OperationStatus; // 'notStarted' | 'running' | 'succeeded' | 'failed'; + /** + * Date and time (UTC) when the receipt recognition operation was submitted. + */ + createdOn: Date; + /** + * Date and time (UTC) when the status was last updated. + */ + lastModified: Date; + /** + * List of errors reported during the receipt recognition operation. + */ + errors?: ErrorInformation[]; +}; + +/** + * Contains response data for an recognize receipt operation. + */ +export type RecognizeReceiptResultResponse = RecognizedReceipts & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalyzeOperationResultModel; + }; +}; + +/** + * Represents the result from an recognize form operation using a custom model from training. + */ +export interface RecognizedForms { + /** + * Version of schema used for this result. + */ + version?: string; + /** + * Document-level information recognized from the input using machine learning. They include + * recognized fields that have meaning beyond text, for example, addresses, phone numbers, dates, etc. + */ + forms?: RecognizedForm[]; + /** + * List of errors reported during the form recognition operation. + */ + errors?: ErrorInformation[]; + /** + * Operation status. + */ + status: OperationStatus; + /** + * Date and time (UTC) when the form recognition operation was submitted. + */ + createdOn: Date; + /** + * Date and time (UTC) when the status was last updated. + */ + lastModified: Date; +}; + +/** + * Contains the response data for recognize form operation using a custom model from training. + */ +export type RecognizeFormResultResponse = RecognizedForms & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnalyzeOperationResultModel; + }; +}; + diff --git a/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/poller.ts b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/contentPoller.ts similarity index 57% rename from sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/poller.ts rename to sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/contentPoller.ts index 48036143e208..59d33d62dff3 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/poller.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/contentPoller.ts @@ -4,29 +4,27 @@ import { delay, AbortSignalLike } from "@azure/core-http"; import { Poller, PollOperation, PollOperationState } from "@azure/core-lro"; import { - RecognizeFormsOptions, RecognizeContentOptions, - RecognizeReceiptsOptions } from "../../formRecognizerClient"; +import { FormContentType } from "../../common"; -import { OperationStatus, ContentType } from "../../generated/models"; -import { FormRecognizerRequestBody } from "../../models"; +import { + GeneratedClientAnalyzeLayoutAsyncResponse as AnalyzeLayoutAsyncResponseModel, + OperationStatus +} from "../../generated/models"; +import { FormRecognizerRequestBody, FormPageArray } from "../../models"; +import { RecognizeContentResultResponse } from "../../internalModels"; export { OperationStatus }; -export type RecognizeOptions = - | RecognizeReceiptsOptions - | RecognizeContentOptions - | RecognizeFormsOptions; - -export interface PollerOperationOptions { +export interface ContentPollerOperationOptions { /** * Time between each polling in milliseconds. */ - intervalInMs?: number; + updateIntervalInMs?: number; /** * callback to receive events on the progress of download operation. */ - onProgress?: (state: BeginRecognizePollState) => void; + onProgress?: (state: BeginRecognizeContentPollState) => void; /** * A serialized poller, used to resume an existing operation */ @@ -37,67 +35,63 @@ export interface PollerOperationOptions { * Defines the operations from a analyze client that are needed for the poller * to work */ -export type RecognizePollerClient = { +export type RecognizeContentPollerClient = { // returns a result id to retrieve results beginRecognize: ( source: FormRecognizerRequestBody | string, - contentType?: ContentType, - analyzeOptions?: RecognizeOptions, - modelId?: string - ) => Promise<{ operationLocation?: string }>; + contentType?: FormContentType, + analyzeOptions?: RecognizeContentOptions + ) => Promise; // retrieves analyze result - getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => Promise; + getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => Promise; }; -export interface BeginRecognizePollState extends PollOperationState { - readonly client: RecognizePollerClient; +export interface BeginRecognizeContentPollState extends PollOperationState { + readonly client: RecognizeContentPollerClient; source?: FormRecognizerRequestBody | string; - contentType?: ContentType; - modelId?: string; + contentType?: FormContentType; resultId?: string; status: OperationStatus; - readonly analyzeOptions?: RecognizeOptions; + readonly analyzeOptions?: RecognizeContentOptions; } -export interface BeginRecognizePollerOperation - extends PollOperation, T> {} +export interface BeginRecognizeContentPollerOperation +extends PollOperation {} /** * @internal */ -export type BeginRecognizePollerOptions = { - client: RecognizePollerClient; +export type BeginRecognizeContentPollerOptions = { + client: RecognizeContentPollerClient; source: FormRecognizerRequestBody | string; - contentType?: ContentType; - modelId?: string; - intervalInMs?: number; + contentType?: FormContentType; + updateIntervalInMs?: number; resultId?: string; - onProgress?: (state: BeginRecognizePollState) => void; + onProgress?: (state: BeginRecognizeContentPollState) => void; resumeFrom?: string; -} & RecognizeOptions; +} & RecognizeContentOptions; /** * Class that represents a poller that waits until a model has been trained. */ -export class BeginRecognizePoller extends Poller< - BeginRecognizePollState, - T +export class BeginRecognizeContentPoller extends Poller< + BeginRecognizeContentPollState, + FormPageArray > { - public intervalInMs: number; + public updateIntervalInMs: number; - constructor(options: BeginRecognizePollerOptions) { + constructor(options: BeginRecognizeContentPollerOptions) { const { client, source, contentType, - intervalInMs = 5000, + updateIntervalInMs = 5000, resultId, - modelId, onProgress, resumeFrom } = options; - let state: BeginRecognizePollState | undefined; + let state: BeginRecognizeContentPollState | undefined; if (resumeFrom) { state = JSON.parse(resumeFrom).state; @@ -109,7 +103,6 @@ export class BeginRecognizePoller extends source, contentType, resultId, - modelId, status: "notStarted", analyzeOptions: options }); @@ -120,30 +113,30 @@ export class BeginRecognizePoller extends this.onProgress(onProgress); } - this.intervalInMs = intervalInMs; + this.updateIntervalInMs = updateIntervalInMs; } public delay(): Promise { - return delay(this.intervalInMs); + return delay(this.updateIntervalInMs); } } /** * Creates a poll operation given the provided state. * @ignore */ -function makeBeginRecognizePollOperation( - state: BeginRecognizePollState -): BeginRecognizePollerOperation { +function makeBeginRecognizePollOperation( + state: BeginRecognizeContentPollState +): BeginRecognizeContentPollerOperation { return { state: { ...state }, - async cancel(_options = {}): Promise> { + async cancel(_options = {}): Promise { throw new Error("Cancel operation is not supported."); }, - async update(options = {}): Promise> { + async update(options = {}): Promise { const state = this.state; - const { client, source, contentType, analyzeOptions, modelId } = state; + const { client, source, contentType, analyzeOptions } = state; if (!state.isStarted) { if (!source) { @@ -154,8 +147,7 @@ function makeBeginRecognizePollOperation( const result = await client.beginRecognize( source, contentType, - analyzeOptions || {}, - modelId + analyzeOptions || {} ); if (!result.operationLocation) { throw new Error("Expect a valid 'operationLocation' to retrieve analyze results"); @@ -173,15 +165,21 @@ function makeBeginRecognizePollOperation( state.status = response.status; if (!state.isCompleted) { if ( - (response.status === "running" || response.status === "notStarted") && typeof options.fireProgress === "function" ) { options.fireProgress(state); - } else if (response.status === "succeeded") { - state.result = response; + } + + if (response.status === "succeeded") { + state.result = response.pages; state.isCompleted = true; } else if (response.status === "failed") { - throw new Error(`Recognition failed ${(response as any)._response.bodyAsText}`); + const errors = response.errors?.map((e) => ` code ${e.code}, message: '${e.message}'`).join("\n"); + const message = `Content recognition failed. +Error(s): +${errors || ""} +`; + throw new Error(message); } } diff --git a/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/customFormPoller.ts b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/customFormPoller.ts new file mode 100644 index 000000000000..7883dcad64ab --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/customFormPoller.ts @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { delay, AbortSignalLike } from "@azure/core-http"; +import { Poller, PollOperation, PollOperationState } from "@azure/core-lro"; +import { + RecognizeFormsOptions, +} from "../../formRecognizerClient"; + +import { + GeneratedClientAnalyzeWithCustomModelResponse as AnalyzeWithCustomModelResponseModel, + OperationStatus, +} from "../../generated/models"; +import { FormContentType } from "../../common"; +import { FormRecognizerRequestBody, RecognizedFormArray } from "../../models"; +import { RecognizeFormResultResponse } from "../../internalModels"; +export { OperationStatus }; + +export interface CustomFormPollerOperationOptions { + /** + * Time between each polling in milliseconds. + */ + updateIntervalInMs?: number; + /** + * callback to receive events on the progress of download operation. + */ + onProgress?: (state: BeginRecognizeCustomFormPollState) => void; + /** + * A serialized poller, used to resume an existing operation + */ + resumeFrom?: string; +} + +/** + * Defines the operations from a analyze client that are needed for the poller + * to work + */ +export type RecognizeCustomFormPollerClient = { + // returns a result id to retrieve results + beginRecognize: ( + source: FormRecognizerRequestBody | string, + modelId: string, + contentType?: FormContentType, + analyzeOptions?: RecognizeFormsOptions + ) => Promise; + // retrieves analyze result + getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => Promise; +}; + +export interface BeginRecognizeCustomFormPollState extends PollOperationState { + readonly client: RecognizeCustomFormPollerClient; + source?: FormRecognizerRequestBody | string; + contentType?: FormContentType; + modelId: string; + resultId?: string; + status: OperationStatus; + readonly analyzeOptions?: RecognizeFormsOptions; +} + +export interface BeginRecognizeCustomFormPollerOperation + extends PollOperation {} + +/** + * @internal + */ +export type BeginRecognizeCustomFormPollerOptions = { + client: RecognizeCustomFormPollerClient; + source: FormRecognizerRequestBody | string; + contentType?: FormContentType; + modelId: string; + updateIntervalInMs?: number; + resultId?: string; + onProgress?: (state: BeginRecognizeCustomFormPollState) => void; + resumeFrom?: string; +} & RecognizeFormsOptions; + +/** + * Class that represents a poller that waits until a model has been trained. + */ +export class BeginRecognizeCustomFormPoller extends Poller< + BeginRecognizeCustomFormPollState, + RecognizedFormArray +> { + public updateIntervalInMs: number; + + constructor(options: BeginRecognizeCustomFormPollerOptions) { + const { + client, + source, + contentType, + updateIntervalInMs = 5000, + resultId, + modelId, + onProgress, + resumeFrom + } = options; + + let state: BeginRecognizeCustomFormPollState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = makeBeginRecognizePollOperation({ + ...state, + client, + source, + contentType, + resultId, + modelId, + status: "notStarted", + analyzeOptions: options + }); + + super(operation); + + if (typeof onProgress === "function") { + this.onProgress(onProgress); + } + + this.updateIntervalInMs = updateIntervalInMs; + } + + public delay(): Promise { + return delay(this.updateIntervalInMs); + } +} +/** + * Creates a poll operation given the provided state. + * @ignore + */ +function makeBeginRecognizePollOperation( + state: BeginRecognizeCustomFormPollState +): BeginRecognizeCustomFormPollerOperation { + return { + state: { ...state }, + + async cancel(_options = {}): Promise { + throw new Error("Cancel operation is not supported."); + }, + + async update(options = {}): Promise { + const state = this.state; + const { client, source, contentType, analyzeOptions, modelId } = state; + + if (!state.isStarted) { + if (!source) { + throw new Error("Expect a valid 'source'"); + } + + state.isStarted = true; + const result = await client.beginRecognize( + source, + modelId, + contentType, + analyzeOptions || {} + ); + if (!result.operationLocation) { + throw new Error("Expect a valid 'operationLocation' to retrieve analyze results"); + } + const lastSlashIndex = result.operationLocation.lastIndexOf("/"); + state.resultId = result.operationLocation.substring(lastSlashIndex + 1); + // source is no longer needed + state.source = undefined; + } + + const response = await client.getRecognizeResult(state.resultId!, { + abortSignal: analyzeOptions?.abortSignal + }); + + state.status = response.status; + if (!state.isCompleted) { + if ( + typeof options.fireProgress === "function" + ) { + options.fireProgress(state); + } + + if (response.status === "succeeded") { + state.result = response.forms; + state.isCompleted = true; + } else if (response.status === "failed") { + const errors = response.errors?.map((e) => ` code ${e.code}, message: '${e.message}'`).join("\n"); + const message = `Custom form recognition failed using model ${state.modelId}. +Error(s): +${errors || ""} +`; + throw new Error(message); + } + } + + return makeBeginRecognizePollOperation(state); + }, + + toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + if (key === "client" || key === "source") { + return undefined; + } + return value; + }); + } + }; +} diff --git a/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/receiptPoller.ts b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/receiptPoller.ts new file mode 100644 index 000000000000..56ecc8e57aa2 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/src/lro/analyze/receiptPoller.ts @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { delay, AbortSignalLike } from "@azure/core-http"; +import { Poller, PollOperation, PollOperationState } from "@azure/core-lro"; +import { + RecognizeReceiptsOptions, +} from "../../formRecognizerClient"; + +import { + GeneratedClientAnalyzeReceiptAsyncResponse as AnalyzeReceiptAsyncResponseModel, + OperationStatus +} from "../../generated/models"; +import { FormContentType } from "../../common"; +import { FormRecognizerRequestBody, RecognizedReceiptArray } from "../../models"; +import { RecognizeReceiptResultResponse } from "../../internalModels"; +export { OperationStatus }; + +export interface ReceiptPollerOperationOptions { + /** + * Time between each polling in milliseconds. + */ + updateIntervalInMs?: number; + /** + * callback to receive events on the progress of download operation. + */ + onProgress?: (state: BeginRecognizeReceiptPollState) => void; + /** + * A serialized poller, used to resume an existing operation + */ + resumeFrom?: string; +} + +/** + * Defines the operations from a analyze client that are needed for the poller + * to work + */ +export type RecognizeReceiptPollerClient = { + // returns a result id to retrieve results + beginRecognize: ( + source: FormRecognizerRequestBody | string, + contentType?: FormContentType, + analyzeOptions?: RecognizeReceiptsOptions + ) => Promise; + // retrieves analyze result + getRecognizeResult: (resultId: string, options: { abortSignal?: AbortSignalLike }) => Promise; +}; + +export interface BeginRecognizeReceiptPollState extends PollOperationState { + readonly client: RecognizeReceiptPollerClient; + source?: FormRecognizerRequestBody | string; + contentType?: FormContentType; + resultId?: string; + status: OperationStatus; + readonly analyzeOptions?: RecognizeReceiptsOptions; +} + +export interface BeginRecognizeReceiptPollerOperation +extends PollOperation {} + +/** + * @internal + */ +export type BeginRecognizeReceiptPollerOptions = { + client: RecognizeReceiptPollerClient; + source: FormRecognizerRequestBody | string; + contentType?: FormContentType; + updateIntervalInMs?: number; + resultId?: string; + onProgress?: (state: BeginRecognizeReceiptPollState) => void; + resumeFrom?: string; +} & RecognizeReceiptsOptions; + +/** + * Class that represents a poller that waits until a model has been trained. + */ +export class BeginRecognizeReceiptPoller extends Poller< + BeginRecognizeReceiptPollState, + RecognizedReceiptArray +> { + public updateIntervalInMs: number; + + constructor(options: BeginRecognizeReceiptPollerOptions) { + const { + client, + source, + contentType, + updateIntervalInMs = 5000, + resultId, + onProgress, + resumeFrom + } = options; + + let state: BeginRecognizeReceiptPollState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = makeBeginRecognizePollOperation({ + ...state, + client, + source, + contentType, + resultId, + status: "notStarted", + analyzeOptions: options + }); + + super(operation); + + if (typeof onProgress === "function") { + this.onProgress(onProgress); + } + + this.updateIntervalInMs = updateIntervalInMs; + } + + public delay(): Promise { + return delay(this.updateIntervalInMs); + } +} +/** + * Creates a poll operation given the provided state. + * @ignore + */ +function makeBeginRecognizePollOperation( + state: BeginRecognizeReceiptPollState +): BeginRecognizeReceiptPollerOperation { + return { + state: { ...state }, + + async cancel(_options = {}): Promise { + throw new Error("Cancel operation is not supported."); + }, + + async update(options = {}): Promise { + const state = this.state; + const { client, source, contentType, analyzeOptions } = state; + + if (!state.isStarted) { + if (!source) { + throw new Error("Expect a valid 'source'"); + } + + state.isStarted = true; + const result = await client.beginRecognize( + source, + contentType, + analyzeOptions || {} + ); + if (!result.operationLocation) { + throw new Error("Expect a valid 'operationLocation' to retrieve analyze results"); + } + const lastSlashIndex = result.operationLocation.lastIndexOf("/"); + state.resultId = result.operationLocation.substring(lastSlashIndex + 1); + // source is no longer needed + state.source = undefined; + } + + const response = await client.getRecognizeResult(state.resultId!, { + abortSignal: analyzeOptions?.abortSignal + }); + + state.status = response.status; + if (!state.isCompleted) { + if ( + typeof options.fireProgress === "function" + ) { + options.fireProgress(state); + } + + if (response.status === "succeeded") { + state.result = response.receipts; + state.isCompleted = true; + } else if (response.status === "failed") { + const errors = response.errors?.map((e) => ` code ${e.code}, message: '${e.message}'`).join("\n"); + const message = `Receipt recognition failed. +Error(s): +${errors || ""} +`; + throw new Error(message); + } + } + + return makeBeginRecognizePollOperation(state); + }, + + toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + if (key === "client" || key === "source") { + return undefined; + } + return value; + }); + } + }; +} diff --git a/sdk/formrecognizer/ai-form-recognizer/src/lro/copy/poller.ts b/sdk/formrecognizer/ai-form-recognizer/src/lro/copy/poller.ts new file mode 100644 index 000000000000..485f560aae25 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/src/lro/copy/poller.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { delay } from "@azure/core-http"; +import { Poller, PollOperation, PollOperationState } from "@azure/core-lro"; +import { CopyModelOptions, GetCopyModelResultOptions } from "../../formTrainingClient"; + +import { + GeneratedClientGetCustomModelCopyResultResponse as GetCustomModelCopyResultResponse, + GeneratedClientCopyCustomModelResponse as CopyCustomModelResponseModel, + OperationStatus +} from "../../generated/models"; +import { CopyAuthorization, CustomFormModelInfo } from "../../models"; +export { OperationStatus }; + +export interface CopyPollerOperationOptions { + /** + * Time between each polling in milliseconds. + */ + updateIntervalInMs?: number; + /** + * callback to receive events on the progress of download operation. + */ + onProgress?: (state: BeginCopyModelPollState) => void; + /** + * A serialized poller, used to resume an existing operation + */ + resumeFrom?: string; +} + +/** + * Defines the operations from a training client that are needed for the poller + * to work + */ +export type CopyModelPollerClient = { + // returns a result id to retrieve results + beginCopyModel: ( + modelId: string, + copyAuthorization: CopyAuthorization, + copyModelOptions?: CopyModelOptions + ) => Promise; + // retrieves copy model result + getCopyModelResult: ( + modelId: string, + resultId: string, + options: GetCopyModelResultOptions + ) => Promise; +}; + +/** + * The state used by the poller returned from {@link FormTrainingClient.beginCopyModel}. + * + * This state is passed into the user-specified `onProgress` callback + * whenever copy progress is detected. + */ +export interface BeginCopyModelPollState extends PollOperationState { + /** + * The instance of {@link CopyModelPollerClient} that is used when calling {@link FormTrainingClient.beginCopyModel}. + */ + readonly client: CopyModelPollerClient; + /** + * Id of the model being copied + */ + modelId: string; + /** + * Id of the target Form Recognizer resource + */ + targetResourceId: string; + /** + * Region of the target Form Recognizer resource + */ + targetResourceRegion: string; + /** + * The copy authorization generated by the target Form Recognizer resource. + */ + copyAuthorization: CopyAuthorization; + /** + * Id of the copy model operation result. + */ + resultId?: string; + /** + * Status of the copy model operation. + */ + status: OperationStatus; + /** + * Option to the copy model operation. + */ + readonly copyModelOptions?: CopyModelOptions; +} + +export interface BeginCopyModelPollerOperation + extends PollOperation {} + +/** + * @internal + */ +export type BeginCopyModelPollerOptions = { + client: CopyModelPollerClient; + modelId: string; + targetResourceId: string; + targetResourceRegion: string; + copyAuthorization: CopyAuthorization; + updateIntervalInMs?: number; + resultId?: string; + onProgress?: (state: BeginCopyModelPollState) => void; + resumeFrom?: string; +} & CopyModelOptions; + +/** + * Class that represents a poller that waits until a model has been trained. + */ +export class BeginCopyModelPoller extends Poller { + public updateIntervalInMs: number; + + constructor(options: BeginCopyModelPollerOptions) { + const { + client, + updateIntervalInMs = 5000, + modelId, + resultId, + targetResourceId, + targetResourceRegion, + copyAuthorization, + onProgress, + resumeFrom + } = options; + + let state: BeginCopyModelPollState | undefined; + + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + + const operation = makeBeginCopyModelPollOperation({ + ...state, + client, + modelId, + targetResourceId, + targetResourceRegion, + copyAuthorization, + resultId, + status: "notStarted", + copyModelOptions: options + }); + + super(operation); + + if (typeof onProgress === "function") { + this.onProgress(onProgress); + } + + this.updateIntervalInMs = updateIntervalInMs; + } + + public delay(): Promise { + return delay(this.updateIntervalInMs); + } +} +/** + * Creates a poll operation given the provided state. + * @ignore + */ +function makeBeginCopyModelPollOperation( + state: BeginCopyModelPollState +): BeginCopyModelPollerOperation { + return { + state: { ...state }, + + async cancel(_options = {}): Promise { + throw new Error("Cancel operation is not supported."); + }, + + async update(options = {}): Promise { + const state = this.state; + const { client, modelId, copyAuthorization, copyModelOptions } = state; + + if (!state.isStarted) { + state.isStarted = true; + const result = await client.beginCopyModel( + modelId, + copyAuthorization, + copyModelOptions || {} + ); + if (!result.operationLocation) { + throw new Error("Expect a valid 'operationLocation' to retrieve analyze results"); + } + const lastSlashIndex = result.operationLocation.lastIndexOf("/"); + state.resultId = result.operationLocation.substring(lastSlashIndex + 1); + } + + const response = await client.getCopyModelResult(modelId, state.resultId!, { + abortSignal: copyModelOptions?.abortSignal + }); + + state.status = response.status; + if (!state.isCompleted) { + if ( + (response.status === "running" || response.status === "notStarted") && + typeof options.fireProgress === "function" + ) { + options.fireProgress(state); + } else if (response.status === "succeeded") { + state.result = { + status: "ready", + requestedOn: response.createdOn, + completedOn: response.lastModified, + modelId: copyAuthorization.modelId + }; + state.isCompleted = true; + } else if (response.status === "failed") { + throw new Error(`Copy model operation failed: ${response._response.bodyAsText}`); + } + } + + return makeBeginCopyModelPollOperation(state); + }, + + toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + if (key === "client" || key === "source") { + return undefined; + } + return value; + }); + } + }; +} diff --git a/sdk/formrecognizer/ai-form-recognizer/src/lro/train/poller.ts b/sdk/formrecognizer/ai-form-recognizer/src/lro/train/poller.ts index 4a8ff46d998d..9712cbcd4280 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/lro/train/poller.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/lro/train/poller.ts @@ -3,76 +3,98 @@ import { delay } from "@azure/core-http"; import { Poller, PollOperation, PollOperationState } from "@azure/core-lro"; -import { TrainModelOptions, GetModelOptions } from "../../formTrainingClient"; +import { TrainingFileFilter, GetModelOptions } from "../../formTrainingClient"; import { ModelStatus, - GeneratedClientTrainCustomModelAsyncResponse as TrainCustomModelAsyncResponse + GeneratedClientTrainCustomModelAsyncResponse as TrainCustomModelAsyncResponse, } from "../../generated/models"; +import { CustomFormModel, FormModelResponse } from '../../models'; export { ModelStatus, TrainCustomModelAsyncResponse }; /** * Defines the operations from a {@link FormRecognizerClient} that are needed for the poller * returned by {@link FormRecognizerClient.beginTraining} to work. */ -export type TrainPollerClient = { - getCustomModel: (modelId: string, options: GetModelOptions) => Promise; +export type TrainPollerClient = { + getCustomModel: (modelId: string, options: GetModelOptions) => Promise; trainCustomModelInternal: ( source: string, useLabelFile?: boolean, - options?: TrainModelOptions - ) => Promise<{ location?: string }>; + options?: TrainingFileFilter + ) => Promise; }; -export interface BeginTrainingPollState extends PollOperationState { - readonly client: TrainPollerClient; +/** + * The state used by the poller returned from {@link FormTrainingClient.beginTraining}. + * + * This state is passed into the user-specified `onProgress` callback + * whenever copy progress is detected. + */ +export interface BeginTrainingPollState extends PollOperationState { + /** + * The instance of {@link TrainPollerClient} that is used when calling {@link FormTrainingClient.beginTraining}. + */ + readonly client: TrainPollerClient; + /** + * The accessible url to an Azure Blob Storage container holding the training documents. + */ source: string; + /** + * The id of the custom form model being created from the training operation. + */ modelId?: string; + /** + * the status of the created model. + */ status: ModelStatus; - readonly trainModelOptions?: TrainModelOptions; + /** + * Option to filter training files. + */ + readonly trainModelOptions?: TrainingFileFilter; } -export interface BeginTrainingPollerOperation - extends PollOperation, T> {} +export interface BeginTrainingPollerOperation +extends PollOperation {} /** * @internal */ -export interface BeginTrainingPollerOptions { - client: TrainPollerClient; +export interface BeginTrainingPollerOptions { + client: TrainPollerClient; source: string; - intervalInMs?: number; - onProgress?: (state: BeginTrainingPollState) => void; + updateIntervalInMs?: number; + onProgress?: (state: BeginTrainingPollState) => void; resumeFrom?: string; - trainModelOptions?: TrainModelOptions; + trainModelOptions?: TrainingFileFilter; } /** * Class that represents a poller that waits until a model has been trained. */ -export class BeginTrainingPoller extends Poller< - BeginTrainingPollState, - T +export class BeginTrainingPoller extends Poller< + BeginTrainingPollState, + CustomFormModel > { - public intervalInMs: number; + public updateIntervalInMs: number; - constructor(options: BeginTrainingPollerOptions) { + constructor(options: BeginTrainingPollerOptions) { const { client, source, - intervalInMs = 5000, + updateIntervalInMs = 5000, onProgress, resumeFrom, trainModelOptions } = options; - let state: BeginTrainingPollState | undefined; + let state: BeginTrainingPollState | undefined; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBeginTrainingPollOperation({ + const operation = makeBeginTrainingPollOperation({ ...state, client, source, @@ -86,11 +108,11 @@ export class BeginTrainingPoller extends Poll this.onProgress(onProgress); } - this.intervalInMs = intervalInMs; + this.updateIntervalInMs = updateIntervalInMs; } public delay(): Promise { - return delay(this.intervalInMs); + return delay(this.updateIntervalInMs); } } @@ -98,17 +120,17 @@ export class BeginTrainingPoller extends Poll * Creates a poll operation given the provided state. * @ignore */ -function makeBeginTrainingPollOperation( - state: BeginTrainingPollState -): BeginTrainingPollerOperation { +function makeBeginTrainingPollOperation( + state: BeginTrainingPollState +): BeginTrainingPollerOperation { return { state: { ...state }, - async cancel(_options = {}): Promise> { + async cancel(_options = {}): Promise { throw new Error("Cancel operation is not supported."); }, - async update(options = {}): Promise> { + async update(options = {}): Promise { const state = this.state; const { client, source, trainModelOptions } = state; @@ -133,15 +155,24 @@ function makeBeginTrainingPollOperation( state.status = model.status; if (!state.isCompleted) { - if (model.status === "creating" && typeof options.fireProgress === "function") { + if (typeof options.fireProgress === "function") { options.fireProgress(state); - } else if (model.status === "ready") { + } + + if (model.status === "ready") { state.result = model; state.isCompleted = true; } else if (model.status === "invalid") { - state.error = new Error(`Model training failed with invalid model status.`); - state.result = model; - state.isCompleted = true; + const errors = model.errors?.map((e) => ` code ${e.code}, message: '${e.message}'`).join("\n"); + const additionalInfo = model.trainingDocuments?.map((d) => + ` document: ${d.documentName}, status: ${d.status}, errors: ${d.errors?.map((e) => `code ${e.code}, message: '${e.message}'`).join("\n")}`).join("\n") + const message = `Model training failed. Invalid model was created with id '${state.modelId}'. +Error(s): +${errors || ""} +Additional information: +${additionalInfo || ""} +`; + throw new Error(message); } } diff --git a/sdk/formrecognizer/ai-form-recognizer/src/models.ts b/sdk/formrecognizer/ai-form-recognizer/src/models.ts index cd5133cdace4..c2b148877725 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/models.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/models.ts @@ -6,13 +6,12 @@ import * as coreHttp from "@azure/core-http"; import { AnalyzeOperationResult as AnalyzeOperationResultModel, FormFieldsReport, + CopyAuthorizationResult as CopyAuthorizationResultModel, KeysResult, KeyValueElement as KeyValueElementModel, KeyValuePair as KeyValuePairModel, Language, LengthUnit, - ModelInfo, - Models, ModelsSummary, ModelStatus as CustomFormModelStatus, TrainStatus as TrainingStatus, @@ -21,14 +20,13 @@ import { export { AnalyzeOperationResultModel, + CopyAuthorizationResultModel, FormFieldsReport, KeysResult, KeyValueElementModel, KeyValuePairModel, Language, LengthUnit, - ModelInfo, - Models, ModelsSummary, CustomFormModelStatus, OperationStatus, @@ -154,7 +152,7 @@ export interface FormTableCell { */ confidence: number; /** - * When includeTextDetails is set to true, a list of references to the text elements constituting this table cell. + * When includeTextContent is set to true, a list of references to the text elements constituting this table cell. */ textContent?: FormContent[]; /** @@ -200,13 +198,17 @@ export interface FormTable { * For example, "Work Address" is the label of * "Work Address: One Microsoft Way, Redmond, WA" */ -export interface FormText { +export interface FieldText { + /** + * The 1-based page number in the input document. + */ + pageNumber: number; /** * The bounding box of the recognized label or value */ boundingBox?: Point2D[]; /** - * When includeTextDetails is set to true, a list of references to the text elements constituting this name or value. + * When includeTextContent is set to true, a list of references to the text elements constituting this name or value. */ textContent?: FormContent[]; /** @@ -219,7 +221,7 @@ export interface FormText { * Represents recognized text elements in label-value pairs. * For example, "Address": "One Microsoft Way, Redmond, WA" */ -export interface FormField { +export type FormField = { /** * Confidence value. */ @@ -227,7 +229,7 @@ export interface FormField { /** * Text of the recognized label of the field. */ - labelText?: FormText; + labelText?: FieldText; /** * A user defined label for the field. */ @@ -235,16 +237,17 @@ export interface FormField { /** * Text of the recognized value of the field. */ - valueText?: FormText; - /** - * Value of the field. - */ - value?: FieldValueTypes; - /** - * Data type of the value property - */ - valueType?: ValueTypes; -} + valueText?: FieldText; +} & ( + | { value?: string, valueType?: "string" } + | { value?: number, valueType?: "number" } + | { value?: Date, valueType?: "date" } + | { value?: string, valueType?: "time" } + | { value?: string, valueType?: "phoneNumber" } + | { value?: number, valueType?: "integer" } + | { value?: FormField[], valueType?: "array" } + | { value?: { [propertyName: string]: FormField }, valueType?: "object" } +) /** * Represents a Form page range @@ -291,7 +294,7 @@ export interface FormPage { */ // language?: Language; /** - * When includeTextDetails is set to true, a list of recognized text lines. The maximum number of + * When includeTextContent is set to true, a list of recognized text lines. The maximum number of * lines returned is 300 per page. The lines are sorted top to bottom, left to right, although in * certain cases proximity is treated with higher priority. As the sorting order depends on the * detected text, it may change across images and OCR version updates. Thus, business logic @@ -305,7 +308,12 @@ export interface FormPage { } /** - * Represent recognized forms consists of text fields that have semantic meanings. + * Array of {@link FormPage} + */ +export interface FormPageArray extends Array {} + +/** + * Represent recognized form consists of text fields that have semantic meanings. */ export interface RecognizedForm { /** @@ -326,10 +334,15 @@ export interface RecognizedForm { pages: FormPage[]; } +/** + * Array of {@link RecognizedForm} + */ +export interface RecognizedFormArray extends Array {} + /** * Properties common to the recognized text field */ -interface CommonFieldValue { +export interface CommonFieldValue { /** * Text content of the recognized field. */ @@ -343,7 +356,7 @@ interface CommonFieldValue { */ confidence?: number; /** - * When includeTextDetails is set to true, a list of references to the text elements constituting + * When includeTextContent is set to true, a list of references to the text elements constituting * this field. */ textContent?: FormContent[]; @@ -353,388 +366,20 @@ interface CommonFieldValue { pageNumber?: number; } -export type FieldValueTypes = - | string - | Date - | number - | FieldValue[] - | { [propertyName: string]: FieldValue }; - -export type ValueTypes = - | "string" - | "date" - | "time" - | "phoneNumber" - | "number" - | "integer" - | "array" - | "object"; - -/** - * Represents a field of string value. - */ -export type StringFieldValue = { - type: "string"; - value?: string; -} & CommonFieldValue; - -/** - * Represents a date field - */ -export type DateFieldValue = { - type: "date"; - value?: Date; -} & CommonFieldValue; - -/** - * Represent a time field - */ -export type TimeFieldValue = { - type: "time"; - value?: string; -} & CommonFieldValue; - -/** - * Represents a phone number field - */ -export type PhoneNumberFieldValue = { - type: "phoneNumber"; - value?: string; -} & CommonFieldValue; - -/** - * Represents a number field - */ -export type NumberFieldValue = { - type: "number"; - value?: number; -} & CommonFieldValue; - -/** - * Represents an integer field - */ -export type IntegerFieldValue = { - type: "integer"; - value?: number; -} & CommonFieldValue; - -/** - * Represents a special field that contains an array of fields - */ -export interface ArrayFieldValue { - type: "array"; - value?: FieldValue[]; -} - -/** - * Represents a special field that contains other fields as its properties - */ -export interface ObjectFieldValue { - type: "object"; - value?: { [propertyName: string]: FieldValue }; -} - -/** - * Union type of all field types - */ -export type FieldValue = - | StringFieldValue - | DateFieldValue - | TimeFieldValue - | PhoneNumberFieldValue - | NumberFieldValue - | IntegerFieldValue - | ArrayFieldValue - | ObjectFieldValue; - -/** - * Represents an recognized item field in a receipt. - */ -export type ReceiptItemField = { - type: "object"; - value: { - Name?: StringFieldValue; - Quantity?: NumberFieldValue; - Price?: NumberFieldValue; - TotalPrice?: NumberFieldValue; - }; -} & CommonFieldValue; - /** - * Represents a list of recognized receipt items in a receipt. - */ -export interface ReceiptItemArrayField { - type: "array"; - value: ReceiptItemField[]; -} - -/* * Recognized Receipt */ -export interface RecognizedReceipt { +export type RecognizedReceipt = { /** - * Locale of the receipt + * Recognized form */ - locale?: string; recognizedForm: RecognizedForm; } -export interface USReceiptItem { - /** - * Name of the receipt item - */ - name?: FormField; - /** - * Price of the receipt item - */ - price?: FormField; - /** - * Quantity of the receipt item - */ - quantity?: FormField; - /** - * Total price of the receipt item - */ - totalPrice?: FormField; -} - -export type USReceiptType = { - type: "Unrecognized" | "Itemized" | "CreditCard" | "Gas" | "Parking"; - /** - * Confidence value. - */ - confidence?: number; -} - -/** - * United States receipt - */ -export interface USReceipt extends RecognizedReceipt { - /** - * Receipt type field - */ - receiptType: USReceiptType; - /** - * Merchant name field - */ - merchantName: FormField; - /** - * Merchant phone number field - */ - merchantPhoneNumber: FormField; - /** - * Merchant address field - */ - merchantAddress: FormField; - /** - * Receipt item list field - */ - items: USReceiptItem[]; - /** - * Subtotal field - */ - subtotal: FormField; - /** - * Tax field - */ - tax: FormField; - /** - * Tip field - */ - tip: FormField; - /** - * Total field - */ - total: FormField; - /** - * Transaction date field - */ - transactionDate: FormField; - /** - * Transaction time field - */ - transactionTime: FormField; -} - -export type Locale = "US" | "UK"; - -export type ReceiptWithLocale = { locale: "US" } & USReceipt; -// | { receiptLocale: "UK" } & UKReceipt -// ... - -/** - * Recognize receipt result. - */ -export interface RecognizeReceiptResult { - /** - * Version of schema used for this result. - */ - version: string; - /** - * List of receipts recognized from input document - */ - receipts?: ReceiptWithLocale[]; -} - -/** - * Results of a Recognize Receipt operation - */ -export type RecognizeReceiptOperationResult = Partial & { - /** - * Operation status. - */ - status: OperationStatus; // 'notStarted' | 'running' | 'succeeded' | 'failed'; - /** - * Date and time (UTC) when the form recognition operation was submitted. - */ - createdOn: Date; - /** - * Date and time (UTC) when the status was last updated. - */ - lastModified: Date; -}; - -/** - * Contains response data for an recognize receipt operation. - */ -export type RecognizeReceiptResultResponse = RecognizeReceiptOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalyzeOperationResultModel; - }; -}; - -/** - * Recognized layout information of the input document - */ -export interface RecognizedContent { - /** - * Version of schema used for this result. - */ - version: string; - /** - * Texts and tables extracted from a page in the input - */ - pages: FormPage[]; -} - -/** - * Represents the result from an Recognize Content operation - */ -export type RecognizeContentOperationResult = Partial & { - /** - * Operation status. - */ - status: OperationStatus; // 'notStarted' | 'running' | 'succeeded' | 'failed'; - /** - * Date and time (UTC) when the recognition operation was submitted. - */ - createdOn: Date; - /** - * Date and time (UTC) when the status was last updated. - */ - lastModified: Date; -}; - -/** - * Contains response data for the Recognize Content operation. - */ -export type RecognizeContentResultResponse = RecognizeContentOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalyzeOperationResultModel; - }; -}; - -/** - * Represents errors from Azure Form Recognizer service - */ -export interface FormRecognizerError { - /** - * Error code - */ - code: string; - /** - * Error message - */ - message: string; -} - -/** - * Represents an recognized form using a custom model. - */ -export interface FormResult { - /** - * Version of schema used for this result. - */ - version: string; - /** - * Document-level information recognized from the input using machine learning. They include - * recognized fields that have meaning beyond text, for example, addresses, phone numbers, dates, etc. - */ - forms?: RecognizedForm[]; - /** - * List of errors reported during the form recognition operation. - */ - errors?: FormRecognizerError[]; -} - -/** - * Represents the result from an recognize form operation using a custom model from training. +/* + * Array of {@link RecognizedReceipt} */ -export type RecognizeFormOperationResult = Partial & { - /** - * Operation status. - */ - status: OperationStatus; - /** - * Date and time (UTC) when the form recognition operation was submitted. - */ - createdOn: Date; - /** - * Date and time (UTC) when the status was last updated. - */ - lastModified: Date; -}; - -/** - * Contains the response data for recognize form operation using a custom model from training. - */ -export type RecognizeFormResultResponse = RecognizeFormOperationResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnalyzeOperationResultModel; - }; -}; +export interface RecognizedReceiptArray extends Array {} /** * Report for a custom model training document. @@ -758,20 +403,6 @@ export interface TrainingDocumentInfo { status: TrainingStatus; } -/** - * Contains the unlabeled training results. - */ -export interface FormTrainResult { - /** - * List of document used to train the model and any errors reported for each document. - */ - trainingDocuments: TrainingDocumentInfo[]; - /** - * Errors returned during training operation. - */ - errors?: FormRecognizerError[]; -} - /** * Basic custom model information. */ @@ -785,31 +416,13 @@ export interface CustomFormModelInfo { */ status: CustomFormModelStatus; /** - * Date and time (UTC) when the model was created. + * Date and time (UTC) when the custom model training request was received. */ - createdOn: Date; + requestedOn: Date; /** - * Date and time (UTC) when the status was last updated. + * Date and time (UTC) when the training operation completed. */ - lastModified: Date; -} - -/** - * Represents a model from unlabeled training. - */ -export interface FormModel { - /** - * Information about the model - */ - modelInfo: CustomFormModelInfo; - /** - * Keys recognized from unlabeled training. - */ - keys: KeysResult; - /** - * Results of the unlabeled training. - */ - trainResult?: FormTrainResult; + completedOn: Date; } export interface CustomFormField { @@ -821,9 +434,16 @@ export interface CustomFormField { * Training field name. */ name: string; + /** + * Training field label. + */ + label: string | null; } -export interface CustomFormSubModel { +/** + * Represents the model for a type of custom form from the training. + */ +export interface CustomFormSubmodel { /** * Estimated extraction accuracy for this field. */ @@ -851,13 +471,13 @@ export interface CustomFormModel { */ status: CustomFormModelStatus; /** - * Date and time (UTC) when the model was created. + * Date and time (UTC) when the custom model training request was received. */ - createdOn: Date; + requestedOn: Date; /** - * Date and time (UTC) when the status was last updated. + * Date and time (UTC) when the training operation completed. */ - lastModified: Date; + completedOn: Date; /** * List of document used to train the model and any errors reported for each document. */ @@ -869,7 +489,7 @@ export interface CustomFormModel { /** * Form models created by training. */ - models?: CustomFormSubModel[]; + submodels?: CustomFormSubmodel[]; } /** @@ -901,7 +521,7 @@ export interface Model { /** * Basic custom model information. */ - modelInfo: ModelInfo; + modelInfo: CustomFormModelInfo; /** * Keys extracted by the custom model. */ @@ -912,6 +532,24 @@ export interface Model { trainResult?: TrainResult; } +/** + * Response to the list custom models operation. + */ +export interface Models { + /** + * Summary of all trained custom models. + */ + summary?: ModelsSummary; + /** + * Collection of trained custom models. + */ + modelList?: CustomFormModelInfo[]; + /** + * Link to the next page of custom models. + */ + nextLink?: string; +} + /** * Contains the response data for retrieving a model from unlabeled training. */ @@ -932,6 +570,26 @@ export type FormModelResponse = CustomFormModel & { }; }; +/** + * Contains response data for the listCustomModels operation. + */ +export type ListCustomModelsResponse = Models & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models; + }; +}; + /** * Types of binary data allowed as input to recognition operations */ @@ -954,3 +612,35 @@ export interface AccountProperties { */ customModelLimit: number; } + +/** + * Represents errors from Azure Form Recognizer service + */ +export interface FormRecognizerError { + /** + * Error code + */ + code: string; + /** + * Error message + */ + message: string; +} + +/** + * Request parameter that contains authorization claims for copy operation. + */ +export interface CopyAuthorization extends CopyAuthorizationResultModel { + /** + * Target resource Id. + */ + resourceId: string; + /** + * Target resource region. + */ + resourceRegion: string; + /** + * The time when the access token expires. + */ + //expiresOn: Date +} diff --git a/sdk/formrecognizer/ai-form-recognizer/src/transforms.ts b/sdk/formrecognizer/ai-form-recognizer/src/transforms.ts index de888ee7a070..d2c789bd354a 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/transforms.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/transforms.ts @@ -24,31 +24,19 @@ import { FormTableRow, FormTable, RecognizedForm, - FormText, + FieldText, FormField, - RecognizeFormResultResponse, - RecognizeContentResultResponse, - RecognizedContent, - RecognizeReceiptResultResponse, - FieldValue, - StringFieldValue, - DateFieldValue, - TimeFieldValue, - PhoneNumberFieldValue, - NumberFieldValue, - IntegerFieldValue, - ObjectFieldValue, - ArrayFieldValue, Point2D, FormModelResponse, CustomFormField, - CustomFormSubModel, - RecognizedReceipt, - USReceiptType, - USReceiptItem, - ReceiptItemArrayField, - ReceiptWithLocale + CustomFormSubmodel, + RecognizedReceipt } from "./models"; +import { + RecognizeFormResultResponse, + RecognizeContentResultResponse, + RecognizeReceiptResultResponse +} from "./internalModels"; export function toBoundingBox(original: number[]): Point2D[] { return [ @@ -112,20 +100,29 @@ export function toFormContent(element: string, readResults: FormPage[]): FormCon } } -export function toFormText(original: KeyValueElementModel, readResults?: FormPage[]): FormText { +export function toFieldText( + pageNumber: number, + original: KeyValueElementModel, + readResults?: FormPage[] +): FieldText { return { + pageNumber, text: original.text, boundingBox: original.boundingBox ? toBoundingBox(original.boundingBox) : undefined, textContent: original.elements?.map((element) => toFormContent(element, readResults!)) }; } -export function toFormField(original: KeyValuePairModel, readResults?: FormPage[]): FormField { +export function toFormFieldFromKeyValuePairModel( + pageNumber: number, + original: KeyValuePairModel, + readResults?: FormPage[] +): FormField { return { name: original.label, confidence: original.confidence || 1, - labelText: toFormText(original.key, readResults), - valueText: toFormText(original.value, readResults), + labelText: toFieldText(pageNumber, original.key, readResults), + valueText: toFieldText(pageNumber, original.value, readResults), value: original.value.text, valueType: "string" }; @@ -190,6 +187,7 @@ export function toRecognizeFormResultResponse( const common = { status: original.status, createdOn: original.createdOn, + errors: original.analyzeResult?.errors, lastModified: original.lastModified, _response: original._response }; @@ -205,8 +203,7 @@ export function toRecognizeFormResultResponse( original.analyzeResult.documentResults && original.analyzeResult.documentResults.length > 0 ? original.analyzeResult.documentResults.map((d) => toRecognizedForm(d, pages)) // supervised - : original.analyzeResult.pageResults?.map((p) => toFormFromPageResult(p, pages)), // unsupervised - errors: original.analyzeResult.errors + : original.analyzeResult.pageResults?.map((p) => toFormFromPageResult(p, pages)) // unsupervised } : undefined; return { @@ -215,73 +212,50 @@ export function toRecognizeFormResultResponse( }; } -export function toFieldValue(original: FieldValueModel, readResults: FormPage[]): FieldValue { - const result = - original.type === "object" || original.type === "array" - ? {} - : { - text: original.text, - boundingBox: original.boundingBox ? toBoundingBox(original.boundingBox) : undefined, - confidence: original.confidence || 1, - pageNumber: original.pageNumber, - textContent: original.elements?.map((element) => toFormContent(element, readResults)) - }; +export function toFormFieldFromFieldValueModel( + original: FieldValueModel, + key: string, + readResults: FormPage[] +): FormField { + let value: string | Date | number | FormField[] | { [propertyName: string] : FormField} | undefined; switch (original.type) { case "string": - (result as StringFieldValue).type = "string"; - (result as StringFieldValue).value = original.valueString; + value = original.valueString; break; case "date": - (result as DateFieldValue).type = "date"; - (result as DateFieldValue).value = original.valueDate; + value = original.valueDate; break; case "time": - (result as TimeFieldValue).type = "time"; - (result as TimeFieldValue).value = original.valueTime; + value = original.valueTime; break; - case "phoneNumber": - (result as PhoneNumberFieldValue).type = "phoneNumber"; - (result as PhoneNumberFieldValue).value = original.valuePhoneNumber; + case "integer": + value = original.valueInteger; break; case "number": - (result as NumberFieldValue).type = "number"; - (result as NumberFieldValue).value = original.valueNumber; + value = original.valueNumber; break; - case "integer": - (result as IntegerFieldValue).type = "integer"; - (result as IntegerFieldValue).value = original.valueInteger; + case "phoneNumber": + value = original.valuePhoneNumber; break; case "array": - (result as ArrayFieldValue).type = "array"; - (result as ArrayFieldValue).value = original.valueArray?.map((a) => - toFieldValue(a, readResults) - ); + value = original.valueArray?.map((fieldValueModel) => toFormFieldFromFieldValueModel(fieldValueModel, key, readResults)); break; case "object": - (result as ObjectFieldValue).type = "object"; - (result as ObjectFieldValue).value = original.valueObject - ? toFields(original.valueObject, readResults) - : undefined; + value = original.valueObject ? toFieldsFromFieldValue(original.valueObject, readResults) : undefined; break; - default: - throw new Error(`Unknown field value type from ${original}`); } - return (result as unknown) as FieldValue; -} - -export function toFields( - original: { [propertyName: string]: FieldValueModel }, - readResults: FormPage[] -): { [propertyName: string]: FieldValue } { - const result: { [propertyName: string]: FieldValue } = {}; - for (const key in original) { - // eslint-disable-next-line no-prototype-builtins - if (original.hasOwnProperty(key)) { - result[key] = toFieldValue(original[key], readResults); - } - } - - return result; + return { + confidence: original.confidence, + name: key, + valueText: { + pageNumber: original.pageNumber || 0, + text: original.text, + boundingBox: original.boundingBox ? toBoundingBox(original.boundingBox) : undefined, + textContent: original.elements?.map((element) => toFormContent(element, readResults)) + }, + valueType: original.type, + value + } as FormField; } export function toFieldsFromFieldValue( @@ -296,29 +270,8 @@ export function toFieldsFromFieldValue( result[key] = { name: key }; continue; } - const fieldValue = toFieldValue(original[key]!, readResults); - if (fieldValue.type === "array" || fieldValue.type === "object") { - const formField: FormField = { - confidence: 1, - name: key, - value: fieldValue.value, - valueType: fieldValue.type - }; - result[key] = formField; - } else { - const formField: FormField = { - confidence: fieldValue.confidence, - name: key, - valueText: { - text: fieldValue.text, - boundingBox: fieldValue.boundingBox, - textContent: fieldValue.textContent - }, - value: fieldValue.value, - valueType: fieldValue.type - }; - result[key] = formField; - } + const formField = toFormFieldFromFieldValueModel(original[key]!, key, readResults); + result[key] = formField; } } @@ -326,13 +279,14 @@ export function toFieldsFromFieldValue( } export function toFieldsFromKeyValuePairs( + pageNumber: number, original: KeyValuePairModel[], pages: FormPage[] ): { [propertyName: string]: FormField } { const result: { [propertyName: string]: FormField } = {}; for (let i = 0; i < original.length; i++) { const pair = original[i]; - const stringField = toFormField(pair, pages); + const stringField = toFormFieldFromKeyValuePairModel(pageNumber, pair, pages); stringField.name = stringField.name || `field-${i}`; result[`field-${i}`] = stringField; @@ -346,7 +300,9 @@ export function toFormFromPageResult(original: PageResultModel, pages: FormPage[ formType: `form-${original.clusterId}`, pageRange: { firstPageNumber: original.pageNumber, lastPageNumber: original.pageNumber }, pages, - fields: original.keyValuePairs ? toFieldsFromKeyValuePairs(original.keyValuePairs, pages) : {} + fields: original.keyValuePairs + ? toFieldsFromKeyValuePairs(original.pageNumber, original.keyValuePairs, pages) + : {} }; } @@ -362,7 +318,9 @@ export function toRecognizedForm(original: DocumentResultModel, pages: FormPage[ export function toRecognizeContentResultResponse( original: GetAnalyzeLayoutResultResponse ): RecognizeContentResultResponse { - function toRecognizeContentResult(model?: AnalyzeResultModel): RecognizedContent | undefined { + function toRecognizeContentResult( + model?: AnalyzeResultModel + ): { version?: string; pages?: FormPage[] } | undefined { if (!model) { return undefined; } @@ -376,6 +334,7 @@ export function toRecognizeContentResultResponse( const common = { status: original.status, createdOn: original.createdOn, + errors: original.analyzeResult?.errors, lastModified: original.lastModified, _response: original._response }; @@ -394,147 +353,47 @@ function toRecognizedReceipt(result: DocumentResultModel, pages: FormPage[]): Re throw new RangeError("The document type is not 'prebuilt:receipt'"); } - const form = toRecognizedForm(result, pages); - return { - recognizedForm: form, - locale: undefined // in the future service would return locale info - }; -} - -function toReceiptType(field: FormField): USReceiptType { - if (field.valueType === "string") { - const stringValue = field.value as string; - switch (stringValue) { - case "Itemized": - case "CreditCard": - case "Gas": - case "Parking": - return { confidence: field.confidence, type: stringValue }; - default: - return { confidence: field.confidence, type: "Unrecognized" }; - } - } - - throw new Error(`Expect receipt type field to have 'string' type but got ${field.valueType}`); -} - -function toUSReceiptItems(items: ReceiptItemArrayField): USReceiptItem[] { - return items.value?.map((item) => { - const name: FormField = { - name: "Name", - confidence: item.value.Name?.confidence, - value: item.value.Name?.value, - valueType: item.value.Name?.type, - valueText: { - text: item.value.Name?.text, - boundingBox: item.value.Name?.boundingBox, - textContent: item.value.Name?.textContent - } - }; - const quantity: FormField = { - name: "Quantity", - confidence: item.value.Quantity?.confidence, - value: item.value.Quantity?.value, - valueType: item.value.Quantity?.type, - valueText: { - text: item.value.Quantity?.text, - boundingBox: item.value.Quantity?.boundingBox, - textContent: item.value.Quantity?.textContent - } - }; - const price: FormField = { - name: "Price", - confidence: item.value.Price?.confidence, - value: item.value.Price?.value, - valueType: item.value.Price?.type, - valueText: { - text: item.value.Price?.text, - boundingBox: item.value.Price?.boundingBox, - textContent: item.value.Price?.textContent - } - }; - const totalPrice: FormField = { - name: "TotalPrice", - confidence: item.value.TotalPrice?.confidence, - value: item.value.TotalPrice?.value, - valueType: item.value.TotalPrice?.type, - valueText: { - text: item.value.TotalPrice?.text, - boundingBox: item.value.TotalPrice?.boundingBox, - textContent: item.value.TotalPrice?.textContent - } - }; - - return { - name, - quantity, - price, - totalPrice - }; - }); -} - -function toUSReceipt(receipt: RecognizedReceipt): ReceiptWithLocale { - const form = receipt.recognizedForm; + const recognizedForm = toRecognizedForm(result, pages); return { - locale: "US", - recognizedForm: receipt.recognizedForm, - items: form.fields["Items"] ? toUSReceiptItems((form.fields["Items"] as unknown) as ReceiptItemArrayField) : [], - merchantAddress: form.fields["MerchantAddress"], - merchantName: form.fields["MerchantName"], - merchantPhoneNumber: form.fields["MerchantPhoneNumber"], - receiptType: toReceiptType(form.fields["ReceiptType"]), - subtotal: form.fields["Subtotal"], - tax: form.fields["Tax"], - tip: form.fields["Tip"], - total: form.fields["Total"], - transactionDate: form.fields["TransactionDate"], - transactionTime: form.fields["TransactionTime"] + recognizedForm }; } -function toReceiptWithLocale(receipt: RecognizedReceipt): ReceiptWithLocale { - switch (receipt.locale) { - case "US": - return toUSReceipt(receipt); - default: - throw new RangeError(`Unsupported receipt with locale ${receipt.locale}`); - } -} - export function toReceiptResultResponse( - result: GetAnalyzeReceiptResultResponse + original: GetAnalyzeReceiptResultResponse ): RecognizeReceiptResultResponse { const common = { - status: result.status, - createdOn: result.createdOn, - lastModified: result.lastModified, - _response: result._response + status: original.status, + createdOn: original.createdOn, + errors: original.analyzeResult?.errors, + lastModified: original.lastModified, + _response: original._response }; - if (result.status !== "succeeded") { + if (original.status !== "succeeded") { return common; } - if (!result.analyzeResult) { - throw new Error("Expecting valid analyzeResult from the service response") + if (!original.analyzeResult) { + throw new Error("Expecting valid analyzeResult from the service response"); } - const pages = result.analyzeResult!.readResults.map(toFormPage); + const pages = original.analyzeResult!.readResults.map(toFormPage); return { ...common, - version: result.analyzeResult!.version, - receipts: result.analyzeResult!.documentResults!.filter(d => { - return !!d.fields - }).map((d) => { - const receipt = toRecognizedReceipt(d, pages); - return toReceiptWithLocale({ ...receipt, locale: "US" }); // default to US until service returns locale info. - }) + version: original.analyzeResult!.version, + receipts: original + .analyzeResult!.documentResults!.filter((d) => { + return !!d.fields; + }) + .map((d) => toRecognizedReceipt(d, pages)) }; } export function toFormModelResponse(response: GetCustomModelResponse): FormModelResponse { const common = { ...response.modelInfo, + trainingDocuments: response.trainResult?.trainingDocuments, + errors: response.trainResult?.errors, _response: response._response }; @@ -546,13 +405,11 @@ export function toFormModelResponse(response: GetCustomModelResponse): FormModel // training with forms and labels, populate from trainingResult.fields const fields: { [propertyName: string]: CustomFormField } = {}; for (const f of response.trainResult.fields!) { - fields[f.fieldName] = { name: f.fieldName, accuracy: f.accuracy }; + fields[f.fieldName] = { name: f.fieldName, accuracy: f.accuracy, label: null }; } return { ...common, - trainingDocuments: response.trainResult.trainingDocuments, - errors: response.trainResult.errors, - models: [ + submodels: [ { accuracy: response.trainResult.averageModelAccuracy, formType: `form-${response.modelInfo.modelId}`, @@ -562,22 +419,20 @@ export function toFormModelResponse(response: GetCustomModelResponse): FormModel }; } else if (response.keys) { // training with forms, populate from trainingResult.keys - const models: CustomFormSubModel[] = []; + const submodels: CustomFormSubmodel[] = []; for (const clusterKey in response.keys.clusters) { const cluster = response.keys.clusters[clusterKey]; const fields: { [propertyName: string]: CustomFormField } = {}; for (let i = 0; i < cluster.length; i++) { - fields[`field-${i}`] = { name: `field-${i}` }; + fields[`field-${i}`] = { name: `field-${i}`, label: cluster[i] }; } - models.push({ formType: `form-${clusterKey}`, fields }); + submodels.push({ formType: `form-${clusterKey}`, fields }); } return { ...common, - trainingDocuments: response.trainResult?.trainingDocuments, - errors: response.trainResult?.errors, - models + submodels }; } else { throw new Error("Expecting model(s) from traning result but got none"); diff --git a/sdk/formrecognizer/ai-form-recognizer/swagger/README.md b/sdk/formrecognizer/ai-form-recognizer/swagger/README.md index 8d1cac37f0d9..1199315ed905 100644 --- a/sdk/formrecognizer/ai-form-recognizer/swagger/README.md +++ b/sdk/formrecognizer/ai-form-recognizer/swagger/README.md @@ -35,26 +35,76 @@ directive: $["x-ms-client-name"] = "pageNumber"; ``` -### `createdDateTime` => `createdOn` +### CopyOperationResult `createdDateTime` => `createdOn` ```yaml directive: - from: swagger-document - where: $.definitions..properties.createdDateTime + where: $.definitions.CopyOperationResult.properties.createdDateTime transform: > $["x-ms-client-name"] = "createdOn"; ``` -### `lastUpdatedDateTime` => `lastUpdatedOn` +### CopyOperationResult `lastUpdatedDateTime` => `lastModified` ```yaml directive: - from: swagger-document - where: $.definitions..properties.lastUpdatedDateTime + where: $.definitions.CopyOperationResult.properties.lastUpdatedDateTime transform: > $["x-ms-client-name"] = "lastModified"; ``` +### AnalyzeOperationResult `createdDateTime` => `createdOn` + +```yaml +directive: + - from: swagger-document + where: $.definitions.AnalyzeOperationResult.properties.createdDateTime + transform: > + $["x-ms-client-name"] = "createdOn"; +``` + +### AnalyzeOperationResult `lastUpdatedDateTime` => `lastModified` + +```yaml +directive: + - from: swagger-document + where: $.definitions.AnalyzeOperationResult.properties.lastUpdatedDateTime + transform: > + $["x-ms-client-name"] = "lastModified"; +``` + +### Models `lastUpdatedDateTime` => `lastModified` + +```yaml +directive: + - from: swagger-document + where: $.definitions.Models.properties.summary.properties.lastUpdatedDateTime + transform: > + $["x-ms-client-name"] = "lastModified"; +``` + +### ModelInfo `createDateTime` => `requestedOn` + +```yaml +directive: + - from: swagger-document + where: $.definitions.ModelInfo.properties.createdDateTime + transform: > + $["x-ms-client-name"] = "requestedOn"; +``` + +### ModelInfo `lastUpdatedDateTime` => `completedOn` + +```yaml +directive: + - from: swagger-document + where: $.definitions.ModelInfo.properties.lastUpdatedDateTime + transform: > + $["x-ms-client-name"] = "completedOn"; +``` + ### `TrainingDocumentInfo.pages` => `TrainingDocumentInfo.pageCount` ```yaml diff --git a/sdk/formrecognizer/ai-form-recognizer/test/browser/formrecognizerclient.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/browser/formrecognizerclient.spec.ts index f4838a6e75a5..bfd5e5989a95 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/browser/formrecognizerclient.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/browser/formrecognizerclient.spec.ts @@ -28,13 +28,11 @@ describe("FormRecognizerClient browser only", () => { const poller = await client.beginRecognizeContentFromUrl(url); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect non-empty pages but got ${pages}` ); }); @@ -45,16 +43,14 @@ describe("FormRecognizerClient browser only", () => { const poller = await client.beginRecognizeReceiptsFromUrl(url); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); }); it("recognizes receipt from a Blob", async () => { @@ -74,15 +70,13 @@ describe("FormRecognizerClient browser only", () => { assert.ok(data, "Expect valid Blob data to use as input"); const poller = await client.beginRecognizeReceipts(data!); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); }); }).timeout(60000); diff --git a/sdk/formrecognizer/ai-form-recognizer/test/browser/formtrainingclient.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/browser/formtrainingclient.spec.ts index e962a7a55876..1218fa7c976c 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/browser/formtrainingclient.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/browser/formtrainingclient.spec.ts @@ -57,8 +57,8 @@ describe("FormTrainingClient browser only", () => { // save the id for recognition tests unlabeledModelId = response!.modelId; - assert.ok(response!.models && response!.models.length > 0, "Expected non empty sub model list"); - const model = response!.models![0]; + assert.ok(response!.submodels && response!.submodels.length > 0, "Expected non empty sub model list"); + const model = response!.submodels![0]; assert.equal(model.formType, "form-0"); assert.equal(model.accuracy, undefined); assert.ok(model.fields["field-0"], "Expecting field with name 'field-0' to be valid"); @@ -78,8 +78,8 @@ describe("FormTrainingClient browser only", () => { assert.ok(response!.status === "ready", "Expecting status to be 'ready'"); assert.ok(response!.modelId); - assert.ok(response!.models && response!.models.length > 0, "Expected non empty sub model list"); - const model = response!.models![0]; + assert.ok(response!.submodels && response!.submodels.length > 0, "Expected non empty sub model list"); + const model = response!.submodels![0]; assert.equal(model.formType, `form-${response!.modelId}`); assert.equal(model.accuracy, 0.973); assert.ok(model.fields["Signature"], "Expecting field with name 'Signature' to be valid"); @@ -136,7 +136,10 @@ describe("FormTrainingClient browser only", () => { it("getAccountProperties() gets model count and limit for this account", async () => { const properties = await trainingClient.getAccountProperties(); - assert.ok(properties.customModelCount > 0, `Expecting models in account but got ${properties.customModelCount}`); + assert.ok( + properties.customModelCount > 0, + `Expecting models in account but got ${properties.customModelCount}` + ); assert.ok( properties.customModelLimit > 0, `Expecting maximum number of models in account but got ${properties.customModelLimit}` @@ -170,7 +173,7 @@ describe("FormTrainingClient browser only", () => { assert.ok(modelInfo.modelId === modelIdToDelete, "Expecting same model id"); assert.ok( - modelInfo.models && modelInfo.models.length > 0, + modelInfo.submodels && modelInfo.submodels.length > 0, "Expecting no empty list of custom form sub models" ); }); @@ -219,15 +222,13 @@ describe("FormRecognizerClient custom form recognition browser only", () => { assert.ok(unlabeledModelId, "Expecting valid model id from training without labels"); const poller = await recognizerClient.beginRecognizeCustomFormsFromUrl(unlabeledModelId!, url); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "form-0"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, @@ -257,15 +258,13 @@ describe("FormRecognizerClient custom form recognition browser only", () => { assert.ok(data, "Expect valid Blob data to use as input"); const poller = await recognizerClient.beginRecognizeCustomForms(unlabeledModelId!, data!); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "form-0"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, diff --git a/sdk/formrecognizer/ai-form-recognizer/test/node/formrecognizerclient.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/node/formrecognizerclient.spec.ts index b0927577b602..664313e018bc 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/node/formrecognizerclient.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/node/formrecognizerclient.spec.ts @@ -30,13 +30,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContent(stream, "application/pdf"); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); //TODO: verify table rows column cells etc. @@ -48,13 +46,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContent(stream, "image/png"); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); }); @@ -64,13 +60,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContent(stream, "image/jpeg"); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); }); @@ -80,13 +74,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContent(stream, "image/tiff"); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); }); @@ -96,13 +88,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContent(stream); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); }); @@ -113,13 +103,11 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeContentFromUrl(url); await poller.pollUntilDone(); - const response = poller.getResult(); + const pages = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.pages && response!.pages.length > 0, - `Expect no-empty pages but got ${response!.pages}` + pages && pages.length > 0, + `Expect no-empty pages but got ${pages}` ); }); @@ -129,24 +117,22 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeReceipts(stream, "image/png"); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); - assert.equal(usReceipt.locale, "US"); // default to "US" for now - assert.equal(usReceipt.receiptType.type, "Itemized"); - assert.equal(usReceipt.locale, "US"); - assert.ok(usReceipt.tax, "Expecting valid 'tax' field"); - assert.equal(usReceipt.tax!.name, "Tax"); - assert.ok(usReceipt.total, "Expecting valid 'total' field"); - assert.equal(typeof usReceipt.total!.value!, "number"); - assert.equal(usReceipt.total!.value!, 1203.39); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); + assert.equal(receipt.recognizedForm.fields["ReceiptType"].valueType, "string"); + assert.equal(receipt.recognizedForm.fields["ReceiptType"].value as string, "Itemized"); + assert.ok(receipt.recognizedForm.fields["Tax"], "Expecting valid 'Tax' field"); + assert.equal(receipt.recognizedForm.fields["Tax"].valueType, "number"); + assert.equal(receipt.recognizedForm.fields["Tax"].name, "Tax"); + assert.ok(receipt.recognizedForm.fields["Total"], "Expecting valid 'Total' field"); + assert.equal(receipt.recognizedForm.fields["Total"].valueType, "number"); + assert.equal(receipt.recognizedForm.fields["Total"].value as number, 1203.39); }); it("recognizes receipt from a jpeg file stream", async () => { @@ -155,16 +141,14 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeReceipts(stream, "image/jpeg"); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); }); it("recognizes receipt from a url", async () => { @@ -174,16 +158,14 @@ describe("FormRecognizerClient NodeJS only", () => { const poller = await client.beginRecognizeReceiptsFromUrl(url); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); }); it("recognizes multi-page receipt with blank page", async () => { @@ -191,21 +173,16 @@ describe("FormRecognizerClient NodeJS only", () => { const stream = fs.createReadStream(filePath); const poller = await client.beginRecognizeReceipts(stream, "application/pdf", { - includeTextDetails: true + includeTextContent: true }); await poller.pollUntilDone(); - const response = poller.getResult(); + const receipts = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.receipts && response!.receipts.length > 0, - `Expect no-empty pages but got ${response!.receipts}` + receipts && receipts.length > 0, + `Expect no-empty pages but got ${receipts}` ); - const usReceipt = response!.receipts![0]; - assert.equal(usReceipt.recognizedForm.formType, "prebuilt:receipt"); - assert.equal(usReceipt.locale, "US"); // default to "US" for now - assert.equal(usReceipt.receiptType.type, "Itemized"); - assert.equal(usReceipt.locale, "US"); + const receipt = receipts![0]; + assert.equal(receipt.recognizedForm.formType, "prebuilt:receipt"); }); }).timeout(60000); diff --git a/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts index 979eae484993..892a0625fd5f 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts @@ -12,12 +12,7 @@ import { createRecordedTrainingClient, createRecordedRecognizerClient } from "../util/recordedClients"; -import { - FormRecognizerClient, - AzureKeyCredential, - TrainingDocumentInfo, - FormTrainingClient -} from "../../src"; +import { FormRecognizerClient, TrainingDocumentInfo, FormTrainingClient } from "../../src"; import { env, Recorder } from "@azure/test-utils-recorder"; const ASSET_PATH = path.resolve(path.join(process.cwd(), "test-assets")); @@ -31,10 +26,6 @@ describe("FormTrainingClient NodeJS only", () => { beforeEach(function() { ({ recorder, client: trainingClient } = createRecordedTrainingClient(this)); - trainingClient = new FormTrainingClient( - env.FORM_RECOGNIZER_ENDPOINT, - new AzureKeyCredential(env.FORM_RECOGNIZER_API_KEY) - ); }); afterEach(function() { @@ -63,8 +54,8 @@ describe("FormTrainingClient NodeJS only", () => { // save the id for recognition tests unlabeledModelId = response!.modelId; - assert.ok(response!.models && response!.models.length > 0, "Expected non empty sub model list"); - const model = response!.models![0]; + assert.ok(response!.submodels && response!.submodels.length > 0, "Expected non empty sub model list"); + const model = response!.submodels![0]; assert.equal(model.formType, "form-0"); assert.equal(model.accuracy, undefined); assert.ok(model.fields["field-0"], "Expecting field with name 'field-0' to be valid"); @@ -86,8 +77,8 @@ describe("FormTrainingClient NodeJS only", () => { // save the id for recognition tests labeledModelId = response!.modelId; - assert.ok(response!.models && response!.models.length > 0, "Expected non empty sub model list"); - const model = response!.models![0]; + assert.ok(response!.submodels && response!.submodels.length > 0, "Expected non empty sub model list"); + const model = response!.submodels![0]; assert.equal(model.formType, `form-${response!.modelId}`); assert.equal(model.accuracy, 0.973); assert.ok(model.fields["Signature"], "Expecting field with name 'Signature' to be valid"); @@ -144,7 +135,10 @@ describe("FormTrainingClient NodeJS only", () => { it("getAccountProperties() gets model count and limit for this account", async () => { const properties = await trainingClient.getAccountProperties(); - assert.ok(properties.customModelCount > 0, `Expecting models in account but got ${properties.customModelCount}`); + assert.ok( + properties.customModelCount > 0, + `Expecting models in account but got ${properties.customModelCount}` + ); assert.ok( properties.customModelLimit > 0, `Expecting maximum number of models in account but got ${properties.customModelLimit}` @@ -178,7 +172,7 @@ describe("FormTrainingClient NodeJS only", () => { assert.ok(modelInfo.modelId === modelIdToDelete, "Expecting same model id"); assert.ok( - modelInfo.models && modelInfo.models.length > 0, + modelInfo.submodels && modelInfo.submodels.length > 0, "Expecting no empty list of custom form sub models" ); }); @@ -204,6 +198,25 @@ describe("FormTrainingClient NodeJS only", () => { ); } }); + + // TODO: re-enabling is tracked by https://github.com/azure/azure-sdk-for-js/issues/9072 + it.skip("copies model", async function() { + // for testing purpose, copy into the same resource + const resourceId = env.FORM_RECOGNIZER_TARGET_RESOURCE_ID; + const resourceRegion = env.FORM_RECOGNIZER_TARGET_RESOURCE_REGION; + const targetAuth = await trainingClient.getCopyAuthorization(resourceId, resourceRegion); + + assert.ok(labeledModelId, "Expecting valide model id in source"); + const poller = await trainingClient.beginCopyModel(labeledModelId!, targetAuth); + await poller.pollUntilDone(); + const result = poller.getResult(); + + assert.ok(result, "Expecting valid copy result"); + assert.equal(result?.modelId, targetAuth.modelId, "Expecting matching model ids"); + assert.equal(result!.status, "ready"); + assert.ok(result!.requestedOn, "Expecting valid 'createOn' property"); + assert.ok(result!.completedOn, "Expecting valid 'lastModified' property"); + }); }).timeout(60000); describe("FormRecognizerClient form recognition NodeJS", () => { @@ -231,15 +244,13 @@ describe("FormRecognizerClient form recognition NodeJS", () => { "image/jpeg" ); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "form-0"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, @@ -259,15 +270,13 @@ describe("FormRecognizerClient form recognition NodeJS", () => { assert.ok(unlabeledModelId, "Expecting valid model id from training without labels"); const poller = await recognizerClient.beginRecognizeCustomFormsFromUrl(unlabeledModelId!, url); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "form-0"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, @@ -290,15 +299,13 @@ describe("FormRecognizerClient form recognition NodeJS", () => { "image/jpeg" ); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "custom:form"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, @@ -320,15 +327,13 @@ describe("FormRecognizerClient form recognition NodeJS", () => { assert.ok(labeledModelId, "Expecting valid model id from training without labels"); const poller = await recognizerClient.beginRecognizeCustomForms(labeledModelId!, stream); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "custom:form"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, @@ -350,15 +355,13 @@ describe("FormRecognizerClient form recognition NodeJS", () => { assert.ok(labeledModelId, "Expecting valid model id from training without labels"); const poller = await recognizerClient.beginRecognizeCustomForms(labeledModelId!, stream); await poller.pollUntilDone(); - const response = poller.getResult(); + const forms = poller.getResult(); - assert.ok(response, "Expect valid response object"); - assert.equal(response!.status, "succeeded"); assert.ok( - response!.forms && response!.forms.length > 0, - `Expect no-empty pages but got ${response!.forms}` + forms && forms.length > 0, + `Expect no-empty pages but got ${forms}` ); - const form = response!.forms![0]; + const form = forms![0]; assert.equal(form.formType, "custom:form"); assert.deepStrictEqual(form.pageRange, { firstPageNumber: 1, diff --git a/sdk/formrecognizer/ai-form-recognizer/test/transforms.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/transforms.spec.ts index 94812c7b2e3c..63cb87d5d196 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/transforms.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/transforms.spec.ts @@ -7,9 +7,9 @@ import { toTextLine, toFormPage, toFormContent, - toFormText, - toFormField, - toFieldValue, + toFieldText, + toFormFieldFromKeyValuePairModel, + toFormFieldFromFieldValueModel, toFieldsFromFieldValue, toFormTable, toRecognizeFormResultResponse, @@ -27,15 +27,8 @@ import { DocumentResult as DocumentResultModel } from "../src/generated/models"; import { - StringFieldValue, - DateFieldValue, - TimeFieldValue, - PhoneNumberFieldValue, - NumberFieldValue, - IntegerFieldValue, - ArrayFieldValue, - ObjectFieldValue, - Point2D + Point2D, + FormField } from "../src/models"; describe("Transforms", () => { @@ -160,8 +153,9 @@ describe("Transforms", () => { }; it("toKeyValueElement() converts original KeyValueElementModel", () => { - const transformed = toFormText(originalKeyValueElement1, formPages); + const transformed = toFieldText(0, originalKeyValueElement1, formPages); + assert.equal(transformed.pageNumber, 0); assert.equal(transformed.text, originalKeyValueElement1.text); assert.ok(transformed.boundingBox); verifyBoundingBox(transformed.boundingBox!, originalKeyValueElement1.boundingBox); @@ -177,20 +171,19 @@ describe("Transforms", () => { value: originalKeyValueElement1 }; - const transformed = toFormField(original, formPages); + const transformed = toFormFieldFromKeyValuePairModel(1, original, formPages); assert.equal(transformed.name, original.label); assert.equal(transformed.confidence, original.confidence); assert.ok(transformed.labelText); assert.ok(transformed.labelText!.boundingBox); + assert.equal(transformed.labelText!.pageNumber, 1); assert.ok(transformed.valueText); + assert.equal(transformed.valueText!.pageNumber, 1); assert.ok(transformed.valueText!.boundingBox); verifyBoundingBox(transformed.labelText!.boundingBox!, original.key.boundingBox); verifyBoundingBox(transformed.valueText!.boundingBox!, original.value.boundingBox); - assert.deepStrictEqual( - transformed.labelText!.textContent![0], - formPages[0].lines![0].words[0] - ); + assert.deepStrictEqual(transformed.labelText!.textContent![0], formPages[0].lines![0].words[0]); assert.deepStrictEqual(transformed.valueText!.textContent![1], formPages[0].lines![0].words[1]); }); @@ -201,7 +194,7 @@ describe("Transforms", () => { elements: ["#/readResults/0/lines/0/words/0", "#/readResults/0/lines/0/words/1"] }; - describe("toFieldValue()", () => { + describe("toFormFieldFromFieldValueModel()", () => { it("converts field value of string", () => { const original: FieldValueModel = { type: "string", @@ -209,11 +202,13 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "string"); + assert.equal(transformed.name, "keyName"); + assert.equal(transformed.valueType, "string"); assert.equal(transformed.value, original.valueString); - assert.equal((transformed as StringFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of date", () => { @@ -223,11 +218,13 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "date"); + assert.equal(transformed.name, "keyName"); + assert.equal(transformed.valueType, "date"); assert.equal(transformed.value, original.valueDate); - assert.equal((transformed as DateFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of time", () => { @@ -237,11 +234,13 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "time"); + assert.equal(transformed.name, "keyName"); + assert.equal(transformed.valueType, "time"); assert.equal(transformed.value, original.valueTime); - assert.equal((transformed as TimeFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of phoneNumber", () => { @@ -251,11 +250,12 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "phoneNumber"); + assert.equal(transformed.valueType, "phoneNumber"); assert.equal(transformed.value, original.valuePhoneNumber); - assert.equal((transformed as PhoneNumberFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of number", () => { @@ -265,11 +265,12 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "number"); + assert.equal(transformed.valueType, "number"); assert.equal(transformed.value, original.valueNumber); - assert.equal((transformed as NumberFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of integer", () => { @@ -279,11 +280,12 @@ describe("Transforms", () => { ...commonProperties }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "integer"); + assert.equal(transformed.valueType, "integer"); assert.equal(transformed.value, original.valueInteger); - assert.equal((transformed as IntegerFieldValue).text, original.text); + assert.ok(transformed.valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(transformed.valueText!.text, original.text); }); it("converts field value of array", () => { @@ -302,21 +304,23 @@ describe("Transforms", () => { valueArray: [originalDate, originalInteger] }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "array"); + assert.equal(transformed.valueType, "array"); - const array = (transformed as ArrayFieldValue).value; - assert.equal(array![0].type, "date"); + const array = transformed.value as FormField[]; + assert.equal(array![0].valueType, "date"); assert.equal(array![0].value, originalDate.valueDate); - assert.equal((array![0] as DateFieldValue).text, originalDate.text); + assert.ok(array![0].valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(array![0].valueText!.text, originalDate.text); assert.deepStrictEqual( - (array![0] as DateFieldValue).textContent![0], + array![0].valueText!.textContent![0], formPages[0].lines![0].words[0] ); - assert.equal(array![1].type, "integer"); + assert.equal(array![1].valueType, "integer"); assert.equal(array![1].value, originalInteger.valueInteger); - assert.equal((array![1] as DateFieldValue).text, originalDate.text); + assert.ok(array![1].valueText, "Expecting valid 'transformed.valueText'"); + assert.equal(array![1].valueText!.text, originalInteger.text); }); it("converts field value of object", () => { @@ -338,14 +342,14 @@ describe("Transforms", () => { } }; - const transformed = toFieldValue(original, formPages); + const transformed = toFormFieldFromFieldValueModel(original, "keyName", formPages); - assert.equal(transformed.type, "object"); + assert.equal(transformed.valueType, "object"); - const obj = transformed as ObjectFieldValue; - assert.equal(obj.type, "object"); - assert.equal(obj.value!["dateProperty"].value, originalDate.valueDate); - assert.equal(obj.value!["integerProperty"].value, originalInteger.valueInteger); + const obj = transformed.value as { [proertyName: string] : FormField}; + assert.ok(obj, "Expecting valid transformed.value") + assert.equal(obj!["dateProperty"].value, originalDate.valueDate); + assert.equal(obj!["integerProperty"].value, originalInteger.valueInteger); }); }); @@ -463,7 +467,7 @@ describe("Transforms", () => { docType: "prebuilt:receipt", pageRange: [1, 1], fields: {} - } + }; const transformed = toRecognizedForm(original, formPages); @@ -515,7 +519,7 @@ describe("Transforms", () => { it("toFormModelResponse() converts labeled model response", () => { const original: GetCustomModelResponse = JSON.parse(labeledModelResponse); const transformed = toFormModelResponse(original); - const models = transformed.models; + const models = transformed.submodels; assert.deepStrictEqual( transformed.trainingDocuments, @@ -531,14 +535,15 @@ describe("Transforms", () => { assert.equal(models![0].accuracy, original.trainResult!.averageModelAccuracy); assert.deepStrictEqual(models![0].fields!["InvoiceDate"], { name: "InvoiceDate", - accuracy: 0.8 + accuracy: 0.8, + label: null }); }); it("toFormModelResponse() converts unlabeled model response", () => { const original: GetCustomModelResponse = JSON.parse(unlabeledModelResponse); const transformed = toFormModelResponse(original); - const models = transformed.models; + const models = transformed.submodels; assert.deepStrictEqual( transformed.trainingDocuments, @@ -561,23 +566,6 @@ describe("Transforms", () => { assert.ok(transformed.receipts, "Expecting non-empty recognized receipts"); assert.equal(transformed.receipts![0].recognizedForm.formType, "prebuilt:receipt"); - assert.equal(transformed.receipts![0].locale, "US"); // default to "US" for now - }); - - it("toUSReceipt() converts receipt to USA sales receipt", () => { - const original: GetAnalyzeReceiptResultResponse = JSON.parse(receiptResponseString); - const receiptResult = toReceiptResultResponse(original); - const usReceipt = receiptResult.receipts![0]; - - assert.equal(usReceipt.receiptType.confidence, 0.692); - assert.equal(usReceipt.receiptType.type, "Itemized"); - assert.equal(usReceipt.locale, "US"); - assert.ok(usReceipt.tax, "Expecting valid 'tax' field"); - assert.equal(usReceipt.tax!.name, "Tax"); - assert.ok(usReceipt.tip, "Expecting valid 'tip' field"); - assert.equal(typeof usReceipt.tip!.value!, "number"); - assert.ok(usReceipt.total, "Expecting valid 'total' field"); - assert.equal(usReceipt.total!.value!, 14.5); }); }); diff --git a/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts b/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts index 3a740eb36a14..4917ddd2de62 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts @@ -31,7 +31,9 @@ const replaceableVariables: { [k: string]: string } = { FORM_RECOGNIZER_API_KEY: "api_key", FORM_RECOGNIZER_ENDPOINT: "https://endpoint/", FORM_RECOGNIZER_TRAINING_CONTAINER_SAS_URL: "https://storageaccount/trainingdata?sastoken", - FORM_RECOGNIZER_TESTING_CONTAINER_SAS_URL: "https://storageaccount/testingdata?sastoken" + FORM_RECOGNIZER_TESTING_CONTAINER_SAS_URL: "https://storageaccount/testingdata?sastoken", + FORM_RECOGNIZER_TARGET_RESOURCE_REGION: "resource_region", + FORM_RECOGNIZER_TARGET_RESOURCE_ID: "resource_id" }; export const testEnv = new Proxy(replaceableVariables, { diff --git a/sdk/formrecognizer/ai-form-recognizer/tests.yml b/sdk/formrecognizer/ai-form-recognizer/tests.yml index 4eee6a580c68..d800a806e559 100644 --- a/sdk/formrecognizer/ai-form-recognizer/tests.yml +++ b/sdk/formrecognizer/ai-form-recognizer/tests.yml @@ -1,20 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/ai-form-recognizer" - ResourceServiceDirectory: formrecognizer - TestSamples: false - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/ai-form-recognizer" + ResourceServiceDirectory: formrecognizer + TestSamples: false + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/formrecognizer/ci.yml b/sdk/formrecognizer/ci.yml index 73d9be072a04..9b23c0b576ee 100644 --- a/sdk/formrecognizer/ci.yml +++ b/sdk/formrecognizer/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/formrecognizer/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: formrecognizer - Artifacts: - - name: azure-ai-form-recognizer - safeName: azureaiformrecognizer +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: formrecognizer + Artifacts: + - name: azure-ai-form-recognizer + safeName: azureaiformrecognizer diff --git a/sdk/formrecognizer/test-resources.json b/sdk/formrecognizer/test-resources.json index 134c0beb84bf..d63494b6b479 100644 --- a/sdk/formrecognizer/test-resources.json +++ b/sdk/formrecognizer/test-resources.json @@ -9,6 +9,13 @@ "description": "The base resource name." } }, + "location": { + "type": "string", + "defaultValue": "westcentralus", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + }, "testApplicationOid": { "type": "string", "metadata": { @@ -94,6 +101,14 @@ "FORM_RECOGNIZER_TESTING_CONTAINER_SAS_URL": { "type": "string", "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('testingDataContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('testingDataSasProperties')).serviceSasToken)]" + }, + "FORM_RECOGNIZER_TARGET_RESOURCE_REGION": { + "type": "string", + "value": "[parameters('location')]" + }, + "FORM_RECOGNIZER_TARGET_RESOURCE_ID": { + "type": "string", + "value": "[resourceId('Microsoft.CognitiveServices/accounts', parameters('baseName'))]" } } } diff --git a/sdk/graphrbac/ci.yml b/sdk/graphrbac/ci.yml deleted file mode 100644 index cfdee10e3afa..000000000000 --- a/sdk/graphrbac/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/graphrbac/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/graphrbac/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: graphrbac - Artifacts: - - name: azure-graph - safeName: azuregraph diff --git a/sdk/hdinsight/arm-hdinsight/package.json b/sdk/hdinsight/arm-hdinsight/package.json index 71cf1617282c..2faa1f83caf7 100644 --- a/sdk/hdinsight/arm-hdinsight/package.json +++ b/sdk/hdinsight/arm-hdinsight/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-hdinsight", "author": "Microsoft Corporation", "description": "HDInsightManagementClient Library with typescript type definitions for node.js and browser.", - "version": "0.16.1", + "version": "0.17.1", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts index 261804e01b82..5db79a438421 100644 --- a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts +++ b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts @@ -25,6 +25,7 @@ class HDInsightManagementClient extends HDInsightManagementClientContext { scriptActions: operations.ScriptActions; scriptExecutionHistory: operations.ScriptExecutionHistory; operations: operations.Operations; + virtualMachines: operations.VirtualMachines; /** * Initializes a new instance of the HDInsightManagementClient class. @@ -43,6 +44,7 @@ class HDInsightManagementClient extends HDInsightManagementClientContext { this.scriptActions = new operations.ScriptActions(this); this.scriptExecutionHistory = new operations.ScriptExecutionHistory(this); this.operations = new operations.Operations(this); + this.virtualMachines = new operations.VirtualMachines(this); } } diff --git a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClientContext.ts b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClientContext.ts index 6feb32e21be7..154452e29474 100644 --- a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClientContext.ts +++ b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-hdinsight"; -const packageVersion = "0.16.1"; +const packageVersion = "0.17.1"; export class HDInsightManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/hdinsight/arm-hdinsight/src/models/index.ts b/sdk/hdinsight/arm-hdinsight/src/models/index.ts index 57dd77c4a9e4..1225bed59363 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/index.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/index.ts @@ -1468,6 +1468,16 @@ export interface Operation { display?: OperationDisplay; } +/** + * The cluster host information. + */ +export interface HostInfo { + /** + * The host name + */ + name?: string; +} + /** * An interface representing HDInsightManagementClientOptions. */ @@ -2179,3 +2189,23 @@ export type OperationsListNextResponse = OperationListResult & { parsedBody: OperationListResult; }; }; + +/** + * Contains response data for the listHosts operation. + */ +export type VirtualMachinesListHostsResponse = Array & { + /** + * 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: HostInfo[]; + }; +}; diff --git a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts index 718621146630..cf5648465ce8 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts @@ -2647,6 +2647,22 @@ export const Operation: msRest.CompositeMapper = { } }; +export const HostInfo: msRest.CompositeMapper = { + serializedName: "HostInfo", + type: { + name: "Composite", + className: "HostInfo", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const ClusterListResult: msRest.CompositeMapper = { serializedName: "ClusterListResult", type: { diff --git a/sdk/hdinsight/arm-hdinsight/src/models/virtualMachinesMappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/virtualMachinesMappers.ts new file mode 100644 index 000000000000..aa9170a021dc --- /dev/null +++ b/sdk/hdinsight/arm-hdinsight/src/models/virtualMachinesMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 { + ErrorResponse, + HostInfo +} from "../models/mappers"; diff --git a/sdk/hdinsight/arm-hdinsight/src/operations/index.ts b/sdk/hdinsight/arm-hdinsight/src/operations/index.ts index 24f8e67f021c..91009a17962e 100644 --- a/sdk/hdinsight/arm-hdinsight/src/operations/index.ts +++ b/sdk/hdinsight/arm-hdinsight/src/operations/index.ts @@ -16,3 +16,4 @@ export * from "./extensions"; export * from "./scriptActions"; export * from "./scriptExecutionHistory"; export * from "./operations"; +export * from "./virtualMachines"; diff --git a/sdk/hdinsight/arm-hdinsight/src/operations/virtualMachines.ts b/sdk/hdinsight/arm-hdinsight/src/operations/virtualMachines.ts new file mode 100644 index 000000000000..837de0a205e3 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsight/src/operations/virtualMachines.ts @@ -0,0 +1,171 @@ +/* + * 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. + */ + +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/virtualMachinesMappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightManagementClientContext } from "../hDInsightManagementClientContext"; + +/** Class representing a VirtualMachines. */ +export class VirtualMachines { + private readonly client: HDInsightManagementClientContext; + + /** + * Create a VirtualMachines. + * @param {HDInsightManagementClientContext} client Reference to the service client. + */ + constructor(client: HDInsightManagementClientContext) { + this.client = client; + } + + /** + * Lists the HDInsight clusters hosts + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param [options] The optional parameters + * @returns Promise + */ + listHosts(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param callback The callback + */ + listHosts(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param options The optional parameters + * @param callback The callback + */ + listHosts(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listHosts(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + listHostsOperationSpec, + callback) as Promise; + } + + /** + * Restarts the specified HDInsight cluster hosts. + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param hosts The list of hosts to restart + * @param [options] The optional parameters + * @returns Promise + */ + restartHosts(resourceGroupName: string, clusterName: string, hosts: string[], options?: msRest.RequestOptionsBase): Promise { + return this.beginRestartHosts(resourceGroupName,clusterName,hosts,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Restarts the specified HDInsight cluster hosts. + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param hosts The list of hosts to restart + * @param [options] The optional parameters + * @returns Promise + */ + beginRestartHosts(resourceGroupName: string, clusterName: string, hosts: string[], options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + hosts, + options + }, + beginRestartHostsOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listHostsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostInfo" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRestartHostsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "hosts", + mapper: { + required: true, + serializedName: "hosts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/identity/ci.yml b/sdk/identity/ci.yml index 1e3abdd76f13..ab55e6741e46 100644 --- a/sdk/identity/ci.yml +++ b/sdk/identity/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/identity/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: identity - Artifacts: - - name: azure-identity - safeName: azureidentity +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: identity + Artifacts: + - name: azure-identity + safeName: azureidentity diff --git a/sdk/identity/identity/CHANGELOG.md b/sdk/identity/identity/CHANGELOG.md index 59f4f8d28c35..362567f0e59f 100644 --- a/sdk/identity/identity/CHANGELOG.md +++ b/sdk/identity/identity/CHANGELOG.md @@ -1,10 +1,12 @@ # Release History -## 1.1.0-preview.4 (Unreleased) - +## 1.1.0-preview.4 (2020-06-09) +- Switch to using CredentialUnavailable to differentiate from expected and unexpected errors during DefaultAzureCredential startup. [PR #8172](https://github.com/Azure/azure-sdk-for-js/pull/8127) +- Make all developer credentials public as well as the list used by DefaultAzureCredential [PR #9274](https://github.com/Azure/azure-sdk-for-js/pull/9274) ## 1.1.0-preview.3 (2020-05-05) -- Add ability to read AZURE_AUTHORITY_HOST from environment ([PR #8226](https://github.com/Azure/azure-sdk-for-js/pull/8226) [PR #8343](https://github.com/Azure/azure-sdk-for-js/pull/8343)) + +- Add ability to read AZURE_AUTHORITY_HOST from environment ([PR #8226](https://github.com/Azure/azure-sdk-for-js/pull/8226) [PR #8343](https://github.com/Azure/azure-sdk-for-js/pull/8343)) - Update to OpenTelemetry 0.6 ([PR #7998](https://github.com/Azure/azure-sdk-for-js/pull/7998)) - Set expires_on at a higher precedence for IMDS ([PR #8591](https://github.com/Azure/azure-sdk-for-js/pull/8591)) @@ -50,7 +52,7 @@ ## 1.0.0-preview.4 (2019-10-07) -- Introduced the [`AuthorizationCodeCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/authorizationcodecredential.html) for performing the [authorization code flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) with AAD ([PR #5356](https://github.com/Azure/azure-sdk-for-js/pull/5356)) +- Introduced the `AuthorizationCodeCredential` for performing the [authorization code flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) with AAD ([PR #5356](https://github.com/Azure/azure-sdk-for-js/pull/5356)) - Fixed an issue preventing the `ManagedIdentityCredential` from working inside of Azure Function Apps ([PR #5144](https://github.com/Azure/azure-sdk-for-js/pull/5144)) - Added tracing to `IdentityClient` and credential implementations ([PR #5283](https://github.com/Azure/azure-sdk-for-js/pull/5283)) - Improved the exception message for `AggregateAuthenticationError` so that errors thrown from `DefaultAzureCredential` are now more actionable ([PR #5409](https://github.com/Azure/azure-sdk-for-js/pull/5409)) @@ -63,22 +65,22 @@ ## 1.0.0-preview.2 (2019-08-05) - Introduced the following credential types: - - [`DeviceCodeCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/devicecodecredential.html) - - [`InteractiveBrowserCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/interactivebrowsercredential.html) - - [`UsernamePasswordCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/usernamepasswordcredential.html) + - `DeviceCodeCredential`. + - `InteractiveBrowserCredential`. + - `UsernamePasswordCredential`. - This library can now be used in the browser! The following credential types supported in browser builds: - - `ClientSecretCredential` - - `UsernamePasswordCredential` - - `InteractiveBrowserCredential` + - `ClientSecretCredential`. + - `UsernamePasswordCredential`. + - `InteractiveBrowserCredential`. ## 1.0.0-preview.1 (2019-06-27) -For release notes and more information please visit https://aka.ms/azure-sdk-preview1-js +For release notes and more information please visit https://aka.ms/azsdk/releases/july2019preview - Introduced the following credential types: - - [`DefaultAzureCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/defaultazurecredential.html) - - [`EnvironmentCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/environmentcredential.html) - - [`ManagedIdentityCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/managedidentitycredential.html) - - [`ClientSecretCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/clientsecretcredential.html) - - [`ClientCertificateCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/clientcertificatecredential.html) - - [`ChainedTokenCredential`](https://azure.github.io/azure-sdk-for-js/identity/classes/chainedtokencredential.html) + - `DefaultAzureCredential`. + - `EnvironmentCredential`. + - `ManagedIdentityCredential`. + - `ClientSecretCredential`. + - `ClientCertificateCredential`. + - `ChainedTokenCredential`. diff --git a/sdk/identity/identity/README.md b/sdk/identity/identity/README.md index 4051af5961f0..918f723612fd 100644 --- a/sdk/identity/identity/README.md +++ b/sdk/identity/identity/README.md @@ -54,14 +54,14 @@ Authenticating as a managed identity requires no configuration, but does require `DefaultAzureCredential` and `EnvironmentCredential` are configured for service principal authentication with these environment variables: -| variable name | value | -| ------------------------------- | ------------------------------------------------------------------------------------- | -| `AZURE_CLIENT_ID` | service principal's app id | -| `AZURE_TENANT_ID` | id of the principal's Azure Active Directory tenant | -| `AZURE_CLIENT_SECRET` | one of the service principal's client secrets (implies `ClientSecretCredential`) | +| variable name | value | +| ------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `AZURE_CLIENT_ID` | service principal's app id | +| `AZURE_TENANT_ID` | id of the principal's Azure Active Directory tenant | +| `AZURE_CLIENT_SECRET` | one of the service principal's client secrets (implies `ClientSecretCredential`) | | `AZURE_CLIENT_CERTIFICATE_PATH` | path to a PEM-encoded certificate file including private key (implies `ClientCertificateCredential`) | -| `AZURE_USERNAME` | the username of a user in the tenant (implies `UsernamePasswordCredential`) | -| `AZURE_PASSWORD` | the password of the user specified in `AZURE_USERNAME` | +| `AZURE_USERNAME` | the username of a user in the tenant (implies `UsernamePasswordCredential`) | +| `AZURE_PASSWORD` | the password of the user specified in `AZURE_USERNAME` | ## Examples @@ -149,5 +149,4 @@ If you'd like to contribute to this library, please read the [contributing guide [8]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-identity/1.0.0/classes/interactivebrowsercredential.html [9]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-identity/1.0.0/classes/usernamepasswordcredential.html - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fidentity%2Fidentity%2FREADME.png) diff --git a/sdk/identity/identity/karma.conf.js b/sdk/identity/identity/karma.conf.js index 46d7dc6b9de8..bf1cc558c99d 100644 --- a/sdk/identity/identity/karma.conf.js +++ b/sdk/identity/identity/karma.conf.js @@ -1,10 +1,6 @@ // https://github.com/karma-runner/karma-chrome-launcher process.env.CHROME_BIN = require("puppeteer").executablePath(); require("dotenv").config({ path: "../.env" }); -const { - isPlaybackMode, - isSoftRecordMode -} = require("@azure/test-utils-recorder"); module.exports = function(config) { config.set({ @@ -36,9 +32,7 @@ module.exports = function(config) { "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", "test-browser/index.js", { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } - ].concat( - isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : [] - ), + ], // list of files / patterns to exclude exclude: [], @@ -118,10 +112,6 @@ module.exports = function(config) { browserNoActivityTimeout: 600000, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 3, - browserConsoleLogOptions: { - // IMPORTANT: COMMENT the following line if you want to print debug logs in your browsers in record mode!! - terminal: process.env.TEST_MODE !== "record" - }, client: { mocha: { diff --git a/sdk/identity/identity/package.json b/sdk/identity/identity/package.json index 48747146a2cb..2889ac126ae4 100644 --- a/sdk/identity/identity/package.json +++ b/sdk/identity/identity/package.json @@ -81,32 +81,31 @@ "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", "events": "^3.0.0", - "jws": "^3.2.2", + "jws": "^4.0.0", "keytar": "^5.4.0", "msal": "^1.0.2", "qs": "^6.7.0", - "tslib": "^1.10.0", - "uuid": "^3.3.2" + "tslib": "^2.0.0", + "uuid": "^8.1.0" }, "devDependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/test-utils-recorder": "^1.0.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": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/express": "^4.16.0", - "@types/jws": "^3.2.0", + "@types/jws": "^3.2.2", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@types/qs": "^6.5.3", - "@types/uuid": "^3.4.3", + "@types/uuid": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "eslint": "^6.1.0", "express": "^4.16.3", "inherits": "^2.0.3", @@ -122,13 +121,13 @@ "mocha-junit-reporter": "^1.18.0", "open": "^7.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/identity/identity/review/identity.api.md b/sdk/identity/identity/review/identity.api.md index c5cac0d691ec..e6f9d6cfa2c4 100644 --- a/sdk/identity/identity/review/identity.api.md +++ b/sdk/identity/identity/review/identity.api.md @@ -13,7 +13,7 @@ export { AccessToken } // @public export class AggregateAuthenticationError extends Error { - constructor(errors: any[]); + constructor(errors: any[], errMsg?: string); errors: any[]; } @@ -37,6 +37,13 @@ export class AuthorizationCodeCredential implements TokenCredential { getToken(scopes: string | string[], options?: GetTokenOptions): Promise; } +// @public +export class AzureCliCredential implements TokenCredential { + constructor(); + protected getAzureCliAccessToken(resource: string): Promise; + getToken(scopes: string | string[], options?: GetTokenOptions): Promise; +} + // @public export type BrowserLoginStyle = "redirect" | "popup"; @@ -44,7 +51,8 @@ export type BrowserLoginStyle = "redirect" | "popup"; export class ChainedTokenCredential implements TokenCredential { constructor(...sources: TokenCredential[]); getToken(scopes: string | string[], options?: GetTokenOptions): Promise; - } + protected UnavailableMessage: string; +} // @public export class ClientCertificateCredential implements TokenCredential { @@ -58,9 +66,14 @@ export class ClientSecretCredential implements TokenCredential { getToken(scopes: string | string[], options?: GetTokenOptions): Promise; } +// @public +export class CredentialUnavailable extends Error { +} + // @public export class DefaultAzureCredential extends ChainedTokenCredential { constructor(tokenCredentialOptions?: TokenCredentialOptions); + static credentials(tokenCredentialOptions?: TokenCredentialOptions): TokenCredential[]; } // @public @@ -150,6 +163,12 @@ export class UsernamePasswordCredential implements TokenCredential { getToken(scopes: string | string[], options?: GetTokenOptions): Promise; } +// @public +export class VSCodeCredential implements TokenCredential { + constructor(options?: TokenCredentialOptions); + getToken(scopes: string | string[], options?: GetTokenOptions): Promise; + } + // (No @packageDocumentation comment for this package) diff --git a/sdk/identity/identity/src/client/errors.ts b/sdk/identity/identity/src/client/errors.ts index 33342a70e364..32c6b6b96db9 100644 --- a/sdk/identity/identity/src/client/errors.ts +++ b/sdk/identity/identity/src/client/errors.ts @@ -63,6 +63,13 @@ function isErrorResponse(errorResponse: any): errorResponse is OAuthErrorRespons ); } +/** + * This signifies that the credential that was tried in a chained credential + * was not available to be used as the credential. Rather than treating this as + * an error that should halt the chain, it's caught and the chain continues + */ +export class CredentialUnavailable extends Error {} + /** * The Error.name value of an AuthenticationError */ @@ -119,11 +126,7 @@ export class AuthenticationError extends Error { } super( - `An error was returned while authenticating to Azure Active Directory (status code ${statusCode}).\n\nMore details:\n\n${JSON.stringify( - errorResponse, - null, - " " - )}` + `${errorResponse.error}(status code ${statusCode}).\nMore details:\n${errorResponse.errorDescription}` ); this.statusCode = statusCode; this.errorResponse = errorResponse; @@ -149,10 +152,11 @@ export class AggregateAuthenticationError extends Error { */ public errors: any[]; - constructor(errors: any[]) { - super( - `Authentication failed to complete due to the following errors:\n\n${errors.join("\n\n")}` - ); + constructor(errors: any[], errMsg?: string) { + let errorDetail = + errors + .join("\n"); + super(`${errMsg}\n\n${errorDetail}`); this.errors = errors; // Ensure that this type reports the correct name diff --git a/sdk/identity/identity/src/credentials/azureCliCredential.ts b/sdk/identity/identity/src/credentials/azureCliCredential.ts index 8779e334675b..fcae40d73663 100644 --- a/sdk/identity/identity/src/credentials/azureCliCredential.ts +++ b/sdk/identity/identity/src/credentials/azureCliCredential.ts @@ -3,7 +3,7 @@ import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; import { createSpan } from "../util/tracing"; -import { AuthenticationErrorName } from "../client/errors"; +import { AuthenticationErrorName, CredentialUnavailable } from "../client/errors"; import { CanonicalCode } from "@opentelemetry/api"; import { logger } from "../util/logging"; @@ -86,15 +86,15 @@ export class AzureCliCredential implements TokenCredential { obj.stderr.match("az:(.*)not found") || obj.stderr.startsWith("'az' is not recognized"); if (isNotInstallError) { - throw new Error( + throw new CredentialUnavailable( "Azure CLI could not be found. Please visit https://aka.ms/azure-cli for installation instructions and then, once installed, authenticate to your Azure account using 'az login'." ); } else if (isLoginError) { - throw new Error( + throw new CredentialUnavailable( "Please run 'az login' from a command prompt to authenticate before using this credential." ); } - throw new Error(obj.stderr); + throw new CredentialUnavailable(obj.stderr); } else { responseData = obj.stdout; const response: { accessToken: string; expiresOn: string } = JSON.parse(responseData); diff --git a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts index bb7964b2aab1..a9e17bc0b365 100644 --- a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts +++ b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { AccessToken, TokenCredential, GetTokenOptions } from "@azure/core-http"; -import { AggregateAuthenticationError } from "../client/errors"; +import { AggregateAuthenticationError, CredentialUnavailable } from "../client/errors"; import { createSpan } from "../util/tracing"; import { CanonicalCode } from "@opentelemetry/api"; @@ -11,6 +11,11 @@ import { CanonicalCode } from "@opentelemetry/api"; * until one of the getToken methods returns an access token. */ export class ChainedTokenCredential implements TokenCredential { + /** + * The message to use when the chained token fails to get a token + */ + protected UnavailableMessage = + "ChainedTokenCredential failed to retrieve a token from the included credentials"; private _sources: TokenCredential[] = []; /** @@ -52,7 +57,11 @@ export class ChainedTokenCredential implements TokenCredential { try { token = await this._sources[i].getToken(scopes, newOptions); } catch (err) { - errors.push(err); + if (err instanceof CredentialUnavailable) { + errors.push(err); + } else { + throw err; + } } } diff --git a/sdk/identity/identity/src/credentials/clientCertificateCredential.ts b/sdk/identity/identity/src/credentials/clientCertificateCredential.ts index ad472ce4932b..584050d2dbb7 100644 --- a/sdk/identity/identity/src/credentials/clientCertificateCredential.ts +++ b/sdk/identity/identity/src/credentials/clientCertificateCredential.ts @@ -3,7 +3,7 @@ import qs from "qs"; import jws from "jws"; -import uuid from "uuid"; +import { v4 as uuidV4 } from "uuid"; import { readFileSync } from "fs"; import { createHash } from "crypto"; import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; @@ -94,7 +94,7 @@ export class ClientCertificateCredential implements TokenCredential { options ); try { - const tokenId = uuid.v4(); + const tokenId = uuidV4(); const audienceUrl = `${this.identityClient.authorityHost}/${this.tenantId}/oauth2/v2.0/token`; const header: jws.Header = { typ: "JWT", diff --git a/sdk/identity/identity/src/credentials/defaultAzureCredential.ts b/sdk/identity/identity/src/credentials/defaultAzureCredential.ts index 1e9842c21429..a363ebe27970 100644 --- a/sdk/identity/identity/src/credentials/defaultAzureCredential.ts +++ b/sdk/identity/identity/src/credentials/defaultAzureCredential.ts @@ -7,6 +7,7 @@ import { EnvironmentCredential } from "./environmentCredential"; import { ManagedIdentityCredential } from "./managedIdentityCredential"; import { AzureCliCredential } from "./azureCliCredential"; import { VSCodeCredential } from "./vscodeCredential"; +import { TokenCredential } from "@azure/core-http"; /** * Provides a default {@link ChainedTokenCredential} configuration for @@ -21,22 +22,35 @@ import { VSCodeCredential } from "./vscodeCredential"; */ export class DefaultAzureCredential extends ChainedTokenCredential { /** - * Creates an instance of the DefaultAzureCredential class. + * Returns the list of credentials DefaultAzureCredential will use to authenticate. * * @param options Options for configuring the client which makes the authentication request. */ - constructor(tokenCredentialOptions?: TokenCredentialOptions) { + static credentials(tokenCredentialOptions?: TokenCredentialOptions): TokenCredential[] { let credentials = []; credentials.push(new EnvironmentCredential(tokenCredentialOptions)); credentials.push(new ManagedIdentityCredential(tokenCredentialOptions)); if (process.env.AZURE_CLIENT_ID) { - credentials.push(new ManagedIdentityCredential(process.env.AZURE_CLIENT_ID, tokenCredentialOptions)); + credentials.push( + new ManagedIdentityCredential(process.env.AZURE_CLIENT_ID, tokenCredentialOptions) + ); } credentials.push(new AzureCliCredential()); credentials.push(new VSCodeCredential(tokenCredentialOptions)); + return credentials; + } + /** + * Creates an instance of the DefaultAzureCredential class. + * + * @param options Options for configuring the client which makes the authentication request. + */ + constructor(tokenCredentialOptions?: TokenCredentialOptions) { + let credentials = DefaultAzureCredential.credentials(tokenCredentialOptions); super( ...credentials ); + this.UnavailableMessage = + "DefaultAzureCredential failed to retrieve a token from the included credentials"; } } diff --git a/sdk/identity/identity/src/credentials/environmentCredential.ts b/sdk/identity/identity/src/credentials/environmentCredential.ts index 3e541b059b53..0caa76b7e0fa 100644 --- a/sdk/identity/identity/src/credentials/environmentCredential.ts +++ b/sdk/identity/identity/src/credentials/environmentCredential.ts @@ -5,7 +5,7 @@ import { AccessToken, TokenCredential, GetTokenOptions } from "@azure/core-http" import { TokenCredentialOptions } from "../client/identityClient"; import { ClientSecretCredential } from "./clientSecretCredential"; import { createSpan } from "../util/tracing"; -import { AuthenticationError, AuthenticationErrorName } from "../client/errors"; +import { AuthenticationError, AuthenticationErrorName, CredentialUnavailable } from "../client/errors"; import { CanonicalCode } from "@opentelemetry/api"; import { logger } from "../util/logging"; import { ClientCertificateCredential } from "./clientCertificateCredential"; @@ -125,7 +125,13 @@ export class EnvironmentCredential implements TokenCredential { code, message: err.message }); - throw err; + throw new AuthenticationError(400, { + error: "EnvironmentCredential authentication failed.", + error_description: err.message + .toString() + .split("More details:") + .join("") + }); } finally { span.end(); } @@ -135,14 +141,6 @@ export class EnvironmentCredential implements TokenCredential { // the user knows the credential was not configured appropriately span.setStatus({ code: CanonicalCode.UNAUTHENTICATED }); span.end(); - throw new AuthenticationError(400, { - error: "missing_environment_variables", - error_description: `EnvironmentCredential cannot return a token because one or more of the following environment variables is missing: - -${this._environmentVarsMissing.join("\n")} - -To authenticate with a service principal AZURE_TENANT_ID, AZURE_CLIENT_ID, and either AZURE_CLIENT_SECRET or AZURE_CLIENT_CERTIFICATE_PATH must be set. To authenticate with a user account AZURE_TENANT_ID, AZURE_USERNAME, and AZURE_PASSWORD must be set. -` - }); + throw new CredentialUnavailable("EnvironmentCredential is unavailable. Environment variables are not fully configured."); } } diff --git a/sdk/identity/identity/src/credentials/managedIdentityCredential.ts b/sdk/identity/identity/src/credentials/managedIdentityCredential.ts index c451d8ed9d0f..4858e32b5ba8 100644 --- a/sdk/identity/identity/src/credentials/managedIdentityCredential.ts +++ b/sdk/identity/identity/src/credentials/managedIdentityCredential.ts @@ -11,7 +11,7 @@ import { } from "@azure/core-http"; import { IdentityClient, TokenCredentialOptions } from "../client/identityClient"; import { createSpan } from "../util/tracing"; -import { AuthenticationErrorName } from "../client/errors"; +import { AuthenticationErrorName, AuthenticationError, CredentialUnavailable } from "../client/errors"; import { CanonicalCode } from "@opentelemetry/api"; import { logger } from "../util/logging"; @@ -70,7 +70,7 @@ export class ManagedIdentityCredential implements TokenCredential { let scope = ""; if (Array.isArray(scopes)) { if (scopes.length !== 1) { - throw "To convert to a resource string the specified array must be exactly length 1"; + throw new Error("To convert to a resource string the specified array must be exactly length 1"); } scope = scopes[0]; @@ -334,16 +334,27 @@ export class ManagedIdentityCredential implements TokenCredential { // endpoints are available. In this case, don't try them in future // requests. this.isEndpointUnavailable = result === null; + } else { + throw new CredentialUnavailable("The managed identity endpoint is not currently available"); } - return result; } catch (err) { span.setStatus({ code: CanonicalCode.UNKNOWN, message: err.message }); - throw err; + + if (err.code == "ENETUNREACH") { + throw new CredentialUnavailable("ManagedIdentityCredential is unavailable. No managed identity endpoint found."); + } + throw new AuthenticationError(400, { + error: "ManagedIdentityCredential authentication failed.", + error_description: err.message + }); } finally { + if (this.isEndpointUnavailable) { + throw new CredentialUnavailable("ManagedIdentityCredential is unavailable. No managed identity endpoint found."); + } span.end(); } } diff --git a/sdk/identity/identity/src/credentials/vscodeCredential.ts b/sdk/identity/identity/src/credentials/vscodeCredential.ts index 7bbe152aa12a..7459b56d444d 100644 --- a/sdk/identity/identity/src/credentials/vscodeCredential.ts +++ b/sdk/identity/identity/src/credentials/vscodeCredential.ts @@ -6,6 +6,7 @@ import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; import { TokenCredentialOptions, IdentityClient } from '../client/identityClient'; import * as keytar from 'keytar'; +import { CredentialUnavailable } from "../client/errors"; const CommonTenantId = 'common'; const AzureAccountClientId = 'aebc6443-996d-45c2-90f0-388ff96faa56'; // VSC: 'aebc6443-996d-45c2-90f0-388ff96faa56' @@ -19,12 +20,25 @@ const VSCodeUserName = 'VS Code Azure'; export class VSCodeCredential implements TokenCredential { private identityClient: IdentityClient; + /** + * Creates an instance of VSCodeCredential to use for automatically authenicating via VSCode. + * + * @param options Options for configuring the client which makes the authentication request. + */ constructor( options?: TokenCredentialOptions ) { this.identityClient = new IdentityClient(options); } + /** + * Returns the token found by searching VSCode's authentication cache or + * returns null if no token could be found. + * + * @param scopes The list of scopes for which the token will have access. + * @param options The options used to configure any requests this + * `TokenCredential` implementation might make. + */ public async getToken( scopes: string | string[], options?: GetTokenOptions @@ -53,10 +67,10 @@ export class VSCodeCredential implements TokenCredential { if (tokenResponse) { return tokenResponse.accessToken; } else { - return null; + throw new CredentialUnavailable("Could not retrieve the token associated with VSCode. Have you connected using the 'Azure Account' extension recently?"); } } else { - return null; + throw new CredentialUnavailable("Could not retrieve the token associated with VSCode. Did you connect using the 'Azure Account' extension?"); } } } diff --git a/sdk/identity/identity/src/index.ts b/sdk/identity/identity/src/index.ts index 3fc475762706..c3634dc86a61 100644 --- a/sdk/identity/identity/src/index.ts +++ b/sdk/identity/identity/src/index.ts @@ -10,6 +10,9 @@ export { EnvironmentCredential } from "./credentials/environmentCredential"; export { ClientSecretCredential } from "./credentials/clientSecretCredential"; export { ClientCertificateCredential } from "./credentials/clientCertificateCredential"; export { InteractiveBrowserCredential } from "./credentials/interactiveBrowserCredential"; +export { VSCodeCredential } from "./credentials/vscodeCredential"; +export { AzureCliCredential } from "./credentials/azureCliCredential"; + export { InteractiveBrowserCredentialOptions, BrowserLoginStyle @@ -29,7 +32,8 @@ export { ErrorResponse, AggregateAuthenticationError, AuthenticationErrorName, - AggregateAuthenticationErrorName + AggregateAuthenticationErrorName, + CredentialUnavailable } from "./client/errors"; export { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; diff --git a/sdk/identity/identity/test/chainedTokenCredential.spec.ts b/sdk/identity/identity/test/chainedTokenCredential.spec.ts index 49ea065779f3..fdec1397b822 100644 --- a/sdk/identity/identity/test/chainedTokenCredential.spec.ts +++ b/sdk/identity/identity/test/chainedTokenCredential.spec.ts @@ -7,7 +7,8 @@ import { ChainedTokenCredential, TokenCredential, AccessToken, - AggregateAuthenticationError + AggregateAuthenticationError, + CredentialUnavailable } from "../src"; function mockCredential(returnPromise: Promise): TokenCredential { @@ -19,7 +20,7 @@ function mockCredential(returnPromise: Promise): TokenCreden describe("ChainedTokenCredential", function() { it("returns the first token received from a credential", async () => { const chainedTokenCredential = new ChainedTokenCredential( - mockCredential(Promise.resolve(null)), + mockCredential(Promise.reject(new CredentialUnavailable("unavailable."))), mockCredential(Promise.resolve({ token: "firstToken", expiresOnTimestamp: 0 })), mockCredential(Promise.resolve({ token: "secondToken", expiresOnTimestamp: 0 })) ); @@ -30,9 +31,8 @@ describe("ChainedTokenCredential", function() { it("returns an AggregateAuthenticationError when no token is returned and one credential returned an error", async () => { const chainedTokenCredential = new ChainedTokenCredential( - mockCredential(Promise.reject(new Error("Boom."))), - mockCredential(Promise.resolve(null)), - mockCredential(Promise.reject(new Error("Boom."))) + mockCredential(Promise.reject(new CredentialUnavailable("unavailable."))), + mockCredential(Promise.reject(new CredentialUnavailable("unavailable."))) ); await assertRejects( diff --git a/sdk/identity/identity/test/errors.spec.ts b/sdk/identity/identity/test/errors.spec.ts index ac87ddd830e3..403fe1c5c7ff 100644 --- a/sdk/identity/identity/test/errors.spec.ts +++ b/sdk/identity/identity/test/errors.spec.ts @@ -11,9 +11,6 @@ describe("AggregateAuthenticationError", function() { new Error("Boom again.") ]); - assert.strictEqual( - aggregateError.message, - "Authentication failed to complete due to the following errors:\n\nError: Boom.\n\nError: Boom again." - ); + assert(aggregateError.message.includes("Error: Boom.\nError: Boom again.")); }); }); diff --git a/sdk/identity/identity/test/node/environmentCredential.spec.ts b/sdk/identity/identity/test/node/environmentCredential.spec.ts index fdb121be90b3..0629239d950a 100644 --- a/sdk/identity/identity/test/node/environmentCredential.spec.ts +++ b/sdk/identity/identity/test/node/environmentCredential.spec.ts @@ -3,7 +3,7 @@ import assert from "assert"; import path from "path"; -import { EnvironmentCredential, AuthenticationError } from "../../src"; +import { EnvironmentCredential, AuthenticationError, CredentialUnavailable } from "../../src"; import { MockAuthHttpClient, assertClientCredentials, @@ -11,7 +11,7 @@ import { assertRejects } from "../authTestUtils"; import { TestTracer, setTracer, SpanGraph } from "@azure/core-tracing"; -import { AllSupportedEnvironmentVariables } from "../../src/credentials/environmentCredential"; +import { OAuthErrorResponse } from "../../src/client/errors"; describe("EnvironmentCredential", function() { it("finds and uses client credential environment variables", async () => { @@ -136,15 +136,16 @@ describe("EnvironmentCredential", function() { assert.strictEqual(tracer.getActiveSpans().length, 0, "All spans should have had end called"); }); - it("throws an AuthenticationError when getToken is called and no credential was configured", async () => { + it("throws an CredentialUnavailable when getToken is called and no credential was configured", async () => { const mockHttpClient = new MockAuthHttpClient(); const credential = new EnvironmentCredential(mockHttpClient.tokenCredentialOptions); await assertRejects( credential.getToken("scope"), - (error: AuthenticationError) => - error.errorResponse.errorDescription.indexOf(AllSupportedEnvironmentVariables.join("\n")) > - -1 + (error: CredentialUnavailable) => + error.message.indexOf( + "EnvironmentCredential is unavailable. Environment variables are not fully configured." + ) > -1 ); process.env.AZURE_TENANT_ID = "It me"; @@ -152,10 +153,34 @@ describe("EnvironmentCredential", function() { const credentialDeux = new EnvironmentCredential(mockHttpClient.tokenCredentialOptions); await assertRejects( credentialDeux.getToken("scope"), - (error: AuthenticationError) => - error.errorResponse.errorDescription.match(/^AZURE_TENANT_ID/gm) === null + (error: CredentialUnavailable) => + error.message.indexOf( + "EnvironmentCredential is unavailable. Environment variables are not fully configured." + ) > -1 ); delete process.env.AZURE_TENANT_ID; }); + + it("throws an AuthenticationError when getToken is called and EnvironmentCredential authentication failed", async () => { + process.env.AZURE_TENANT_ID = "tenant"; + process.env.AZURE_CLIENT_ID = "errclient"; + process.env.AZURE_CLIENT_SECRET = "secret"; + + const errResponse: OAuthErrorResponse = { + error: "EnvironmentCredential authentication failed.", + error_description: "" + }; + + const mockHttpClient = new MockAuthHttpClient({ + authResponse: [{ status: 400, parsedBody: errResponse }] + }); + + const credential = new EnvironmentCredential(mockHttpClient.tokenCredentialOptions); + await assertRejects( + credential.getToken("scope"), + (error: AuthenticationError) => + error.errorResponse.error.indexOf("EnvironmentCredential authentication failed.") > -1 + ); + }); }); diff --git a/sdk/identity/identity/test/node/managedIdentityCredential.spec.ts b/sdk/identity/identity/test/node/managedIdentityCredential.spec.ts index b98a0e3e1682..8cdc68967da7 100644 --- a/sdk/identity/identity/test/node/managedIdentityCredential.spec.ts +++ b/sdk/identity/identity/test/node/managedIdentityCredential.spec.ts @@ -3,14 +3,15 @@ import qs from "qs"; import assert from "assert"; -import { ManagedIdentityCredential } from "../../src"; +import { ManagedIdentityCredential, AuthenticationError, CredentialUnavailable } from "../../src"; import { ImdsEndpoint, ImdsApiVersion, AppServiceMsiApiVersion } from "../../src/credentials/managedIdentityCredential"; -import { MockAuthHttpClient, MockAuthHttpClientOptions } from "../authTestUtils"; +import { MockAuthHttpClient, MockAuthHttpClientOptions, assertRejects } from "../authTestUtils"; import { WebResource, AccessToken } from "@azure/core-http"; +import { OAuthErrorResponse } from "../../src/client/errors"; interface AuthRequestDetails { requests: WebResource[]; @@ -76,46 +77,61 @@ describe("ManagedIdentityCredential", function() { } }); - it("returns null when IMDS endpoint can't be detected", async function() { - // Mock a timeout so that the endpoint ping fails - const authDetails = await getMsiTokenAuthRequest(["https://service/.default"], "client", { - mockTimeout: true - }); + it("returns error when ManagedIdentityCredential authentication failed", async function() { + process.env.AZURE_CLIENT_ID = "errclient"; - assert.strictEqual(authDetails.requests[0].timeout, 500); - assert.strictEqual(authDetails.token, null); - }); + const errResponse: OAuthErrorResponse = { + error: "ManagedIdentityCredential authentication failed.", + error_description: "" + }; - it("can extend timeout for IMDS endpoint", async function() { - // Mock a timeout so that the endpoint ping fails - const authDetails = await getMsiTokenAuthRequest( - ["https://service/.default"], - "client", - { mockTimeout: true }, - 5000 - ); // Set the timeout higher - - assert.strictEqual(authDetails.requests[0].timeout, 5000); - assert.strictEqual(authDetails.token, null); - }); + const mockHttpClient = new MockAuthHttpClient({ + authResponse: [{ status: 400, parsedBody: errResponse }] + }); - it("doesn't try IMDS endpoint again once it can't be detected", async function() { - const mockHttpClient = new MockAuthHttpClient({ mockTimeout: true }); - const credential = new ManagedIdentityCredential("client", { + const credential = new ManagedIdentityCredential(process.env.AZURE_CLIENT_ID, { ...mockHttpClient.tokenCredentialOptions }); - - // Run getToken twice and verify that an auth request is only - // attempted the first time. It should be skipped the second - // time after no IMDS endpoint was found. - const firstGetToken = await credential.getToken("scopes"); - const secondGetToken = await credential.getToken("scopes"); - - assert.strictEqual(firstGetToken, null); - assert.strictEqual(secondGetToken, null); - assert.strictEqual(mockHttpClient.requests.length, 1); + await assertRejects( + credential.getToken("scopes"), + (error: AuthenticationError) => + error.errorResponse.error.indexOf("ManagedIdentityCredential authentication failed.") > -1 + ); }); + // Unavailable exception throws while IMDS endpoint is unavailable. This test not valid. + // it("can extend timeout for IMDS endpoint", async function() { + // // Mock a timeout so that the endpoint ping fails + // const authDetails = await getMsiTokenAuthRequest( + // ["https://service/.default"], + // "client", + // { mockTimeout: true }, + // 5000 + // ); // Set the timeout higher + + // assert.strictEqual(authDetails.requests[0].timeout, 5000); + // assert.strictEqual(authDetails.token, null); + // }); + + // unavailable exception throws while IMDS endpoint is unavailable. This test not valid. + // it("doesn't try IMDS endpoint again once it can't be detected", async function() { + // const mockHttpClient = new MockAuthHttpClient({ mockTimeout: true }); + // const credential = new ManagedIdentityCredential("client", { + // ...mockHttpClient.tokenCredentialOptions + // }); + + // // Run getToken twice and verify that an auth request is only + // // attempted the first time. It should be skipped the second + // // time after no IMDS endpoint was found. + + // const firstGetToken = await credential.getToken("scopes"); + // const secondGetToken = await credential.getToken("scopes"); + + // assert.strictEqual(firstGetToken, null); + // assert.strictEqual(secondGetToken, null); + // assert.strictEqual(mockHttpClient.requests.length, 1); + // }); + it("sends an authorization request correctly in an App Service environment", async () => { // Trigger App Service behavior by setting environment variables process.env.MSI_ENDPOINT = "https://endpoint"; diff --git a/sdk/keyvault/ci.yml b/sdk/keyvault/ci.yml index 6340564d4d8d..6b2e8fbdd4e4 100644 --- a/sdk/keyvault/ci.yml +++ b/sdk/keyvault/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,14 +22,14 @@ pr: include: - sdk/keyvault/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: keyvault - Artifacts: - - name: azure-keyvault-certificates - safeName: azurekeyvaultcertificates - - name: azure-keyvault-keys - safeName: azurekeyvaultkeys - - name: azure-keyvault-secrets - safeName: azurekeyvaultsecrets +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: keyvault + Artifacts: + - name: azure-keyvault-certificates + safeName: azurekeyvaultcertificates + - name: azure-keyvault-keys + safeName: azurekeyvaultkeys + - name: azure-keyvault-secrets + safeName: azurekeyvaultsecrets diff --git a/sdk/keyvault/keyvault-certificates/.eslintignore b/sdk/keyvault/keyvault-certificates/.eslintignore new file mode 100644 index 000000000000..c92bb15b91ea --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/.eslintignore @@ -0,0 +1,2 @@ +# Ignoring the core files since they're auto-generated. Eventually, the auto-generated code will be on par with our current eslint rules, but in the mean time we should ignore them. +src/core diff --git a/sdk/keyvault/keyvault-certificates/.eslintrc.json b/sdk/keyvault/keyvault-certificates/.eslintrc.json index f733ef036321..4f409a486c3f 100644 --- a/sdk/keyvault/keyvault-certificates/.eslintrc.json +++ b/sdk/keyvault/keyvault-certificates/.eslintrc.json @@ -4,6 +4,8 @@ "ignorePatterns": ["src/core"], "rules": { "@typescript-eslint/no-this-alias": "off", - "no-invalid-this": "off" + "no-invalid-this": "off", + "@azure/azure-sdk/ts-package-json-module": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "warn" } } diff --git a/sdk/keyvault/keyvault-certificates/.prettierignore b/sdk/keyvault/keyvault-certificates/.prettierignore index d53119f04d7f..656f37824af2 100644 --- a/sdk/keyvault/keyvault-certificates/.prettierignore +++ b/sdk/keyvault/keyvault-certificates/.prettierignore @@ -1 +1,2 @@ -src/core \ No newline at end of file +/src/core/* +!/src/core/challengeBasedAuthenticationPolicy.ts \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/CHANGELOG.md b/sdk/keyvault/keyvault-certificates/CHANGELOG.md index 93b04a19c161..7c911ba13c4f 100644 --- a/sdk/keyvault/keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/keyvault-certificates/CHANGELOG.md @@ -6,6 +6,8 @@ - `KVPollerLike` is now an alias of `PollerLike`. - `KVPollerLike` is considered deprecated. Use `PollerLike`. - Fixed [bug 8378](https://github.com/Azure/azure-sdk-for-js/issues/8378), which caused the challenge based authentication to re-authenticate on every new request. +- Fixed [bug 9005](https://github.com/Azure/azure-sdk-for-js/issues/9005), which caused parallel requests to throw if one of them needed to authenticate. +- Fixed [bug 9020](https://github.com/Azure/azure-sdk-for-js/issues/9020), which caused updateCertificateProperties to not properly send the certificate attributes to the service. ## 4.0.1 (2020-05-13) diff --git a/sdk/keyvault/keyvault-certificates/api-extractor.json b/sdk/keyvault/keyvault-certificates/api-extractor.json index d7c1d0c15df7..259a8f39927a 100644 --- a/sdk/keyvault/keyvault-certificates/api-extractor.json +++ b/sdk/keyvault/keyvault-certificates/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "types/src/index.d.ts", + "mainEntryPointFilePath": "types/keyvault-certificates/src/index.d.ts", "docModel": { "enabled": false }, diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index dfe531256731..e9d7ef3fe693 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -20,15 +20,17 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "main": "./dist/index.js", - "module": "dist-esm/src/index.js", + "module": "dist-esm/keyvault-certificates/src/index.js", "types": "./types/keyvault-certificates.d.ts", "engines": { "node": ">=8.0.0" }, "files": [ - "types/keyvault-certificates.d.ts", + "types/", "dist/", - "dist-esm/src", + "dist-browser/", + "dist-esm/keyvault-certificates/src", + "dist-esm/keyvault-common/src", "README.md", "LICENSE" ], @@ -47,13 +49,13 @@ "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist-esm dist-test typings *.tgz *.log samples/typescript/dist", "execute:js-samples": "node ../../../common/scripts/run-samples.js samples/javascript/", - "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", + "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/keyvault-certificates/samples/typescript/src/", "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"samples/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.test.js", - "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/**/*.spec.js", + "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/**/*.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o keyvault-certificates-lintReport.html", @@ -90,7 +92,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -101,18 +103,19 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/fs-extra": "^8.0.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@types/query-string": "6.2.0", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -138,16 +141,17 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "query-string": "^5.0.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "source-map-support": "^0.5.9", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9", "url": "^0.11.0" } diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.json new file mode 100644 index 000000000000..9a23788c28c2 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.json @@ -0,0 +1,798 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:03 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "42f3af0a-e6cc-4762-8e95-2481a5789f36", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:02 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10620.11 - SCUS ProdSlices", + "x-ms-request-id": "107f6279-b061-4008-8b27-323dd1ae1400" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", + "status": 202, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:04 GMT", + "expires": "-1", + "location": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending?api-version=7.1-preview&request_id=e22e74332ca24528ba5a057284bf2013", + "pragma": "no-cache", + "retry-after": "10", + "status": "202", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bc1a0fa5-1f97-4390-bf1c-f86563c6571a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:04 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a4bd38df-b0d3-4640-a1b4-3c03032b1fee", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:04 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "448ab1c9-2a15-4b8b-87b3-b210519dbaa7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:06 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6dc160cb-8472-4ca3-9aa0-619a524ecc4e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "58f7428e-b60a-4048-879e-832e126c9650", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "329b5624-e851-4cd4-bfe7-cba4d68089b2", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1bf5000c-bd57-47b0-9253-4e4885a75b27", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:14 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d09bcaf0-2b80-46b4-a0c6-cd3decf4c731", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:16 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "afc7dc95-d265-4c67-bc31-d2adb979b2c1", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:18 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3ddf39b1-260c-4627-8ffc-4ff77a11450a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1340", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:20 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c54537e8-78a3-42b6-bcc4-5766cd671404", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAytMudPd4xKlECxl48T16fUsm0H1DGNrei3kUUGCARU7/JQR9s0uxQmhCc0BergwZYKCUgLCB7anIzvG52I5/Dz4HXoRGBru+BssXVvTQ+bkVdx3RhQKz9Hlw/k8fKAAYRx5L/TBcrijvYzBSfcfHpFF3j11dQvj9B95AZUtuanKYdfgoa/vvodakFfEcJL8MFTq4SwAyiaLyaLWc7acBINzw7uoHXn6xFewTf2LfDAxPagQmlFVw9Am4N1zcVXXOvUEdXsBvZOnqEcEsBcL4xXr8i1TcOiyzj3ankiUktsxlMkHAVn8aB0SK33zSBqfNocqbyFVSc6FnMPFJEGcqqQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAK5rrrzMx+prINd7YgoRGwhqk7KFja6MOgj8MKlFQJxrBJRYr4wcOwRHnNgm1kEKf21hSfdISJzShlboSR75RgTLTbbX2x+Nv3EX4vzOEvDw9qpDBihGDKQe3knL/9CFl2EhwJyW+C8GntSQTSVsOpKeDZuvv1narndQCdhAq2kKVXRCZ8WmGeMhXqWabdjaGG0kKIi2zfKEC6SUuSKarCBtidV2Tt3YIyOLrbqwOPI2wkL0xJu9645ZazOrPDGr5nlFVT6cMzpKK3fYdn91zUzCeoP4WzOSPLrjer5mDKWNjPu+N6osTdHAJm12WaNQcQE3r3yuQHVSz3HOu5lg4kk=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-\",\"request_id\":\"e22e74332ca24528ba5a057284bf2013\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1307", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "97e52ddf-666f-439f-8eac-74074affe3ee", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"x5t\":\"SAs2q2eqxu0yf3GLra66Q5R_BRg\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQK4lHJzObSK+6Y9IDPyoIwjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDIxWhcNMjEwNTI3MTMyMDIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK0y5093jEqUQLGXjxPXp9SybQfUMY2t6LeRRQYIBFTv8lBH2zS7FCaEJzQF6uDBlgoJSAsIHtqcjO8bnYjn8PPgdehEYGu74GyxdW9ND5uRV3HdGFArP0eXD+Tx8oABhHHkv9MFyuKO9jMFJ9x8ekUXePXV1C+P0H3kBlS25qcph1+Chr+++h1qQV8RwkvwwVOrhLADKJovJotZztpwEg3PDu6gdefrEV7BN/Yt8MDE9qBCaUVXD0Cbg3XNxVdc69QR1ewG9k6eoRwSwFwvjFevyLVNw6LLOPdqeSJSS2zGUyQcBWfxoHRIrffNIGp82hypvIVVJzoWcw8UkQZyqpAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQLvO5HKRafyQAfae1XheZF4SxsYzAdBgNVHQ4EFgQUC7zuRykWn8kAH2ntV4XmReEsbGMwDQYJKoZIhvcNAQELBQADggEBACV9CuJB+Q7IJusvg3lw0u/G7twTsZRnwaf2wUexRmAeoi6cHOY4yXIpJxzc3acRPypuJv4jfnLRf8No1N+EeOwYwxOOWDZGFiqq6EzRUSpMxeFfbmd9BbERS0Fn6h8LDfFpjHxs+2QlRGXledoE8tHw2GBr7aukTxzz3GcBrChAanMFc4ARb5CPtJvTemiHHcgMKFc2LClSA82zFN7mBViWqZrNj8n1sCEzohiygX02z2/zKAqIJRxcbI/9sPJt36LwYwpFX1knGB7NVYD4tBP1P3POGedHIbiBoH9pwtsUTvcTzJIhPkX3HlqI+xYaR8GQVk+yqZ3nlLmYvFG/Riw=\",\"attributes\":{\"enabled\":true,\"nbf\":1590585021,\"exp\":1622121621,\"created\":1590585621,\"updated\":1590585621,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585604,\"updated\":1590585604}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2590", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0aabbded-8325-4c33-b70a-156d8e8b24aa", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "PATCH", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"attributes\":{\"enabled\":false}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"x5t\":\"SAs2q2eqxu0yf3GLra66Q5R_BRg\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQK4lHJzObSK+6Y9IDPyoIwjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDIxWhcNMjEwNTI3MTMyMDIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK0y5093jEqUQLGXjxPXp9SybQfUMY2t6LeRRQYIBFTv8lBH2zS7FCaEJzQF6uDBlgoJSAsIHtqcjO8bnYjn8PPgdehEYGu74GyxdW9ND5uRV3HdGFArP0eXD+Tx8oABhHHkv9MFyuKO9jMFJ9x8ekUXePXV1C+P0H3kBlS25qcph1+Chr+++h1qQV8RwkvwwVOrhLADKJovJotZztpwEg3PDu6gdefrEV7BN/Yt8MDE9qBCaUVXD0Cbg3XNxVdc69QR1ewG9k6eoRwSwFwvjFevyLVNw6LLOPdqeSJSS2zGUyQcBWfxoHRIrffNIGp82hypvIVVJzoWcw8UkQZyqpAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQLvO5HKRafyQAfae1XheZF4SxsYzAdBgNVHQ4EFgQUC7zuRykWn8kAH2ntV4XmReEsbGMwDQYJKoZIhvcNAQELBQADggEBACV9CuJB+Q7IJusvg3lw0u/G7twTsZRnwaf2wUexRmAeoi6cHOY4yXIpJxzc3acRPypuJv4jfnLRf8No1N+EeOwYwxOOWDZGFiqq6EzRUSpMxeFfbmd9BbERS0Fn6h8LDfFpjHxs+2QlRGXledoE8tHw2GBr7aukTxzz3GcBrChAanMFc4ARb5CPtJvTemiHHcgMKFc2LClSA82zFN7mBViWqZrNj8n1sCEzohiygX02z2/zKAqIJRxcbI/9sPJt36LwYwpFX1knGB7NVYD4tBP1P3POGedHIbiBoH9pwtsUTvcTzJIhPkX3HlqI+xYaR8GQVk+yqZ3nlLmYvFG/Riw=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585021,\"exp\":1622121621,\"created\":1590585621,\"updated\":1590585623,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585604,\"updated\":1590585604}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2591", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "98b6a02a-d18e-4125-9edc-8d992cc88440", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"x5t\":\"SAs2q2eqxu0yf3GLra66Q5R_BRg\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQK4lHJzObSK+6Y9IDPyoIwjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDIxWhcNMjEwNTI3MTMyMDIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK0y5093jEqUQLGXjxPXp9SybQfUMY2t6LeRRQYIBFTv8lBH2zS7FCaEJzQF6uDBlgoJSAsIHtqcjO8bnYjn8PPgdehEYGu74GyxdW9ND5uRV3HdGFArP0eXD+Tx8oABhHHkv9MFyuKO9jMFJ9x8ekUXePXV1C+P0H3kBlS25qcph1+Chr+++h1qQV8RwkvwwVOrhLADKJovJotZztpwEg3PDu6gdefrEV7BN/Yt8MDE9qBCaUVXD0Cbg3XNxVdc69QR1ewG9k6eoRwSwFwvjFevyLVNw6LLOPdqeSJSS2zGUyQcBWfxoHRIrffNIGp82hypvIVVJzoWcw8UkQZyqpAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQLvO5HKRafyQAfae1XheZF4SxsYzAdBgNVHQ4EFgQUC7zuRykWn8kAH2ntV4XmReEsbGMwDQYJKoZIhvcNAQELBQADggEBACV9CuJB+Q7IJusvg3lw0u/G7twTsZRnwaf2wUexRmAeoi6cHOY4yXIpJxzc3acRPypuJv4jfnLRf8No1N+EeOwYwxOOWDZGFiqq6EzRUSpMxeFfbmd9BbERS0Fn6h8LDfFpjHxs+2QlRGXledoE8tHw2GBr7aukTxzz3GcBrChAanMFc4ARb5CPtJvTemiHHcgMKFc2LClSA82zFN7mBViWqZrNj8n1sCEzohiygX02z2/zKAqIJRxcbI/9sPJt36LwYwpFX1knGB7NVYD4tBP1P3POGedHIbiBoH9pwtsUTvcTzJIhPkX3HlqI+xYaR8GQVk+yqZ3nlLmYvFG/Riw=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585021,\"exp\":1622121621,\"created\":1590585621,\"updated\":1590585623,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585604,\"updated\":1590585604}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2591", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d6357de2-4661-471b-a07c-43514d80c93b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-\",\"deletedDate\":1590585623,\"scheduledPurgeDate\":1598361623,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"x5t\":\"SAs2q2eqxu0yf3GLra66Q5R_BRg\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQK4lHJzObSK+6Y9IDPyoIwjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDIxWhcNMjEwNTI3MTMyMDIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK0y5093jEqUQLGXjxPXp9SybQfUMY2t6LeRRQYIBFTv8lBH2zS7FCaEJzQF6uDBlgoJSAsIHtqcjO8bnYjn8PPgdehEYGu74GyxdW9ND5uRV3HdGFArP0eXD+Tx8oABhHHkv9MFyuKO9jMFJ9x8ekUXePXV1C+P0H3kBlS25qcph1+Chr+++h1qQV8RwkvwwVOrhLADKJovJotZztpwEg3PDu6gdefrEV7BN/Yt8MDE9qBCaUVXD0Cbg3XNxVdc69QR1ewG9k6eoRwSwFwvjFevyLVNw6LLOPdqeSJSS2zGUyQcBWfxoHRIrffNIGp82hypvIVVJzoWcw8UkQZyqpAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQLvO5HKRafyQAfae1XheZF4SxsYzAdBgNVHQ4EFgQUC7zuRykWn8kAH2ntV4XmReEsbGMwDQYJKoZIhvcNAQELBQADggEBACV9CuJB+Q7IJusvg3lw0u/G7twTsZRnwaf2wUexRmAeoi6cHOY4yXIpJxzc3acRPypuJv4jfnLRf8No1N+EeOwYwxOOWDZGFiqq6EzRUSpMxeFfbmd9BbERS0Fn6h8LDfFpjHxs+2QlRGXledoE8tHw2GBr7aukTxzz3GcBrChAanMFc4ARb5CPtJvTemiHHcgMKFc2LClSA82zFN7mBViWqZrNj8n1sCEzohiygX02z2/zKAqIJRxcbI/9sPJt36LwYwpFX1knGB7NVYD4tBP1P3POGedHIbiBoH9pwtsUTvcTzJIhPkX3HlqI+xYaR8GQVk+yqZ3nlLmYvFG/Riw=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585021,\"exp\":1622121621,\"created\":1590585621,\"updated\":1590585623,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585604,\"updated\":1590585604}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2791", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0b20de93-80e1-44c4-bae5-9bd9d78040e7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6f9336ee-c414-433d-bb12-c6c907b2e021", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:22 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "87df494c-15d2-410a-989a-1812bb7a9509", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:25 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7a3c607f-06e3-43ce-965e-0b7ff22fc5c8", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:27 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "19fddc1b-b2b3-436f-a8cc-4126531eac8a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:29 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7a5aeab8-f539-46c8-91c3-e3b87df9b0f0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:31 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "37a8a515-7931-417b-9636-24cc02d7b6f6", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:33 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f02a6bfd-75fe-47ae-93e5-4c40604287c5", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:35 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6b4e87be-f6ed-4dfd-93d9-e8b941fac39b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificate-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "148", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:37 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c6467322-0aa9-4e4d-8a72-f91979eb1aaf", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-\",\"deletedDate\":1590585623,\"scheduledPurgeDate\":1598361623,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ab2cbba510b24499873fe188975b784c\",\"x5t\":\"SAs2q2eqxu0yf3GLra66Q5R_BRg\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQK4lHJzObSK+6Y9IDPyoIwjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDIxWhcNMjEwNTI3MTMyMDIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK0y5093jEqUQLGXjxPXp9SybQfUMY2t6LeRRQYIBFTv8lBH2zS7FCaEJzQF6uDBlgoJSAsIHtqcjO8bnYjn8PPgdehEYGu74GyxdW9ND5uRV3HdGFArP0eXD+Tx8oABhHHkv9MFyuKO9jMFJ9x8ekUXePXV1C+P0H3kBlS25qcph1+Chr+++h1qQV8RwkvwwVOrhLADKJovJotZztpwEg3PDu6gdefrEV7BN/Yt8MDE9qBCaUVXD0Cbg3XNxVdc69QR1ewG9k6eoRwSwFwvjFevyLVNw6LLOPdqeSJSS2zGUyQcBWfxoHRIrffNIGp82hypvIVVJzoWcw8UkQZyqpAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQLvO5HKRafyQAfae1XheZF4SxsYzAdBgNVHQ4EFgQUC7zuRykWn8kAH2ntV4XmReEsbGMwDQYJKoZIhvcNAQELBQADggEBACV9CuJB+Q7IJusvg3lw0u/G7twTsZRnwaf2wUexRmAeoi6cHOY4yXIpJxzc3acRPypuJv4jfnLRf8No1N+EeOwYwxOOWDZGFiqq6EzRUSpMxeFfbmd9BbERS0Fn6h8LDfFpjHxs+2QlRGXledoE8tHw2GBr7aukTxzz3GcBrChAanMFc4ARb5CPtJvTemiHHcgMKFc2LClSA82zFN7mBViWqZrNj8n1sCEzohiygX02z2/zKAqIJRxcbI/9sPJt36LwYwpFX1knGB7NVYD4tBP1P3POGedHIbiBoH9pwtsUTvcTzJIhPkX3HlqI+xYaR8GQVk+yqZ3nlLmYvFG/Riw=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585021,\"exp\":1622121621,\"created\":1590585621,\"updated\":1590585623,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585604,\"updated\":1590585604}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2791", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d9b25e8a-7954-42bc-8a9b-96243bcb3d9d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Wed, 27 May 2020 13:20:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "9580f6f1-76d4-47a5-9ee1-ecb9bf78f934", + "x-powered-by": "ASP.NET" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "dc6a461082bdeae7db210cbfa3031db0" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.json new file mode 100644 index 000000000000..6db5652db9aa --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.json @@ -0,0 +1,743 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0afc7ea7-c44e-44e5-a63a-5063eb49e570", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:39 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10620.11 - SCUS ProdSlices", + "x-ms-request-id": "2fa850d9-9601-4ad4-a6fc-855f97111500" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", + "status": 202, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:40 GMT", + "expires": "-1", + "location": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending?api-version=7.1-preview&request_id=bd20b951a0a34fb1a8b0829a68a55ddd", + "pragma": "no-cache", + "retry-after": "10", + "status": "202", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "9cc2200f-1ec2-43b9-8dbe-4c1e4c32997c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f03671c7-b347-4785-b9f1-d9052f6da99b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "66e06585-3db3-4552-bd0e-6bf63b58ef95", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:42 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fad078b0-4ea0-42e6-8705-431f25ea374b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:44 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "82adb507-66cc-49ed-bcee-72aac33602cf", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:46 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "04cbc280-1185-4dbc-83ac-98c583b4510b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:49 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "435fabfd-a595-4a47-af42-adf72f8445bb", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:51 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bca225cc-78cf-4369-bec2-f724e35a33b0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:53 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7bc2bcbc-d8e5-4166-af95-3b559ad79dee", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1345", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:55 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f436371a-ea2c-4f59-bac8-0e394a1db996", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsPS79Vch1WFIF56N3VzNKq2/nN3p7aHGUt+/1H3+qgonLiQBbU1oqPdyZfbQB2e5P78SX3uVYqF5br8ucHhW3rDfWj9PubEqvySlCDLEKwDIsGjGAN8ulsbi/ce+vWe3vKl2ZgJgPySCP0C3Jj/N5WP79L9WBWoPBMkbjQoAXDQ3dko++FPtkj8wNf/YkLJ7ha2DbmFp0covzM+X5mSZP47DLEia6G1nRlCjC99lrNXelHyApH6/3rFQEU87Tb3m/SPNIPNa8Vih63cmfaXNxw4yOEoe3l2WlY/guRm5ZvaYUA9xny6LqZJRpCdjG5unAP9dS37uAJnzCNdhNtNyNQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJiFwXUw/DfkwfgBCc8AEn7mlDPkHIdA1WNTv4Zd+1C+x3AriXugnxrOhvwWKMRQvZCSek5oPLgSfI2c8yLyP21i9Y8OujG4khV/+ZtwnT4oKk65+x1dGVFPI1EEsI+8551iBZSfgvbQMCrj8u4E8FMXoih1EOJY736EyO69NvFRbcp+GLROeQeJ4Ahw0SXE1UbsOjl9G/PSxzY9T7xGvyeEMvM0A0ESh0aE7WfJDLIHL0PO8hl/j7oKTg9VDCHxCOgjK9xmlDvJsVEnb1pszGpUpTAK1ww/XAPXESbPrJaR2NiD+yx5dGLW5C655XdIwo8nDDS6immVudkZYXrAKeY=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-\",\"request_id\":\"bd20b951a0a34fb1a8b0829a68a55ddd\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1317", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:56 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "896a1cec-2c74-434c-9337-36271822ea2b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"x5t\":\"79j3HP5IszZKuqMz_rRHltlaNBs\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQU/ThA1drSN+xUI36Uvf4XDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDU0WhcNMjEwNTI3MTMyMDU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCw9Lv1VyHVYUgXno3dXM0qrb+c3entocZS37/Uff6qCicuJAFtTWio93Jl9tAHZ7k/vxJfe5VioXluvy5weFbesN9aP0+5sSq/JKUIMsQrAMiwaMYA3y6WxuL9x769Z7e8qXZmAmA/JII/QLcmP83lY/v0v1YFag8EyRuNCgBcNDd2Sj74U+2SPzA1/9iQsnuFrYNuYWnRyi/Mz5fmZJk/jsMsSJrobWdGUKML32Ws1d6UfICkfr/esVARTztNveb9I80g81rxWKHrdyZ9pc3HDjI4Sh7eXZaVj+C5Gblm9phQD3GfLoupklGkJ2Mbm6cA/11Lfu4AmfMI12E203I1AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSQM58EpHMCl43Ewq0GS8xQYhaKqDAdBgNVHQ4EFgQUkDOfBKRzApeNxMKtBkvMUGIWiqgwDQYJKoZIhvcNAQELBQADggEBAD3rfLPjg/DbEwxlhw55BDXT+gyHLR2PHgvJNvZpB9AOrTJOTZCt+kinPgj3DcscgTNx6ITMG9fbLoUsRO4WVQNlHJxdRIkK0+y+WO+An2PyZvzxMqzNdQDPhkO1SQ36FXokgtRJRVif66HvML+6fOgoVTsYDyQOagSnIya+28WlUWha+1Jp8ALdctWGGMJHlQVdvQS4le8In6xWvwq90zkhNRznk70E/aHRHr6veOi6D8MgMX3XOFWh6asYahv9Eh84d4cwsNMnagSlFixQnss9hqv6YHe/H3FAAlEKSygGciEVYP80cbXqmZ9xMYlIjJbMKDxQJNUm3NEqPDpFyy4=\",\"attributes\":{\"enabled\":true,\"nbf\":1590585054,\"exp\":1622121654,\"created\":1590585655,\"updated\":1590585655,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585640,\"updated\":1590585640}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2615", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:56 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "00f75525-b4cc-4cb7-be13-9cec5fe33ff4", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "PATCH", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"attributes\":{\"enabled\":false}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"x5t\":\"79j3HP5IszZKuqMz_rRHltlaNBs\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQU/ThA1drSN+xUI36Uvf4XDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDU0WhcNMjEwNTI3MTMyMDU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCw9Lv1VyHVYUgXno3dXM0qrb+c3entocZS37/Uff6qCicuJAFtTWio93Jl9tAHZ7k/vxJfe5VioXluvy5weFbesN9aP0+5sSq/JKUIMsQrAMiwaMYA3y6WxuL9x769Z7e8qXZmAmA/JII/QLcmP83lY/v0v1YFag8EyRuNCgBcNDd2Sj74U+2SPzA1/9iQsnuFrYNuYWnRyi/Mz5fmZJk/jsMsSJrobWdGUKML32Ws1d6UfICkfr/esVARTztNveb9I80g81rxWKHrdyZ9pc3HDjI4Sh7eXZaVj+C5Gblm9phQD3GfLoupklGkJ2Mbm6cA/11Lfu4AmfMI12E203I1AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSQM58EpHMCl43Ewq0GS8xQYhaKqDAdBgNVHQ4EFgQUkDOfBKRzApeNxMKtBkvMUGIWiqgwDQYJKoZIhvcNAQELBQADggEBAD3rfLPjg/DbEwxlhw55BDXT+gyHLR2PHgvJNvZpB9AOrTJOTZCt+kinPgj3DcscgTNx6ITMG9fbLoUsRO4WVQNlHJxdRIkK0+y+WO+An2PyZvzxMqzNdQDPhkO1SQ36FXokgtRJRVif66HvML+6fOgoVTsYDyQOagSnIya+28WlUWha+1Jp8ALdctWGGMJHlQVdvQS4le8In6xWvwq90zkhNRznk70E/aHRHr6veOi6D8MgMX3XOFWh6asYahv9Eh84d4cwsNMnagSlFixQnss9hqv6YHe/H3FAAlEKSygGciEVYP80cbXqmZ9xMYlIjJbMKDxQJNUm3NEqPDpFyy4=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585054,\"exp\":1622121654,\"created\":1590585655,\"updated\":1590585657,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1938", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6c3f48a6-8851-44b8-a1ef-0f869e4cfb64", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"x5t\":\"79j3HP5IszZKuqMz_rRHltlaNBs\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQU/ThA1drSN+xUI36Uvf4XDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDU0WhcNMjEwNTI3MTMyMDU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCw9Lv1VyHVYUgXno3dXM0qrb+c3entocZS37/Uff6qCicuJAFtTWio93Jl9tAHZ7k/vxJfe5VioXluvy5weFbesN9aP0+5sSq/JKUIMsQrAMiwaMYA3y6WxuL9x769Z7e8qXZmAmA/JII/QLcmP83lY/v0v1YFag8EyRuNCgBcNDd2Sj74U+2SPzA1/9iQsnuFrYNuYWnRyi/Mz5fmZJk/jsMsSJrobWdGUKML32Ws1d6UfICkfr/esVARTztNveb9I80g81rxWKHrdyZ9pc3HDjI4Sh7eXZaVj+C5Gblm9phQD3GfLoupklGkJ2Mbm6cA/11Lfu4AmfMI12E203I1AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSQM58EpHMCl43Ewq0GS8xQYhaKqDAdBgNVHQ4EFgQUkDOfBKRzApeNxMKtBkvMUGIWiqgwDQYJKoZIhvcNAQELBQADggEBAD3rfLPjg/DbEwxlhw55BDXT+gyHLR2PHgvJNvZpB9AOrTJOTZCt+kinPgj3DcscgTNx6ITMG9fbLoUsRO4WVQNlHJxdRIkK0+y+WO+An2PyZvzxMqzNdQDPhkO1SQ36FXokgtRJRVif66HvML+6fOgoVTsYDyQOagSnIya+28WlUWha+1Jp8ALdctWGGMJHlQVdvQS4le8In6xWvwq90zkhNRznk70E/aHRHr6veOi6D8MgMX3XOFWh6asYahv9Eh84d4cwsNMnagSlFixQnss9hqv6YHe/H3FAAlEKSygGciEVYP80cbXqmZ9xMYlIjJbMKDxQJNUm3NEqPDpFyy4=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585054,\"exp\":1622121654,\"created\":1590585655,\"updated\":1590585657,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1785", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ee494cb9-ab95-4b04-b5dd-fdab183e94b1", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-\",\"deletedDate\":1590585657,\"scheduledPurgeDate\":1598361657,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"x5t\":\"79j3HP5IszZKuqMz_rRHltlaNBs\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQU/ThA1drSN+xUI36Uvf4XDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDU0WhcNMjEwNTI3MTMyMDU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCw9Lv1VyHVYUgXno3dXM0qrb+c3entocZS37/Uff6qCicuJAFtTWio93Jl9tAHZ7k/vxJfe5VioXluvy5weFbesN9aP0+5sSq/JKUIMsQrAMiwaMYA3y6WxuL9x769Z7e8qXZmAmA/JII/QLcmP83lY/v0v1YFag8EyRuNCgBcNDd2Sj74U+2SPzA1/9iQsnuFrYNuYWnRyi/Mz5fmZJk/jsMsSJrobWdGUKML32Ws1d6UfICkfr/esVARTztNveb9I80g81rxWKHrdyZ9pc3HDjI4Sh7eXZaVj+C5Gblm9phQD3GfLoupklGkJ2Mbm6cA/11Lfu4AmfMI12E203I1AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSQM58EpHMCl43Ewq0GS8xQYhaKqDAdBgNVHQ4EFgQUkDOfBKRzApeNxMKtBkvMUGIWiqgwDQYJKoZIhvcNAQELBQADggEBAD3rfLPjg/DbEwxlhw55BDXT+gyHLR2PHgvJNvZpB9AOrTJOTZCt+kinPgj3DcscgTNx6ITMG9fbLoUsRO4WVQNlHJxdRIkK0+y+WO+An2PyZvzxMqzNdQDPhkO1SQ36FXokgtRJRVif66HvML+6fOgoVTsYDyQOagSnIya+28WlUWha+1Jp8ALdctWGGMJHlQVdvQS4le8In6xWvwq90zkhNRznk70E/aHRHr6veOi6D8MgMX3XOFWh6asYahv9Eh84d4cwsNMnagSlFixQnss9hqv6YHe/H3FAAlEKSygGciEVYP80cbXqmZ9xMYlIjJbMKDxQJNUm3NEqPDpFyy4=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585054,\"exp\":1622121654,\"created\":1590585655,\"updated\":1590585657,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585640,\"updated\":1590585640}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2821", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "96d24685-dde2-44b9-a4ae-9c0536c8a87e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "06b9897d-d878-479d-8eae-8cde5d38673e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6adb71df-1b97-41f3-81d6-7ed374e22ce7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:20:59 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "288b6b8b-0a55-4b50-8b95-9b9f586958c2", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:01 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fa7657ba-b328-4b22-9a04-ca6069651f7f", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:03 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4351f580-b8c9-4c12-b9cb-5a27d322fac4", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:05 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "16c4f609-b6c9-476c-96ad-9628c40e988a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "06a374c5-eae5-48f7-a8a7-45d6764dfe22", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "153", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:09 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "06221ad3-5594-4d18-b235-514d146f5fc8", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-\",\"deletedDate\":1590585657,\"scheduledPurgeDate\":1598361657,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/9213925b8ea64685b417d0c6b99bf3ec\",\"x5t\":\"79j3HP5IszZKuqMz_rRHltlaNBs\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQU/ThA1drSN+xUI36Uvf4XDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMxMDU0WhcNMjEwNTI3MTMyMDU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCw9Lv1VyHVYUgXno3dXM0qrb+c3entocZS37/Uff6qCicuJAFtTWio93Jl9tAHZ7k/vxJfe5VioXluvy5weFbesN9aP0+5sSq/JKUIMsQrAMiwaMYA3y6WxuL9x769Z7e8qXZmAmA/JII/QLcmP83lY/v0v1YFag8EyRuNCgBcNDd2Sj74U+2SPzA1/9iQsnuFrYNuYWnRyi/Mz5fmZJk/jsMsSJrobWdGUKML32Ws1d6UfICkfr/esVARTztNveb9I80g81rxWKHrdyZ9pc3HDjI4Sh7eXZaVj+C5Gblm9phQD3GfLoupklGkJ2Mbm6cA/11Lfu4AmfMI12E203I1AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSQM58EpHMCl43Ewq0GS8xQYhaKqDAdBgNVHQ4EFgQUkDOfBKRzApeNxMKtBkvMUGIWiqgwDQYJKoZIhvcNAQELBQADggEBAD3rfLPjg/DbEwxlhw55BDXT+gyHLR2PHgvJNvZpB9AOrTJOTZCt+kinPgj3DcscgTNx6ITMG9fbLoUsRO4WVQNlHJxdRIkK0+y+WO+An2PyZvzxMqzNdQDPhkO1SQ36FXokgtRJRVif66HvML+6fOgoVTsYDyQOagSnIya+28WlUWha+1Jp8ALdctWGGMJHlQVdvQS4le8In6xWvwq90zkhNRznk70E/aHRHr6veOi6D8MgMX3XOFWh6asYahv9Eh84d4cwsNMnagSlFixQnss9hqv6YHe/H3FAAlEKSygGciEVYP80cbXqmZ9xMYlIjJbMKDxQJNUm3NEqPDpFyy4=\",\"attributes\":{\"enabled\":false,\"nbf\":1590585054,\"exp\":1622121654,\"created\":1590585655,\"updated\":1590585657,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590585640,\"updated\":1590585640}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2821", + "content-type": "application/json; charset=utf-8", + "date": "Wed, 27 May 2020 13:21:11 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7fc57516-dee9-4958-a420-760d54a487d7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Wed, 27 May 2020 13:21:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "33fc98ca-a6cf-4da4-9bcc-a945256e9be8", + "x-powered-by": "ASP.NET" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "9e136291d49054d5d1549f5678670816" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_certificate_with_requestoptions_timeout.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_certificate_with_requestoptions_timeout.json index 4be843bb79d0..72eca4b422e7 100644 --- a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_certificate_with_requestoptions_timeout.json +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_certificate_with_requestoptions_timeout.json @@ -4,5 +4,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "ee26e3ba3709c5e698d14a3a7de8ae8c" + "hash": "4e2de66bd216e6b04a01e029aeb8d3dc" } \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.json index 4f0ef4d8e4af..0c72e97dcb69 100644 --- a/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.json +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.json @@ -13,19 +13,18 @@ "cache-control": "no-cache", "content-length": "87", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:20 GMT", + "date": "Wed, 27 May 2020 15:05:14 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "401", "strict-transport-security": "max-age=31536000;includeSubDomains", "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1a7c1070-b252-4733-85ab-09acc9ba66af", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2d853811-0420-405f-af69-61c536202bed", "x-powered-by": "ASP.NET" } }, @@ -40,15 +39,15 @@ "cache-control": "no-cache, no-store", "content-length": "1315", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:20 GMT", + "date": "Wed, 27 May 2020 15:05:14 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10433.14 - EUS ProdSlices", - "x-ms-request-id": "f19a06ef-e2a2-4e15-8411-9353b514af00" + "x-ms-ests-server": "2.1.10620.11 - EUS ProdSlices", + "x-ms-request-id": "cf7115d9-8f96-42e2-8bcd-7edd30641800" } }, { @@ -59,25 +58,24 @@ }, "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", "status": 202, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtAUfNG9gZXkrQ+DxQjc777YZSb9GiFwDfNrantahpqMbDplKuTSQLwrjA6UbcovgVJL8ImKrl5JdZCI7oYKb3MtlnxkZlNp6Sy6gq4wc5N/l2xq1UAM3tTyShpzL1pP+0d3MlNu24bFIo7uTPG9bmnY6yqIncImUlEE8ObDnzkjwHVK3TZswT9UxU50kEkakvr25aHOeuSvuaStlg5uLYSWv0ZUH66VS0gZlvaqwLqd3ZPl8SzBuWHTccJHIy/UOLzMA3kEPZ2DL/ti6xht1/d7NTMZ/wG3w74DZ3MiO9b8dELhe6JnY7aPiah28WYAnwzSEzEy0XXbzUWr22ZXtFQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAEqacsquldDua1iMfCg1d/ROxJYTuBAGwmjiulNbrMvcyVdPDCVB0WjR8Q7GQ4MR0APoC5qTLW0v/sCM7PY3dtSyJJ9bCVQiWdY6BfdWTK65yClJBnL7C4OiC2UDoy1wczFypj62KxcamDxNykFRVg9k6CDmqL+TTe/yAtuTwj9jH6rqQC0h1BSbEA7l77hbvfinHAnDN214ERkD09vZxWG80F9Oh7lvaJ6vVvo/Gs0HCCvLDyJ/nA4C/Wsau+aGX39C13lwqoEuAAnw5l8QzG3sSVj8bc4Nc3bzJle1z5IwusUzJI8GHEdoKKb94BfmNxeQiIWJX8LCJIAbWVmvqgc=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"a0538bd948c04a42b6e9ceee4dea7d92\"}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsoTfjZOlo83NG+5oV1Q4GmXFZbjeN78M8Kth3hTE2kpDtWHohOe8wPWpqKsVjvxmLp+crPlfi20dkamE2AfDSlWqrCZbjRGCxAc5VmljjaQi3MLNCg9wr1wvUGWsIjWvRthQX6civkvsdr5BlYwNsFZXdixsi9Gdr4hU6fmCm3sPUh9pm732B5TtusH7uB7ovMLS6bs15BbHFBX80al5AIiW7il3+9NNYPU28o+B23Lg2DIU48oY32c3g150qie1ar0RoJpMuSJNQ++EChHZApCDfZw6H6hsbB4JKzNWir5XScZx6JDMeP5q/KWoQpivIivHIabbjBnE+1N0CFMQrQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGt/+gBl5uv/OxvKhSVzV9B04GIsCbQidK8xGiFlXupD4hrZnoc45mmoA1EXyvohprrnjubUKf2CyNfjNvr1MxxfZ79HD1SsWuss5815uYSY/YfltyTOnWrD55MtIK8KpG5wvLpsTdKsyrFnBCkvS8rcORFQd9mhqSx6bUohR8DwbPFDmRUhgAaj8YSXoaaa6SjEzYj6fW6L3RFUep3zKHdGlMJTypkRdqrR58tzLhE9VlMnb3jPzhIGhjB9M6ECLQquexl8cqW7tK3QLfcI9Xbv5Ptp7Nk7t6cFlxyuc49hbdubZVMqIfLx5jcoAp2x7mZElYM7k3AdfRF5E7+YW2g=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"f420b7b34aba46b4b32c7b0b6992cf57\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1347", + "content-length": "1346", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:22 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", - "location": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending?api-version=7.1-preview&request_id=a0538bd948c04a42b6e9ceee4dea7d92", + "location": "https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending?api-version=7.1-preview&request_id=f420b7b34aba46b4b32c7b0b6992cf57", "pragma": "no-cache", "retry-after": "10", - "server": "Microsoft-IIS/10.0", "status": "202", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "3bddf01c-be2e-4278-879f-d1954d3c473a", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "99797a8a-fe4e-498f-8542-3b4a13c3e4da", "x-powered-by": "ASP.NET" } }, @@ -89,24 +87,23 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtAUfNG9gZXkrQ+DxQjc777YZSb9GiFwDfNrantahpqMbDplKuTSQLwrjA6UbcovgVJL8ImKrl5JdZCI7oYKb3MtlnxkZlNp6Sy6gq4wc5N/l2xq1UAM3tTyShpzL1pP+0d3MlNu24bFIo7uTPG9bmnY6yqIncImUlEE8ObDnzkjwHVK3TZswT9UxU50kEkakvr25aHOeuSvuaStlg5uLYSWv0ZUH66VS0gZlvaqwLqd3ZPl8SzBuWHTccJHIy/UOLzMA3kEPZ2DL/ti6xht1/d7NTMZ/wG3w74DZ3MiO9b8dELhe6JnY7aPiah28WYAnwzSEzEy0XXbzUWr22ZXtFQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAEqacsquldDua1iMfCg1d/ROxJYTuBAGwmjiulNbrMvcyVdPDCVB0WjR8Q7GQ4MR0APoC5qTLW0v/sCM7PY3dtSyJJ9bCVQiWdY6BfdWTK65yClJBnL7C4OiC2UDoy1wczFypj62KxcamDxNykFRVg9k6CDmqL+TTe/yAtuTwj9jH6rqQC0h1BSbEA7l77hbvfinHAnDN214ERkD09vZxWG80F9Oh7lvaJ6vVvo/Gs0HCCvLDyJ/nA4C/Wsau+aGX39C13lwqoEuAAnw5l8QzG3sSVj8bc4Nc3bzJle1z5IwusUzJI8GHEdoKKb94BfmNxeQiIWJX8LCJIAbWVmvqgc=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"a0538bd948c04a42b6e9ceee4dea7d92\"}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsoTfjZOlo83NG+5oV1Q4GmXFZbjeN78M8Kth3hTE2kpDtWHohOe8wPWpqKsVjvxmLp+crPlfi20dkamE2AfDSlWqrCZbjRGCxAc5VmljjaQi3MLNCg9wr1wvUGWsIjWvRthQX6civkvsdr5BlYwNsFZXdixsi9Gdr4hU6fmCm3sPUh9pm732B5TtusH7uB7ovMLS6bs15BbHFBX80al5AIiW7il3+9NNYPU28o+B23Lg2DIU48oY32c3g150qie1ar0RoJpMuSJNQ++EChHZApCDfZw6H6hsbB4JKzNWir5XScZx6JDMeP5q/KWoQpivIivHIabbjBnE+1N0CFMQrQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGt/+gBl5uv/OxvKhSVzV9B04GIsCbQidK8xGiFlXupD4hrZnoc45mmoA1EXyvohprrnjubUKf2CyNfjNvr1MxxfZ79HD1SsWuss5815uYSY/YfltyTOnWrD55MtIK8KpG5wvLpsTdKsyrFnBCkvS8rcORFQd9mhqSx6bUohR8DwbPFDmRUhgAaj8YSXoaaa6SjEzYj6fW6L3RFUep3zKHdGlMJTypkRdqrR58tzLhE9VlMnb3jPzhIGhjB9M6ECLQquexl8cqW7tK3QLfcI9Xbv5Ptp7Nk7t6cFlxyuc49hbdubZVMqIfLx5jcoAp2x7mZElYM7k3AdfRF5E7+YW2g=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"f420b7b34aba46b4b32c7b0b6992cf57\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1347", + "content-length": "1346", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", "retry-after": "10", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "88b7230b-6ea2-4f7e-b544-776c6325362f", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4854c0dd-4ea7-48d2-90c3-b053f81aa197", "x-powered-by": "ASP.NET" } }, @@ -116,25 +113,24 @@ "query": { "api-version": "7.1-preview" }, - "requestBody": "{\"tags\":{\"customTag\":\"value\"}}", + "requestBody": "{\"attributes\":{},\"tags\":{\"customTag\":\"value\"}}", "status": 200, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/b8ecd117cf2540b5b76b2edc780fa9a2\",\"attributes\":{\"enabled\":false,\"nbf\":1588197921,\"exp\":1619734521,\"created\":1588198521,\"updated\":1588198523,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588198521,\"updated\":1588198521}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/93cb49ab678540eaa432ef3819a75980\",\"attributes\":{\"enabled\":false,\"nbf\":1590591315,\"exp\":1622127915,\"created\":1590591915,\"updated\":1590591916,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590591915,\"updated\":1590591915}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1201", + "content-length": "1198", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "49b4f5d5-da0b-4843-bbad-c6550f9e48c5", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fc519dc4-6d25-4c78-bb51-3bc671221d88", "x-powered-by": "ASP.NET" } }, @@ -146,23 +142,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/b8ecd117cf2540b5b76b2edc780fa9a2\",\"attributes\":{\"enabled\":false,\"nbf\":1588197921,\"exp\":1619734521,\"created\":1588198521,\"updated\":1588198523,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588198521,\"updated\":1588198521}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/93cb49ab678540eaa432ef3819a75980\",\"attributes\":{\"enabled\":false,\"nbf\":1590591315,\"exp\":1622127915,\"created\":1590591915,\"updated\":1590591916,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590591915,\"updated\":1590591915}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1201", + "content-length": "1198", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2f72745b-9a4b-4a76-8df5-007f0117d20c", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e8bc9785-8466-4dd5-8d49-eedc970126a1", "x-powered-by": "ASP.NET" } }, @@ -174,23 +169,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-\",\"deletedDate\":1588198524,\"scheduledPurgeDate\":1595974524,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/b8ecd117cf2540b5b76b2edc780fa9a2\",\"attributes\":{\"enabled\":false,\"nbf\":1588197921,\"exp\":1619734521,\"created\":1588198521,\"updated\":1588198523,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588198521,\"updated\":1588198521}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-\",\"deletedDate\":1590591916,\"scheduledPurgeDate\":1598367916,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/93cb49ab678540eaa432ef3819a75980\",\"attributes\":{\"enabled\":false,\"nbf\":1590591315,\"exp\":1622127915,\"created\":1590591915,\"updated\":1590591916,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590591915,\"updated\":1590591915}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1408", + "content-length": "1404", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7a5e769f-de05-4e18-8d74-f0033806f8b3", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "57e0dee8-ca38-4905-8db1-6d5ac3d9f56b", "x-powered-by": "ASP.NET" } }, @@ -205,20 +199,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1aad89e9-9ab6-468c-aa2d-326bcdd2e2ba", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ef12c88b-b8e1-4734-a23c-1c1151255120", "x-powered-by": "ASP.NET" } }, @@ -233,20 +226,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:23 GMT", + "date": "Wed, 27 May 2020 15:05:15 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "519395c2-809f-488a-86de-d104f577ccb7", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "66a3e534-9a9d-4be8-aeb8-fd6111420b1b", "x-powered-by": "ASP.NET" } }, @@ -261,20 +253,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:25 GMT", + "date": "Wed, 27 May 2020 15:05:18 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "bc8d2e36-1040-42ad-acd7-026b36a292c3", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "8ecb88fd-69bd-40cc-a765-7235f85142b5", "x-powered-by": "ASP.NET" } }, @@ -289,20 +280,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:27 GMT", + "date": "Wed, 27 May 2020 15:05:20 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c8862c3f-30aa-4229-b12e-ba9777979c51", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "49a120b0-c42b-4a7d-80ae-90674e1238dd", "x-powered-by": "ASP.NET" } }, @@ -317,20 +307,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:29 GMT", + "date": "Wed, 27 May 2020 15:05:22 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "19bbd0d9-d22c-4292-9033-8777f49dfbed", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a14c9963-ff64-42a1-8b2e-c7dd6b0752ec", "x-powered-by": "ASP.NET" } }, @@ -345,1280 +334,19 @@ "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "155", + "content-length": "154", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:32 GMT", + "date": "Wed, 27 May 2020 15:05:24 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0a7dc4a3-9e79-4381-9581-eeaf3d897610", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:34 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1dccab3a-bb61-47a7-b4c6-f94f6a872d49", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:36 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "62be7ea0-f176-49f8-818c-de4d5363b35d", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:38 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "42d51362-10c2-49ca-8877-2ec23a919c78", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:40 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1e8e03c6-fe05-4150-9165-b348f7fe5d8c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:42 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "fb86ba67-0cda-40b4-ac9b-938c0f9e9976", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:44 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "142e2689-bcd7-4d7d-a142-7faf8af5365f", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:46 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "95c2758f-c5a1-41cc-a04d-cb9910fd6f0d", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:48 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e0cb927a-2f21-4a90-8318-ee66bf04284c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:50 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "b1b7b53f-e111-48fa-85ea-b2c2606c8967", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:52 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "68799483-1375-4356-8e8a-5a3c7876718e", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:54 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2745823f-635a-4905-8360-53f0ce2b3d73", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:56 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "65383fe2-a064-4b30-9c50-249306adb875", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:15:58 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f64b88e0-6e47-4a80-8447-68f5fd5d09c2", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:00 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "26861dce-0a46-474b-8a8c-0a3504afc134", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:02 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "ce3c0ecc-6081-4261-8056-edc1ccaa9063", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:05 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d470eaa7-44a6-4042-9d01-f5667f0cefe6", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:07 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "3afecadd-3255-4622-a196-e591eccace19", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:09 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4e5827b7-05fe-4478-99f2-569f9a0cf78e", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:11 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e9d9220c-0afd-4a7d-94bc-0a48a3fd4510", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:13 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "17f44e52-98f1-4dce-aa78-49daa6fab3d5", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:15 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "52f6d362-cdda-4c19-ae52-0f3960093aa6", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:17 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "81819258-95ca-4881-ae2d-194ffbe6ec49", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:19 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c659c647-36f4-46f1-8912-6104b52f6e4e", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:21 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a4b7376b-7bc7-40d4-a2aa-3d4d06f092d9", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:23 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7bbc719e-500b-4b56-aa30-3b4b6f6bb113", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:25 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c66a5a89-cf9f-401c-8a41-5bdc18fca5f1", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:27 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "073e2fb7-bf2f-4a46-ad00-0dc5f34a2e00", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:29 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "405a82a4-ffb6-4ac1-81ef-69112b820a87", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:31 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "b17d1d06-906f-43b0-9827-73c7a48b7f2b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:33 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "19a3efef-6f90-42e0-bf60-8a9a4b4182dd", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:36 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "45a30182-42e4-4d83-8897-f8547c601de1", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:38 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "eeb48bda-847a-4cac-9351-1d8dcc17195f", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:40 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4e04ef33-8714-4d57-bfe3-37790ade26c0", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:42 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e92609ae-6d09-4913-af13-7438b04b1f3c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:44 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8040e812-b73f-4631-b7b0-a6998a31cb0d", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:46 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "6d65122a-84e5-4922-bbed-02f7891435f4", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:48 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a352bdfd-fd4b-45d2-9de9-0f9f71eb04d5", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:50 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a37c12aa-adf9-49f0-87bd-4a6c5e1920b4", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:52 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0f93a8c5-4e98-4784-a60c-341f29802585", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:54 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "29f9a61e-b282-4462-a6ff-18fb8931f623", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:56 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "68e9bc22-e2f6-473c-91ce-01005a111aa2", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:16:58 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4ab733db-57aa-4184-82b5-ece5d32aead5", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:17:00 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4604934b-b9d3-4437-b209-c45f58cc2aac", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:17:02 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d2de71ab-8786-4465-a120-ecb6ddea4064", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "155", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:17:04 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "450ec548-a2a5-45bf-a6d2-087d5960c0ba", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "24249fb3-34ba-4908-866a-230e913b278c", "x-powered-by": "ASP.NET" } }, @@ -1630,23 +358,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-\",\"deletedDate\":1588198524,\"scheduledPurgeDate\":1595974524,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/b8ecd117cf2540b5b76b2edc780fa9a2\",\"attributes\":{\"enabled\":false,\"nbf\":1588197921,\"exp\":1619734521,\"created\":1588198521,\"updated\":1588198523,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588198521,\"updated\":1588198521}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-\",\"deletedDate\":1590591916,\"scheduledPurgeDate\":1598367916,\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/93cb49ab678540eaa432ef3819a75980\",\"attributes\":{\"enabled\":false,\"nbf\":1590591315,\"exp\":1622127915,\"created\":1590591915,\"updated\":1590591916,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"customTag\":\"value\"},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590591915,\"updated\":1590591915}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1408", + "content-length": "1404", "content-type": "application/json; charset=utf-8", - "date": "Wed, 29 Apr 2020 22:17:06 GMT", + "date": "Wed, 27 May 2020 15:05:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "38237c56-067b-460e-82f2-383d5c9afa85", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a12d7891-a3c1-42d3-ab29-dad705026538", "x-powered-by": "ASP.NET" } }, @@ -1661,18 +388,17 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Wed, 29 Apr 2020 22:17:06 GMT", + "date": "Wed, 27 May 2020 15:05:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=51.141.174.130;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "701cb500-9245-48de-97b9-a3cd1f68e9c7", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7d066121-3cbc-4219-96ec-66b817af20c3", "x-powered-by": "ASP.NET" } } @@ -1681,5 +407,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "07d5d6f962357f9d42e3a6d6d4489a51" + "hash": "fb6fc7121879e408171ce6c3c0e95a8e" } \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json new file mode 100644 index 000000000000..dbde08c5eeaf --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json @@ -0,0 +1,1171 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:25 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "8f041c85-152b-4f36-9af7-5a2f0d19482a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:25 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a4e27675-026c-4291-b113-5d491eff80e2", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:25 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - NCUS ProdSlices", + "x-ms-request-id": "7ed12922-e92e-4d41-8a39-f4c89251fd00" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:25 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - EUS ProdSlices", + "x-ms-request-id": "98152840-6d97-44da-8887-7af99858bd00" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", + "status": 202, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:26 GMT", + "expires": "-1", + "location": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending?api-version=7.1-preview&request_id=8a5862165e71489fac3c7c5414c9907e", + "pragma": "no-cache", + "retry-after": "10", + "status": "202", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e7dd3eab-46b9-4c9c-ab49-2eda677dd664", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:26 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "de6c45dc-7234-4711-965a-c83c0f2f2f79", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", + "status": 202, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TFeOGluNB8QWQeiSsGZSkXbCpFWe1Pidw/wAOWCpZmYJl+Ilfo2Rpczjax9VkLkEzpyfsR0ApZN9Wmlnu675snAbxzC/0iaKQim+u2x8O4nXeNu11Y5mOrMXqpTvhgR4PeHwrj99VTPce4JEr0spfcbY641uu9Bv5YbYdYgk6g+NpEL+8fyOCDLpAnlOO/pclAQbHDNhT0wObOF8k+6Rk8CSYyf436FsogTtwRYtSOV4aGc0wsdetpQJLRUqmThnnL7eR9dtrVUGZ4x0MFuVmxz7w9xz7a1a5duR8fOWOtFWqmb+uMZny5bnb4NN+vo8+eKYRSUDWXGQAXVrEX6ZQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABU/CldZChGthTf/ee3UjNljIDe7grCyDN1XAQXKvhhH4nWSf138EkDTWznaQ2hPSZ6NDgbqMgAhrNzwUaH1T5MPeI9H3g8KNAlzvE3Sc+K+iW03o3wcsMU1qPo1qsERYQu+LbyjbjWXq4JxAFSrVa4ChzFVeMDy1CPJciOiTQdP5722O6bo8fU+QT8xJA1YM5JOrrcxGv9OECVju0C0FOEMHvI/WPLdU2HJlm59sPgBNOwApfMN9Xlb58T55rFi21w1vCmSoh6/ARvi/YMeakxyDpnEm0kCuyWJhZX/GqiQD+of5UV3rd4EfzDvvqX4LJvXIXUhXYOluKEZWt61HiE=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"395a83f3f28a490bac19e147b5fb6716\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:26 GMT", + "expires": "-1", + "location": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending?api-version=7.1-preview&request_id=395a83f3f28a490bac19e147b5fb6716", + "pragma": "no-cache", + "retry-after": "10", + "status": "202", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4671c13d-10c3-46d7-bed9-b2cf1d5f5b08", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:26 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0e0c7fda-e87d-426c-9b86-a6d9022490fd", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TFeOGluNB8QWQeiSsGZSkXbCpFWe1Pidw/wAOWCpZmYJl+Ilfo2Rpczjax9VkLkEzpyfsR0ApZN9Wmlnu675snAbxzC/0iaKQim+u2x8O4nXeNu11Y5mOrMXqpTvhgR4PeHwrj99VTPce4JEr0spfcbY641uu9Bv5YbYdYgk6g+NpEL+8fyOCDLpAnlOO/pclAQbHDNhT0wObOF8k+6Rk8CSYyf436FsogTtwRYtSOV4aGc0wsdetpQJLRUqmThnnL7eR9dtrVUGZ4x0MFuVmxz7w9xz7a1a5duR8fOWOtFWqmb+uMZny5bnb4NN+vo8+eKYRSUDWXGQAXVrEX6ZQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABU/CldZChGthTf/ee3UjNljIDe7grCyDN1XAQXKvhhH4nWSf138EkDTWznaQ2hPSZ6NDgbqMgAhrNzwUaH1T5MPeI9H3g8KNAlzvE3Sc+K+iW03o3wcsMU1qPo1qsERYQu+LbyjbjWXq4JxAFSrVa4ChzFVeMDy1CPJciOiTQdP5722O6bo8fU+QT8xJA1YM5JOrrcxGv9OECVju0C0FOEMHvI/WPLdU2HJlm59sPgBNOwApfMN9Xlb58T55rFi21w1vCmSoh6/ARvi/YMeakxyDpnEm0kCuyWJhZX/GqiQD+of5UV3rd4EfzDvvqX4LJvXIXUhXYOluKEZWt61HiE=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"395a83f3f28a490bac19e147b5fb6716\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:26 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "140b84c0-3294-4b14-80a6-fb06e3eecfdc", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:28 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e0694c10-a1e1-4c63-b11e-fca390ebe848", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:30 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0c3e271c-27c2-4c82-9ddd-43c0ee99d736", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:32 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "80fa9872-5d62-420f-b4bf-cd2a5c9019b6", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:34 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "8c88e375-df7f-4ebb-a348-bc694b3e7411", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:36 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "49bf25fa-beb1-47dd-9106-e44347739a4b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1367", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:38 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "9377a8d9-c78b-461a-acbd-957788599923", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyqwxTBN2RDRDVHGICIJS6Wg1hjvL2QdXITsr8ft9/FfOw2yvEihP2/yYaXCSZb/++MyzwsGyESLXcrH5xbpaKz+60zDwW2vhwTFM74Yq11O2iaaDJMGNVgjN1Hiw7EF2T1lGfyVJi+1j69XE3TDQLa8REHYYqWCEFntjkeHW0eqPDQJ+DOxHo9K/HuqfqpHi23kRd9ys+FB3sRy14SoZMq3ZmdmnWXmTaWxmS8xKxncNfPnNqpZdRTx/hVxiuqmJLZ3OZrQBRQ9X9YTA6IxQgP3IemQc/9URixl+NqotA33GQUOy92Dhg7RJEqpM0ihPnPr2jwD7i+GZjS9jfF0MQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJmxOfKlZaAA3nXK5qaNiI/OZIVDf3aIvqhpyV+PWNJg208rcpoTHfpXEaAp/3yeq7wDkfPbI0rXjIGqD1qOIjb4RWZqVeWhvF0jHBIlo3AAfQxg4m6R8U6H+hUHtA1SSZ8toI9i0X3IjPo5Tg4PZzOaauSznX+8qnfsqTHH7evicoE+hoddEuyGspUzyEJ8nV0XKvGL3HOtA/XIlJlQgb9/uuU6DmQQnKW4GcuEfpFi/lIe5SfyIaVekVhvz6FOHRKqLUbVleCcqzDjgWolw/ZAYI8weWEUwnnF4Ru7VconUeztDn72Govi5U/oDIFtFKo31Zb5XHJGp4YwIid7H8E=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\",\"request_id\":\"8a5862165e71489fac3c7c5414c9907e\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1361", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7b0ab2bb-0560-48df-9214-0f47d46908d4", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"x5t\":\"G-CNsJqpK7ox8jJyCSjtSkX1pUw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQNZmPrKeqSNyZfHNf0lmvzTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfKrDFME3ZENENUcYgIglLpaDWGO8vZB1chOyvx+338V87DbK8SKE/b/JhpcJJlv/74zLPCwbIRItdysfnFulorP7rTMPBba+HBMUzvhirXU7aJpoMkwY1WCM3UeLDsQXZPWUZ/JUmL7WPr1cTdMNAtrxEQdhipYIQWe2OR4dbR6o8NAn4M7Eej0r8e6p+qkeLbeRF33Kz4UHexHLXhKhkyrdmZ2adZeZNpbGZLzErGdw18+c2qll1FPH+FXGK6qYktnc5mtAFFD1f1hMDojFCA/ch6ZBz/1RGLGX42qi0DfcZBQ7L3YOGDtEkSqkzSKE+c+vaPAPuL4ZmNL2N8XQxAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTUo3SsgkTat4TiUr/ntyUxdjJOxDAdBgNVHQ4EFgQU1KN0rIJE2reE4lK/57clMXYyTsQwDQYJKoZIhvcNAQELBQADggEBAJxo9cJ3U2FHT8KaLIJIgYRpzNMImXvCiu19/aEHPm73naiGoVjZxpqXTfC3eHn/17eifVG4vdLJ9zx3yve4QYlDHRRew1D8B9Ba0MuJirZL1y3bl9vYqmTj0Prax2wbnFMxJCe+umjhWna8thPfayJ9C1nowsI4lSldZxkLrZAG7SDfRgUxrmK35NxYc55GJuuBGEygr9yqaEOef+jCVNLeo+S5jinAVDVMe7yYenQOnZM5HmSZEFmXTvbeENJXIeOjhiyw1wX5ssO7UgznThDopO8JWfJJZOnROOtLScMATtdKKoQlkBCAr0TIMhVWsX8GiCYc2GPgbf25RTNaFck=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2725", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "8fe5410c-bad1-4ad6-b264-e4b2e164d9d8", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590498641,\"scheduledPurgeDate\":1598274641,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"x5t\":\"G-CNsJqpK7ox8jJyCSjtSkX1pUw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQNZmPrKeqSNyZfHNf0lmvzTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfKrDFME3ZENENUcYgIglLpaDWGO8vZB1chOyvx+338V87DbK8SKE/b/JhpcJJlv/74zLPCwbIRItdysfnFulorP7rTMPBba+HBMUzvhirXU7aJpoMkwY1WCM3UeLDsQXZPWUZ/JUmL7WPr1cTdMNAtrxEQdhipYIQWe2OR4dbR6o8NAn4M7Eej0r8e6p+qkeLbeRF33Kz4UHexHLXhKhkyrdmZ2adZeZNpbGZLzErGdw18+c2qll1FPH+FXGK6qYktnc5mtAFFD1f1hMDojFCA/ch6ZBz/1RGLGX42qi0DfcZBQ7L3YOGDtEkSqkzSKE+c+vaPAPuL4ZmNL2N8XQxAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTUo3SsgkTat4TiUr/ntyUxdjJOxDAdBgNVHQ4EFgQU1KN0rIJE2reE4lK/57clMXYyTsQwDQYJKoZIhvcNAQELBQADggEBAJxo9cJ3U2FHT8KaLIJIgYRpzNMImXvCiu19/aEHPm73naiGoVjZxpqXTfC3eHn/17eifVG4vdLJ9zx3yve4QYlDHRRew1D8B9Ba0MuJirZL1y3bl9vYqmTj0Prax2wbnFMxJCe+umjhWna8thPfayJ9C1nowsI4lSldZxkLrZAG7SDfRgUxrmK35NxYc55GJuuBGEygr9yqaEOef+jCVNLeo+S5jinAVDVMe7yYenQOnZM5HmSZEFmXTvbeENJXIeOjhiyw1wX5ssO7UgznThDopO8JWfJJZOnROOtLScMATtdKKoQlkBCAr0TIMhVWsX8GiCYc2GPgbf25RTNaFck=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2952", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "211b6650-dc1e-47a8-9017-a2df6b49111d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c0336311-6e9f-47e1-ab12-9bb2fe17e2da", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:40 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "9f515197-3b98-4b7b-8c3f-84bf3fb1d367", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:42 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "9ea88ce5-e003-4722-b4d0-0af08a44d2ce", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:44 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6a03872c-31ca-4678-b717-b6ecb1807107", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:46 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7de677c5-1830-48a6-a5f0-5329872c56c7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:48 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ac2d7214-8e44-4960-a107-6cb0a0b14794", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:51 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "34862c56-755f-4d13-8d9d-bfada1a01ccb", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:53 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fed0d382-22e8-4d93-9c7a-485459b3b39d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:55 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "88fe9f76-8401-453f-9739-9ed5094ac529", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590498641,\"scheduledPurgeDate\":1598274641,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/35dfb46c728d4f03b9ffab80186fa25b\",\"x5t\":\"G-CNsJqpK7ox8jJyCSjtSkX1pUw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQNZmPrKeqSNyZfHNf0lmvzTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfKrDFME3ZENENUcYgIglLpaDWGO8vZB1chOyvx+338V87DbK8SKE/b/JhpcJJlv/74zLPCwbIRItdysfnFulorP7rTMPBba+HBMUzvhirXU7aJpoMkwY1WCM3UeLDsQXZPWUZ/JUmL7WPr1cTdMNAtrxEQdhipYIQWe2OR4dbR6o8NAn4M7Eej0r8e6p+qkeLbeRF33Kz4UHexHLXhKhkyrdmZ2adZeZNpbGZLzErGdw18+c2qll1FPH+FXGK6qYktnc5mtAFFD1f1hMDojFCA/ch6ZBz/1RGLGX42qi0DfcZBQ7L3YOGDtEkSqkzSKE+c+vaPAPuL4ZmNL2N8XQxAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTUo3SsgkTat4TiUr/ntyUxdjJOxDAdBgNVHQ4EFgQU1KN0rIJE2reE4lK/57clMXYyTsQwDQYJKoZIhvcNAQELBQADggEBAJxo9cJ3U2FHT8KaLIJIgYRpzNMImXvCiu19/aEHPm73naiGoVjZxpqXTfC3eHn/17eifVG4vdLJ9zx3yve4QYlDHRRew1D8B9Ba0MuJirZL1y3bl9vYqmTj0Prax2wbnFMxJCe+umjhWna8thPfayJ9C1nowsI4lSldZxkLrZAG7SDfRgUxrmK35NxYc55GJuuBGEygr9yqaEOef+jCVNLeo+S5jinAVDVMe7yYenQOnZM5HmSZEFmXTvbeENJXIeOjhiyw1wX5ssO7UgznThDopO8JWfJJZOnROOtLScMATtdKKoQlkBCAr0TIMhVWsX8GiCYc2GPgbf25RTNaFck=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2952", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "904bc1bb-a1b1-40ba-8861-69f5ba3acbac", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "40230fe6-8fcc-4724-9adf-31235e9a8862", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TFeOGluNB8QWQeiSsGZSkXbCpFWe1Pidw/wAOWCpZmYJl+Ilfo2Rpczjax9VkLkEzpyfsR0ApZN9Wmlnu675snAbxzC/0iaKQim+u2x8O4nXeNu11Y5mOrMXqpTvhgR4PeHwrj99VTPce4JEr0spfcbY641uu9Bv5YbYdYgk6g+NpEL+8fyOCDLpAnlOO/pclAQbHDNhT0wObOF8k+6Rk8CSYyf436FsogTtwRYtSOV4aGc0wsdetpQJLRUqmThnnL7eR9dtrVUGZ4x0MFuVmxz7w9xz7a1a5duR8fOWOtFWqmb+uMZny5bnb4NN+vo8+eKYRSUDWXGQAXVrEX6ZQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABU/CldZChGthTf/ee3UjNljIDe7grCyDN1XAQXKvhhH4nWSf138EkDTWznaQ2hPSZ6NDgbqMgAhrNzwUaH1T5MPeI9H3g8KNAlzvE3Sc+K+iW03o3wcsMU1qPo1qsERYQu+LbyjbjWXq4JxAFSrVa4ChzFVeMDy1CPJciOiTQdP5722O6bo8fU+QT8xJA1YM5JOrrcxGv9OECVju0C0FOEMHvI/WPLdU2HJlm59sPgBNOwApfMN9Xlb58T55rFi21w1vCmSoh6/ARvi/YMeakxyDpnEm0kCuyWJhZX/GqiQD+of5UV3rd4EfzDvvqX4LJvXIXUhXYOluKEZWt61HiE=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\",\"request_id\":\"395a83f3f28a490bac19e147b5fb6716\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1361", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f557f90f-c275-4423-a94a-d8ac9c84bc1e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"x5t\":\"oyXw8yEZbQlHAKK-_NXovTr02xw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQF4ES5YqtRKOrwjCO27ldpzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVMV44aW40HxBZB6JKwZlKRdsKkVZ7U+J3D/AA5YKlmZgmX4iV+jZGlzONrH1WQuQTOnJ+xHQClk31aaWe7rvmycBvHML/SJopCKb67bHw7idd427XVjmY6sxeqlO+GBHg94fCuP31VM9x7gkSvSyl9xtjrjW670G/lhth1iCTqD42kQv7x/I4IMukCeU47+lyUBBscM2FPTA5s4XyT7pGTwJJjJ/jfoWyiBO3BFi1I5XhoZzTCx162lAktFSqZOGecvt5H122tVQZnjHQwW5WbHPvD3HPtrVrl25Hx85Y60VaqZv64xmfLludvg036+jz54phFJQNZcZABdWsRfplAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYOad6rnbch2d4ZmFQeIaoa1ycLDAdBgNVHQ4EFgQUGDmneq523IdneGZhUHiGqGtcnCwwDQYJKoZIhvcNAQELBQADggEBAK2TRxvKkRuALnr7thIBIVVgTs8+nbaBT4CVwsVQ+eH+XsRD9p/CUjOdhM9kv7zFu8sn0xwt3pDzyQE6GU+clvB3DqufaN1HSfTojv4OtrDbxekZKQY42HeMzhnH/eNeJgwy+0GECEMXHNIhTIG7VkPqgY+jEvrTk6zOSxUJPRYvxY15W6bGk9qSiNIj8klus1+kaKOdV9rCuJsa90AFCfc2yxIksHg7AyKDYdXQadDeL9iYH+oXiMXa8ho3GfUXcG5A3o0vw/5V5fpur7hN7EpXJhgStmktbjQZ6Njp7oceSsT12bemgYMb4eX+UYyKm4dU9DBkQEZckGOI+AmvHfg=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2725", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a736e0e7-b032-4b08-9ffa-96ab78c18122", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590498657,\"scheduledPurgeDate\":1598274657,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"x5t\":\"oyXw8yEZbQlHAKK-_NXovTr02xw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQF4ES5YqtRKOrwjCO27ldpzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVMV44aW40HxBZB6JKwZlKRdsKkVZ7U+J3D/AA5YKlmZgmX4iV+jZGlzONrH1WQuQTOnJ+xHQClk31aaWe7rvmycBvHML/SJopCKb67bHw7idd427XVjmY6sxeqlO+GBHg94fCuP31VM9x7gkSvSyl9xtjrjW670G/lhth1iCTqD42kQv7x/I4IMukCeU47+lyUBBscM2FPTA5s4XyT7pGTwJJjJ/jfoWyiBO3BFi1I5XhoZzTCx162lAktFSqZOGecvt5H122tVQZnjHQwW5WbHPvD3HPtrVrl25Hx85Y60VaqZv64xmfLludvg036+jz54phFJQNZcZABdWsRfplAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYOad6rnbch2d4ZmFQeIaoa1ycLDAdBgNVHQ4EFgQUGDmneq523IdneGZhUHiGqGtcnCwwDQYJKoZIhvcNAQELBQADggEBAK2TRxvKkRuALnr7thIBIVVgTs8+nbaBT4CVwsVQ+eH+XsRD9p/CUjOdhM9kv7zFu8sn0xwt3pDzyQE6GU+clvB3DqufaN1HSfTojv4OtrDbxekZKQY42HeMzhnH/eNeJgwy+0GECEMXHNIhTIG7VkPqgY+jEvrTk6zOSxUJPRYvxY15W6bGk9qSiNIj8klus1+kaKOdV9rCuJsa90AFCfc2yxIksHg7AyKDYdXQadDeL9iYH+oXiMXa8ho3GfUXcG5A3o0vw/5V5fpur7hN7EpXJhgStmktbjQZ6Njp7oceSsT12bemgYMb4eX+UYyKm4dU9DBkQEZckGOI+AmvHfg=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2952", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "82b956df-b3d1-4335-b5c7-14704ae233ba", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bcb03c6c-1e90-464b-b29b-2838bbf1d2c0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7be88227-217c-4549-b4bd-dd02c2b1fe15", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:59 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "98b4a153-d2e1-41ea-8d7c-f8f9dc80648c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:01 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3aadd1b8-483b-49b8-99a7-b1e7b72e80e1", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:03 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5c170cd1-0d94-40c9-8b2a-ae6d5a4f684e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:05 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1798cf47-6296-4436-89e5-379d934ad696", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:07 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7f70f12a-2e87-4aef-b4c5-acb4ca5efe52", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "247df118-fd28-42a7-b18b-9d3496af7e72", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "175", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d0c2d990-ac34-4da5-b017-ccb2c7386dc1", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590498657,\"scheduledPurgeDate\":1598274657,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/3b06f091d46447b0bbb68022232b2338\",\"x5t\":\"oyXw8yEZbQlHAKK-_NXovTr02xw\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQF4ES5YqtRKOrwjCO27ldpzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTMwMDQwWhcNMjEwNTI2MTMxMDQwWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVMV44aW40HxBZB6JKwZlKRdsKkVZ7U+J3D/AA5YKlmZgmX4iV+jZGlzONrH1WQuQTOnJ+xHQClk31aaWe7rvmycBvHML/SJopCKb67bHw7idd427XVjmY6sxeqlO+GBHg94fCuP31VM9x7gkSvSyl9xtjrjW670G/lhth1iCTqD42kQv7x/I4IMukCeU47+lyUBBscM2FPTA5s4XyT7pGTwJJjJ/jfoWyiBO3BFi1I5XhoZzTCx162lAktFSqZOGecvt5H122tVQZnjHQwW5WbHPvD3HPtrVrl25Hx85Y60VaqZv64xmfLludvg036+jz54phFJQNZcZABdWsRfplAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYOad6rnbch2d4ZmFQeIaoa1ycLDAdBgNVHQ4EFgQUGDmneq523IdneGZhUHiGqGtcnCwwDQYJKoZIhvcNAQELBQADggEBAK2TRxvKkRuALnr7thIBIVVgTs8+nbaBT4CVwsVQ+eH+XsRD9p/CUjOdhM9kv7zFu8sn0xwt3pDzyQE6GU+clvB3DqufaN1HSfTojv4OtrDbxekZKQY42HeMzhnH/eNeJgwy+0GECEMXHNIhTIG7VkPqgY+jEvrTk6zOSxUJPRYvxY15W6bGk9qSiNIj8klus1+kaKOdV9rCuJsa90AFCfc2yxIksHg7AyKDYdXQadDeL9iYH+oXiMXa8ho3GfUXcG5A3o0vw/5V5fpur7hN7EpXJhgStmktbjQZ6Njp7oceSsT12bemgYMb4eX+UYyKm4dU9DBkQEZckGOI+AmvHfg=\",\"attributes\":{\"enabled\":true,\"nbf\":1590498040,\"exp\":1622034640,\"created\":1590498640,\"updated\":1590498640,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498626,\"updated\":1590498626}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2952", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:11:14 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7e3284a7-a733-410d-bb45-2c441a9ce018", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Tue, 26 May 2020 13:11:14 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "81da80a6-99bb-456e-82b6-636a2e3e327f", + "x-powered-by": "ASP.NET" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "49ed560f6dd5224c4cb0372f9cda8e82" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json index 405b4f989923..b1e12cdd9b78 100644 --- a/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "POST", - "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/create", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/create", "query": { "api-version": "7.1-preview" }, @@ -13,19 +13,18 @@ "cache-control": "no-cache", "content-length": "87", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:13 GMT", + "date": "Tue, 26 May 2020 13:09:32 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "401", "strict-transport-security": "max-age=31536000;includeSubDomains", "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2262c3da-01d8-41ff-a8b5-a84a2b1988c6", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3f662740-1862-4da8-a712-fc1e51d283f0", "x-powered-by": "ASP.NET" } }, @@ -40,695 +39,1087 @@ "cache-control": "no-cache, no-store", "content-length": "1315", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:13 GMT", + "date": "Tue, 26 May 2020 13:09:33 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10519.7 - EUS ProdSlices", - "x-ms-request-id": "045ed163-9c6b-4ef0-9cd0-48a594fa2a00" + "x-ms-ests-server": "2.1.10571.11 - EUS ProdSlices", + "x-ms-request-id": "f09b584b-ce27-42cf-b030-b341a9defe00" } }, { "method": "POST", - "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/create", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/create", "query": { "api-version": "7.1-preview" }, "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", "status": 202, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAru56tUcmXli/Tsm2XOwHE7MhCyhoD5K042WJ/CFlz+F+JI9lQspK4pHHBkvmh5QGAKEHhG5vbCxe0LpicbZ3brE84EUic4SitAjIcFvCgNDk8rB2LWmNXMJjedo4wFQuKw75E8ns9+F7PAQPnEYVR+TXhqCqChuGUl0An9EJQ1gxnmonWaYJu9RYNV8Pp3px6g9lSe3hibMuGp0ZhDiLgCN3I23IS/zIicaV28fjuKfqmZTiB6F2Yjybda5tQTMR62Wfbmlzaod058CbvOo7+tTvgBG1PQFzL7IuXgXVWRkZMEucVC1dInntppdbsJeGfn3xlz53eQdlhAADvTjBlQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHpokwrOc3CU+234WgWkc2lDeVT/aV4XYrT6caEakqWofpLP+wA2sRGEMu33aHky/0n8vEluzNDZ7uQjBHsrc1iUOQnt4/8jujnv0sr8AnGxXFU3PAiYEjtGwBUlmUXmwreK/o+PNFb1i9AAjfTxQr7TgWQuTyTJ5mn/2EpER6BzpGdHF7FXMfo5NFWnGk7i0yLaSILFCGtK2ZE9X67KHEqbORyyqiadiFUtmqAJ8V9I3N+5/PLaksWC6GBj5EmdSmHZAZ2y/QsPFIaM+aiJK4RBwa9NO8dWdwyDPOtFuNtC3UkSaEtzpgAhYqBlReAn80rXaAgw9ogCnQG79XnAWRg=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"5c877975ea8847489d2c9c4e99a871e9\"}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1369", + "content-length": "1378", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:14 GMT", + "date": "Tue, 26 May 2020 13:09:33 GMT", "expires": "-1", - "location": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending?api-version=7.1-preview&request_id=5c877975ea8847489d2c9c4e99a871e9", + "location": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending?api-version=7.1-preview&request_id=4e1cec15d38b461190028d8c963aaef8", "pragma": "no-cache", "retry-after": "10", - "server": "Microsoft-IIS/10.0", "status": "202", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "69ef03f8-a6b5-4c20-97b4-fbe43d20aec2", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b16c98e4-7917-4137-b2a9-d34cf8701754", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAru56tUcmXli/Tsm2XOwHE7MhCyhoD5K042WJ/CFlz+F+JI9lQspK4pHHBkvmh5QGAKEHhG5vbCxe0LpicbZ3brE84EUic4SitAjIcFvCgNDk8rB2LWmNXMJjedo4wFQuKw75E8ns9+F7PAQPnEYVR+TXhqCqChuGUl0An9EJQ1gxnmonWaYJu9RYNV8Pp3px6g9lSe3hibMuGp0ZhDiLgCN3I23IS/zIicaV28fjuKfqmZTiB6F2Yjybda5tQTMR62Wfbmlzaod058CbvOo7+tTvgBG1PQFzL7IuXgXVWRkZMEucVC1dInntppdbsJeGfn3xlz53eQdlhAADvTjBlQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHpokwrOc3CU+234WgWkc2lDeVT/aV4XYrT6caEakqWofpLP+wA2sRGEMu33aHky/0n8vEluzNDZ7uQjBHsrc1iUOQnt4/8jujnv0sr8AnGxXFU3PAiYEjtGwBUlmUXmwreK/o+PNFb1i9AAjfTxQr7TgWQuTyTJ5mn/2EpER6BzpGdHF7FXMfo5NFWnGk7i0yLaSILFCGtK2ZE9X67KHEqbORyyqiadiFUtmqAJ8V9I3N+5/PLaksWC6GBj5EmdSmHZAZ2y/QsPFIaM+aiJK4RBwa9NO8dWdwyDPOtFuNtC3UkSaEtzpgAhYqBlReAn80rXaAgw9ogCnQG79XnAWRg=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"5c877975ea8847489d2c9c4e99a871e9\"}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1369", + "content-length": "1378", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:14 GMT", + "date": "Tue, 26 May 2020 13:09:33 GMT", "expires": "-1", "pragma": "no-cache", "retry-after": "10", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "9eaddbb1-905c-4a6e-89f4-36aa1815299d", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f7dc735d-7a10-40fe-9995-4b2dde667eb6", "x-powered-by": "ASP.NET" } }, { - "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\",\"deletedDate\":1588821615,\"scheduledPurgeDate\":1596597615,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/47260ca3e5e744348f671259b3aa4b25\",\"attributes\":{\"enabled\":false,\"nbf\":1588821014,\"exp\":1620357614,\"created\":1588821614,\"updated\":1588821614,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588821614,\"updated\":1588821614}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending\"}}", + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1467", + "content-length": "1378", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:14 GMT", + "date": "Tue, 26 May 2020 13:09:33 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", + "retry-after": "10", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "58d71d8f-3583-459d-b828-258f5f6478db", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6b4ff362-eece-4cfb-95fe-62e4d69f456b", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending", "query": { "api-version": "7.1-preview" }, "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "1378", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:14 GMT", + "date": "Tue, 26 May 2020 13:09:36 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", + "retry-after": "10", + "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "ff54885d-51ca-47c9-b80c-714cf8df2385", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a6f5a253-c9cc-4684-b788-9ab643dc865c", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending", "query": { "api-version": "7.1-preview" }, "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "1378", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:15 GMT", + "date": "Tue, 26 May 2020 13:09:38 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", + "retry-after": "10", + "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8d66d0ad-cf75-49d5-9c82-8ec0586023f2", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a67b5289-aefa-48e0-91f0-1f08f556f422", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending", "query": { "api-version": "7.1-preview" }, "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvy2zIufpofKJeCUmO+f06a3EH1kDe150ZMEkiIUv0x5Hoxa/8DjXQ4PhJDNMDqIpQNZch/PTk4bi9NkXifGUi0HPUXL8wFBA9Amdi9KwgdYa1Qg1cxqbUtQQRPF+eKKO844MLjWkeuC7hHTdZh12+aXwglU5RJAu+rKahRp9J4Lb8XBc9STk8GP9hpoeaHSdJZwyZP1H3OOmiwPxV0mFV419HwZ0xmcKguw1rXtmoUqLHbTqt+CPcMMaNKmCKQN61CtmsCaIfXZBc4TvQOm3UjkmbWNXlrfU4+9e7xQV63zUbns+WWFv+tTACRhT/jL3YPBJhcXs9yznQjS2M1603QIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFMFMERVhR3Grz2aGQzUxEXZ9/241GBK1qtP7d/9dvuxNd0dPW3ywcs3gg059D4fFwt5HEHvTH68wWXwQd4FDgWl6YWE7e7sGFTJcMVUjrdD7U+rG0ipunAZQoEsmOPfvmRPHFs+MqlhHxpJfREJ0CMita1ztYMWFDuCSpQZId8ik0lZBv56itgjcKJX1pQ+xUUfslCfkWmjWRlS1Umajv+qpwB5UAGNd+2V8YtKmIzgZMKmkd59qQvmhcomfbQWn9BBycIMuzcporj7C+CsA6z/Yl65qUUbp1Vs/8ebUXNSkj2QDPUi4pJNnpcm8fF/j55mF9y8n/Ab4OGASDpnKjs=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"request_id\":\"4e1cec15d38b461190028d8c963aaef8\"}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "1383", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:16 GMT", + "date": "Tue, 26 May 2020 13:09:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", + "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "ff2d4092-a667-4dfd-9b2e-5fe5abe20860", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1cd19dc9-3d85-4597-bfd5-5a334148732c", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/", "query": { "api-version": "7.1-preview" }, "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"x5t\":\"jxOaW4U3NViPIj2J5Ew58w3aft8\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQMHdqDTYuR9icSWodGfgQrDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTM5WhcNMjEwNTI2MTMwOTM5WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/LbMi5+mh8ol4JSY75/TprcQfWQN7XnRkwSSIhS/THkejFr/wONdDg+EkM0wOoilA1lyH89OThuL02ReJ8ZSLQc9RcvzAUED0CZ2L0rCB1hrVCDVzGptS1BBE8X54oo7zjgwuNaR64LuEdN1mHXb5pfCCVTlEkC76spqFGn0ngtvxcFz1JOTwY/2Gmh5odJ0lnDJk/Ufc46aLA/FXSYVXjX0fBnTGZwqC7DWte2ahSosdtOq34I9wwxo0qYIpA3rUK2awJoh9dkFzhO9A6bdSOSZtY1eWt9Tj717vFBXrfNRuez5ZYW/61MAJGFP+Mvdg8EmFxez3LOdCNLYzXrTdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTAJO4jH5p87Rw9OlmAu9cORkuPATAdBgNVHQ4EFgQUwCTuIx+afO0cPTpZgLvXDkZLjwEwDQYJKoZIhvcNAQELBQADggEBABYPILDVuE//O/EagvDsvmCduNs11HfWogfiQMMjnV0pzv+xZgOstAziu/hIMsZtDzjV5F1ZJtTzt8n3xOyI10tX6cDXtBevgPeTJYwtqCwWmJOe6HmI9cFEaSMQ0/8iG5ZFzyubACreg/dWEuk6axWle+y4MheIFhcw6a6BPN5habaxXv1g17JyFZkOq9yCG0Ed34L0InlRDT7CCwA0+fCW1FwNPxQz0obCwyn1KzwokxSjIg+CJuMs3ELu9aDP/jIIo+0cR4+jRnRx8G1RNPAhOm8q28r6yas0o583Wff1z7BdB77OpfKGQ0qlilKnjUJ1Uunve30Buezd+apGsDw=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497979,\"exp\":1622034579,\"created\":1590498579,\"updated\":1590498579,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498573,\"updated\":1590498573}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "2780", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:18 GMT", + "date": "Tue, 26 May 2020 13:09:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e991f7a6-8a32-4348-a093-bc528afb0aa7", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"policy\":{\"key_props\":{},\"secret_props\":{},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{}},\"issuer\":{\"name\":\"Self\"},\"attributes\":{}},\"attributes\":{}}", + "status": 202, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:41 GMT", + "expires": "-1", + "location": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending?api-version=7.1-preview&request_id=080e46565ad44ef087be67689ae2cfca", + "pragma": "no-cache", + "retry-after": "10", + "status": "202", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "604a1c4c-b9d2-4964-b159-b1c1d276c29f", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:41 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "8ee43855-158d-47f9-a258-0cea050f0b3e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:41 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "378a8608-3fca-4c58-b711-205db5f12120", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:43 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "efb8a1b3-8d2d-43ea-9b9c-78277fda4ae6", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:45 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "76cc2636-33e0-403c-aadd-bfff48f9116a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:47 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "07dc8cdc-06b3-4e2f-9db0-2227c714f925", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:49 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e2537e29-ff35-4d09-9424-dcbd7f318a49", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:51 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "b772bc38-65b3-459b-9144-70040c9f51a1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "04eee6b3-232a-4a99-a1d3-218e453f838d", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"inProgress\",\"status_details\":\"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1378", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:53 GMT", + "expires": "-1", + "pragma": "no-cache", + "retry-after": "10", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7c368b98-f8a4-4150-b651-d075b8a07eae", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\",\"issuer\":{\"name\":\"Self\"},\"csr\":\"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuuJI6p+748dQmIKG7/BPsG4ert8y3iGY/lkj6Tq4ITajF6Nb/2mXQL+RNtaGjw8XvlAX+G3m1KDMrd+a3hnknvKFGR0qz0swuoyh+mRdhCt3VIv+u1egC8TizRUMBGmWFEwVRoMfvUqsMpmiHKWhTk0kf6VevnvN1XbBVBlDf+HB+ICkJwFz8fTWEimPoTIAv1B6bIoSBJzt7qgXycBBtPBznwd7MehMSy7uPqVDhStZT2t3BLUdz2CL9ccYF5LipjDdWuSsCztQieuaqWfQgUcOZJL9atujKRCg2noO3pYWMMEXd/Y5/GlR0K6BH/JEuQ0f90vxot8bXdEHxqAhmQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJ9Ns8AX8Nd278aL8tjV9+FWbQoYFcfoP3WZQ3KDGTtVxQGUMkzdSjr3KeRBdWqdBtCvbfCAqZkfuttfewyeNpZUaPYxd8dkI8TI74fJZegE3Cn7Pmwv0qucSfIGJp+1bFH/XCTqkayQateHzVwv5dShEPlMwJgonxp6hUiAMUufmPlcOSRK7FVUiL68x0TrRrjdSM4V2iYjwUhCa34+cLQtxWHJgH0s4dCr8BMhgUY1ne7SyrBkh9DTTD2qEPP4KYRb32CBsVQrBxwDG4EmM1qe99THVP58uwK0jepM9nlfjIj92aBUzcaEm0GBj/i6447GR+xAagXZcX5uGg6skDQ=\",\"cancellation_requested\":false,\"status\":\"completed\",\"target\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"request_id\":\"080e46565ad44ef087be67689ae2cfca\"}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "1383", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:55 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c942aa0c-a156-4a2f-9753-311e8faf2e3e", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"x5t\":\"x3yMSvhnNQeg_fsr64wQUfLAVh0\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQcTLCo5vzSvyTGbqybCWX6zANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTU0WhcNMjEwNTI2MTMwOTU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC64kjqn7vjx1CYgobv8E+wbh6u3zLeIZj+WSPpOrghNqMXo1v/aZdAv5E21oaPDxe+UBf4bebUoMyt35reGeSe8oUZHSrPSzC6jKH6ZF2EK3dUi/67V6ALxOLNFQwEaZYUTBVGgx+9SqwymaIcpaFOTSR/pV6+e83VdsFUGUN/4cH4gKQnAXPx9NYSKY+hMgC/UHpsihIEnO3uqBfJwEG08HOfB3sx6ExLLu4+pUOFK1lPa3cEtR3PYIv1xxgXkuKmMN1a5KwLO1CJ65qpZ9CBRw5kkv1q26MpEKDaeg7elhYwwRd39jn8aVHQroEf8kS5DR/3S/Gi3xtd0QfGoCGZAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQykyl3BoopGrEPATLYFNHHTKcmwzAdBgNVHQ4EFgQUMpMpdwaKKRqxDwEy2BTRx0ynJsMwDQYJKoZIhvcNAQELBQADggEBAGeaSriQQ4yQNscYp2+UjI0taSVWq7iXQqpBv3ZJ/99VqetPUbG1DIDdWCS/Zx0ZJ4lwOKD/uePZtF98qLbV1g6A/9j9lTGOoYgMLy+W3CgPHw66oQzjts5paJ4qvi6AGxwtjknBtbxSiekoiGHCqvyc0MzkQryczyNsi5mSgVLcSGx0KfWno4TRdDiQKtcEIdtb5PvS0cVt4pAAr/CihUqS2taBEBAgHPbJsCJSYGpPPS+CmXoiWCzLYDUWI4Ffzsk5/uIsFn3SLM1H1LI4HQ4QbxEx/dxGg4BkEiIlrgrrlp6FDlwzZd89gknV1lpKsgmPdAAW582iUsfEqCovtCE=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497994,\"exp\":1622034594,\"created\":1590498594,\"updated\":1590498594,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498581,\"updated\":1590498581}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "2780", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:55 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4be74afb-9b6e-4f65-b35e-caa6ab543ef2", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590498596,\"scheduledPurgeDate\":1598274596,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"x5t\":\"jxOaW4U3NViPIj2J5Ew58w3aft8\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQMHdqDTYuR9icSWodGfgQrDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTM5WhcNMjEwNTI2MTMwOTM5WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/LbMi5+mh8ol4JSY75/TprcQfWQN7XnRkwSSIhS/THkejFr/wONdDg+EkM0wOoilA1lyH89OThuL02ReJ8ZSLQc9RcvzAUED0CZ2L0rCB1hrVCDVzGptS1BBE8X54oo7zjgwuNaR64LuEdN1mHXb5pfCCVTlEkC76spqFGn0ngtvxcFz1JOTwY/2Gmh5odJ0lnDJk/Ufc46aLA/FXSYVXjX0fBnTGZwqC7DWte2ahSosdtOq34I9wwxo0qYIpA3rUK2awJoh9dkFzhO9A6bdSOSZtY1eWt9Tj717vFBXrfNRuez5ZYW/61MAJGFP+Mvdg8EmFxez3LOdCNLYzXrTdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTAJO4jH5p87Rw9OlmAu9cORkuPATAdBgNVHQ4EFgQUwCTuIx+afO0cPTpZgLvXDkZLjwEwDQYJKoZIhvcNAQELBQADggEBABYPILDVuE//O/EagvDsvmCduNs11HfWogfiQMMjnV0pzv+xZgOstAziu/hIMsZtDzjV5F1ZJtTzt8n3xOyI10tX6cDXtBevgPeTJYwtqCwWmJOe6HmI9cFEaSMQ0/8iG5ZFzyubACreg/dWEuk6axWle+y4MheIFhcw6a6BPN5habaxXv1g17JyFZkOq9yCG0Ed34L0InlRDT7CCwA0+fCW1FwNPxQz0obCwyn1KzwokxSjIg+CJuMs3ELu9aDP/jIIo+0cR4+jRnRx8G1RNPAhOm8q28r6yas0o583Wff1z7BdB77OpfKGQ0qlilKnjUJ1Uunve30Buezd+apGsDw=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497979,\"exp\":1622034579,\"created\":1590498579,\"updated\":1590498579,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498573,\"updated\":1590498573}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "3018", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:09:55 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5346ae9f-2e59-435c-84ab-101e68fc9dd3", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:20 GMT", + "date": "Tue, 26 May 2020 13:09:56 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "470a1527-0ca1-4164-b3eb-d95fe3c0d96d", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ede462ff-dea3-4780-bec0-c95d68da9ca7", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:23 GMT", + "date": "Tue, 26 May 2020 13:09:56 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "bc5fa133-5eac-4b2f-8bd6-99fdea547b38", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c99c528c-e199-4848-9166-e2d7015cedb5", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:25 GMT", + "date": "Tue, 26 May 2020 13:09:57 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "307c9003-cb19-4e5f-af11-d881b6bb69df", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f72d81fb-5439-4607-a1af-3418c9561dbf", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:27 GMT", + "date": "Tue, 26 May 2020 13:09:59 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "37fc42b8-4d80-4537-9dad-43876c73ee3e", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c9bbbb96-623b-46be-b96f-6cc857a86930", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:29 GMT", + "date": "Tue, 26 May 2020 13:10:01 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a42e4a06-a477-4cf7-aba3-c529a803e2e1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7647b33c-bde8-4e7e-9c33-e949ac7af960", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:31 GMT", + "date": "Tue, 26 May 2020 13:10:03 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c2174319-18c1-433f-bf72-b1d451985d84", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3f3ee2fc-8832-427d-973f-187895b52f16", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:33 GMT", + "date": "Tue, 26 May 2020 13:10:05 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "fd242d77-f307-4b77-b351-2bc5e3696862", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c268a109-5bca-4f62-a199-2877b1ea117b", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:35 GMT", + "date": "Tue, 26 May 2020 13:10:08 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e205d3e7-fa97-4b27-a50f-3d16861bcf8c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590498596,\"scheduledPurgeDate\":1598274596,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/a205dd7cbba4443d88cbc6e7ad343685\",\"x5t\":\"jxOaW4U3NViPIj2J5Ew58w3aft8\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQMHdqDTYuR9icSWodGfgQrDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTM5WhcNMjEwNTI2MTMwOTM5WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/LbMi5+mh8ol4JSY75/TprcQfWQN7XnRkwSSIhS/THkejFr/wONdDg+EkM0wOoilA1lyH89OThuL02ReJ8ZSLQc9RcvzAUED0CZ2L0rCB1hrVCDVzGptS1BBE8X54oo7zjgwuNaR64LuEdN1mHXb5pfCCVTlEkC76spqFGn0ngtvxcFz1JOTwY/2Gmh5odJ0lnDJk/Ufc46aLA/FXSYVXjX0fBnTGZwqC7DWte2ahSosdtOq34I9wwxo0qYIpA3rUK2awJoh9dkFzhO9A6bdSOSZtY1eWt9Tj717vFBXrfNRuez5ZYW/61MAJGFP+Mvdg8EmFxez3LOdCNLYzXrTdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTAJO4jH5p87Rw9OlmAu9cORkuPATAdBgNVHQ4EFgQUwCTuIx+afO0cPTpZgLvXDkZLjwEwDQYJKoZIhvcNAQELBQADggEBABYPILDVuE//O/EagvDsvmCduNs11HfWogfiQMMjnV0pzv+xZgOstAziu/hIMsZtDzjV5F1ZJtTzt8n3xOyI10tX6cDXtBevgPeTJYwtqCwWmJOe6HmI9cFEaSMQ0/8iG5ZFzyubACreg/dWEuk6axWle+y4MheIFhcw6a6BPN5habaxXv1g17JyFZkOq9yCG0Ed34L0InlRDT7CCwA0+fCW1FwNPxQz0obCwyn1KzwokxSjIg+CJuMs3ELu9aDP/jIIo+0cR4+jRnRx8G1RNPAhOm8q28r6yas0o583Wff1z7BdB77OpfKGQ0qlilKnjUJ1Uunve30Buezd+apGsDw=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497979,\"exp\":1622034579,\"created\":1590498579,\"updated\":1590498579,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498573,\"updated\":1590498573}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "3018", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:09 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7d67a0bc-fb45-4359-af31-73bc687dd3fb", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Tue, 26 May 2020 13:10:09 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "48d4522e-e045-4946-a78b-f88acfe12d43", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590498610,\"scheduledPurgeDate\":1598274610,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"x5t\":\"x3yMSvhnNQeg_fsr64wQUfLAVh0\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQcTLCo5vzSvyTGbqybCWX6zANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTU0WhcNMjEwNTI2MTMwOTU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC64kjqn7vjx1CYgobv8E+wbh6u3zLeIZj+WSPpOrghNqMXo1v/aZdAv5E21oaPDxe+UBf4bebUoMyt35reGeSe8oUZHSrPSzC6jKH6ZF2EK3dUi/67V6ALxOLNFQwEaZYUTBVGgx+9SqwymaIcpaFOTSR/pV6+e83VdsFUGUN/4cH4gKQnAXPx9NYSKY+hMgC/UHpsihIEnO3uqBfJwEG08HOfB3sx6ExLLu4+pUOFK1lPa3cEtR3PYIv1xxgXkuKmMN1a5KwLO1CJ65qpZ9CBRw5kkv1q26MpEKDaeg7elhYwwRd39jn8aVHQroEf8kS5DR/3S/Gi3xtd0QfGoCGZAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQykyl3BoopGrEPATLYFNHHTKcmwzAdBgNVHQ4EFgQUMpMpdwaKKRqxDwEy2BTRx0ynJsMwDQYJKoZIhvcNAQELBQADggEBAGeaSriQQ4yQNscYp2+UjI0taSVWq7iXQqpBv3ZJ/99VqetPUbG1DIDdWCS/Zx0ZJ4lwOKD/uePZtF98qLbV1g6A/9j9lTGOoYgMLy+W3CgPHw66oQzjts5paJ4qvi6AGxwtjknBtbxSiekoiGHCqvyc0MzkQryczyNsi5mSgVLcSGx0KfWno4TRdDiQKtcEIdtb5PvS0cVt4pAAr/CihUqS2taBEBAgHPbJsCJSYGpPPS+CmXoiWCzLYDUWI4Ffzsk5/uIsFn3SLM1H1LI4HQ4QbxEx/dxGg4BkEiIlrgrrlp6FDlwzZd89gknV1lpKsgmPdAAW582iUsfEqCovtCE=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497994,\"exp\":1622034594,\"created\":1590498594,\"updated\":1590498594,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498581,\"updated\":1590498581}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "3018", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 13:10:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "06a5123b-e952-462d-afc8-134cc68b1f94", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "701f1d5f-c16d-42de-a51f-db813e394a2a", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:37 GMT", + "date": "Tue, 26 May 2020 13:10:10 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5b05e8c0-0e51-4a75-b994-532783ff69bb", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7aed5765-281f-4ace-8469-c447ff610e6a", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:39 GMT", + "date": "Tue, 26 May 2020 13:10:10 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "638872fa-e7d3-470d-96f3-3340e624e524", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0760686c-6a22-4c2d-8bb0-22feaee326d0", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:41 GMT", + "date": "Tue, 26 May 2020 13:10:13 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2b80b0b8-f321-4602-a677-b38b6108ab5d", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7f836e2a-c652-460c-bbbf-bff5edce4ca0", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:43 GMT", + "date": "Tue, 26 May 2020 13:10:14 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "6c99cabf-3512-4dae-b2e2-4fc57e019cb8", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b9887dce-e7e9-4198-a694-1c22aef54a0f", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:45 GMT", + "date": "Tue, 26 May 2020 13:10:16 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a3686efb-2d85-4056-a183-2fa5082f91d1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "15ef01ed-afe5-46f5-88f5-c04cd78e22a5", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:47 GMT", + "date": "Tue, 26 May 2020 13:10:18 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "99d2bae3-b0d9-48d1-97c5-26d7b16aab83", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2d83af19-0a21-407d-9be0-232722628bf2", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:50 GMT", + "date": "Tue, 26 May 2020 13:10:21 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "39aa0642-043a-4d2b-909b-7f3cb3220833", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "769aca92-7816-4f76-8965-de899c5337ec", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\"}}", + "response": "{\"error\":{\"code\":\"CertificateNotFound\",\"message\":\"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "177", + "content-length": "186", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:52 GMT", + "date": "Tue, 26 May 2020 13:10:23 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8378d2d7-46f4-42e1-b5ae-2843b78fd59c", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0a326e54-5982-4572-b665-65cf30a12189", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined\",\"deletedDate\":1588821615,\"scheduledPurgeDate\":1596597615,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/47260ca3e5e744348f671259b3aa4b25\",\"attributes\":{\"enabled\":false,\"nbf\":1588821014,\"exp\":1620357614,\"created\":1588821614,\"updated\":1588821614,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1588821614,\"updated\":1588821614}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending\"}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590498610,\"scheduledPurgeDate\":1598274610,\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"sid\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/62122e5ce6164b20afaec9fc785003d0\",\"x5t\":\"x3yMSvhnNQeg_fsr64wQUfLAVh0\",\"cer\":\"MIIDKDCCAhCgAwIBAgIQcTLCo5vzSvyTGbqybCWX6zANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1OTU0WhcNMjEwNTI2MTMwOTU0WjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC64kjqn7vjx1CYgobv8E+wbh6u3zLeIZj+WSPpOrghNqMXo1v/aZdAv5E21oaPDxe+UBf4bebUoMyt35reGeSe8oUZHSrPSzC6jKH6ZF2EK3dUi/67V6ALxOLNFQwEaZYUTBVGgx+9SqwymaIcpaFOTSR/pV6+e83VdsFUGUN/4cH4gKQnAXPx9NYSKY+hMgC/UHpsihIEnO3uqBfJwEG08HOfB3sx6ExLLu4+pUOFK1lPa3cEtR3PYIv1xxgXkuKmMN1a5KwLO1CJ65qpZ9CBRw5kkv1q26MpEKDaeg7elhYwwRd39jn8aVHQroEf8kS5DR/3S/Gi3xtd0QfGoCGZAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQykyl3BoopGrEPATLYFNHHTKcmwzAdBgNVHQ4EFgQUMpMpdwaKKRqxDwEy2BTRx0ynJsMwDQYJKoZIhvcNAQELBQADggEBAGeaSriQQ4yQNscYp2+UjI0taSVWq7iXQqpBv3ZJ/99VqetPUbG1DIDdWCS/Zx0ZJ4lwOKD/uePZtF98qLbV1g6A/9j9lTGOoYgMLy+W3CgPHw66oQzjts5paJ4qvi6AGxwtjknBtbxSiekoiGHCqvyc0MzkQryczyNsi5mSgVLcSGx0KfWno4TRdDiQKtcEIdtb5PvS0cVt4pAAr/CihUqS2taBEBAgHPbJsCJSYGpPPS+CmXoiWCzLYDUWI4Ffzsk5/uIsFn3SLM1H1LI4HQ4QbxEx/dxGg4BkEiIlrgrrlp6FDlwzZd89gknV1lpKsgmPdAAW582iUsfEqCovtCE=\",\"attributes\":{\"enabled\":true,\"nbf\":1590497994,\"exp\":1622034594,\"created\":1590498594,\"updated\":1590498594,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"policy\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy\",\"key_props\":{\"exportable\":true,\"kty\":\"RSA\",\"key_size\":2048,\"reuse_key\":false},\"secret_props\":{\"contentType\":\"application/x-pkcs12\"},\"x509_props\":{\"subject\":\"cn=MyCert\",\"sans\":{},\"ekus\":[\"1.3.6.1.5.5.7.3.1\",\"1.3.6.1.5.5.7.3.2\"],\"key_usage\":[\"digitalSignature\",\"keyEncipherment\"],\"validity_months\":12,\"basic_constraints\":{\"ca\":false}},\"lifetime_actions\":[{\"trigger\":{\"lifetime_percentage\":80},\"action\":{\"action_type\":\"AutoRenew\"}}],\"issuer\":{\"name\":\"Self\"},\"attributes\":{\"enabled\":true,\"created\":1590498581,\"updated\":1590498581}},\"pending\":{\"id\":\"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending\"}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "1467", + "content-length": "3018", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 03:20:54 GMT", + "date": "Tue, 26 May 2020 13:10:25 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f6e9f07c-6b95-4e06-bd33-a1da0cfb9899", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c4926ad8-74bb-4bd2-9108-8d84bbf8ec8a", "x-powered-by": "ASP.NET" } }, { "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined", + "url": "https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, @@ -737,18 +1128,17 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Thu, 07 May 2020 03:20:54 GMT", + "date": "Tue, 26 May 2020 13:10:25 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c6dc569f-2867-4b10-a5f9-8c97e3f8c7c1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "49045ca9-606d-4a7a-9a4b-38c35e0d5f3e", "x-powered-by": "ASP.NET" } } @@ -757,5 +1147,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "ada78cc1aafff4c80e377bfa89aae6da" + "hash": "50d392bb7e87e4b2371a030b5c0bdbd4" } \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..586d71d82525 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "ff0b4abcb6cc025b836139455eb0757a" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..eacc36b76da7 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "a9b6ad82f3782cabb0899a9f1f58db5d" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.js b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.js new file mode 100644 index 000000000000..7db51b4b7eb5 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate.js @@ -0,0 +1,1014 @@ +let nock = require('nock'); + +module.exports.hash = "292818f01c5ac558f9a432982a7bfae2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/recoverCertificateName-candisableacertificate-/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a46c6281-e0ec-4e14-a9a4-9dc95186f8ac', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:01 GMT' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + 'ac7be9c3-c96c-4071-be94-01c39ce30900', + 'x-ms-ests-server', + '2.1.10656.5 - WUS2 ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=As2SNxyetS1Evpi27lOew8M_aSJHAQAAAIlfYNYOAAAA; expires=Fri, 26-Jun-2020 13:18:02 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Wed, 27 May 2020 13:18:01 GMT', + 'Content-Length', + '1315' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/recoverCertificateName-candisableacertificate-/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .query(true) + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending?api-version=7.1-preview&request_id=e37f677a9b354a139c378071673d6e13', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bc21e71a-0048-4a3c-804f-005ae71f92d3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:02 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '7f73593d-0d42-4195-8cf9-347311ddbfe5', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:02 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8abbf2ac-0dd0-4218-908b-9accc9f114a6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:02 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1531378e-4970-48a3-a54b-e663285f2710', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:04 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f09bb5ca-2ccc-4f3f-8fdb-40f80bf5296c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:06 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b18eda00-dd81-40a2-bfa8-6dbbb0d62908', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:08 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bce8e50e-bf10-4c0c-82cf-dca3b3821279', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:10 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '68998ebe-8d7a-4d9b-bd85-e147cf3d259c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:12 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b2c2c0ed-aa1c-4d02-b09e-651a6e3db238', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:15 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '059be727-aebc-4c15-bf1b-c1356c0fbca6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:17 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '669982e6-4236-4a6f-91bf-be82a244a678', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:19 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c2505610-5309-4d45-8737-2522c9af3817', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:21 GMT', + 'Content-Length', + '1338' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuOda2PUv4OOLSXUqi764t5zKRl5a8hFeV7iDGC/lcgWY356QZe9DlbCuHWZsTQ8X9CJa0puDHRQQ7r7Ac50qalwSgT9NtEjoXoNoe5Ir0vYCpfFToHtYWWV8pQmRE96DrHgl8wXyECZvrF1OUtdL1xyrtT6lXyAEqEFgrBilu4JZW3PVfLlJSd69wK/JKaw/JfLv4uyS8MlWeMh2BIq03H5tUGesZelFM2zeOJgpLJJYJ3kYfM468Y5qf9eR2A7FU362Kuko4TpZwh5NLvcQ7O6zNMuS/qJgfXaXRKXUhHIDENq2amj5Selft2bFj7As1rlytdzaD7QzRZnBMiQDmwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHErgRW0yrpr0AAsCsJcHiLx20ML50NKJy0rvzFSS8fvwtvOlMAkUHJSmxp93HuDZB67t+ibVxHq6p5qju4yZS7cs6fP9uua2RYoKLnx05MgLuhvrPej5VGicNob8LTA+GlSjKrl09l8BKXUItPZmtxMdv0grD4Cq+NLELwyv3f0VE5oeo4bst9Om4BoeCgruCsJD530KP+5Z3PiOE6VRXaouIpAK9MGgVcBTNYlTHUXX4HPEYRgNWMtd6Qv+dfyOrIdHxM2bUgz7Bi9a4PdvbYXlz/NrSpVXd5Co7NjKe7TBxnlhYcjVXfxjtQbTNb0rbfdWDMCoQBxvTddlCHhJPk=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-","request_id":"e37f677a9b354a139c378071673d6e13"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '83885339-b9c6-47a2-bcf3-849715854d56', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT', + 'Content-Length', + '1303' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","x5t":"rnjuw18TqWex92xvwqYfH71iC_o","cer":"MIIDKDCCAhCgAwIBAgIQf1JriRdtT4yQl2Am3+f8EDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODIxWhcNMjEwNTI3MTMxODIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC451rY9S/g44tJdSqLvri3nMpGXlryEV5XuIMYL+VyBZjfnpBl70OVsK4dZmxNDxf0IlrSm4MdFBDuvsBznSpqXBKBP020SOheg2h7kivS9gKl8VOge1hZZXylCZET3oOseCXzBfIQJm+sXU5S10vXHKu1PqVfIASoQWCsGKW7gllbc9V8uUlJ3r3Ar8kprD8l8u/i7JLwyVZ4yHYEirTcfm1QZ6xl6UUzbN44mCksklgneRh8zjrxjmp/15HYDsVTfrYq6SjhOlnCHk0u9xDs7rM0y5L+omB9dpdEpdSEcgMQ2rZqaPlJ6V+3ZsWPsCzWuXK13NoPtDNFmcEyJAObAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQs86BZlbIcjpyRkpkYuEpRduV4WjAdBgNVHQ4EFgQULPOgWZWyHI6ckZKZGLhKUXbleFowDQYJKoZIhvcNAQELBQADggEBAKGu5VU7H9/108y+IgCcdtlaXjf67ljW1a5S2kIH91OKIU9ah2qHTI+lVI1DCSsSXlwsYVCFbPAXES/g7MSmFBU/7B1utZvcFjg3ZCpIOsl59RCqcO/tZFl9+DNgzY3k21FB6sK0H2ZmELoSYMrmy5FRFybNrQkJS4UrrjmLocFXAZMTKZfVjx+O+H7v9ttZ2YvfBCEc8xAuWybpdMMOMAElf9FA7wZjuEyWYkPbUXPXted0XRWcvu23iQirUXzOcCIFFMqEDlviZzGx5FYFS5BjkLhuTgZDZWRGCq2GEUpsaiOoTUYQS8apMQEj4fBaIaWKyjnveXbf4gcjKERyq/M=","attributes":{"enabled":true,"nbf":1590584901,"exp":1622121501,"created":1590585501,"updated":1590585501,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585482,"updated":1590585482}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '7559b87e-4e43-4290-9108-8e8b18dc6272', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT', + 'Content-Length', + '2580' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .patch('/certificates/recoverCertificateName-candisableacertificate-/', {"attributes":{"enabled":false}}) + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","x5t":"rnjuw18TqWex92xvwqYfH71iC_o","cer":"MIIDKDCCAhCgAwIBAgIQf1JriRdtT4yQl2Am3+f8EDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODIxWhcNMjEwNTI3MTMxODIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC451rY9S/g44tJdSqLvri3nMpGXlryEV5XuIMYL+VyBZjfnpBl70OVsK4dZmxNDxf0IlrSm4MdFBDuvsBznSpqXBKBP020SOheg2h7kivS9gKl8VOge1hZZXylCZET3oOseCXzBfIQJm+sXU5S10vXHKu1PqVfIASoQWCsGKW7gllbc9V8uUlJ3r3Ar8kprD8l8u/i7JLwyVZ4yHYEirTcfm1QZ6xl6UUzbN44mCksklgneRh8zjrxjmp/15HYDsVTfrYq6SjhOlnCHk0u9xDs7rM0y5L+omB9dpdEpdSEcgMQ2rZqaPlJ6V+3ZsWPsCzWuXK13NoPtDNFmcEyJAObAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQs86BZlbIcjpyRkpkYuEpRduV4WjAdBgNVHQ4EFgQULPOgWZWyHI6ckZKZGLhKUXbleFowDQYJKoZIhvcNAQELBQADggEBAKGu5VU7H9/108y+IgCcdtlaXjf67ljW1a5S2kIH91OKIU9ah2qHTI+lVI1DCSsSXlwsYVCFbPAXES/g7MSmFBU/7B1utZvcFjg3ZCpIOsl59RCqcO/tZFl9+DNgzY3k21FB6sK0H2ZmELoSYMrmy5FRFybNrQkJS4UrrjmLocFXAZMTKZfVjx+O+H7v9ttZ2YvfBCEc8xAuWybpdMMOMAElf9FA7wZjuEyWYkPbUXPXted0XRWcvu23iQirUXzOcCIFFMqEDlviZzGx5FYFS5BjkLhuTgZDZWRGCq2GEUpsaiOoTUYQS8apMQEj4fBaIaWKyjnveXbf4gcjKERyq/M=","attributes":{"enabled":false,"nbf":1590584901,"exp":1622121501,"created":1590585501,"updated":1590585503,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585482,"updated":1590585482}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '10e1720c-a461-49b6-b9ec-8fc37a1e0e7c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT', + 'Content-Length', + '2581' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificate-/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","x5t":"rnjuw18TqWex92xvwqYfH71iC_o","cer":"MIIDKDCCAhCgAwIBAgIQf1JriRdtT4yQl2Am3+f8EDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODIxWhcNMjEwNTI3MTMxODIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC451rY9S/g44tJdSqLvri3nMpGXlryEV5XuIMYL+VyBZjfnpBl70OVsK4dZmxNDxf0IlrSm4MdFBDuvsBznSpqXBKBP020SOheg2h7kivS9gKl8VOge1hZZXylCZET3oOseCXzBfIQJm+sXU5S10vXHKu1PqVfIASoQWCsGKW7gllbc9V8uUlJ3r3Ar8kprD8l8u/i7JLwyVZ4yHYEirTcfm1QZ6xl6UUzbN44mCksklgneRh8zjrxjmp/15HYDsVTfrYq6SjhOlnCHk0u9xDs7rM0y5L+omB9dpdEpdSEcgMQ2rZqaPlJ6V+3ZsWPsCzWuXK13NoPtDNFmcEyJAObAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQs86BZlbIcjpyRkpkYuEpRduV4WjAdBgNVHQ4EFgQULPOgWZWyHI6ckZKZGLhKUXbleFowDQYJKoZIhvcNAQELBQADggEBAKGu5VU7H9/108y+IgCcdtlaXjf67ljW1a5S2kIH91OKIU9ah2qHTI+lVI1DCSsSXlwsYVCFbPAXES/g7MSmFBU/7B1utZvcFjg3ZCpIOsl59RCqcO/tZFl9+DNgzY3k21FB6sK0H2ZmELoSYMrmy5FRFybNrQkJS4UrrjmLocFXAZMTKZfVjx+O+H7v9ttZ2YvfBCEc8xAuWybpdMMOMAElf9FA7wZjuEyWYkPbUXPXted0XRWcvu23iQirUXzOcCIFFMqEDlviZzGx5FYFS5BjkLhuTgZDZWRGCq2GEUpsaiOoTUYQS8apMQEj4fBaIaWKyjnveXbf4gcjKERyq/M=","attributes":{"enabled":false,"nbf":1590584901,"exp":1622121501,"created":1590585501,"updated":1590585503,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585482,"updated":1590585482}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ac930158-5105-4a85-9850-f32425f61eb8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT', + 'Content-Length', + '2581' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-","deletedDate":1590585503,"scheduledPurgeDate":1598361503,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","x5t":"rnjuw18TqWex92xvwqYfH71iC_o","cer":"MIIDKDCCAhCgAwIBAgIQf1JriRdtT4yQl2Am3+f8EDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODIxWhcNMjEwNTI3MTMxODIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC451rY9S/g44tJdSqLvri3nMpGXlryEV5XuIMYL+VyBZjfnpBl70OVsK4dZmxNDxf0IlrSm4MdFBDuvsBznSpqXBKBP020SOheg2h7kivS9gKl8VOge1hZZXylCZET3oOseCXzBfIQJm+sXU5S10vXHKu1PqVfIASoQWCsGKW7gllbc9V8uUlJ3r3Ar8kprD8l8u/i7JLwyVZ4yHYEirTcfm1QZ6xl6UUzbN44mCksklgneRh8zjrxjmp/15HYDsVTfrYq6SjhOlnCHk0u9xDs7rM0y5L+omB9dpdEpdSEcgMQ2rZqaPlJ6V+3ZsWPsCzWuXK13NoPtDNFmcEyJAObAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQs86BZlbIcjpyRkpkYuEpRduV4WjAdBgNVHQ4EFgQULPOgWZWyHI6ckZKZGLhKUXbleFowDQYJKoZIhvcNAQELBQADggEBAKGu5VU7H9/108y+IgCcdtlaXjf67ljW1a5S2kIH91OKIU9ah2qHTI+lVI1DCSsSXlwsYVCFbPAXES/g7MSmFBU/7B1utZvcFjg3ZCpIOsl59RCqcO/tZFl9+DNgzY3k21FB6sK0H2ZmELoSYMrmy5FRFybNrQkJS4UrrjmLocFXAZMTKZfVjx+O+H7v9ttZ2YvfBCEc8xAuWybpdMMOMAElf9FA7wZjuEyWYkPbUXPXted0XRWcvu23iQirUXzOcCIFFMqEDlviZzGx5FYFS5BjkLhuTgZDZWRGCq2GEUpsaiOoTUYQS8apMQEj4fBaIaWKyjnveXbf4gcjKERyq/M=","attributes":{"enabled":false,"nbf":1590584901,"exp":1622121501,"created":1590585501,"updated":1590585503,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585482,"updated":1590585482}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8884925d-7149-48f3-8fe5-b79ee2b6a224', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT', + 'Content-Length', + '2779' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '32137119-7da2-4851-b1ec-a5f90d2f6ab3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '2e8df743-c46f-4ad7-909d-3ed8c21238cf', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:23 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6e2e2cb5-a722-4e9e-8904-24401ae1cf55', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:25 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1c7fbf97-8bcc-4cff-9e37-6ff3e74530d7', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:27 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '856a47a6-77e9-406e-9555-2f447fe4ed07', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:29 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1ae6a15e-2b7b-441a-a5ca-85861eafcda9', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:31 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6bb142ec-b128-4876-ad47-f3249aadbd4c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:33 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificate-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '146', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '33680e76-4a65-49ec-84a6-635ed64fcc6f', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:35 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificate-","deletedDate":1590585503,"scheduledPurgeDate":1598361503,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificate-/ca74d2a4dafa43209b004505f397e86a","x5t":"rnjuw18TqWex92xvwqYfH71iC_o","cer":"MIIDKDCCAhCgAwIBAgIQf1JriRdtT4yQl2Am3+f8EDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODIxWhcNMjEwNTI3MTMxODIxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC451rY9S/g44tJdSqLvri3nMpGXlryEV5XuIMYL+VyBZjfnpBl70OVsK4dZmxNDxf0IlrSm4MdFBDuvsBznSpqXBKBP020SOheg2h7kivS9gKl8VOge1hZZXylCZET3oOseCXzBfIQJm+sXU5S10vXHKu1PqVfIASoQWCsGKW7gllbc9V8uUlJ3r3Ar8kprD8l8u/i7JLwyVZ4yHYEirTcfm1QZ6xl6UUzbN44mCksklgneRh8zjrxjmp/15HYDsVTfrYq6SjhOlnCHk0u9xDs7rM0y5L+omB9dpdEpdSEcgMQ2rZqaPlJ6V+3ZsWPsCzWuXK13NoPtDNFmcEyJAObAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQs86BZlbIcjpyRkpkYuEpRduV4WjAdBgNVHQ4EFgQULPOgWZWyHI6ckZKZGLhKUXbleFowDQYJKoZIhvcNAQELBQADggEBAKGu5VU7H9/108y+IgCcdtlaXjf67ljW1a5S2kIH91OKIU9ah2qHTI+lVI1DCSsSXlwsYVCFbPAXES/g7MSmFBU/7B1utZvcFjg3ZCpIOsl59RCqcO/tZFl9+DNgzY3k21FB6sK0H2ZmELoSYMrmy5FRFybNrQkJS4UrrjmLocFXAZMTKZfVjx+O+H7v9ttZ2YvfBCEc8xAuWybpdMMOMAElf9FA7wZjuEyWYkPbUXPXted0XRWcvu23iQirUXzOcCIFFMqEDlviZzGx5FYFS5BjkLhuTgZDZWRGCq2GEUpsaiOoTUYQS8apMQEj4fBaIaWKyjnveXbf4gcjKERyq/M=","attributes":{"enabled":false,"nbf":1590584901,"exp":1622121501,"created":1590585501,"updated":1590585503,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585482,"updated":1590585482}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificate-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a033ff8c-de45-4f64-8fcf-154a6cd8c06d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:38 GMT', + 'Content-Length', + '2779' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedcertificates/recoverCertificateName-candisableacertificate-') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ab80d433-f499-4203-bbda-6710444c2019', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:38 GMT' +]); diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.js b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.js new file mode 100644 index 000000000000..2fce6f1b3baf --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_disable_a_certificate_version.js @@ -0,0 +1,906 @@ +let nock = require('nock'); + +module.exports.hash = "6642b148547d702a60858c62054b7edb"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/recoverCertificateName-candisableacertificateversion-/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '2c01b3f7-063d-4285-a94e-d654041e831b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:38 GMT' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + 'ac7be9c3-c96c-4071-be94-01c377e80900', + 'x-ms-ests-server', + '2.1.10656.5 - WUS2 ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=ArnHxfp2qxZHjMg8-lfYXCA_aSJHAQAAAK5fYNYOAAAA; expires=Fri, 26-Jun-2020 13:18:38 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Wed, 27 May 2020 13:18:38 GMT', + 'Content-Length', + '1310' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/recoverCertificateName-candisableacertificateversion-/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .query(true) + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending?api-version=7.1-preview&request_id=6b53d972e3ce4395b05c4c2728e77a4b', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a90496f2-6bfa-48fd-b564-6b11608130f9', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:39 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '0e387b24-0127-4b81-92b7-42e587250825', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:39 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'dc941c1a-319a-4ed9-87f1-14e1a41ce3af', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:39 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '44b6acf2-8630-4a45-967b-713d2eaceb08', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:41 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd62b3e92-13fe-46f2-a808-693ec1a93660', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:42 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3b3b7ed5-ad78-4707-912a-7fcfca3930b9', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:45 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '76f50107-cab3-418b-a42e-bf4e73772d58', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:47 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a533b10b-3f6e-421d-94b0-f485ae60712f', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:49 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '257ac7e3-7603-4cd9-97a8-3ca7ef37149a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:51 GMT', + 'Content-Length', + '1346' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vgH5rX6LySq6O+imhpvdLAMs9kfVPQmbZHSpDWcS2rKVgk4wA/warOCqhaOhV0kEfIHgKIvkklCEK5x40VSK5E84HlQ7/yFuo/OGTkIxtfSe5p/KY3etmRukAchAo/flERry3yty8cFBmXLcAOJrgHM4V1AsJk2NL3V3EUWJtgr4Sl5fpKnJOBIkdK78KOKYqmsO4i8gWfNQYhzbiY4lRNl1QvcoEAOyw8ExmQDwzox7eFxU/YAir1Ol2eTwCZPW6Qgep1fStc/crZXSwnhwj64RyjWN4hjIqIxAhshA+f5x9W1PsSdH+sznPshTJLlxkyH/0zfd8K8xs7X1ViPpQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGChujG1zgYfiyG8bI7I9e7b+kS7vi4LEI+iRoC44v/WkzueDeopz2VEMIg3eqxyc+PB3df9SzBbivfQnaA053B6P2aDOseRIifXCGPbhqPl+9Cw9MmjPP5MTRagpasl4a46H/74Jm00PM7KAEtwTgjO8vBO9KusReSdK9WzCX2O5gtkWBFZ0KivBczmKHN3dq1Go5J+jxH57bot9CDYZDz27YqrWVJjLg9tV1p9DddJBg6YH9FUlQ0BHTvjDpLRor5PsHvjQ/NQqn5w9DLw4CsB820GPXQAdAxODK+WuWhV5+Ggk/qMH/y6mrRTBVYWtH/cHK2qH9lbL21T28Cwixw=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-","request_id":"6b53d972e3ce4395b05c4c2728e77a4b"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '791ceda0-8888-4d62-9a31-089fc876c922', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT', + 'Content-Length', + '1319' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","x5t":"VTgf6LvLaVgtK9Rm5vdvaOE9J5c","cer":"MIIDKDCCAhCgAwIBAgIQR55D2LCIRhaeV7mhDd2DGDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODUyWhcNMjEwNTI3MTMxODUyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe+AfmtfovJKro76KaGm90sAyz2R9U9CZtkdKkNZxLaspWCTjAD/Bqs4KqFo6FXSQR8geAoi+SSUIQrnHjRVIrkTzgeVDv/IW6j84ZOQjG19J7mn8pjd62ZG6QByECj9+URGvLfK3LxwUGZctwA4muAczhXUCwmTY0vdXcRRYm2CvhKXl+kqck4EiR0rvwo4piqaw7iLyBZ81BiHNuJjiVE2XVC9ygQA7LDwTGZAPDOjHt4XFT9gCKvU6XZ5PAJk9bpCB6nV9K1z9ytldLCeHCPrhHKNY3iGMiojECGyED5/nH1bU+xJ0f6zOc+yFMkuXGTIf/TN93wrzGztfVWI+lAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSKGdSvpdcm6pwBb4T03vuDJP466zAdBgNVHQ4EFgQUihnUr6XXJuqcAW+E9N77gyT+OuswDQYJKoZIhvcNAQELBQADggEBAK+4DMHb7vnyz5rtYJjHh5bwNPKYm/K4FG7QLS+W/c3W9fnkQdhuJCXJ6LsPbWbwZdir4QRdJTlGNnlUH8NGSrBxzlDfoHYd9XmpjfZB3nThq6Lc6KvbBNS0Da8l6C3kokUFffno/CoedRiDDNbSlD3eXMalZLQliY8S/Q1+7D4HgcKuJFKDVCku/45zGQPg9k+55uCTX9hOKwO5BS/99wq/sQ5B9vKIfrXlj84f724z9ipgmTUDVWqZ4MjT+G25vI2Gitz3t+KPwiY3dowx8wAEtHxQCvAzm0bZGucyrXYMnb4v+bC3TQpufamXL+OM1aFPGp6xjFgOEkx3Fl87w1A=","attributes":{"enabled":true,"nbf":1590584932,"exp":1622121532,"created":1590585532,"updated":1590585532,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585519,"updated":1590585519}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6841c490-9666-42c4-8107-d74f74a67401', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT', + 'Content-Length', + '2620' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .patch('/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0', {"attributes":{"enabled":false}}) + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","x5t":"VTgf6LvLaVgtK9Rm5vdvaOE9J5c","cer":"MIIDKDCCAhCgAwIBAgIQR55D2LCIRhaeV7mhDd2DGDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODUyWhcNMjEwNTI3MTMxODUyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe+AfmtfovJKro76KaGm90sAyz2R9U9CZtkdKkNZxLaspWCTjAD/Bqs4KqFo6FXSQR8geAoi+SSUIQrnHjRVIrkTzgeVDv/IW6j84ZOQjG19J7mn8pjd62ZG6QByECj9+URGvLfK3LxwUGZctwA4muAczhXUCwmTY0vdXcRRYm2CvhKXl+kqck4EiR0rvwo4piqaw7iLyBZ81BiHNuJjiVE2XVC9ygQA7LDwTGZAPDOjHt4XFT9gCKvU6XZ5PAJk9bpCB6nV9K1z9ytldLCeHCPrhHKNY3iGMiojECGyED5/nH1bU+xJ0f6zOc+yFMkuXGTIf/TN93wrzGztfVWI+lAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSKGdSvpdcm6pwBb4T03vuDJP466zAdBgNVHQ4EFgQUihnUr6XXJuqcAW+E9N77gyT+OuswDQYJKoZIhvcNAQELBQADggEBAK+4DMHb7vnyz5rtYJjHh5bwNPKYm/K4FG7QLS+W/c3W9fnkQdhuJCXJ6LsPbWbwZdir4QRdJTlGNnlUH8NGSrBxzlDfoHYd9XmpjfZB3nThq6Lc6KvbBNS0Da8l6C3kokUFffno/CoedRiDDNbSlD3eXMalZLQliY8S/Q1+7D4HgcKuJFKDVCku/45zGQPg9k+55uCTX9hOKwO5BS/99wq/sQ5B9vKIfrXlj84f724z9ipgmTUDVWqZ4MjT+G25vI2Gitz3t+KPwiY3dowx8wAEtHxQCvAzm0bZGucyrXYMnb4v+bC3TQpufamXL+OM1aFPGp6xjFgOEkx3Fl87w1A=","attributes":{"enabled":false,"nbf":1590584932,"exp":1622121532,"created":1590585532,"updated":1590585534,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ac56b114-6b8b-4780-96db-b5d81808f626', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT', + 'Content-Length', + '1942' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","x5t":"VTgf6LvLaVgtK9Rm5vdvaOE9J5c","cer":"MIIDKDCCAhCgAwIBAgIQR55D2LCIRhaeV7mhDd2DGDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODUyWhcNMjEwNTI3MTMxODUyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe+AfmtfovJKro76KaGm90sAyz2R9U9CZtkdKkNZxLaspWCTjAD/Bqs4KqFo6FXSQR8geAoi+SSUIQrnHjRVIrkTzgeVDv/IW6j84ZOQjG19J7mn8pjd62ZG6QByECj9+URGvLfK3LxwUGZctwA4muAczhXUCwmTY0vdXcRRYm2CvhKXl+kqck4EiR0rvwo4piqaw7iLyBZ81BiHNuJjiVE2XVC9ygQA7LDwTGZAPDOjHt4XFT9gCKvU6XZ5PAJk9bpCB6nV9K1z9ytldLCeHCPrhHKNY3iGMiojECGyED5/nH1bU+xJ0f6zOc+yFMkuXGTIf/TN93wrzGztfVWI+lAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSKGdSvpdcm6pwBb4T03vuDJP466zAdBgNVHQ4EFgQUihnUr6XXJuqcAW+E9N77gyT+OuswDQYJKoZIhvcNAQELBQADggEBAK+4DMHb7vnyz5rtYJjHh5bwNPKYm/K4FG7QLS+W/c3W9fnkQdhuJCXJ6LsPbWbwZdir4QRdJTlGNnlUH8NGSrBxzlDfoHYd9XmpjfZB3nThq6Lc6KvbBNS0Da8l6C3kokUFffno/CoedRiDDNbSlD3eXMalZLQliY8S/Q1+7D4HgcKuJFKDVCku/45zGQPg9k+55uCTX9hOKwO5BS/99wq/sQ5B9vKIfrXlj84f724z9ipgmTUDVWqZ4MjT+G25vI2Gitz3t+KPwiY3dowx8wAEtHxQCvAzm0bZGucyrXYMnb4v+bC3TQpufamXL+OM1aFPGp6xjFgOEkx3Fl87w1A=","attributes":{"enabled":false,"nbf":1590584932,"exp":1622121532,"created":1590585532,"updated":1590585534,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'eaa5580c-5360-4747-a346-716455c48db7', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT', + 'Content-Length', + '1788' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-","deletedDate":1590585534,"scheduledPurgeDate":1598361534,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","x5t":"VTgf6LvLaVgtK9Rm5vdvaOE9J5c","cer":"MIIDKDCCAhCgAwIBAgIQR55D2LCIRhaeV7mhDd2DGDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODUyWhcNMjEwNTI3MTMxODUyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe+AfmtfovJKro76KaGm90sAyz2R9U9CZtkdKkNZxLaspWCTjAD/Bqs4KqFo6FXSQR8geAoi+SSUIQrnHjRVIrkTzgeVDv/IW6j84ZOQjG19J7mn8pjd62ZG6QByECj9+URGvLfK3LxwUGZctwA4muAczhXUCwmTY0vdXcRRYm2CvhKXl+kqck4EiR0rvwo4piqaw7iLyBZ81BiHNuJjiVE2XVC9ygQA7LDwTGZAPDOjHt4XFT9gCKvU6XZ5PAJk9bpCB6nV9K1z9ytldLCeHCPrhHKNY3iGMiojECGyED5/nH1bU+xJ0f6zOc+yFMkuXGTIf/TN93wrzGztfVWI+lAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSKGdSvpdcm6pwBb4T03vuDJP466zAdBgNVHQ4EFgQUihnUr6XXJuqcAW+E9N77gyT+OuswDQYJKoZIhvcNAQELBQADggEBAK+4DMHb7vnyz5rtYJjHh5bwNPKYm/K4FG7QLS+W/c3W9fnkQdhuJCXJ6LsPbWbwZdir4QRdJTlGNnlUH8NGSrBxzlDfoHYd9XmpjfZB3nThq6Lc6KvbBNS0Da8l6C3kokUFffno/CoedRiDDNbSlD3eXMalZLQliY8S/Q1+7D4HgcKuJFKDVCku/45zGQPg9k+55uCTX9hOKwO5BS/99wq/sQ5B9vKIfrXlj84f724z9ipgmTUDVWqZ4MjT+G25vI2Gitz3t+KPwiY3dowx8wAEtHxQCvAzm0bZGucyrXYMnb4v+bC3TQpufamXL+OM1aFPGp6xjFgOEkx3Fl87w1A=","attributes":{"enabled":false,"nbf":1590584932,"exp":1622121532,"created":1590585532,"updated":1590585534,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585519,"updated":1590585519}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e521a09a-8915-46e7-b40e-599a2e351ded', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT', + 'Content-Length', + '2827' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a7796335-9aa6-417b-bac6-515461608212', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '54b886a6-2b29-4966-baf2-698fca9853b7', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:53 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a5b17ae7-5519-48eb-9c8a-81165681e2d1', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:55 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ddbe3c6f-aa31-431a-ad3a-4ed09e3fd7ae', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:18:58 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c18a2dc7-adf1-4c8d-bff2-bd784db5e479', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:00 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8375ca83-a8c2-4d63-b0ac-e8014782197c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:02 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bb20a977-408b-4c95-a63f-c32ebf511b60', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:04 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-candisableacertificateversion-"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '154', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3bce1d32-d371-40d2-a602-e5ce8b109a84', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:07 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-candisableacertificateversion-","deletedDate":1590585534,"scheduledPurgeDate":1598361534,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","kid":"https://keyvault_name.vault.azure.net/keys/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","sid":"https://keyvault_name.vault.azure.net/secrets/recoverCertificateName-candisableacertificateversion-/a27358f95acc445bb78cc6eb3d3ce4a0","x5t":"VTgf6LvLaVgtK9Rm5vdvaOE9J5c","cer":"MIIDKDCCAhCgAwIBAgIQR55D2LCIRhaeV7mhDd2DGDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI3MTMwODUyWhcNMjEwNTI3MTMxODUyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe+AfmtfovJKro76KaGm90sAyz2R9U9CZtkdKkNZxLaspWCTjAD/Bqs4KqFo6FXSQR8geAoi+SSUIQrnHjRVIrkTzgeVDv/IW6j84ZOQjG19J7mn8pjd62ZG6QByECj9+URGvLfK3LxwUGZctwA4muAczhXUCwmTY0vdXcRRYm2CvhKXl+kqck4EiR0rvwo4piqaw7iLyBZ81BiHNuJjiVE2XVC9ygQA7LDwTGZAPDOjHt4XFT9gCKvU6XZ5PAJk9bpCB6nV9K1z9ytldLCeHCPrhHKNY3iGMiojECGyED5/nH1bU+xJ0f6zOc+yFMkuXGTIf/TN93wrzGztfVWI+lAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSKGdSvpdcm6pwBb4T03vuDJP466zAdBgNVHQ4EFgQUihnUr6XXJuqcAW+E9N77gyT+OuswDQYJKoZIhvcNAQELBQADggEBAK+4DMHb7vnyz5rtYJjHh5bwNPKYm/K4FG7QLS+W/c3W9fnkQdhuJCXJ6LsPbWbwZdir4QRdJTlGNnlUH8NGSrBxzlDfoHYd9XmpjfZB3nThq6Lc6KvbBNS0Da8l6C3kokUFffno/CoedRiDDNbSlD3eXMalZLQliY8S/Q1+7D4HgcKuJFKDVCku/45zGQPg9k+55uCTX9hOKwO5BS/99wq/sQ5B9vKIfrXlj84f724z9ipgmTUDVWqZ4MjT+G25vI2Gitz3t+KPwiY3dowx8wAEtHxQCvAzm0bZGucyrXYMnb4v+bC3TQpufamXL+OM1aFPGp6xjFgOEkx3Fl87w1A=","attributes":{"enabled":false,"nbf":1590584932,"exp":1622121532,"created":1590585532,"updated":1590585534,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590585519,"updated":1590585519}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-candisableacertificateversion-/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd1b7543e-69f5-4a08-89ce-075ebc70ffce', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:09 GMT', + 'Content-Length', + '2827' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedcertificates/recoverCertificateName-candisableacertificateversion-') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c21f9274-408a-4712-b627-614744942887', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Wed, 27 May 2020 13:19:09 GMT' +]); diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.js b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.js index 062e3f33bb6a..76a348446a28 100644 --- a/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.js +++ b/sdk/keyvault/keyvault-certificates/recordings/node/certificates_client__create_read_update_and_delete/recording_can_update_the_tags_of_a_certificate.js @@ -18,18 +18,16 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'WWW-Authenticate', 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '1e2adc49-688b-495b-a709-df9604abd4f0', + '32615cae-1f80-4a9e-b55c-b0eeaa35763a', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -39,7 +37,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:48 GMT' + 'Wed, 27 May 2020 15:04:23 GMT' ]); nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -58,19 +56,19 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'ac2b3571-3c5a-4c56-9e73-7b5468aa0700', + '1647191f-fc41-4f66-94c8-0d57ccb31700', 'x-ms-ests-server', - '2.1.10433.14 - EUS ProdSlices', + '2.1.10620.11 - EUS ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Ani8mC5EM2JCsERNuNhjkBQ_aSJHAQAAAOC4OdYOAAAA; expires=Thu, 28-May-2020 05:40:49 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AvrQdu_2QcpKhBAcaVoI2Jw_aSJHAQAAAHd4YNYOAAAA; expires=Fri, 26-Jun-2020 15:04:24 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Tue, 28 Apr 2020 05:40:48 GMT', + 'Wed, 27 May 2020 15:04:23 GMT', 'Content-Length', '1315' ]); @@ -78,7 +76,7 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .post('/certificates/recoverCertificateName-canupdatethetagsofacertificate-/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) .query(true) - .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAixAA5opOGBWRbITOxM/lR/TyHMxMLeNvtahQTcWbY/javFk/mmsgIkfgABi8TT4qNfTtVPKP2XiWkhBLLGEoeqZ56ap9Ea57uP/m+3ZOM2GBN/5+DjFHsWMK6HAtMrehVWiGb9NuOJ6EmwROCCqrURvX5CXRMtAfHve+mFpXeH0fEy6Z87RZh1Z86Hw7ih+x9X0sxBKkUbQUXnDuzED67zdM8n/EIL5/L5pXW4vM7Ys7o3YsKtGB6ShkKMwSqt+QMoMz9XI9kVdeZTtRFibeRoUuKHXcDwnN2QnkdRWHJqP9yLPWoNTU830vBRnXAqZZtdXtULVdS/Yf3nGB0Kk7TQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAEJh/MFE9afffBdgwTW7zcx04Y027Bs/B18KNK34tE9ZQgMBYz+xtTCP1Q1dWzOiSAenxFHqNR6arPhYo0jylx81GqHXRfTJTcjmMQfoILR2vZUL77r5cDpJ0/4pQIcyYIbGg9AtlsVr0Ie9Qp0TbJQO7AXuEX4erl/lOYvjIzDkPemTJl1FyfzhwszFwcKxFtN5VmrZj+9tC/6qUkOmINnXSFpgLX75axe6fVHQOqhhU6FAzqwznWMsmOwihk7c0IKFpH3HKg/C8qQCSXlDllUpgGDdLtyzvnCxHRyzOAFpgZUyHps0CMDN2OhwYSduXU+IQaTKvDDp3cbHk4WIaCM=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"427f91944ee64db0b85d940dc37e3653"}, [ + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzC1uQc4JhMZme+h3xgWkdAZHaCIhV+OCLMSc+8dqg6fYL9W4Bjc90mK8s88GDAb1gn8ch8IGVldmFJ9brPLs4Jad+gx3hdewKBugKMacPyqHrHIG+v49p1kdPwCq848XCQWgI1p663Pua8taSHnsSnZvONPqdmCi3e/b50vb7gEODBpt0PdQ1CUgEIUSLxSWiKaVsim2TpfJXhAuev8rqCd5ApCqKzLzgJ1OBySmZifFEiTmxuo3kSR7hUjdK2f4cB9myEJawqxqBLO/qDyd4XGwQzLNO6QaTc9WP+Jq5hyeJ+ZkpgjZymDysCtlkGmZaMTe0WuQsOBqzqfJCf3r8wIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA8/jTcYv8kuR/52ZG6EOgOEsA2yxZd+TRNXw9BgU6s//MR1Vli5wpayPZIXIdMgE9n8sSkIuIRupGybLjnJieKOWwvhxwl5COubcPxYe+/lNk5YSHSlr3UTBF+PO+eksBcGobmb9wY5Cjj5+VPVhFYgZ1XxxgZIWjAkPtzjIoLxM/vzg9WUrMaytmUFWBfai+v/yIs6P5UYXcCeV5edWFNfv3WOlyZTEnNMQo2LVpDxu5moAwJ5ho9IjuYYGQ7w7LbG5NTAw09tf61P64HokbnfPS2cHwt4+IaToVvPe7AWiLOaWWChL/ujLzRtKMc/JvD5YtOWPRLwvwUmDWYl8Vo=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"a8b3796d3b5240f685a3b350e5f2f07c"}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -88,19 +86,17 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Expires', '-1', 'Location', - 'https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending?api-version=7.1-preview&request_id=427f91944ee64db0b85d940dc37e3653', + 'https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending?api-version=7.1-preview&request_id=a8b3796d3b5240f685a3b350e5f2f07c', 'Retry-After', '10', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '26e05b29-cef3-4425-a52f-7985598748d8', + 'a5196634-dd97-418e-a683-cd3360de4adc', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -110,15 +106,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT', + 'Wed, 27 May 2020 15:04:24 GMT', 'Content-Length', - '1347' + '1346' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .get('/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending') .query(true) - .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAixAA5opOGBWRbITOxM/lR/TyHMxMLeNvtahQTcWbY/javFk/mmsgIkfgABi8TT4qNfTtVPKP2XiWkhBLLGEoeqZ56ap9Ea57uP/m+3ZOM2GBN/5+DjFHsWMK6HAtMrehVWiGb9NuOJ6EmwROCCqrURvX5CXRMtAfHve+mFpXeH0fEy6Z87RZh1Z86Hw7ih+x9X0sxBKkUbQUXnDuzED67zdM8n/EIL5/L5pXW4vM7Ys7o3YsKtGB6ShkKMwSqt+QMoMz9XI9kVdeZTtRFibeRoUuKHXcDwnN2QnkdRWHJqP9yLPWoNTU830vBRnXAqZZtdXtULVdS/Yf3nGB0Kk7TQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAEJh/MFE9afffBdgwTW7zcx04Y027Bs/B18KNK34tE9ZQgMBYz+xtTCP1Q1dWzOiSAenxFHqNR6arPhYo0jylx81GqHXRfTJTcjmMQfoILR2vZUL77r5cDpJ0/4pQIcyYIbGg9AtlsVr0Ie9Qp0TbJQO7AXuEX4erl/lOYvjIzDkPemTJl1FyfzhwszFwcKxFtN5VmrZj+9tC/6qUkOmINnXSFpgLX75axe6fVHQOqhhU6FAzqwznWMsmOwihk7c0IKFpH3HKg/C8qQCSXlDllUpgGDdLtyzvnCxHRyzOAFpgZUyHps0CMDN2OhwYSduXU+IQaTKvDDp3cbHk4WIaCM=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"427f91944ee64db0b85d940dc37e3653"}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzC1uQc4JhMZme+h3xgWkdAZHaCIhV+OCLMSc+8dqg6fYL9W4Bjc90mK8s88GDAb1gn8ch8IGVldmFJ9brPLs4Jad+gx3hdewKBugKMacPyqHrHIG+v49p1kdPwCq848XCQWgI1p663Pua8taSHnsSnZvONPqdmCi3e/b50vb7gEODBpt0PdQ1CUgEIUSLxSWiKaVsim2TpfJXhAuev8rqCd5ApCqKzLzgJ1OBySmZifFEiTmxuo3kSR7hUjdK2f4cB9myEJawqxqBLO/qDyd4XGwQzLNO6QaTc9WP+Jq5hyeJ+ZkpgjZymDysCtlkGmZaMTe0WuQsOBqzqfJCf3r8wIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAA8/jTcYv8kuR/52ZG6EOgOEsA2yxZd+TRNXw9BgU6s//MR1Vli5wpayPZIXIdMgE9n8sSkIuIRupGybLjnJieKOWwvhxwl5COubcPxYe+/lNk5YSHSlr3UTBF+PO+eksBcGobmb9wY5Cjj5+VPVhFYgZ1XxxgZIWjAkPtzjIoLxM/vzg9WUrMaytmUFWBfai+v/yIs6P5UYXcCeV5edWFNfv3WOlyZTEnNMQo2LVpDxu5moAwJ5ho9IjuYYGQ7w7LbG5NTAw09tf61P64HokbnfPS2cHwt4+IaToVvPe7AWiLOaWWChL/ujLzRtKMc/JvD5YtOWPRLwvwUmDWYl8Vo=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"a8b3796d3b5240f685a3b350e5f2f07c"}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -129,16 +125,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) '-1', 'Retry-After', '10', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'effc1fd7-020d-4fa0-afff-b0023d368b3c', + 'b2350e61-b694-4ec9-8dd5-7469f13efc3d', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -148,15 +142,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT', + 'Wed, 27 May 2020 15:04:24 GMT', 'Content-Length', - '1347' + '1346' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .patch('/certificates/recoverCertificateName-canupdatethetagsofacertificate-/', {"tags":{"customTag":"value"}}) + .patch('/certificates/recoverCertificateName-canupdatethetagsofacertificate-/', {"attributes":{},"tags":{"customTag":"value"}}) .query(true) - .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/84f3531c3e2548ed84aece9d033c2ade","attributes":{"enabled":false,"nbf":1588051849,"exp":1619588449,"created":1588052449,"updated":1588052450,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588052449,"updated":1588052449}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/a005245c0d7945e7a56201021c894cbd","attributes":{"enabled":false,"nbf":1590591264,"exp":1622127864,"created":1590591864,"updated":1590591865,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590591864,"updated":1590591864}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -165,16 +159,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'c415443a-3c0c-4f4a-8723-056c473eb021', + '9ce02114-3057-42bd-86d8-4046f20f89cc', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -184,15 +176,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT', + 'Wed, 27 May 2020 15:04:25 GMT', 'Content-Length', - '1201' + '1198' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .get('/certificates/recoverCertificateName-canupdatethetagsofacertificate-/') .query(true) - .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/84f3531c3e2548ed84aece9d033c2ade","attributes":{"enabled":false,"nbf":1588051849,"exp":1619588449,"created":1588052449,"updated":1588052450,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588052449,"updated":1588052449}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/a005245c0d7945e7a56201021c894cbd","attributes":{"enabled":false,"nbf":1590591264,"exp":1622127864,"created":1590591864,"updated":1590591865,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590591864,"updated":1590591864}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -201,16 +193,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8b0df78d-dbdf-41dd-96da-7f17c63f84fe', + '8795cf57-64e4-4470-a299-7679ca7d9b62', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -220,15 +210,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT', + 'Wed, 27 May 2020 15:04:25 GMT', 'Content-Length', - '1201' + '1198' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .delete('/certificates/recoverCertificateName-canupdatethetagsofacertificate-') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-","deletedDate":1588052450,"scheduledPurgeDate":1595828450,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/84f3531c3e2548ed84aece9d033c2ade","attributes":{"enabled":false,"nbf":1588051849,"exp":1619588449,"created":1588052449,"updated":1588052450,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588052449,"updated":1588052449}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-","deletedDate":1590591865,"scheduledPurgeDate":1598367865,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/a005245c0d7945e7a56201021c894cbd","attributes":{"enabled":false,"nbf":1590591264,"exp":1622127864,"created":1590591864,"updated":1590591865,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590591864,"updated":1590591864}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -237,16 +227,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '5f324396-0418-4124-85db-c54aaf56823d', + '12515b46-182b-4b26-b2fb-bb9fa9e41359', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -256,9 +244,9 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT', + 'Wed, 27 May 2020 15:04:25 GMT', 'Content-Length', - '1408' + '1404' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -270,21 +258,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '4e4bdf85-c2a8-4304-9d07-061b072a7604', + '4b63931e-9ecf-45bd-89ac-9956c8e1c7b4', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -294,7 +280,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT' + 'Wed, 27 May 2020 15:04:25 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -306,21 +292,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8fa6d507-5dac-44cd-8630-c2d04fada22e', + 'd389edc4-1348-4661-a53a-4bc688583fec', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -330,7 +314,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:50 GMT' + 'Wed, 27 May 2020 15:04:25 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -342,21 +326,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '5e34e15f-b2e1-47a1-99e1-1c3455bb244b', + '76f701c9-f6fa-4589-81ef-ee908dfd0d0f', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -366,7 +348,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:52 GMT' + 'Wed, 27 May 2020 15:04:27 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -378,21 +360,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'c0a27123-aec6-4ea3-822d-bc5352e34139', + 'a3a618bd-e097-42ab-b411-1fc43af52c09', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -402,7 +382,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:54 GMT' + 'Wed, 27 May 2020 15:04:29 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -414,21 +394,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'ffb08db6-9b08-43e0-84a9-f9a20737e080', + '95b098df-444a-4963-b1a3-f4ebafd8565a', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -438,7 +416,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:56 GMT' + 'Wed, 27 May 2020 15:04:31 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -450,21 +428,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '127b3bc9-6e8f-43f0-b5d7-11039965ee19', + '0c382576-d925-49ed-9619-e0d0791a20f1', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -474,7 +450,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:40:58 GMT' + 'Wed, 27 May 2020 15:04:33 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -486,21 +462,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8c5cf06e-e5c7-4cd9-83a2-aeae8a80d997', + '198d0eac-1631-48a0-bd22-46aee265b352', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -510,7 +484,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:41:00 GMT' + 'Wed, 27 May 2020 15:04:35 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -522,21 +496,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '155', + '154', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '50b85dea-5ec8-4d15-869f-edbc5a10ca2a', + '8f532fe3-f416-4702-85e2-b2d57a3168ec', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -546,805 +518,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:41:02 GMT' + 'Wed, 27 May 2020 15:04:37 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '3c404501-ee62-451f-8bdf-29f9ca34d8f5', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:04 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'c779269c-6ebd-40e2-8a21-d46e50370f6c', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:06 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'e7f43ee2-c50d-4a2f-99b9-028443d16d66', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:08 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '1a2c06ce-4019-4cc2-aa4a-083986c357bb', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:11 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '11b36587-21f2-4a95-9640-53587b1c6f27', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:13 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ad0f382b-018c-4669-b22f-4be41608719b', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:15 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'b382a07b-9c60-46c9-859d-01c247bb4723', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:17 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '516958c2-a81c-4db3-a18e-ef3e6326ee1d', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:19 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '84fe5425-df21-4cdb-8066-9c342397fd70', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:21 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'e58da587-7b86-454e-b9b0-d9ba7be99aa7', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:23 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '8e18828d-b8a5-40f2-b155-fdee30aa7a42', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:25 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'a6d68812-21ef-40ef-8bc9-a132d8466fc9', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:27 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '527b1f1e-6dae-42b8-8230-761ea8884933', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:29 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '37fee5ce-3d68-4637-b22c-134bc0de04db', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:31 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '93a970a0-5612-4ba5-b2ff-0e17a383bdce', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:33 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'fc9184a5-6962-4064-8b52-414853456a17', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:35 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'cfd7d947-38e2-42d0-892b-4f20e0cc8857', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:38 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ad5e123d-6530-4e7a-99f5-3125ec15007f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:41 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'e2b603cb-3c8a-4106-a54a-facad1b85662', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:43 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '9819806c-0559-4a46-8a32-9052b8fbe863', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:45 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'd3b6f5c8-e885-405a-a71f-425ecb645ee3', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:46 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: recoverCertificateName-canupdatethetagsofacertificate-"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '155', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'c9be7d7c-0426-4ee1-acad-343b4ad49577', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 28 Apr 2020 05:41:48 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-') - .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-","deletedDate":1588052450,"scheduledPurgeDate":1595828450,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/84f3531c3e2548ed84aece9d033c2ade","attributes":{"enabled":false,"nbf":1588051849,"exp":1619588449,"created":1588052449,"updated":1588052450,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588052449,"updated":1588052449}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/recoverCertificateName-canupdatethetagsofacertificate-","deletedDate":1590591865,"scheduledPurgeDate":1598367865,"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/a005245c0d7945e7a56201021c894cbd","attributes":{"enabled":false,"nbf":1590591264,"exp":1622127864,"created":1590591864,"updated":1590591865,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"tags":{"customTag":"value"},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590591864,"updated":1590591864}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/recoverCertificateName-canupdatethetagsofacertificate-/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -1353,16 +533,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '9bd16744-568f-45bd-9e8e-bd32c090b88e', + 'ef3dbd8d-523b-4ecc-b663-f53b598d4db8', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1372,9 +550,9 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:41:50 GMT', + 'Wed, 27 May 2020 15:04:39 GMT', 'Content-Length', - '1408' + '1404' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -1387,16 +565,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'no-cache', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b0d26b0d-3e94-465d-a7b2-194dad8d5e31', + 'f2f2dd71-53b9-4fb5-8872-a3c130587240', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.247.203.156;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.233.72.51;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1406,5 +582,5 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Tue, 28 Apr 2020 05:41:51 GMT' + 'Wed, 27 May 2020 15:04:39 GMT' ]); diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js new file mode 100644 index 000000000000..35419fe63d5f --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js @@ -0,0 +1,1485 @@ +let nock = require('nock'); + +module.exports.hash = "7846e49801cb89451a7c2d068fff2698"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b7508d76-6277-43b4-b76b-23b93de5c402', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '67d7d1c1-8369-4a9c-87a4-dc6096ef2aaa', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:29 GMT' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '9f177f99-7ff4-4d48-91bd-8de916fb8300', + 'x-ms-ests-server', + '2.1.10620.9 - WUS2 ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=AlLwbyhMwqFBn1ox-w97y64_aSJHAQAAAFYLX9YOAAAA; expires=Thu, 25-Jun-2020 13:06:30 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT', + 'Content-Length', + '1315' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '9f11b6cc-3d95-4851-b7d3-f1f5272f0001', + 'x-ms-ests-server', + '2.1.10571.11 - EUS ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=As_0v7n3gQlJrDK5ewDXZs8_aSJHAQAAAFYLX9YOAAAA; expires=Thu, 25-Jun-2020 13:06:30 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT', + 'Content-Length', + '1315' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .query(true) + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending?api-version=7.1-preview&request_id=52881cef6db44fb0ad39ffb7d8d0b14a', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1fe48404-48c8-4409-8702-84092c401c1a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .query(true) + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4A7X7Ru7ZkETZDbqBPPtTkXmYFneXndduHxX5M0hXwHNNc5H3qagziIoAKzcJmrYg8GDBNpgvYFPAUXERQh0fwkfTAFvqeJR13qJ+FZ/c6cmeTNmoKlmM7DUYoKMIS4mX2iFUQM0VUWabSS97vNFFpGcizztUnAXOZCbSWCHcrU4FSmtP9hMCUY8BBqwwFq3+zCGaNpQQyivFFyOlbZTA1pIT25JKgibAQ8CO+R3ZUwBsrltg/ZpXnRxYD3Ee1MaBrwmRXO5pMwqOz/mZLnorohaQQlEv05epLnST5bX4TJJJIlhe3sp7G45ywKWpsBnt42w0iPij0qzZoCZqWbJnQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAD9FaPnsa2x4Ii6c1+0Kr3knoDwGUuAxTlDf8WQK9PdJctEKlJTeTV4egyyAM2/NzJ3s6gHHWnbLoEiyamyCCw/ovmj95C2TM3CdCXbD3XF4CpnKmi5BSqIDS+aq0KVl9c0Kxqp22FEvTiUjLwFiyXsB9eNNXZqKmgmgIIh642oFfoH16PNHs2G0aIY+QQQEURgQo9bmgjN9XPKVwiGcr5OR1nxDRzMhfFUmv0OVLvLYunxmWBW+thyxWxWaigECt3eaHHgZvxrob4lvfb3tcNSm1M6QbqJp3/zHrpaiucl/7Ek5hgRoCS4DWpxF4vHGlwb9WyjS3/CqKJUhHRmxdOk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"cbdb4e61c63b489da5d565211fd2b3d0"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending?api-version=7.1-preview&request_id=cbdb4e61c63b489da5d565211fd2b3d0', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c39bbe4f-4dc6-4904-93db-dc1d8bd3d34d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:31 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f29ef905-b702-4317-8595-33716826809d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4A7X7Ru7ZkETZDbqBPPtTkXmYFneXndduHxX5M0hXwHNNc5H3qagziIoAKzcJmrYg8GDBNpgvYFPAUXERQh0fwkfTAFvqeJR13qJ+FZ/c6cmeTNmoKlmM7DUYoKMIS4mX2iFUQM0VUWabSS97vNFFpGcizztUnAXOZCbSWCHcrU4FSmtP9hMCUY8BBqwwFq3+zCGaNpQQyivFFyOlbZTA1pIT25JKgibAQ8CO+R3ZUwBsrltg/ZpXnRxYD3Ee1MaBrwmRXO5pMwqOz/mZLnorohaQQlEv05epLnST5bX4TJJJIlhe3sp7G45ywKWpsBnt42w0iPij0qzZoCZqWbJnQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAD9FaPnsa2x4Ii6c1+0Kr3knoDwGUuAxTlDf8WQK9PdJctEKlJTeTV4egyyAM2/NzJ3s6gHHWnbLoEiyamyCCw/ovmj95C2TM3CdCXbD3XF4CpnKmi5BSqIDS+aq0KVl9c0Kxqp22FEvTiUjLwFiyXsB9eNNXZqKmgmgIIh642oFfoH16PNHs2G0aIY+QQQEURgQo9bmgjN9XPKVwiGcr5OR1nxDRzMhfFUmv0OVLvLYunxmWBW+thyxWxWaigECt3eaHHgZvxrob4lvfb3tcNSm1M6QbqJp3/zHrpaiucl/7Ek5hgRoCS4DWpxF4vHGlwb9WyjS3/CqKJUhHRmxdOk=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"cbdb4e61c63b489da5d565211fd2b3d0"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bc8bc788-fcea-4986-9227-8949a27b5673', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:31 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'fbc95a7f-3f9f-4516-b73b-382ccba3d89d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:30 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '437a6d9b-e8c9-4830-9516-136e470fb56e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:32 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '9c719510-e3ad-4f91-a94d-49e22187d7e5', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:34 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1a87d7d4-3359-466f-aad5-1bdfccedceb3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:36 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a73f4832-9def-4317-a1ca-e6fe41fd9027', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:39 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ad136858-e1a3-4171-9805-38b092f54f94', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:41 GMT', + 'Content-Length', + '1367' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzfF8kUntJrCp/iyZqhgC9NUOMdYObSvN9jr4gqhDNBKyuN3fUAe6zoJJbwaqJsDTckg+W++VQ9d/Fjs5bb6VFc6r8AxATnV2Ps0g2JnTKzW78TGXW43BdGl7dTil/3oAs1dIkS7rnecfCWGWA5gVoXyGp6fVyKxY16BTWHEsAefaJ0Vve1h6KDs0C5JweErrfHbEJjATeySjaWaseucj6wmrZZJcib2wSqpZhvZIbKxWbXs9z+mKGGqJheWuzreyY0x6ebE0MJ/FpTOxPS69IxnsqN2OXyEjpe6NJOwI1TvAf3geLwGiSZS7Ag/XUeRSAtNgcAsFD8jj0RC3HookcwIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAHEV4fa7MXFEWvJwfY2+s3DHkiByNkuQbDL1TRbGUw2JpLUM6tD9ZcigjL+ZJ7ZojnJMUCSSbU46OBpTiaCoOmt7W/P+hgzyG2Lmj/mlJKoPrgqPbk1FqgEz+cCR/q0qJcx02zNk9DV3MynWBJ6glcZVLoDSyFKmtx3h7RFh0AFuv73Roz1/FenP9WphoEOuQQP9pS9ulb9JWagpikgU8gN7asL31HKWeUtwLGmOLU22SuOPII0V/J71+55ZIhfNM4ITYGhA0jydOIlUm0oiQfEcJ1rml0qJCOkKaNuoXI+0BA6H646PXmMzp9ymrwEXflewvuRRHCkigsaCaWHbKhs=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0","request_id":"52881cef6db44fb0ad39ffb7d8d0b14a"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3698ab94-b96d-4571-a4cf-511df26da23a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:43 GMT', + 'Content-Length', + '1361' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","x5t":"-s6fv9NJHGSXMR77JGAQcvHX7kk","cer":"MIIDKDCCAhCgAwIBAgIQVw2YlcZ6RuKCJd7tgCLB/jANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDN8XyRSe0msKn+LJmqGAL01Q4x1g5tK832OviCqEM0ErK43d9QB7rOgklvBqomwNNySD5b75VD138WOzltvpUVzqvwDEBOdXY+zSDYmdMrNbvxMZdbjcF0aXt1OKX/egCzV0iRLuud5x8JYZYDmBWhfIanp9XIrFjXoFNYcSwB59onRW97WHooOzQLknB4Sut8dsQmMBN7JKNpZqx65yPrCatlklyJvbBKqlmG9khsrFZtez3P6YoYaomF5a7Ot7JjTHp5sTQwn8WlM7E9Lr0jGeyo3Y5fISOl7o0k7AjVO8B/eB4vAaJJlLsCD9dR5FIC02BwCwUPyOPRELceiiRzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTA6w5J0jomrTgiVcWqW14hQm8SQjAdBgNVHQ4EFgQUwOsOSdI6Jq04IlXFqlteIUJvEkIwDQYJKoZIhvcNAQELBQADggEBABu4Ws7fi7Q2VWKu3DKbYwfqiK1/0OY7Nzw4INr/pzfNbOixiDKm76hI1bOlOk+QNZlFcO62L4bntfIo+L3ocZGHrEqZcCvnNHweS9TcA+ptmE0XFtNuIEPunC0xUFwmx0/IfMXyfGXmTiJVs3ZtuJSaT/Y7itrUC1Pe3oFdcNPqP7+shorEWsVgN9j+/dAe6Erl9+qYO5OSI3j6ZjdRRCBE4rSt/rFKIsxryGqvlxd+sy6ci/UWCHWHqlkdssRSB90LGdAW3AApk/iW5ymJpUp2Rp2naC3TORJj1m0JXepWEeLNT3dtCEfseHP562OFNQ7SvfzN+DmjFfcRLeTpbS0=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '255ece62-d4ac-4ab6-823b-18a363538551', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:43 GMT', + 'Content-Length', + '2725' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590498404,"scheduledPurgeDate":1598274404,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","x5t":"-s6fv9NJHGSXMR77JGAQcvHX7kk","cer":"MIIDKDCCAhCgAwIBAgIQVw2YlcZ6RuKCJd7tgCLB/jANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDN8XyRSe0msKn+LJmqGAL01Q4x1g5tK832OviCqEM0ErK43d9QB7rOgklvBqomwNNySD5b75VD138WOzltvpUVzqvwDEBOdXY+zSDYmdMrNbvxMZdbjcF0aXt1OKX/egCzV0iRLuud5x8JYZYDmBWhfIanp9XIrFjXoFNYcSwB59onRW97WHooOzQLknB4Sut8dsQmMBN7JKNpZqx65yPrCatlklyJvbBKqlmG9khsrFZtez3P6YoYaomF5a7Ot7JjTHp5sTQwn8WlM7E9Lr0jGeyo3Y5fISOl7o0k7AjVO8B/eB4vAaJJlLsCD9dR5FIC02BwCwUPyOPRELceiiRzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTA6w5J0jomrTgiVcWqW14hQm8SQjAdBgNVHQ4EFgQUwOsOSdI6Jq04IlXFqlteIUJvEkIwDQYJKoZIhvcNAQELBQADggEBABu4Ws7fi7Q2VWKu3DKbYwfqiK1/0OY7Nzw4INr/pzfNbOixiDKm76hI1bOlOk+QNZlFcO62L4bntfIo+L3ocZGHrEqZcCvnNHweS9TcA+ptmE0XFtNuIEPunC0xUFwmx0/IfMXyfGXmTiJVs3ZtuJSaT/Y7itrUC1Pe3oFdcNPqP7+shorEWsVgN9j+/dAe6Erl9+qYO5OSI3j6ZjdRRCBE4rSt/rFKIsxryGqvlxd+sy6ci/UWCHWHqlkdssRSB90LGdAW3AApk/iW5ymJpUp2Rp2naC3TORJj1m0JXepWEeLNT3dtCEfseHP562OFNQ7SvfzN+DmjFfcRLeTpbS0=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c09b7167-e65c-46d7-948e-1335d65abd60', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:43 GMT', + 'Content-Length', + '2952' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e24e7d84-5bfd-42c2-aa14-9f7b92fd1a18', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:43 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '9b092ebc-7447-41df-8f23-f228de39a5b6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:43 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c8fe1367-c1c5-4778-b618-10354ef2a99a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:45 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5e3e47a3-0c28-4001-9235-7dbd0da0f29f', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:47 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '623d7b9b-22ba-4f03-9f4a-3d1b9a12f078', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:50 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '32889f5a-639d-4980-aa76-d6a0f3c3f2cd', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:51 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e25de8ed-d3cc-4043-98ab-a29645e52a4b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:53 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '77dec8e6-7a9d-4b27-a602-f393edb474ed', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:56 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '9abe44cd-87ad-45d5-b4ae-b7782e7d513c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:57 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '9eca9b68-5abd-4169-80e0-fbc5a263c8c7', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:00 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'dea9a6f4-b476-45b7-b8b9-e6ad3731167b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:02 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590498404,"scheduledPurgeDate":1598274404,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/f2d104a9c62a4c59b66f690017696c66","x5t":"-s6fv9NJHGSXMR77JGAQcvHX7kk","cer":"MIIDKDCCAhCgAwIBAgIQVw2YlcZ6RuKCJd7tgCLB/jANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDN8XyRSe0msKn+LJmqGAL01Q4x1g5tK832OviCqEM0ErK43d9QB7rOgklvBqomwNNySD5b75VD138WOzltvpUVzqvwDEBOdXY+zSDYmdMrNbvxMZdbjcF0aXt1OKX/egCzV0iRLuud5x8JYZYDmBWhfIanp9XIrFjXoFNYcSwB59onRW97WHooOzQLknB4Sut8dsQmMBN7JKNpZqx65yPrCatlklyJvbBKqlmG9khsrFZtez3P6YoYaomF5a7Ot7JjTHp5sTQwn8WlM7E9Lr0jGeyo3Y5fISOl7o0k7AjVO8B/eB4vAaJJlLsCD9dR5FIC02BwCwUPyOPRELceiiRzAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTA6w5J0jomrTgiVcWqW14hQm8SQjAdBgNVHQ4EFgQUwOsOSdI6Jq04IlXFqlteIUJvEkIwDQYJKoZIhvcNAQELBQADggEBABu4Ws7fi7Q2VWKu3DKbYwfqiK1/0OY7Nzw4INr/pzfNbOixiDKm76hI1bOlOk+QNZlFcO62L4bntfIo+L3ocZGHrEqZcCvnNHweS9TcA+ptmE0XFtNuIEPunC0xUFwmx0/IfMXyfGXmTiJVs3ZtuJSaT/Y7itrUC1Pe3oFdcNPqP7+shorEWsVgN9j+/dAe6Erl9+qYO5OSI3j6ZjdRRCBE4rSt/rFKIsxryGqvlxd+sy6ci/UWCHWHqlkdssRSB90LGdAW3AApk/iW5ymJpUp2Rp2naC3TORJj1m0JXepWEeLNT3dtCEfseHP562OFNQ7SvfzN+DmjFfcRLeTpbS0=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8b95aa25-5768-40fc-a4ae-72fd6ba4acd8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT', + 'Content-Length', + '2952' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '4fc5aeeb-3633-4354-812c-e74e7a3adfc2', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4A7X7Ru7ZkETZDbqBPPtTkXmYFneXndduHxX5M0hXwHNNc5H3qagziIoAKzcJmrYg8GDBNpgvYFPAUXERQh0fwkfTAFvqeJR13qJ+FZ/c6cmeTNmoKlmM7DUYoKMIS4mX2iFUQM0VUWabSS97vNFFpGcizztUnAXOZCbSWCHcrU4FSmtP9hMCUY8BBqwwFq3+zCGaNpQQyivFFyOlbZTA1pIT25JKgibAQ8CO+R3ZUwBsrltg/ZpXnRxYD3Ee1MaBrwmRXO5pMwqOz/mZLnorohaQQlEv05epLnST5bX4TJJJIlhe3sp7G45ywKWpsBnt42w0iPij0qzZoCZqWbJnQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAD9FaPnsa2x4Ii6c1+0Kr3knoDwGUuAxTlDf8WQK9PdJctEKlJTeTV4egyyAM2/NzJ3s6gHHWnbLoEiyamyCCw/ovmj95C2TM3CdCXbD3XF4CpnKmi5BSqIDS+aq0KVl9c0Kxqp22FEvTiUjLwFiyXsB9eNNXZqKmgmgIIh642oFfoH16PNHs2G0aIY+QQQEURgQo9bmgjN9XPKVwiGcr5OR1nxDRzMhfFUmv0OVLvLYunxmWBW+thyxWxWaigECt3eaHHgZvxrob4lvfb3tcNSm1M6QbqJp3/zHrpaiucl/7Ek5hgRoCS4DWpxF4vHGlwb9WyjS3/CqKJUhHRmxdOk=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1","request_id":"cbdb4e61c63b489da5d565211fd2b3d0"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f8e7c87f-12b6-4c5c-a347-f6027d289652', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT', + 'Content-Length', + '1361' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","x5t":"NHMy9vo6wcUtLTQDG4_IkmKDAnM","cer":"MIIDKDCCAhCgAwIBAgIQedPPVVR5R/OMpxp95fibAzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDgDtftG7tmQRNkNuoE8+1OReZgWd5ed124fFfkzSFfAc01zkfepqDOIigArNwmatiDwYME2mC9gU8BRcRFCHR/CR9MAW+p4lHXeon4Vn9zpyZ5M2agqWYzsNRigowhLiZfaIVRAzRVRZptJL3u80UWkZyLPO1ScBc5kJtJYIdytTgVKa0/2EwJRjwEGrDAWrf7MIZo2lBDKK8UXI6VtlMDWkhPbkkqCJsBDwI75HdlTAGyuW2D9mledHFgPcR7UxoGvCZFc7mkzCo7P+ZkueiuiFpBCUS/Tl6kudJPltfhMkkkiWF7eynsbjnLApamwGe3jbDSI+KPSrNmgJmpZsmdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSFcfP3huP0jCkku18iYG2+YpAMCTAdBgNVHQ4EFgQUhXHz94bj9IwpJLtfImBtvmKQDAkwDQYJKoZIhvcNAQELBQADggEBAFpB1lQfEf/XrQmR6Fw3Fqwn+o944KcDPFvrvtLh3CR7PFZOqnViEF15G22u57kX/SLsdBtV+hiAGt6Zhse+3spUw3XnBK+FxIbV4i3bD4dSz89DLm2RHQpoef/KBW1hl+/1qIc+6Gw7sp6U5dcpGNKCBueTO0neQaftSDuJr9Xrk5Honh87neiZMC7cW6jULCA+Ou2P/V805RJP0Aq28z3tOSm7aruzavjCpJUbe32FvUsyw0jjFOGcXuYPD2onbtUZlQWv9eAsNYB09/oZ/T/kOHcb8vMKZCqgSUzJ4M1lQsN2274tOYLcWMCJadTwfa2zCsOSV+VZpK2zYVaXdC8=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '20a8461c-a75f-4815-8a96-066d552ca9d1', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT', + 'Content-Length', + '2725' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590498425,"scheduledPurgeDate":1598274425,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","x5t":"NHMy9vo6wcUtLTQDG4_IkmKDAnM","cer":"MIIDKDCCAhCgAwIBAgIQedPPVVR5R/OMpxp95fibAzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDgDtftG7tmQRNkNuoE8+1OReZgWd5ed124fFfkzSFfAc01zkfepqDOIigArNwmatiDwYME2mC9gU8BRcRFCHR/CR9MAW+p4lHXeon4Vn9zpyZ5M2agqWYzsNRigowhLiZfaIVRAzRVRZptJL3u80UWkZyLPO1ScBc5kJtJYIdytTgVKa0/2EwJRjwEGrDAWrf7MIZo2lBDKK8UXI6VtlMDWkhPbkkqCJsBDwI75HdlTAGyuW2D9mledHFgPcR7UxoGvCZFc7mkzCo7P+ZkueiuiFpBCUS/Tl6kudJPltfhMkkkiWF7eynsbjnLApamwGe3jbDSI+KPSrNmgJmpZsmdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSFcfP3huP0jCkku18iYG2+YpAMCTAdBgNVHQ4EFgQUhXHz94bj9IwpJLtfImBtvmKQDAkwDQYJKoZIhvcNAQELBQADggEBAFpB1lQfEf/XrQmR6Fw3Fqwn+o944KcDPFvrvtLh3CR7PFZOqnViEF15G22u57kX/SLsdBtV+hiAGt6Zhse+3spUw3XnBK+FxIbV4i3bD4dSz89DLm2RHQpoef/KBW1hl+/1qIc+6Gw7sp6U5dcpGNKCBueTO0neQaftSDuJr9Xrk5Honh87neiZMC7cW6jULCA+Ou2P/V805RJP0Aq28z3tOSm7aruzavjCpJUbe32FvUsyw0jjFOGcXuYPD2onbtUZlQWv9eAsNYB09/oZ/T/kOHcb8vMKZCqgSUzJ4M1lQsN2274tOYLcWMCJadTwfa2zCsOSV+VZpK2zYVaXdC8=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '371de9e3-22e0-4780-9058-e7c7074dbd3e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT', + 'Content-Length', + '2952' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e716ed3b-9b99-416c-86fe-ebc02304f13b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '17862598-58eb-4dfe-b081-59a4038ffabb', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:04 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'be1bb9d0-d13c-49dc-a9b5-1820c191c79f', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:06 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '0207240a-7404-473a-80f9-5ca30dbaa8e0', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:08 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f176db25-1080-444a-adba-32f623066f29', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:11 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5f5ad154-a110-44b4-95a5-f4988454d4c1', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:13 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '216e977d-4741-41c1-868c-a5ba80fea52d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:15 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '175', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '4b415e2d-497d-48c1-8864-cf05c9b17005', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:17 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590498425,"scheduledPurgeDate":1598274425,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/50ac82f4ea314337bd2830ede6220ef9","x5t":"NHMy9vo6wcUtLTQDG4_IkmKDAnM","cer":"MIIDKDCCAhCgAwIBAgIQedPPVVR5R/OMpxp95fibAzANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjQyWhcNMjEwNTI2MTMwNjQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDgDtftG7tmQRNkNuoE8+1OReZgWd5ed124fFfkzSFfAc01zkfepqDOIigArNwmatiDwYME2mC9gU8BRcRFCHR/CR9MAW+p4lHXeon4Vn9zpyZ5M2agqWYzsNRigowhLiZfaIVRAzRVRZptJL3u80UWkZyLPO1ScBc5kJtJYIdytTgVKa0/2EwJRjwEGrDAWrf7MIZo2lBDKK8UXI6VtlMDWkhPbkkqCJsBDwI75HdlTAGyuW2D9mledHFgPcR7UxoGvCZFc7mkzCo7P+ZkueiuiFpBCUS/Tl6kudJPltfhMkkkiWF7eynsbjnLApamwGe3jbDSI+KPSrNmgJmpZsmdAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSFcfP3huP0jCkku18iYG2+YpAMCTAdBgNVHQ4EFgQUhXHz94bj9IwpJLtfImBtvmKQDAkwDQYJKoZIhvcNAQELBQADggEBAFpB1lQfEf/XrQmR6Fw3Fqwn+o944KcDPFvrvtLh3CR7PFZOqnViEF15G22u57kX/SLsdBtV+hiAGt6Zhse+3spUw3XnBK+FxIbV4i3bD4dSz89DLm2RHQpoef/KBW1hl+/1qIc+6Gw7sp6U5dcpGNKCBueTO0neQaftSDuJr9Xrk5Honh87neiZMC7cW6jULCA+Ou2P/V805RJP0Aq28z3tOSm7aruzavjCpJUbe32FvUsyw0jjFOGcXuYPD2onbtUZlQWv9eAsNYB09/oZ/T/kOHcb8vMKZCqgSUzJ4M1lQsN2274tOYLcWMCJadTwfa2zCsOSV+VZpK2zYVaXdC8=","attributes":{"enabled":true,"nbf":1590497802,"exp":1622034402,"created":1590498403,"updated":1590498403,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498391,"updated":1590498391}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '4112343d-dd22-452e-beb2-1b61a62f5cb6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:18 GMT', + 'Content-Length', + '2952' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedcertificates/challengeAuthCertificateName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f2f38313-0ac4-4752-9fbb-4c2afb77f490', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:07:19 GMT' +]); diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js index 1d685e5dfafa..93931d775c1c 100644 --- a/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js +++ b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js @@ -1,11 +1,11 @@ let nock = require('nock'); -module.exports.hash = "e1d04c8184c0d5de8271d76428ba839b"; +module.exports.hash = "4516d5e44da484f1c640d285850ff50b"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .post('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/create') + .post('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/create') .query(true) .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ 'Cache-Control', @@ -18,18 +18,16 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'WWW-Authenticate', 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '83c2400c-53e2-448a-8135-397a5027d2a5', + 'c9611bb8-d653-473f-a21b-ace3a18b24d1', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -39,7 +37,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:29 GMT' + 'Tue, 26 May 2020 13:05:27 GMT' ]); nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -58,27 +56,27 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '4c2b2be7-2ad6-4e2c-b818-1eadae642d00', + 'a1fd9e87-6bad-4040-a848-32821cad1201', 'x-ms-ests-server', - '2.1.10519.7 - SCUS ProdSlices', + '2.1.10571.11 - SCUS ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=At7hTG_Oy6JBprzmG-XDV2o_aSJHAQAAAAV1RdYOAAAA; expires=Sat, 06-Jun-2020 03:18:30 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AgJKe1UKgWVEsv_pX9yoPk0_aSJHAQAAABcLX9YOAAAA; expires=Thu, 25-Jun-2020 13:05:27 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 07 May 2020 03:18:30 GMT', + 'Tue, 26 May 2020 13:05:26 GMT', 'Content-Length', '1315' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .post('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .post('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) .query(true) - .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2UsAixGeExmwqrHsSw4yE9mlKNf7jq/Vsdqx72K/dVNvM9B2mSFn/6UzAX/1OyyXgQnme4CGp0F9fwN4WYSetqgPA7puZbDKKrkIht7KdzMfxr/AyUHhHtQJT+MiMwIg1vZKCl9j0L39uOAuOf4WUxCmXbdWjkjC2ywMor7zi0OXmxnIivhzAzZPDtMGtWfYu9ev86PW3uYrdYwIU/xP7c1lCxtvWysgagUFuT7H3OrZPDAjRMKObuNDlnhUpr+5rPIOIzH+grV5EH0h8FkC1fWRNBm5KSw4BNaP294fYoekJuQAn0F4Qe7hoRxyWWxhSW0WmTnLDFe4wOFB6iKUnQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALh1pAepB1I32dLz1sC8VO864Fj8OqpHGMe1G+XPAaWL02zMlXNDWlRbxq/znCJcTNg9FdYASfJ9Q9c/rE67NmaA1Wl2vVipc23h5gkIWyQh9fnLJlk4m03gke1tJoMjBPKz4TU4k7DUUs4kOmrAjPNPgjf54HS9bDaIYRb9Rx8i5I7Aqh/9V7+MosXq56gtOU8kcGjGhAfu9Qgid8viQ325CE0M/LRNa3Oddgudp5UY9W/p661hqKYPr3DzgZNhKZ2qRO32Wfv+8m5cC/3s/Wb3nGCFLEOxwPSH6a2uR1HfuVvzZRd3e4nIBWN31aJfbK9vWkJqRQNogWaobyVoVRw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"65fb3533cf2e49088723618e448eecd5"}, [ + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -88,19 +86,17 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Expires', '-1', 'Location', - 'https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending?api-version=7.1-preview&request_id=65fb3533cf2e49088723618e448eecd5', + 'https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending?api-version=7.1-preview&request_id=19373e837bd644c9ae7586056050136c', 'Retry-After', '10', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '1f25f99f-831a-45cf-be58-1c4ef2d58cf7', + '9c77fbcf-219c-456e-a17a-da5a87118da2', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -110,15 +106,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:31 GMT', + 'Tue, 26 May 2020 13:05:28 GMT', 'Content-Length', - '1369' + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') .query(true) - .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2UsAixGeExmwqrHsSw4yE9mlKNf7jq/Vsdqx72K/dVNvM9B2mSFn/6UzAX/1OyyXgQnme4CGp0F9fwN4WYSetqgPA7puZbDKKrkIht7KdzMfxr/AyUHhHtQJT+MiMwIg1vZKCl9j0L39uOAuOf4WUxCmXbdWjkjC2ywMor7zi0OXmxnIivhzAzZPDtMGtWfYu9ev86PW3uYrdYwIU/xP7c1lCxtvWysgagUFuT7H3OrZPDAjRMKObuNDlnhUpr+5rPIOIzH+grV5EH0h8FkC1fWRNBm5KSw4BNaP294fYoekJuQAn0F4Qe7hoRxyWWxhSW0WmTnLDFe4wOFB6iKUnQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBALh1pAepB1I32dLz1sC8VO864Fj8OqpHGMe1G+XPAaWL02zMlXNDWlRbxq/znCJcTNg9FdYASfJ9Q9c/rE67NmaA1Wl2vVipc23h5gkIWyQh9fnLJlk4m03gke1tJoMjBPKz4TU4k7DUUs4kOmrAjPNPgjf54HS9bDaIYRb9Rx8i5I7Aqh/9V7+MosXq56gtOU8kcGjGhAfu9Qgid8viQ325CE0M/LRNa3Oddgudp5UY9W/p661hqKYPr3DzgZNhKZ2qRO32Wfv+8m5cC/3s/Wb3nGCFLEOxwPSH6a2uR1HfuVvzZRd3e4nIBWN31aJfbK9vWkJqRQNogWaobyVoVRw=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"65fb3533cf2e49088723618e448eecd5"}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -129,16 +125,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) '-1', 'Retry-After', '10', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e822c19d-d99d-46ca-b8fc-142286ba512c', + '5b67d60e-c7db-43ec-a7fa-22d8ef6b05ae', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -148,15 +142,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:31 GMT', + 'Tue, 26 May 2020 13:05:28 GMT', 'Content-Length', - '1369' + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined","deletedDate":1588821511,"scheduledPurgeDate":1596597511,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/3ae73c1a23a9418681ffbee0936b4d20","attributes":{"enabled":false,"nbf":1588820910,"exp":1620357510,"created":1588821510,"updated":1588821510,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588821511,"updated":1588821511}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -165,16 +159,482 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5cc4e7af-5cf6-4c22-ac7b-11113cbfc904', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:28 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6bc4a4ba-06bc-487f-a778-d58e6da38cc0', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:30 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a436f912-5f5a-4322-af8a-068fdd7d619a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:32 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '00f8a011-2882-4739-8fb4-2272f5ffb922', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:34 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5d50de6c-b6d5-4d89-8a6c-b58a1e67420b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:36 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd515ee96-8a31-4c26-ab8b-bd93b9f4f6c6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:39 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bdee8445-6c0f-431d-85c2-2b56c4188a1e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:40 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqAVOBPrWas++grk/C87hxjWY5uen9RSQEHeS13EglzQR+45oEXj4i0Fonb8uK+gjiAuMAZZYuhNd1QqC0BmlI1fOaOfoiAVndQQgGFX+MbR1Vzxml87U/S+/7v6Q9dCiXPi24pi7O9pS09rIzcS/rr9CLog9NHZ5d2tEsmZTogQIwvnu7ryYLikegRmD1vXdw+hTj/ogyIDMMqguRDIZihr/r0FeZr2bDSDe1QclNWVM3JPEjsaAnXomEyjIAQ8RdQ6Y99SSbpw/jHuMtmjVBGBUzKJkfyLFx32LYOmVKY7E7DSm4nUoTGjqQrGvFhVKVbVrROjGF3WNHvgoYEOYjQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAGIg867G9fRJ9A5OEUdiutqHaz1MZum7VhtTtvbruTS78IWMT4/BKYWhE+M7MBXWda8pgspN2SdAoc7DgiEl7sxMC7z3i902nGu+X4CfUlGQECChqliIGYg//gMAUtv04w9X7+0P4dqq4KZDtFoPNum704/AOsPB6+frXDbwulXwvFSj30Uo3/v4qvepBoyZ3U+Oetd6byVdre5fA+AZZ3KMIUf8qpE6fctrgjHCfqqMgX43dQ8inJS/yscqLlVnmr1BeyDTf7V7ig7TISznpsmB8RAHgJ2/v2ys8QXshkCB/8hTP+uWmnN6NaEXCup0nelyz7ptZ1pZ1L/jOx8nQbU=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","request_id":"19373e837bd644c9ae7586056050136c"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd5dd5a6e-a9b6-4865-8d30-6c96d05e66a2', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:42 GMT', + 'Content-Length', + '1385' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","x5t":"43rtUzoB5-XjM4OfzoFvl1SHifk","cer":"MIIDKDCCAhCgAwIBAgIQYDvv1usIRROW7T9hRX8FeTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NTQyWhcNMjEwNTI2MTMwNTQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCoBU4E+tZqz76CuT8LzuHGNZjm56f1FJAQd5LXcSCXNBH7jmgRePiLQWidvy4r6COIC4wBlli6E13VCoLQGaUjV85o5+iIBWd1BCAYVf4xtHVXPGaXztT9L7/u/pD10KJc+LbimLs72lLT2sjNxL+uv0IuiD00dnl3a0SyZlOiBAjC+e7uvJguKR6BGYPW9d3D6FOP+iDIgMwyqC5EMhmKGv+vQV5mvZsNIN7VByU1ZUzck8SOxoCdeiYTKMgBDxF1Dpj31JJunD+Me4y2aNUEYFTMomR/IsXHfYtg6ZUpjsTsNKbidShMaOpCsa8WFUpVtWtE6MYXdY0e+ChgQ5iNAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYs0ck9Zo6ji/eTNa3rHzpGfMAOzAdBgNVHQ4EFgQUGLNHJPWaOo4v3kzWt6x86RnzADswDQYJKoZIhvcNAQELBQADggEBAHNvQKCDuDk2QWfHeGnvgtGADuy5japSXIDPYynE3Vd/f3Hvv4G0cfyH7oALpc+6myd1Kka/lUAFtkQHXpkWaFtuDv1FEqqXRzzOQU+Rh5siLnUQC8zVbZ2//PvwXOTccArwwpBef4h+esj+iIgGy94W5vdgI2I3IG0UId8OYf1GMDsfFHXeaVKs9aj4nFy5k41xttD3+2TqpgJQbddrDd6mIMAeX8wzjkYyPyZVwLQCKPfDRwBJGmBQd0wHE3HZXBQ0TI0z+LtlFBkgG7ZULH0dlrrcqQWuKdA3pWi0bozXQrWDwndKUhz9bz68DpPQXmtgt2jjkBIYNYRMlIfYp+4=","attributes":{"enabled":true,"nbf":1590497742,"exp":1622034342,"created":1590498342,"updated":1590498342,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498328,"updated":1590498328}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '11ea2927-f5e6-4255-9149-db7971c3f4f7', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:42 GMT', + 'Content-Length', + '2785' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/create', {"policy":{"key_props":{},"secret_props":{},"x509_props":{"subject":"cn=MyCert","sans":{}},"issuer":{"name":"Self"},"attributes":{}},"attributes":{}}) + .query(true) + .reply(202, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Location', + 'https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending?api-version=7.1-preview&request_id=db142cbd5c474b39b160af8748d4126d', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '100e1b7c-cb10-4b5a-844f-c40107593e06', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:43 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f130abdd-bab1-4c71-bebb-347319abd5d4', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:43 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '03baf0e8-cdaf-4879-9c6a-1ed34c16d3ca', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:43 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8499a157-c604-4b77-962f-44dbd01160c6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:45 GMT', + 'Content-Length', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'baba8942-ba3f-4d85-b646-e66dbbd066b9', + '822e5674-d64e-4c89-a91a-6ad8e6e0feab', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -184,35 +644,69 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:31 GMT', + 'Tue, 26 May 2020 13:05:47 GMT', 'Content-Length', - '1467' + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bda3c861-de2a-4c98-8194-ebbcca7d0e51', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:49 GMT', 'Content-Length', - '177', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', + 'Retry-After', + '10', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '106a72ff-065a-4862-a350-e43d5b4bc886', + '985bc5f5-fac0-4e95-b410-013c77196c87', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -222,33 +716,69 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:31 GMT' + 'Tue, 26 May 2020 13:05:52 GMT', + 'Content-Length', + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8b7c9fa6-42d3-4912-8384-a69e94556f0b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:53 GMT', 'Content-Length', - '177', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', + 'Retry-After', + '10', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '374075ce-caca-4d21-ba63-b44e36d145a9', + 'a91bc63b-4550-4cb9-9b92-a893c3eae1a7', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -258,33 +788,69 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:31 GMT' + 'Tue, 26 May 2020 13:05:55 GMT', + 'Content-Length', + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c1fff38b-d6f0-4061-95f7-ed2fad7f451e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:05:57 GMT', 'Content-Length', - '177', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', + 'Retry-After', + '10', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '54bd3a19-8712-4da7-9df2-e26a42659b76', + 'da467b26-3c8a-4c24-8ac7-093ecf9f08c5', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -294,33 +860,67 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:33 GMT' + 'Tue, 26 May 2020 13:05:59 GMT', + 'Content-Length', + '1379' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"inProgress","status_details":"Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Retry-After', + '10', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '584ec407-0428-49f2-b5df-401c5740dac1', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:01 GMT', 'Content-Length', - '177', + '1379' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending') + .query(true) + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending","issuer":{"name":"Self"},"csr":"MIICoTCCAYkCAQAwETEPMA0GA1UEAxMGTXlDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyd0r3J8MCXfXaPS4qzfwo2WEBy9z4SP6kDwa/ohX5PiklthsN7SKE+CVQP20RPC2hZm3LYIT1hgdSi9oHxI3Ln7NzdmejKciN3Dn9ffueO9+zwC5iEi7W7CMWrKwOshJFhf/ZKKEJqcF83d8NDzpWjLesoeUSCR/NwwL329P4HUzNTS0hUV4kiRMD0/wuTISssT/zoqSXEx7P57yYLX0AM1WWgvHEaFqSYjjxY1Z4B3FysPE19iWs/nUGbVbogUWePLqy/X2smeFCTh7z/aAXM5FcawSF3GddMxpDERUkYLKNVNmKkWAgL1XVCk/1IQI5Nxy6qBLxZ1pY7OEsmKCLQIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABhObNnvZ20L4ikwo3m4+QGqnFX/Oa1p/mjnNi7d24U7Tcm6LV46KW28EBHEzqe15K2BugTrqNmumVT1GVnXMJjIqyECAn2rXZTrPzmonXeGSyNJLx8IVTfn1vBwm1nxLJA61PLMBjwZbbbVo4ECkpAcxU15F0cExI52cBgEL6tNKQ+PzObphycPAaipQoUvBNCyqTSNqf9A3M6rp/skEnbfOz8K56pap1JRHwlmoN3teWLHqcOhED0iD48A+vzPJXc6rTjW4luMt5ywzWWOICqjzAvJUsxTApORPtvt8rJYsFA2JqbzKHOWfHt0ZmRmtZ4thWlVVP2ig2izHUA9XuI=","cancellation_requested":false,"status":"completed","target":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","request_id":"db142cbd5c474b39b160af8748d4126d"}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '389aab7a-fa82-40b1-a423-ba2c4261f51e', + '7a9c038d-9767-412c-bdb3-92bdecc9d2c0', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -330,33 +930,65 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:35 GMT' + 'Tue, 26 May 2020 13:06:04 GMT', + 'Content-Length', + '1385' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","x5t":"o8f6g96f8IKS6OIPjgeQiUuPp_g","cer":"MIIDKDCCAhCgAwIBAgIQftQQ5FJZTEqws0x3bS+fbjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjAxWhcNMjEwNTI2MTMwNjAxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJ3SvcnwwJd9do9LirN/CjZYQHL3PhI/qQPBr+iFfk+KSW2Gw3tIoT4JVA/bRE8LaFmbctghPWGB1KL2gfEjcufs3N2Z6MpyI3cOf19+54737PALmISLtbsIxasrA6yEkWF/9kooQmpwXzd3w0POlaMt6yh5RIJH83DAvfb0/gdTM1NLSFRXiSJEwPT/C5MhKyxP/OipJcTHs/nvJgtfQAzVZaC8cRoWpJiOPFjVngHcXKw8TX2Jaz+dQZtVuiBRZ48urL9fayZ4UJOHvP9oBczkVxrBIXcZ10zGkMRFSRgso1U2YqRYCAvVdUKT/UhAjk3HLqoEvFnWljs4SyYoItAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRJLPVCQEh86toYqCF3BJTHBEnFeDAdBgNVHQ4EFgQUSSz1QkBIfOraGKghdwSUxwRJxXgwDQYJKoZIhvcNAQELBQADggEBAFhTaaIds41+jb8FJbzgiVcv88bNsUlnB5BCm70j3vdyWKULAZI6L0x/fLYcIQqQwtw2Rk+kc2dctZUCxZ68diLFyzlkUpGZX8UZwxr+zCgrNSe2AtXsE1dDTq7I7+JhN2cNzQ77FASC8yVK49XA+hyp+82Gme7lwQ6ZNNjWMZFrpVDeh78MOBHL/33+PQs2JPPIhfaB4OZ7A3DjBmiMOpDn7P5wfaoILivFaJODLWNMPlMmSUKT8OjUD3hMMe2SZ5KvuTmgyYUHm7DLics/+z8q27J5FiE1OQuirxIignaBlY867WBApiYgCu/gUQGat/a5+9r10Jio0ndvAXw7gEw=","attributes":{"enabled":true,"nbf":1590497761,"exp":1622034361,"created":1590498361,"updated":1590498361,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498343,"updated":1590498343}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3c03ccd7-6658-4030-bfba-2258bc1a75ab', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:04 GMT', 'Content-Length', - '177', + '2785' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590498364,"scheduledPurgeDate":1598274364,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","x5t":"43rtUzoB5-XjM4OfzoFvl1SHifk","cer":"MIIDKDCCAhCgAwIBAgIQYDvv1usIRROW7T9hRX8FeTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NTQyWhcNMjEwNTI2MTMwNTQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCoBU4E+tZqz76CuT8LzuHGNZjm56f1FJAQd5LXcSCXNBH7jmgRePiLQWidvy4r6COIC4wBlli6E13VCoLQGaUjV85o5+iIBWd1BCAYVf4xtHVXPGaXztT9L7/u/pD10KJc+LbimLs72lLT2sjNxL+uv0IuiD00dnl3a0SyZlOiBAjC+e7uvJguKR6BGYPW9d3D6FOP+iDIgMwyqC5EMhmKGv+vQV5mvZsNIN7VByU1ZUzck8SOxoCdeiYTKMgBDxF1Dpj31JJunD+Me4y2aNUEYFTMomR/IsXHfYtg6ZUpjsTsNKbidShMaOpCsa8WFUpVtWtE6MYXdY0e+ChgQ5iNAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYs0ck9Zo6ji/eTNa3rHzpGfMAOzAdBgNVHQ4EFgQUGLNHJPWaOo4v3kzWt6x86RnzADswDQYJKoZIhvcNAQELBQADggEBAHNvQKCDuDk2QWfHeGnvgtGADuy5japSXIDPYynE3Vd/f3Hvv4G0cfyH7oALpc+6myd1Kka/lUAFtkQHXpkWaFtuDv1FEqqXRzzOQU+Rh5siLnUQC8zVbZ2//PvwXOTccArwwpBef4h+esj+iIgGy94W5vdgI2I3IG0UId8OYf1GMDsfFHXeaVKs9aj4nFy5k41xttD3+2TqpgJQbddrDd6mIMAeX8wzjkYyPyZVwLQCKPfDRwBJGmBQd0wHE3HZXBQ0TI0z+LtlFBkgG7ZULH0dlrrcqQWuKdA3pWi0bozXQrWDwndKUhz9bz68DpPQXmtgt2jjkBIYNYRMlIfYp+4=","attributes":{"enabled":true,"nbf":1590497742,"exp":1622034342,"created":1590498342,"updated":1590498342,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498328,"updated":1590498328}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'dbecff4c-c122-41f2-bba9-32a0994c0a9c', + 'a37c5d54-278a-443a-810f-4b0bfa275a8e', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -366,33 +998,33 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:37 GMT' + 'Tue, 26 May 2020 13:06:04 GMT', + 'Content-Length', + '3024' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '72e3325a-3a1a-4d6e-8d1f-5686f12a841a', + '378846f2-8a25-4690-b4f6-6089d711f53c', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -402,33 +1034,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:39 GMT' + 'Tue, 26 May 2020 13:06:04 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '3cf640f2-9b3d-4b90-9eda-ea9805fc96c1', + 'e082fde2-4eb8-4bce-914f-bbfa6b3ae99b', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -438,33 +1068,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:41 GMT' + 'Tue, 26 May 2020 13:06:04 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '55199feb-0453-4394-8206-164b058ced85', + 'e47d7a21-97bd-4852-8142-5f9cbb790988', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -474,33 +1102,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:43 GMT' + 'Tue, 26 May 2020 13:06:06 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8081228d-7344-4d39-9a89-fee24d1d8bac', + 'c072adcc-02f9-48b4-86a4-f3e96e07c595', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -510,33 +1136,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:45 GMT' + 'Tue, 26 May 2020 13:06:08 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '25cc05a7-7c15-4739-96b7-374c00e31f5d', + '02d6c286-1f51-4c9c-abfa-2c3ae627f015', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -546,33 +1170,93 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:47 GMT' + 'Tue, 26 May 2020 13:06:10 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590498364,"scheduledPurgeDate":1598274364,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4542684ff47d40df9c8a48adc9122af7","x5t":"43rtUzoB5-XjM4OfzoFvl1SHifk","cer":"MIIDKDCCAhCgAwIBAgIQYDvv1usIRROW7T9hRX8FeTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NTQyWhcNMjEwNTI2MTMwNTQyWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCoBU4E+tZqz76CuT8LzuHGNZjm56f1FJAQd5LXcSCXNBH7jmgRePiLQWidvy4r6COIC4wBlli6E13VCoLQGaUjV85o5+iIBWd1BCAYVf4xtHVXPGaXztT9L7/u/pD10KJc+LbimLs72lLT2sjNxL+uv0IuiD00dnl3a0SyZlOiBAjC+e7uvJguKR6BGYPW9d3D6FOP+iDIgMwyqC5EMhmKGv+vQV5mvZsNIN7VByU1ZUzck8SOxoCdeiYTKMgBDxF1Dpj31JJunD+Me4y2aNUEYFTMomR/IsXHfYtg6ZUpjsTsNKbidShMaOpCsa8WFUpVtWtE6MYXdY0e+ChgQ5iNAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBQYs0ck9Zo6ji/eTNa3rHzpGfMAOzAdBgNVHQ4EFgQUGLNHJPWaOo4v3kzWt6x86RnzADswDQYJKoZIhvcNAQELBQADggEBAHNvQKCDuDk2QWfHeGnvgtGADuy5japSXIDPYynE3Vd/f3Hvv4G0cfyH7oALpc+6myd1Kka/lUAFtkQHXpkWaFtuDv1FEqqXRzzOQU+Rh5siLnUQC8zVbZ2//PvwXOTccArwwpBef4h+esj+iIgGy94W5vdgI2I3IG0UId8OYf1GMDsfFHXeaVKs9aj4nFy5k41xttD3+2TqpgJQbddrDd6mIMAeX8wzjkYyPyZVwLQCKPfDRwBJGmBQd0wHE3HZXBQ0TI0z+LtlFBkgG7ZULH0dlrrcqQWuKdA3pWi0bozXQrWDwndKUhz9bz68DpPQXmtgt2jjkBIYNYRMlIfYp+4=","attributes":{"enabled":true,"nbf":1590497742,"exp":1622034342,"created":1590498342,"updated":1590498342,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498328,"updated":1590498328}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '389714dc-2833-4520-9b0d-14412408bbd4', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:12 GMT', 'Content-Length', - '177', + '3024' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3bef7c0b-54b0-43aa-bd7d-8356b28911e4', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 13:06:12 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590498373,"scheduledPurgeDate":1598274373,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","x5t":"o8f6g96f8IKS6OIPjgeQiUuPp_g","cer":"MIIDKDCCAhCgAwIBAgIQftQQ5FJZTEqws0x3bS+fbjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjAxWhcNMjEwNTI2MTMwNjAxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJ3SvcnwwJd9do9LirN/CjZYQHL3PhI/qQPBr+iFfk+KSW2Gw3tIoT4JVA/bRE8LaFmbctghPWGB1KL2gfEjcufs3N2Z6MpyI3cOf19+54737PALmISLtbsIxasrA6yEkWF/9kooQmpwXzd3w0POlaMt6yh5RIJH83DAvfb0/gdTM1NLSFRXiSJEwPT/C5MhKyxP/OipJcTHs/nvJgtfQAzVZaC8cRoWpJiOPFjVngHcXKw8TX2Jaz+dQZtVuiBRZ48urL9fayZ4UJOHvP9oBczkVxrBIXcZ10zGkMRFSRgso1U2YqRYCAvVdUKT/UhAjk3HLqoEvFnWljs4SyYoItAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRJLPVCQEh86toYqCF3BJTHBEnFeDAdBgNVHQ4EFgQUSSz1QkBIfOraGKghdwSUxwRJxXgwDQYJKoZIhvcNAQELBQADggEBAFhTaaIds41+jb8FJbzgiVcv88bNsUlnB5BCm70j3vdyWKULAZI6L0x/fLYcIQqQwtw2Rk+kc2dctZUCxZ68diLFyzlkUpGZX8UZwxr+zCgrNSe2AtXsE1dDTq7I7+JhN2cNzQ77FASC8yVK49XA+hyp+82Gme7lwQ6ZNNjWMZFrpVDeh78MOBHL/33+PQs2JPPIhfaB4OZ7A3DjBmiMOpDn7P5wfaoILivFaJODLWNMPlMmSUKT8OjUD3hMMe2SZ5KvuTmgyYUHm7DLics/+z8q27J5FiE1OQuirxIignaBlY867WBApiYgCu/gUQGat/a5+9r10Jio0ndvAXw7gEw=","attributes":{"enabled":true,"nbf":1590497761,"exp":1622034361,"created":1590498361,"updated":1590498361,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498343,"updated":1590498343}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b763befa-12e4-4140-838c-80b5dc6cb846', + '0b268204-0833-41b0-926b-cc5e8f138fe3', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -582,33 +1266,33 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:49 GMT' + 'Tue, 26 May 2020 13:06:12 GMT', + 'Content-Length', + '3024' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e25ac6cb-71f7-4475-8d1e-0e70d27ff80b', + 'a574a8a3-7624-4e36-a101-269dd532108d', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -618,33 +1302,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:51 GMT' + 'Tue, 26 May 2020 13:06:12 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'f378adc9-d3ae-4579-99c6-1c8f26d032ad', + 'ec11a2cb-e738-4126-ad3d-5517d5578577', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -654,33 +1336,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:53 GMT' + 'Tue, 26 May 2020 13:06:12 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '99d79c37-ea72-4500-9972-31e1c2959106', + '0281614a-8eeb-4a8f-b598-4b84c2e60527', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -690,33 +1370,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:55 GMT' + 'Tue, 26 May 2020 13:06:15 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'bc02f4eb-3ba1-4265-937a-deef774f9c1b', + 'd949e382-088c-460a-93e2-03093eaece89', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -726,33 +1404,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:18:57 GMT' + 'Tue, 26 May 2020 13:06:17 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'baf7a3dd-bcb9-4eac-aac4-4af81d6c7286', + '6c8ff434-2781-4ebf-b332-93634dba57c1', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -762,33 +1438,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:00 GMT' + 'Tue, 26 May 2020 13:06:19 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b4742ad4-6ebf-4185-9ac3-7cfd945d60af', + 'eb81b578-2967-4614-9193-14e65ef3d84b', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -798,33 +1472,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:02 GMT' + 'Tue, 26 May 2020 13:06:21 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '1bb4aae1-330e-48e1-afcf-edd497c23e57', + '030f3643-b6c7-4400-a6d0-972356f4f521', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -834,33 +1506,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:04 GMT' + 'Tue, 26 May 2020 13:06:23 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'de417456-8ed3-4c00-8351-b93bd721a576', + 'b7487bee-d0b6-4c95-808f-8394c61c9bcf', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -870,33 +1540,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:06 GMT' + 'Tue, 26 May 2020 13:06:25 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined"}}, [ + .reply(404, {"error":{"code":"CertificateNotFound","message":"Deleted Certificate not found: challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '177', + '187', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'dbd18602-8447-445c-a2c2-f715a4fc90cc', + '56259769-2607-4644-b80d-969c332a861a', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -906,13 +1574,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:08 GMT' + 'Tue, 26 May 2020 13:06:27 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .get('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined","deletedDate":1588821511,"scheduledPurgeDate":1596597511,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/3ae73c1a23a9418681ffbee0936b4d20","attributes":{"enabled":false,"nbf":1588820910,"exp":1620357510,"created":1588821510,"updated":1588821510,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1588821511,"updated":1588821511}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined/pending"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590498373,"scheduledPurgeDate":1598274373,"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","sid":"https://keyvault_name.vault.azure.net/secrets/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/547efcd1d08447eead0778ffd9a70147","x5t":"o8f6g96f8IKS6OIPjgeQiUuPp_g","cer":"MIIDKDCCAhCgAwIBAgIQftQQ5FJZTEqws0x3bS+fbjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNTI2MTI1NjAxWhcNMjEwNTI2MTMwNjAxWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJ3SvcnwwJd9do9LirN/CjZYQHL3PhI/qQPBr+iFfk+KSW2Gw3tIoT4JVA/bRE8LaFmbctghPWGB1KL2gfEjcufs3N2Z6MpyI3cOf19+54737PALmISLtbsIxasrA6yEkWF/9kooQmpwXzd3w0POlaMt6yh5RIJH83DAvfb0/gdTM1NLSFRXiSJEwPT/C5MhKyxP/OipJcTHs/nvJgtfQAzVZaC8cRoWpJiOPFjVngHcXKw8TX2Jaz+dQZtVuiBRZ48urL9fayZ4UJOHvP9oBczkVxrBIXcZ10zGkMRFSRgso1U2YqRYCAvVdUKT/UhAjk3HLqoEvFnWljs4SyYoItAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRJLPVCQEh86toYqCF3BJTHBEnFeDAdBgNVHQ4EFgQUSSz1QkBIfOraGKghdwSUxwRJxXgwDQYJKoZIhvcNAQELBQADggEBAFhTaaIds41+jb8FJbzgiVcv88bNsUlnB5BCm70j3vdyWKULAZI6L0x/fLYcIQqQwtw2Rk+kc2dctZUCxZ68diLFyzlkUpGZX8UZwxr+zCgrNSe2AtXsE1dDTq7I7+JhN2cNzQ77FASC8yVK49XA+hyp+82Gme7lwQ6ZNNjWMZFrpVDeh78MOBHL/33+PQs2JPPIhfaB4OZ7A3DjBmiMOpDn7P5wfaoILivFaJODLWNMPlMmSUKT8OjUD3hMMe2SZ5KvuTmgyYUHm7DLics/+z8q27J5FiE1OQuirxIignaBlY867WBApiYgCu/gUQGat/a5+9r10Jio0ndvAXw7gEw=","attributes":{"enabled":true,"nbf":1590497761,"exp":1622034361,"created":1590498361,"updated":1590498361,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"cn=MyCert","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1590498343,"updated":1590498343}},"pending":{"id":"https://keyvault_name.vault.azure.net/certificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/pending"}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -921,16 +1589,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'a12300e6-9d79-49a3-a6ed-276e10ef4437', + 'f02b3f30-3cd3-4de0-8d3b-da0127caf373', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -940,13 +1606,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:10 GMT', + 'Tue, 26 May 2020 13:06:29 GMT', 'Content-Length', - '1467' + '3024' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain-undefined') + .delete('/deletedcertificates/challengeAuthCertificateName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) .reply(204, "", [ 'Cache-Control', @@ -955,16 +1621,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'no-cache', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '0a9133b5-1e0f-4304-a821-bfe1a90f0043', + '4fb89009-7d7a-4a44-a14e-6afe74241322', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -974,5 +1638,5 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 03:19:10 GMT' + 'Tue, 26 May 2020 13:06:29 GMT' ]); diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..7040692b68be --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "a4e6782787203da965d3cea21b9b1225"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..86dc6025739d --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "fe38d4229e9f2d028f6211678c3b4865"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-certificates/rollup.base.config.js b/sdk/keyvault/keyvault-certificates/rollup.base.config.js index 7bd47136890f..72b70b695033 100644 --- a/sdk/keyvault/keyvault-certificates/rollup.base.config.js +++ b/sdk/keyvault/keyvault-certificates/rollup.base.config.js @@ -33,7 +33,7 @@ export function nodeConfig(test = false) { const externalNodeBuiltins = ["crypto", "fs", "os", "url", "assert"]; const additionalExternals = ["keytar"]; const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-certificates/src/index.js", external: depNames.concat(externalNodeBuiltins, additionalExternals), output: { file: "dist/index.js", @@ -57,7 +57,7 @@ export function nodeConfig(test = false) { if (test) { // entry point is every test file - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. @@ -83,7 +83,7 @@ export function nodeConfig(test = false) { export function browserConfig(test = false) { const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-certificates/src/index.js", output: { file: "dist-browser/azure-keyvault-certificates.js", banner: banner, @@ -121,7 +121,7 @@ export function browserConfig(test = false) { }), cjs({ namedExports: { - assert: ["ok", "equal", "strictEqual"], + assert: ["ok", "equal", "strictEqual", "deepEqual"], "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] } }) @@ -131,7 +131,7 @@ export function browserConfig(test = false) { baseConfig.external = ["fs", "fs-extra", "child_process", "path", "crypto", "constants"]; if (test) { baseConfig.external.push("os"); - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. diff --git a/sdk/keyvault/keyvault-certificates/src/core/challengeBasedAuthenticationPolicy.ts b/sdk/keyvault/keyvault-certificates/src/core/challengeBasedAuthenticationPolicy.ts deleted file mode 100644 index 058cb1e7e0ff..000000000000 --- a/sdk/keyvault/keyvault-certificates/src/core/challengeBasedAuthenticationPolicy.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -import { TokenCredential } from "@azure/core-http"; -import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http"; -import { Constants } from "@azure/core-http"; -import { HttpOperationResponse } from "@azure/core-http"; -import { HttpHeaders } from "@azure/core-http"; -import { WebResource } from "@azure/core-http"; -import { AccessTokenCache, ExpiringAccessTokenCache } from "@azure/core-http"; - -/** - * Representation of the Authentication Challenge - */ -export class AuthenticationChallenge { - constructor(public authorization: string, public scope: string) { - } - - /** - * Checks that this AuthenticationChallenge is equal to another one given. - * @param other The other AuthenticationChallenge - */ - public equalTo(other: AuthenticationChallenge | undefined) { - if (!other) { - return false; - } - return this.authorization === other.authorization && this.scope === other.scope; - } -} - -/** - * Helps keep a copy of any previous authentication challenges, - * so that we can compare on any further request. - */ -export class AuthenticationChallengeCache { - public challenge?: AuthenticationChallenge; - - public setCachedChallenge(challenge: AuthenticationChallenge) { - this.challenge = challenge; - } -} - -/** - * Creates a new ChallengeBasedAuthenticationPolicy factory. - * - * @param credential The TokenCredential implementation that can supply the challenge token. - */ -export function challengeBasedAuthenticationPolicy(credential: TokenCredential): RequestPolicyFactory { - const tokenCache: AccessTokenCache = new ExpiringAccessTokenCache(); - const challengeCache = new AuthenticationChallengeCache(); - return { - create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => { - return new ChallengeBasedAuthenticationPolicy(nextPolicy, options, credential, tokenCache, challengeCache); - } - }; -} - -/** - * - * Provides a RequestPolicy that can request a token from a TokenCredential - * implementation and then apply it to the Authorization header of a request - * as a Bearer token. - * - */ -export class ChallengeBasedAuthenticationPolicy extends BaseRequestPolicy { - - /** - * Creates a new ChallengeBasedAuthenticationPolicy object. - * - * @param nextPolicy The next RequestPolicy in the request pipeline. - * @param options Options for this RequestPolicy. - * @param credential The TokenCredential implementation that can supply the bearer token. - * @param tokenCache The cache for the most recent AccessToken returned by the TokenCredential. - */ - constructor( - nextPolicy: RequestPolicy, - options: RequestPolicyOptions, - private credential: TokenCredential, - private tokenCache: AccessTokenCache, - private challengeCache: AuthenticationChallengeCache - ) { - super(nextPolicy, options); - } - - private parseWWWAuthenticate(www_authenticate: string): { - authorization: string, - resource: string - } { - const returnValue = { - authorization: "", - resource: "" - }; - // Parses an authentication message like: - // ``` - // Bearer authorization="some_authorization", resource="https://some.url" - // ``` - let spaceSep = www_authenticate.split(" "); - - // Split the KV comma-separated list - for (const spaceItem of spaceSep) { - const commaSep = spaceItem.split(","); - for (const commaItem of commaSep) { - // Split the key/value pairs - const kv = commaItem.split("="); - const key = kv[0].trim(); - const removeQuotes = (x: string): string => x.trim().replace(/['"]+/g, ''); - if (key == "authorization" || key == "authorization_uri") { - returnValue.authorization = removeQuotes(kv[1]); - } else if (key == "resource" || key == "scope") { - returnValue.resource = removeQuotes(kv[1]); - } - } - } - return returnValue; - } - - /** - * Applies the Bearer token to the request through the Authorization header. - * @param webResource - */ - public async sendRequest( - webResource: WebResource - ): Promise { - if (!webResource.headers) webResource.headers = new HttpHeaders(); - - // Ensure that we're about to use a secure connection - if (!webResource.url.startsWith("https:")) { - throw new Error("The resource address for authorization must use the 'https' protocol."); - } - - const originalBody = webResource.body; - - if (this.challengeCache.challenge == undefined) { - // Use a blank to start the challenge - webResource.body = ""; - } else { - // or use the cached token if we have one - await this.authenticateRequest(webResource); - } - - const response = await this._nextPolicy.sendRequest(webResource); - - if (response.status == 401) { - webResource.body = originalBody; - - let www_authenticate = response.headers.get("WWW-Authenticate"); - - if (www_authenticate) { - // The challenge based authentication will contain both an authorization URI with a token, - // and the resource to which that token is valid against (also called the scope). - const { authorization, resource } = this.parseWWWAuthenticate(www_authenticate); - const challenge = new AuthenticationChallenge(authorization, resource + "/.default") - - if (!challenge.equalTo(this.challengeCache.challenge)) { - this.challengeCache.setCachedChallenge(challenge); - this.tokenCache.setCachedToken(undefined); - - await this.authenticateRequest(webResource); - return this._nextPolicy.sendRequest(webResource); - } - return response; - } - return response; - } else { - return response; - } - } - - private async authenticateRequest(webResource: WebResource): Promise { - let accessToken = this.tokenCache.getCachedToken(); - if (accessToken === undefined) { - accessToken = (await this.credential.getToken(this.challengeCache.challenge!.scope)) || undefined; - this.tokenCache.setCachedToken(accessToken); - } - - if (accessToken) { - webResource.headers.set( - Constants.HeaderConstants.AUTHORIZATION, - `Bearer ${accessToken.token}` - ); - } - } -} diff --git a/sdk/keyvault/keyvault-certificates/src/index.ts b/sdk/keyvault/keyvault-certificates/src/index.ts index 000903a7c393..f2e846063579 100644 --- a/sdk/keyvault/keyvault-certificates/src/index.ts +++ b/sdk/keyvault/keyvault-certificates/src/index.ts @@ -7,6 +7,8 @@ // This file makes more sense if ordered based on how meaningful are some methods in relation to others. /* eslint-disable @typescript-eslint/member-ordering */ +/// + import { TokenCredential, isTokenCredential, @@ -140,8 +142,7 @@ import { SDK_VERSION } from "./core/utils/constants"; import { parseKeyvaultIdentifier as parseKeyvaultEntityIdentifier } from "./core/utils"; import "@azure/core-paging"; import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging"; -import { challengeBasedAuthenticationPolicy } from "./core/challengeBasedAuthenticationPolicy"; - +import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src"; import { CreateCertificatePoller } from "./lro/create/poller"; import { CertificateOperationPoller } from "./lro/operation/poller"; import { DeleteCertificatePoller } from "./lro/delete/poller"; @@ -232,7 +233,10 @@ export { /** * Deprecated KeyVault copy of core-lro's PollerLike. */ -export type KVPollerLike, TResult> = PollerLike; +export type KVPollerLike, TResult> = PollerLike< + TState, + TResult +>; function toCoreAttributes(properties: CertificateProperties): CoreCertificateAttributes { return { @@ -1438,7 +1442,10 @@ export class CertificateClient { this.vaultUrl, certificateName, version, - this.setParentSpan(span, requestOptions) + { + ...this.setParentSpan(span, requestOptions), + certificateAttributes: toCoreAttributes(options) + } ); } finally { span.end(); @@ -2150,7 +2157,6 @@ export class CertificateClient { const attributes: any = item.attributes || {}; const abstractProperties: any = { - name: parsedId.name, createdOn: attributes.created, updatedOn: attributes.updated, expiresOn: attributes.expires, diff --git a/sdk/keyvault/keyvault-certificates/src/lro/create/operation.ts b/sdk/keyvault/keyvault-certificates/src/lro/create/operation.ts index 717be96cccbe..cd9eed521c4e 100644 --- a/sdk/keyvault/keyvault-certificates/src/lro/create/operation.ts +++ b/sdk/keyvault/keyvault-certificates/src/lro/create/operation.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortSignalLike } from "@azure/abort-controller"; +import { AbortSignalLike, AbortSignal } from "@azure/abort-controller"; import { PollOperationState, PollOperation } from "@azure/core-lro"; import { RequestOptionsBase } from "@azure/core-http"; import { diff --git a/sdk/keyvault/keyvault-certificates/src/lro/operation/operation.ts b/sdk/keyvault/keyvault-certificates/src/lro/operation/operation.ts index e899d9d01c03..21a5fdaa177c 100644 --- a/sdk/keyvault/keyvault-certificates/src/lro/operation/operation.ts +++ b/sdk/keyvault/keyvault-certificates/src/lro/operation/operation.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortSignalLike } from "@azure/abort-controller"; +import { AbortSignalLike, AbortSignal } from "@azure/abort-controller"; import { PollOperationState, PollOperation } from "@azure/core-lro"; import { RequestOptionsBase } from "@azure/core-http"; import { diff --git a/sdk/keyvault/keyvault-certificates/test/challengeBasedAuthenticationPolicy.test.ts b/sdk/keyvault/keyvault-certificates/test/challengeBasedAuthenticationPolicy.test.ts deleted file mode 100644 index d5870fe8a01a..000000000000 --- a/sdk/keyvault/keyvault-certificates/test/challengeBasedAuthenticationPolicy.test.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import * as assert from "assert"; -import { CertificateClient } from "../src"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { - AuthenticationChallengeCache, - AuthenticationChallenge -} from "../src/core/challengeBasedAuthenticationPolicy"; -import { testPollerProperties } from "./utils/recorderUtils"; - -describe("Challenge based authentication tests", () => { - const certificatePrefix = `challengeAuth${env.KEY_NAME || "CertificateName"}`; - let certificateSuffix: string; - let client: CertificateClient; - let testClient: TestClient; - let recorder: Recorder; - let originalSetCachedChallenge: any; - - beforeEach(async function() { - const authentication = await authenticate(this); - certificateSuffix = authentication.certificateSuffix; - client = authentication.client; - testClient = authentication.testClient; - recorder = authentication.recorder; - - // Since the Challenge based authentication is protected from writing normally, - // and is involved in considerable core-http machinery, - // the easiest way to test it is to hack into the `AuthenticationChallengeCache` class. - // We will restore it on the `afterEach`. - originalSetCachedChallenge = AuthenticationChallengeCache.prototype.setCachedChallenge; - }); - - afterEach(async function() { - recorder.stop(); - - // Restoring `AuthenticationChallengeCache` back to normal. - AuthenticationChallengeCache.prototype.setCachedChallenge = originalSetCachedChallenge; - }); - - // The tests follow - - it("Once authenticated, new requests should not authenticate again", async function() { - // Our goal is to intercept how our pipelines are storing the challenge. - // The first network call should indeed set the challenge in memory. - // Subsequent network calls should not set new challenges. - - const challenges: AuthenticationChallenge[] = []; - - AuthenticationChallengeCache.prototype.setCachedChallenge = function( - challenge: AuthenticationChallenge - ): void { - challenges.push(challenge); - originalSetCachedChallenge.call(this, challenge); - }; - - // Now we run what would be a normal use of the client. - // Here we will create a certificates, then we flush it. - // testClient.flushCertificate deletes, then purges the certificates. - const certificateName = testClient.formatName( - `${certificatePrefix}-${this!.test!.title}-${certificateSuffix}` - ); - await client.beginCreateCertificate( - certificateName, - { - issuerName: "Self", - subject: "cn=MyCert" - }, - testPollerProperties - ); - await testClient.flushCertificate(certificateName); - - // We should have recorded a total of ONE challenge. - // Failing to authenticate will make network requests throw. - assert.equal(challenges.length, 1); - }); -}); diff --git a/sdk/keyvault/keyvault-certificates/test/internal/challengeBasedAuthenticationPolicy.spc.ts b/sdk/keyvault/keyvault-certificates/test/internal/challengeBasedAuthenticationPolicy.spc.ts new file mode 100644 index 000000000000..c1d0763c1ac2 --- /dev/null +++ b/sdk/keyvault/keyvault-certificates/test/internal/challengeBasedAuthenticationPolicy.spc.ts @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as assert from "assert"; +import { createSandbox } from "sinon"; +import { env, Recorder } from "@azure/test-utils-recorder"; + +import { + AuthenticationChallengeCache, + AuthenticationChallenge, + parseWWWAuthenticate +} from "../../../keyvault-common/src"; +import { CertificateClient } from "../../src"; +import { testPollerProperties } from '../utils/recorderUtils'; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + +// Following the philosophy of not testing the insides if we can test the outsides... +// I present you with this "Get Out of Jail Free" card (in reference to Monopoly). +// Once we move to a common folder, and after some refactoring, +// we will be able to unit test the insides in detail. + +describe("Challenge based authentication tests", () => { + const certificatePrefix = `challengeAuth${env.KEY_NAME || "CertificateName"}`; + let certificateSuffix: string; + let client: CertificateClient; + let testClient: TestClient; + let recorder: Recorder; + + const basicCertificatePolicy = { + issuerName: "Self", + subject: "cn=MyCert" + }; + + beforeEach(async function() { + const authentication = await authenticate(this); + certificateSuffix = authentication.suffix; + client = authentication.client; + testClient = authentication.testClient; + recorder = authentication.recorder; + }); + + afterEach(async function() { + recorder.stop(); + }); + + // The tests follow + + it("Once authenticated, new requests should not authenticate again", async function() { + // Our goal is to intercept how our pipelines are storing the challenge. + // The first network call should indeed set the challenge in memory. + // Subsequent network calls should not set new challenges. + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + + // Now we run what would be a normal use of the client. + // Here we will create two keys, then flush them. + // testClient.flushCertificate deletes, then purges the keys. + const certificateName = testClient.formatName( + `${certificatePrefix}-${this!.test!.title}-${certificateSuffix}` + ); + const certificateNames = [`${certificateName}-0`, `${certificateName}-1`]; + for (const name of certificateNames) { + const poller = await client.beginCreateCertificate( + name, + basicCertificatePolicy, + testPollerProperties + ); + await poller.pollUntilDone(); + } + for (const name of certificateNames) { + await testClient.flushCertificate(name); + } + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + + // Note: Failing to authenticate will make network requests throw. + }); + + it("Authentication should work for parallel requests", async function() { + const certificateName = testClient.formatName( + `${certificatePrefix}-${this!.test!.title}-${certificateSuffix}` + ); + const certificateNames = [`${certificateName}-0`, `${certificateName}-1`]; + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + const spyEqualTo = sandbox.spy(AuthenticationChallenge.prototype, "equalTo"); + + const promises = certificateNames.map((name) => { + const promise = client.beginCreateCertificate( + name, + basicCertificatePolicy, + testPollerProperties + ); + return { promise, name }; + }); + + for (const promise of promises) { + const poller = await promise.promise; + await poller.pollUntilDone(); + await testClient.flushCertificate(promise.name); + } + + // Even though we had parallel requests, only one authentication should have happened. + + // This is determined by the comparison between the cached challenge and the new receive challenge. + // So, AuthenticationChallenge's equalTo should have returned true at least once. + assert.ok(spyEqualTo.returned(true)); + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + }); + + describe("parseWWWAuthenticate tests", () => { + it("Should work for known shapes of the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", resource="https://some.url"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + resource: "https://some.url" + }); + + const wwwAuthenticate2 = `Bearer authorization="some_authorization", scope="https://some.url"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + authorization: "some_authorization", + scope: "https://some.url" + }); + }); + + it("Should skip unexpected properties on the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", a="a", b="b"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + a: "a", + b: "b" + }); + + const wwwAuthenticate2 = `scope="https://some.url", a="a", c="c"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + scope: "https://some.url", + a: "a", + c: "c" + }); + }); + }); +}); diff --git a/sdk/keyvault/keyvault-certificates/test/userAgent.test.ts b/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts similarity index 71% rename from sdk/keyvault/keyvault-certificates/test/userAgent.test.ts rename to sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts index 21ddadb74cfa..b8758871c0e4 100644 --- a/sdk/keyvault/keyvault-certificates/test/userAgent.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts @@ -2,9 +2,9 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { version } from "../package.json"; -import { SDK_VERSION } from "../src/core/utils/constants"; -import { packageVersion } from "../src/core/keyVaultClientContext"; +import { version } from "../../package.json"; +import { SDK_VERSION } from "../../src/core/utils/constants"; +import { packageVersion } from "../../src/core/keyVaultClientContext"; describe("Certificates client's user agent", () => { // The tests follow diff --git a/sdk/keyvault/keyvault-certificates/test/CRUD.test.ts b/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts similarity index 91% rename from sdk/keyvault/keyvault-certificates/test/CRUD.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts index b93847613b2e..b3c663dd5ddd 100644 --- a/sdk/keyvault/keyvault-certificates/test/CRUD.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts @@ -5,17 +5,18 @@ import os from "os"; import fs from "fs"; import childProcess from "child_process"; import * as assert from "assert"; -import { CertificateClient } from "../src"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { AbortController } from "@azure/abort-controller"; -import { assertThrowsAbortError } from "./utils/utils.common"; import { SecretClient } from "@azure/keyvault-secrets"; import { ClientSecretCredential } from "@azure/identity"; import { isNode } from "@azure/core-http"; +import { CertificateClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + describe("Certificates client - create, read, update and delete", () => { const prefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; let suffix: string; @@ -136,6 +137,54 @@ describe("Certificates client - create, read, update and delete", () => { await testClient.flushCertificate(certificateName); }); + it("can disable a certificate", async function() { + const certificateName = testClient.formatName(`${prefix}-${this!.test!.title}-${suffix}`); + + const poller = await client.beginCreateCertificate( + certificateName, + basicCertificatePolicy, + testPollerProperties + ); + + let result = await poller.pollUntilDone(); + assert.equal(result.properties.enabled, true); + + result = await client.updateCertificateProperties(certificateName, "", { + enabled: false + }); + assert.equal(result.properties.enabled, false); + + result = await client.getCertificate(certificateName); + assert.equal(result.properties.enabled, false); + + await testClient.flushCertificate(certificateName); + }); + + it("can disable a certificate version", async function() { + const certificateName = testClient.formatName(`${prefix}-${this!.test!.title}-${suffix}`); + + const poller = await client.beginCreateCertificate( + certificateName, + basicCertificatePolicy, + testPollerProperties + ); + + let result = await poller.pollUntilDone(); + + const version = result.properties.version!; + assert.equal(result.properties.enabled, true); + + result = await client.updateCertificateProperties(certificateName, version, { + enabled: false + }); + assert.equal(result.properties.enabled, false); + + result = await client.getCertificateVersion(certificateName, version); + assert.equal(result.properties.enabled, false); + + await testClient.flushCertificate(certificateName); + }); + // On playback mode, the tests happen too fast for the timeout to work it("can update certificate with requestOptions timeout", async function() { recorder.skip(undefined, "Timeout tests don't work on playback mode."); diff --git a/sdk/keyvault/keyvault-certificates/test/list.test.ts b/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts similarity index 96% rename from sdk/keyvault/keyvault-certificates/test/list.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/list.spec.ts index 0b9e9f276bfe..be9af2ea2f4f 100644 --- a/sdk/keyvault/keyvault-certificates/test/list.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts @@ -1,15 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import * as assert from "assert"; import chai from "chai"; -import { CertificateClient } from "../src"; +import * as assert from "assert"; import { env, isPlaybackMode, Recorder, isRecordMode } from "@azure/test-utils-recorder"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { isNode } from "@azure/core-http"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { CertificateClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + const { expect } = chai; describe("Certificates client - list certificates in various ways", () => { @@ -41,7 +43,7 @@ describe("Certificates client - list certificates in various ways", () => { // Use this while recording to make sure the target keyvault is clean. // The next tests will produce a more consistent output. // This test is only useful while developing locally. - it("can purge all certificates", async function() { + it("can purge all certificates", async function(): Promise { // WARNING: When TEST_MODE equals "record", all of the certificates in the indicated KEYVAULT_NAME will be deleted as part of this test. if (!isRecordMode()) { return this.skip(); @@ -52,7 +54,7 @@ describe("Certificates client - list certificates in various ways", () => { try { await testClient.flushCertificate(certificate.name!); } catch (e) { - // Nothing to do here + // Nothing to do here } } for await (const certificate of client.listDeletedCertificates({ includePending: true })) { diff --git a/sdk/keyvault/keyvault-certificates/test/lro.create.test.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts similarity index 93% rename from sdk/keyvault/keyvault-certificates/test/lro.create.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts index 79c58e2eb934..cbe2cb774853 100644 --- a/sdk/keyvault/keyvault-certificates/test/lro.create.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts @@ -2,12 +2,13 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { CertificateClient, KeyVaultCertificate, DefaultCertificatePolicy } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; +import { env, Recorder } from "@azure/test-utils-recorder"; + +import { CertificateClient, KeyVaultCertificate, DefaultCertificatePolicy } from "../../src"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Certificates client - LRO - create", () => { const certificatePrefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; diff --git a/sdk/keyvault/keyvault-certificates/test/lro.delete.test.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts similarity index 94% rename from sdk/keyvault/keyvault-certificates/test/lro.delete.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts index 82e5dbd98d25..89fd83181863 100644 --- a/sdk/keyvault/keyvault-certificates/test/lro.delete.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts @@ -2,12 +2,13 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { CertificateClient, DeletedCertificate, DefaultCertificatePolicy } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; +import { env, Recorder } from "@azure/test-utils-recorder"; + +import { CertificateClient, DeletedCertificate, DefaultCertificatePolicy } from "../../src"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Certificates client - lro - delete", () => { const certificatePrefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; diff --git a/sdk/keyvault/keyvault-certificates/test/lro.operation.test.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts similarity index 94% rename from sdk/keyvault/keyvault-certificates/test/lro.operation.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts index 6c0100e0a48c..225a2e13f489 100644 --- a/sdk/keyvault/keyvault-certificates/test/lro.operation.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts @@ -2,16 +2,17 @@ // Licensed under the MIT license. import * as assert from "assert"; +import { env, Recorder } from "@azure/test-utils-recorder"; + import { CertificateClient, CertificateOperation, DefaultCertificatePolicy, KeyVaultCertificateWithPolicy -} from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; +} from "../../src"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Certificates client - LRO - certificate operation", () => { const certificatePrefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; diff --git a/sdk/keyvault/keyvault-certificates/test/lro.recover.test.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts similarity index 94% rename from sdk/keyvault/keyvault-certificates/test/lro.recover.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts index 4111c6736cc5..dae1ece5d3fa 100644 --- a/sdk/keyvault/keyvault-certificates/test/lro.recover.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { CertificateClient, DeletedCertificate, DefaultCertificatePolicy } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { CertificateClient, DeletedCertificate, DefaultCertificatePolicy } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Certificates client - LRO - recoverDelete", () => { const certificatePrefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; diff --git a/sdk/keyvault/keyvault-certificates/test/mergeAndImport.test.ts b/sdk/keyvault/keyvault-certificates/test/public/mergeAndImport.spec.ts similarity index 92% rename from sdk/keyvault/keyvault-certificates/test/mergeAndImport.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/mergeAndImport.spec.ts index 3eae388f7969..1b4ed7b7b146 100644 --- a/sdk/keyvault/keyvault-certificates/test/mergeAndImport.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/mergeAndImport.spec.ts @@ -3,15 +3,16 @@ import fs from "fs"; import childProcess from "child_process"; -import { CertificateClient } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; +import { isNode } from "@azure/core-http"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { SecretClient } from "@azure/keyvault-secrets"; import { ClientSecretCredential } from "@azure/identity"; -import { base64ToUint8Array, stringToUint8Array } from "../src/utils"; -import { isNode } from "@azure/core-http"; + +import { CertificateClient } from "../../src"; +import { base64ToUint8Array, stringToUint8Array } from "../../src/utils"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Certificates client - merge and import certificates", () => { const prefix = `merge${env.CERTIFICATE_NAME || "CertificateName"}`; @@ -95,7 +96,7 @@ describe("Certificates client - merge and import certificates", () => { // The signed certificate will never be the same, so we can't play it back. // This test is only designed to work on NodeJS, since we use child_process to interact with openssl. - it("can merge a self signed certificate", async function() { + it("can merge a self signed certificate", async function(): Promise { recorder.skip( undefined, "The signed certificate will never be the same, so we can't play it back." diff --git a/sdk/keyvault/keyvault-certificates/test/recoverBackupRestore.test.ts b/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts similarity index 94% rename from sdk/keyvault/keyvault-certificates/test/recoverBackupRestore.test.ts rename to sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts index bc6b2cbb271f..037ca96268cb 100644 --- a/sdk/keyvault/keyvault-certificates/test/recoverBackupRestore.test.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts @@ -2,14 +2,15 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { CertificateClient } from "../src"; import { env, isPlaybackMode, Recorder, delay, isRecordMode } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { assertThrowsAbortError } from "./utils/utils.common"; import { isNode } from "@azure/core-http"; +import { CertificateClient } from "../../src"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + describe("Certificates client - restore certificates and recover backups", () => { const prefix = `recover${env.CERTIFICATE_NAME || "CertificateName"}`; let suffix: string; diff --git a/sdk/keyvault/keyvault-certificates/tests.yml b/sdk/keyvault/keyvault-certificates/tests.yml index 7e70a9fa4691..dd5041399c35 100644 --- a/sdk/keyvault/keyvault-certificates/tests.yml +++ b/sdk/keyvault/keyvault-certificates/tests.yml @@ -1,19 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/keyvault-certificates" - ResourceServiceDirectory: keyvault - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/keyvault-certificates" + ResourceServiceDirectory: keyvault + TestMinMax: true + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/keyvault/keyvault-certificates/tsconfig.json b/sdk/keyvault/keyvault-certificates/tsconfig.json index 9a0426a5d935..7a5252578c4f 100644 --- a/sdk/keyvault/keyvault-certificates/tsconfig.json +++ b/sdk/keyvault/keyvault-certificates/tsconfig.json @@ -1,27 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./types", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true, + "outDir": "./dist-esm", + "lib": ["dom"], "resolveJsonModule": true }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/**/*.ts"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "exclude": ["node_modules", "../keyvault-common/node_modules", "./samples/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../keyvault-common/**/*.ts"] } diff --git a/sdk/keyvault/keyvault-certificates/tsconfig.samples.json b/sdk/keyvault/keyvault-certificates/tsconfig.samples.json index 846639b2d955..a0b15abb027d 100644 --- a/sdk/keyvault/keyvault-certificates/tsconfig.samples.json +++ b/sdk/keyvault/keyvault-certificates/tsconfig.samples.json @@ -19,6 +19,5 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "include": ["./samples/**/*.ts"] } diff --git a/sdk/keyvault/keyvault-common/index.ts b/sdk/keyvault/keyvault-common/index.ts new file mode 100644 index 000000000000..a2b24231e7f5 --- /dev/null +++ b/sdk/keyvault/keyvault-common/index.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export * from "./src"; diff --git a/sdk/keyvault/keyvault-common/package.json b/sdk/keyvault/keyvault-common/package.json new file mode 100644 index 000000000000..59713928108d --- /dev/null +++ b/sdk/keyvault/keyvault-common/package.json @@ -0,0 +1,55 @@ +{ + "name": "@azure/keyvault-common", + "sideEffects": false, + "private": true, + "author": "Microsoft Corporation", + "version": "1.0.0", + "license": "MIT", + "description": "Common internal functionality for all of the Azure Key Vault clients in the Azure SDK for JavaScript", + "repository": "github:Azure/azure-sdk-for-js", + "main": "./src/index.ts", + "module": "dist-esm/index.js", + "types": "./types/index.d.ts", + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "audit": "echo skipped", + "build:minify": "echo skipped", + "build:samples": "echo skipped", + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "echo skipped", + "build:test": "echo skipped", + "build": "npm run extract-api && npm run build:es6 && npm run build:nodebrowser", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist-esm dist-test typings *.tgz *.log samples/typescript/dist", + "execute:js-samples": "echo skipped", + "execute:ts-samples": "echo skipped", + "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", + "extract-api": "echo skipped", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\"", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "integration-test:node:no-timeout": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "lint:fix": "eslint package.json src --ext .ts --fix --fix-type [problem,suggestion]", + "lint": "eslint src --ext .ts -f html -o search-lintReport.html || exit 0", + "lint:terminal": "eslint src --ext .ts", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "test": "npm run clean && npm run build:test && npm run unit-test", + "unit-test:browser": "echo skipped", + "unit-test:node": "echo skipped", + "unit-test:node:no-timeout": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser" + }, + "dependencies": { + "@azure/core-http": "^1.1.1", + "tslib": "^2.0.0" + }, + "devDependencies": { + "typescript": "~3.9.3" + } +} diff --git a/sdk/keyvault/keyvault-common/src/challengeBasedAuthenticationPolicy.ts b/sdk/keyvault/keyvault-common/src/challengeBasedAuthenticationPolicy.ts new file mode 100644 index 000000000000..2539bcd4e4a1 --- /dev/null +++ b/sdk/keyvault/keyvault-common/src/challengeBasedAuthenticationPolicy.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { TokenCredential } from "@azure/core-http"; +import { + BaseRequestPolicy, + RequestPolicy, + RequestPolicyOptions, + RequestPolicyFactory, +} from "@azure/core-http"; +import { Constants } from "@azure/core-http"; +import { HttpOperationResponse } from "@azure/core-http"; +import { WebResource } from "@azure/core-http"; +import { AccessTokenCache, ExpiringAccessTokenCache } from "@azure/core-http"; + +type ValidParsedWWWAuthenticateProperties = + // "authorization_uri" was used in the track 1 version of KeyVault. + // This is not a relevant property anymore, since the service is consistently answering with "authorization". + // | "authorization_uri" + | "authorization" + // Even though the service is moving to "scope", both "resource" and "scope" should be supported. + | "resource" + | "scope"; + +type ParsedWWWAuthenticate = { + [Key in ValidParsedWWWAuthenticateProperties]?: string; +}; + +/** + * Representation of the Authentication Challenge + */ +export class AuthenticationChallenge { + constructor(public authorization: string, public scope: string) {} + + /** + * Checks that this AuthenticationChallenge is equal to another one given. + * Only compares the scope. + * This is exactly what C# is doing, as we can see here: + * https://github.com/Azure/azure-sdk-for-net/blob/70e54b878ff1d01a45266fb3674a396b4ab9c1d2/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs#L143-L147 + * @param other The other AuthenticationChallenge + */ + public equalTo(other: AuthenticationChallenge | undefined) { + return other + ? this.scope.toLowerCase() === other.scope.toLowerCase() && + this.authorization.toLowerCase() === other.authorization.toLowerCase() + : false; + } +} + +/** + * Helps keep a copy of any previous authentication challenges, + * so that we can compare on any further request. + */ +export class AuthenticationChallengeCache { + public challenge?: AuthenticationChallenge; + + public setCachedChallenge(challenge: AuthenticationChallenge) { + this.challenge = challenge; + } +} + +/** + * Creates a new ChallengeBasedAuthenticationPolicy factory. + * + * @param credential The TokenCredential implementation that can supply the challenge token. + */ +export function challengeBasedAuthenticationPolicy( + credential: TokenCredential +): RequestPolicyFactory { + const tokenCache: AccessTokenCache = new ExpiringAccessTokenCache(); + const challengeCache = new AuthenticationChallengeCache(); + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => { + return new ChallengeBasedAuthenticationPolicy( + nextPolicy, + options, + credential, + tokenCache, + challengeCache + ); + }, + }; +} + +/** + * Parses an WWW-Authenticate response. + * This transforms a string value like: + * `Bearer authorization="some_authorization", resource="https://some.url"` + * into an object like: + * `{ authorization: "some_authorization", resource: "https://some.url" }` + * @param wwwAuthenticate string value in the WWW-Authenticate header + */ +export function parseWWWAuthenticate(wwwAuthenticate: string): ParsedWWWAuthenticate { + // First we split the string by either `, ` or ` `. + const parts = wwwAuthenticate.split(/,* +/); + // Then we only keep the strings with an equal sign after a word and before a quote. + // also splitting these sections by their equal sign + const keyValues = parts.reduce( + (parts, str) => (str.match(/\w="/) ? [...parts, str.split("=")] : parts), + [] + ); + // Then we transform these key-value pairs back into an object. + const parsed = keyValues.reduce( + (result, [key, value]: string[]) => ({ + ...result, + [key]: value.slice(1, -1), + }), + {} + ); + return parsed; +} + +/** + * + * Provides a RequestPolicy that can request a token from a TokenCredential + * implementation and then apply it to the Authorization header of a request + * as a Bearer token. + * + */ +export class ChallengeBasedAuthenticationPolicy extends BaseRequestPolicy { + private parseWWWAuthenticate: ( + wwwAuthenticate: string + ) => ParsedWWWAuthenticate = parseWWWAuthenticate; + + /** + * Creates a new ChallengeBasedAuthenticationPolicy object. + * + * @param nextPolicy The next RequestPolicy in the request pipeline. + * @param options Options for this RequestPolicy. + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param tokenCache The cache for the most recent AccessToken returned by the TokenCredential. + */ + constructor( + nextPolicy: RequestPolicy, + options: RequestPolicyOptions, + private credential: TokenCredential, + private tokenCache: AccessTokenCache, + private challengeCache: AuthenticationChallengeCache + ) { + super(nextPolicy, options); + } + + /** + * Gets or updates the token from the token cache into the headers of the received web resource. + */ + private async loadToken(webResource: WebResource): Promise { + let accessToken = this.tokenCache.getCachedToken(); + + // If there's no cached token in the cache, we try to get a new one. + if (accessToken === undefined) { + const receivedToken = await this.credential.getToken(this.challengeCache.challenge!.scope); + accessToken = receivedToken || undefined; + this.tokenCache.setCachedToken(accessToken); + } + + if (accessToken) { + webResource.headers.set( + Constants.HeaderConstants.AUTHORIZATION, + `Bearer ${accessToken.token}` + ); + } + } + + /** + * Parses the given WWW-Authenticate header, generates a new AuthenticationChallenge, + * then if the challenge is different from the one cached, resets the token and forces + * a re-authentication, otherwise continues with the existing challenge and token. + * @param wwwAuthenticate Value of the incoming WWW-Authenticate header. + * @param webResource Ongoing HTTP request. + */ + private async regenerateChallenge( + wwwAuthenticate: string, + webResource: WebResource + ): Promise { + // The challenge based authentication will contain both: + // - An authorization URI with a token, + // - The resource to which that token is valid against (also called the scope). + const parsedWWWAuth = this.parseWWWAuthenticate(wwwAuthenticate); + const authorization = parsedWWWAuth.authorization!; + const resource = parsedWWWAuth.resource! || parsedWWWAuth.scope!; + + if (!(authorization && resource)) { + return this._nextPolicy.sendRequest(webResource); + } + + const challenge = new AuthenticationChallenge(authorization, resource + "/.default"); + + // Either if there's no cached challenge at this point (could have happen in parallel), + // or if the cached challenge has a different scope, + // we store the just received challenge and reset the cached token, to force a re-authentication. + if (!this.challengeCache.challenge?.equalTo(challenge)) { + this.challengeCache.setCachedChallenge(challenge); + this.tokenCache.setCachedToken(undefined); + } + + await this.loadToken(webResource); + return this._nextPolicy.sendRequest(webResource); + } + + /** + * Applies the Bearer token to the request through the Authorization header. + * @param webResource Ongoing HTTP request. + */ + public async sendRequest(webResource: WebResource): Promise { + // Ensure that we're about to use a secure connection. + if (!webResource.url.startsWith("https:")) { + throw new Error("The resource address for authorization must use the 'https' protocol."); + } + + // The next request will happen differently whether we have a challenge or not. + let response: HttpOperationResponse; + + if (this.challengeCache.challenge == undefined) { + // If there's no challenge in cache, a blank body will start the challenge. + const originalBody = webResource.body; + webResource.body = ""; + response = await this._nextPolicy.sendRequest(webResource); + webResource.body = originalBody; + } else { + // If we did have a challenge in memory, + // we attempt to load the token from the cache into the request before we try to send the request. + await this.loadToken(webResource); + response = await this._nextPolicy.sendRequest(webResource); + } + + // If we don't receive a response with a 401 status code, + // then we can assume this response has nothing to do with the challenge authentication process. + if (response.status !== 401) { + return response; + } + + // If the response status is 401, we only re-authenticate if the WWW-Authenticate header is present. + const wwwAuthenticate = response.headers.get("WWW-Authenticate"); + if (!wwwAuthenticate) { + return response; + } + + // We re-generate the challenge and see if we have to re-authenticate. + return await this.regenerateChallenge(wwwAuthenticate, webResource); + } +} diff --git a/sdk/keyvault/keyvault-common/src/index.ts b/sdk/keyvault/keyvault-common/src/index.ts new file mode 100644 index 000000000000..6b3ad96773fa --- /dev/null +++ b/sdk/keyvault/keyvault-common/src/index.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export * from "./challengeBasedAuthenticationPolicy"; diff --git a/sdk/keyvault/keyvault-common/tsconfig.json b/sdk/keyvault/keyvault-common/tsconfig.json new file mode 100644 index 000000000000..2936b15768d1 --- /dev/null +++ b/sdk/keyvault/keyvault-common/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.package", + "compilerOptions": { + "declarationDir": "./types", + "outDir": "./dist-esm", + "lib": ["dom"], + "resolveJsonModule": true + }, + "exclude": ["node_modules"], + "include": ["./src/**/*.ts"] +} diff --git a/sdk/keyvault/keyvault-keys/.eslintrc.json b/sdk/keyvault/keyvault-keys/.eslintrc.json index f733ef036321..4f409a486c3f 100644 --- a/sdk/keyvault/keyvault-keys/.eslintrc.json +++ b/sdk/keyvault/keyvault-keys/.eslintrc.json @@ -4,6 +4,8 @@ "ignorePatterns": ["src/core"], "rules": { "@typescript-eslint/no-this-alias": "off", - "no-invalid-this": "off" + "no-invalid-this": "off", + "@azure/azure-sdk/ts-package-json-module": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "warn" } } diff --git a/sdk/keyvault/keyvault-keys/.prettierignore b/sdk/keyvault/keyvault-keys/.prettierignore index d53119f04d7f..656f37824af2 100644 --- a/sdk/keyvault/keyvault-keys/.prettierignore +++ b/sdk/keyvault/keyvault-keys/.prettierignore @@ -1 +1,2 @@ -src/core \ No newline at end of file +/src/core/* +!/src/core/challengeBasedAuthenticationPolicy.ts \ No newline at end of file diff --git a/sdk/keyvault/keyvault-keys/CHANGELOG.md b/sdk/keyvault/keyvault-keys/CHANGELOG.md index cbbec6d1b59b..f7eb99830e4f 100644 --- a/sdk/keyvault/keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/keyvault-keys/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.1.0-preview.2 (Unreleased) - Fixed [bug 8378](https://github.com/Azure/azure-sdk-for-js/issues/8378), which caused the challenge based authentication to re-authenticate on every new request. +- Fixed [bug 9005](https://github.com/Azure/azure-sdk-for-js/issues/9005), which caused parallel requests to throw if one of them needed to authenticate. ## 4.0.3 (2020-05-13) @@ -73,4 +74,4 @@ ## 4.0.0-preview.1 (2019-06-28) For release notes and more information please visit -https://aka.ms/azure-sdk-preview1-js +https://aka.ms/azsdk/releases/july2019preview diff --git a/sdk/keyvault/keyvault-keys/api-extractor.json b/sdk/keyvault/keyvault-keys/api-extractor.json index d4e027f92c18..57d68f5a531b 100644 --- a/sdk/keyvault/keyvault-keys/api-extractor.json +++ b/sdk/keyvault/keyvault-keys/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "types/src/index.d.ts", + "mainEntryPointFilePath": "types/keyvault-keys/src/index.d.ts", "docModel": { "enabled": false }, diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index 88a10343a1e2..f35234206fe3 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -20,18 +20,12 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "main": "./dist/index.js", - "module": "dist-esm/src/index.js", + "module": "dist-esm/keyvault-keys/src/index.js", "types": "./types/keyvault-keys.d.ts", "engines": { "node": ">=8.0.0" }, - "files": [ - "types/keyvault-keys.d.ts", - "dist/", - "dist-esm/src", - "README.md", - "LICENSE" - ], + "files": ["types/keyvault-keys.d.ts", "types/", "dist/", "dist-browser/", "dist-esm/keyvault-keys/src", "dist-esm/keyvault-common/src", "README.md", "LICENSE"], "browser": { "os": false, "process": false @@ -47,13 +41,13 @@ "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-esm dist-test types *.tgz *.log dist-browser statistics.html coverage && rimraf src/**/*.js && rimraf test/**/*.js", "execute:js-samples": "node ../../../common/scripts/run-samples.js samples/javascript/", - "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", + "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/keyvault-keys/samples/typescript/src/", "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.test.js", - "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/**/*.spec.js", + "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/**/*.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o keyvault-keys-lintReport.html", @@ -89,7 +83,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/abort-controller": "^1.0.0", @@ -100,18 +94,19 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/fs-extra": "^8.0.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@types/query-string": "6.2.0", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -137,16 +132,17 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "query-string": "^5.0.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "source-map-support": "^0.5.9", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9", "url": "^0.11.0" } diff --git a/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json new file mode 100644 index 000000000000..b317e3f8f5fc --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json @@ -0,0 +1,1185 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:07 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d24b2a48-0a99-407a-996f-0b19a98da96c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:07 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c12036e5-409d-4c2f-b64d-53071a70b792", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - SCUS ProdSlices", + "x-ms-request-id": "24bcefc8-b00b-4e6b-be23-c15b54f60100" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:07 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - EUS ProdSlices", + "x-ms-request-id": "6d59a1b5-058d-4dac-8154-c31faba76a00" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"kty\":\"RSA\"}", + "status": 200, + "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/be6f634aba5840c3a05ada1eb39d030f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s-ECeSxcIT2__MuG9JSNMqA2AfZRbUSzPXMMJM_jkG1jKn3EbnNHlP1PM52Imz6o_oTHznCnH2g1l1Wqx0McSDE1WU1hj9ynOGDfR1NHrO4wiVSaRxNPtK9H3at30aRJTwHy8PLQqGF82jIZ9aaV5IhtBoj2EluxLnxKk7KiHqpafT0XrkOh-eED0iPZ59PuO2pKvLfzyVR7ArGSuJORt2cFfn7H4nwDIEJL3fvyIAmuhf5edNjF4ca_-jy4fR7lr2731551M79Y3PgNIGbPRYAn7l9rAwqIJgNO_sr3C-WuBsKIRrnSqYjHGVgHOmgh16_pjehuZNDxNO_33VFWXQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "757", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c6feec18-8d23-4f93-aef8-971b0c567741", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/create", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"kty\":\"RSA\"}", + "status": 200, + "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/1a9f088043494e6c9aa13ab1c8d2570e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"x_BYtFhKJ8zjJ9R5Xoj2Zy3euq3sYblaM7D6Gy1KXHnr__6QSp51utpaERuKLId3WU1U4Y38vakXEmxsH-wksAc_DyU6YPtiCUsz00ks0luyFd1oymWQZzhfQTFOKTi5R-5m5EEja8JzSQiUSmByenURchwOWKAJe5jakY5Xy0BpVWiOclV9WzsTmspZ2q9bigbuMlKPR94uJTyEyxKxnd7_y705k5czSgLCUaN2ipADI7GXrtidZ4SHit1mrPnuyoC2v1-WCf_dFU2BwMayKHtHNMzfaS5-Cb1EAd8eSuanoXwXfYCrZD4HUu4rLcQv2CljcaSlYQKWl0H0aVuDgQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "757", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6c576fef-700c-4f8a-8df1-f84109fef36a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590094508,\"scheduledPurgeDate\":1597870508,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/1a9f088043494e6c9aa13ab1c8d2570e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"x_BYtFhKJ8zjJ9R5Xoj2Zy3euq3sYblaM7D6Gy1KXHnr__6QSp51utpaERuKLId3WU1U4Y38vakXEmxsH-wksAc_DyU6YPtiCUsz00ks0luyFd1oymWQZzhfQTFOKTi5R-5m5EEja8JzSQiUSmByenURchwOWKAJe5jakY5Xy0BpVWiOclV9WzsTmspZ2q9bigbuMlKPR94uJTyEyxKxnd7_y705k5czSgLCUaN2ipADI7GXrtidZ4SHit1mrPnuyoC2v1-WCf_dFU2BwMayKHtHNMzfaS5-Cb1EAd8eSuanoXwXfYCrZD4HUu4rLcQv2CljcaSlYQKWl0H0aVuDgQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "968", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f912bf8b-f686-459e-97d1-db98b71c5c85", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c8be0aaa-3765-4a2d-88a0-c004ce6ef61d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1b6d5291-f280-46e9-9ee7-13de898cd5d0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2fc5f3af-5883-402b-8cfb-d1b87cbad1cd", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b243cade-ccb1-4c92-a8f9-10ee555acfee", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:14 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "161bd27d-bd43-49d8-8728-4d39b5532163", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:16 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3661b06e-8257-451e-86bd-f911ba7253b0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:18 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2c89cb2a-6c24-48b1-92f6-167583d4d4f6", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:21 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c8af7a37-f9ad-4fd3-892f-a0f631669646", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:23 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3f2a6e88-503a-40ed-8b69-c6a5ba540f1c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:25 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "dda9a87e-c5dc-4ee0-8fc3-83258002a5f4", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:27 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "723c3df5-ef98-4746-bc3f-341e79fccc02", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:29 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b5081ad1-f200-45ef-916f-c49385659bfc", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:31 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fb631f0c-6a6b-4f5e-a474-0a0047b6df7a", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:33 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "87e265ac-b6ef-4f0f-adbd-f318516c0430", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:35 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "16df5502-075a-417a-82b0-30e55db771bc", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:37 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "239655f4-05cb-4786-8848-61a77b049b8b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590094508,\"scheduledPurgeDate\":1597870508,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/1a9f088043494e6c9aa13ab1c8d2570e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"x_BYtFhKJ8zjJ9R5Xoj2Zy3euq3sYblaM7D6Gy1KXHnr__6QSp51utpaERuKLId3WU1U4Y38vakXEmxsH-wksAc_DyU6YPtiCUsz00ks0luyFd1oymWQZzhfQTFOKTi5R-5m5EEja8JzSQiUSmByenURchwOWKAJe5jakY5Xy0BpVWiOclV9WzsTmspZ2q9bigbuMlKPR94uJTyEyxKxnd7_y705k5czSgLCUaN2ipADI7GXrtidZ4SHit1mrPnuyoC2v1-WCf_dFU2BwMayKHtHNMzfaS5-Cb1EAd8eSuanoXwXfYCrZD4HUu4rLcQv2CljcaSlYQKWl0H0aVuDgQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "968", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:38 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c523936c-f256-469b-a781-024cfb29c7ae", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Thu, 21 May 2020 20:55:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "cb4b19ed-63fe-4616-a938-0a6c942be09b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590094539,\"scheduledPurgeDate\":1597870539,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/be6f634aba5840c3a05ada1eb39d030f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s-ECeSxcIT2__MuG9JSNMqA2AfZRbUSzPXMMJM_jkG1jKn3EbnNHlP1PM52Imz6o_oTHznCnH2g1l1Wqx0McSDE1WU1hj9ynOGDfR1NHrO4wiVSaRxNPtK9H3at30aRJTwHy8PLQqGF82jIZ9aaV5IhtBoj2EluxLnxKk7KiHqpafT0XrkOh-eED0iPZ59PuO2pKvLfzyVR7ArGSuJORt2cFfn7H4nwDIEJL3fvyIAmuhf5edNjF4ca_-jy4fR7lr2731551M79Y3PgNIGbPRYAn7l9rAwqIJgNO_sr3C-WuBsKIRrnSqYjHGVgHOmgh16_pjehuZNDxNO_33VFWXQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "968", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6b15efdb-4001-4ead-862c-9170b0a71941", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7e080700-e7b4-4c6a-92ce-8f95943cac30", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:39 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4f14a555-2ec5-4650-afc1-91633c78b24b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:42 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ca8c3522-d6f8-4051-a99c-b2b8cfbe74b4", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:44 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d3c355ab-dfed-49fe-b59c-7eb838a5da19", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:46 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f8063519-778b-4e29-a541-ac2a4989a93d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:48 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "aa220b2d-aae7-4b2f-9431-87233b847c19", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:50 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5535475a-0d1a-4f7d-98ce-d4f14f495ee9", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:52 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "af1b8523-e851-4374-a293-0e087e2c2d7b", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:54 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "954492e3-8113-43a4-a7b6-0a3d7ad98ea2", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:56 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "749af84e-0530-4475-b95c-706e3f182424", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:55:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f83f5d6b-b7d6-4fde-b864-2ee58e5827dc", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:00 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a2c31c65-770a-42ad-9670-ad23cecda86c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:02 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a6154ba8-7113-4509-ae88-a44677c16682", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:04 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f3248ac7-439e-4547-a5d1-f718782275f9", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:07 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d5c76c0f-ea1d-4a69-b01e-271a4b19ed78", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "151", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:08 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f8bb694a-aaf2-4b0a-bc35-38785ba735c8", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590094539,\"scheduledPurgeDate\":1597870539,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/be6f634aba5840c3a05ada1eb39d030f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"s-ECeSxcIT2__MuG9JSNMqA2AfZRbUSzPXMMJM_jkG1jKn3EbnNHlP1PM52Imz6o_oTHznCnH2g1l1Wqx0McSDE1WU1hj9ynOGDfR1NHrO4wiVSaRxNPtK9H3at30aRJTwHy8PLQqGF82jIZ9aaV5IhtBoj2EluxLnxKk7KiHqpafT0XrkOh-eED0iPZ59PuO2pKvLfzyVR7ArGSuJORt2cFfn7H4nwDIEJL3fvyIAmuhf5edNjF4ca_-jy4fR7lr2731551M79Y3PgNIGbPRYAn7l9rAwqIJgNO_sr3C-WuBsKIRrnSqYjHGVgHOmgh16_pjehuZNDxNO_33VFWXQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094508,\"updated\":1590094508,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "968", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 May 2020 20:56:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "13626aad-5a44-4d28-8272-28f677e3ea55", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Thu, 21 May 2020 20:56:10 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0e095ba3-8c27-42cb-a326-42ccd69a96c8", + "x-powered-by": "ASP.NET" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "ff4613da427f76189b2b49b1ec66b644" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json index 23e960fa795e..ea9f2bb09d68 100644 --- a/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json +++ b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json @@ -13,19 +13,18 @@ "cache-control": "no-cache", "content-length": "87", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:19 GMT", + "date": "Thu, 21 May 2020 20:54:10 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "401", "strict-transport-security": "max-age=31536000;includeSubDomains", "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7852840d-c206-42fe-85d5-09d45b5003be", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "42f5e413-26a0-4862-b2e0-59fe79449daa", "x-powered-by": "ASP.NET" } }, @@ -40,15 +39,15 @@ "cache-control": "no-cache, no-store", "content-length": "1315", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:20 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10519.7 - WUS2 ProdSlices", - "x-ms-request-id": "3a0b1c04-6076-470b-8709-20ca46333b00" + "x-ms-ests-server": "2.1.10571.11 - NCUS ProdSlices", + "x-ms-request-id": "17d757d9-57aa-46b7-90f5-d3dd2a0b6d00" } }, { @@ -59,23 +58,22 @@ }, "requestBody": "{\"kty\":\"RSA\"}", "status": 200, - "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/8dda5952c9a04b389e103007b716fb3a\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"5xIkvjtQednksnq2s0_UWl3F6BwibhuBK1knLAhq2_GLWoTKjS9sgxgi5Wp914coCibNU42iUK9OrKF2TtEAjA1jIm6tmRN5O4azyWttw_JSzXT6WhYTaFGKrKkxGD8v5L7dq1QBVU-sXGGi24BP8WkunrHti_Z-Kc69JHbjfHMqhklLmjO-psAOilJM5w71SFdQfK6xPEuMrpPWLV_U_ypGMjNcKlbyF6kVJwdyKQBY2lYmb74acZqkbMoixufiEZUYlfAMeZ8Thl9pugOYmarfhAAR94PS07ibjsuyiZDpUp_vT0flIeBdBt_p3XkPYuDdoicB6xIXIcmSUT4_tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4ceb44645ea94eeebc8ededf1183fde5\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uHN_aOpMriz3l0GjvOuGQeDOXnij7TA-ziGZ9rCd5dVoKGgD_jnE7HUmNelomNQYsevyuNzzf-AIlY3gylvBNLfji6WcIwiagIHUpbAOXi7D9d_ShjlkxGW5Bf4p3BaIbcFJ58xMyn-f2k_2zLx3TnCmWZDj7fXWcipdw22ZrAnZZnZz6S6CsSa6fGCO4ti_JLtlimTFVa0695a1dCbwUHXvU8B6vm0mOmAZw6m_ngQ8NI04VIz3ReiLsm_ggmMMZ4umOipcUrdlg-2vshd-Ir0uf19ZniOVz5kcp6gbSIkk0rWOGGqanQSeoNz_OVy-t1GPTaYJDWcbCCOCLMG_4w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094451,\"updated\":1590094451,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "768", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:19 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "88c81094-d791-403b-b76f-feac146f11b0", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d0726ed8-dec5-4e11-9c59-7d6e8a055c08", "x-powered-by": "ASP.NET" } }, @@ -87,23 +85,22 @@ }, "requestBody": "{\"kty\":\"RSA\"}", "status": 200, - "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/9f04e743ef9541bea9d62f8b41f59c3f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"wjnTKit2qtzPop6fu6AXYF4Nu6-zGyXVSf8IzLWTYxBDt2DEZ2m8Fm2k51Davp5Y2vAY1Y-jgaX7rliSBp-7QQSy2qaQFQeNVuuHRypgk4vQYjlcTSvrrW99DwIyMfzyNFaeTfe8ZZhBbVvXX2ko_YWJd3oVl6IaeLzP8EUliyB-T5aGhVqhawhyi1V2J3wr3Qd6GYz2Wqw5lZD2mA_3xhpcfnX2yKF6CkLdEdc6Tcxw19tsTjQy2EedOcmqxzoMEIQu1DjKZPzAnLIniCxBMtdjFGzJ_nwMRSr4taI-6hV65srj_TVvAaS5S5Whj77w-Q1M3okp4z7RQ1RIRD1oWw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/5ab1c73d095242619907cb5190c17d22\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tl2Xa-OpSz-pIPfSWDOFh3ZO2FEZTQoOSuLsaXk6cfOCiyYby0Cuoamb3OKzw0zEI9sosYg9riMAXbQkiLvYQ6y_hktsGPJXUPSqrH6Req36eJxRWNMztFk61ZQ9-MkM3Y11Xqv_hKoSaB9yILX_OJsVMzfxo2rMHeUf4mXSq7sETNG1N70VVBz-P9FLf2I9QBaI2ms5ir-1qBp6VeOs00FUCR91B-VWL_OnMuw-XEKPV-wjFM0xhH2xiFEGQsbgXXaiFXbuPj6Q_Nftzn1s3qtDprkA_ucNQdXWrbzDoxcXD-MvjMU0DQFPBxED2gmi9sQuhLqjIkcx5IWFnbUEhw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094452,\"updated\":1590094452,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "768", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:20 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "acb1cd92-73b3-4e39-aa09-a47c81160cfc", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a614ea87-8ca4-43af-a7ac-11a669a4d3c1", "x-powered-by": "ASP.NET" } }, @@ -115,23 +112,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1588816220,\"scheduledPurgeDate\":1596592220,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/8dda5952c9a04b389e103007b716fb3a\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"5xIkvjtQednksnq2s0_UWl3F6BwibhuBK1knLAhq2_GLWoTKjS9sgxgi5Wp914coCibNU42iUK9OrKF2TtEAjA1jIm6tmRN5O4azyWttw_JSzXT6WhYTaFGKrKkxGD8v5L7dq1QBVU-sXGGi24BP8WkunrHti_Z-Kc69JHbjfHMqhklLmjO-psAOilJM5w71SFdQfK6xPEuMrpPWLV_U_ypGMjNcKlbyF6kVJwdyKQBY2lYmb74acZqkbMoixufiEZUYlfAMeZ8Thl9pugOYmarfhAAR94PS07ibjsuyiZDpUp_vT0flIeBdBt_p3XkPYuDdoicB6xIXIcmSUT4_tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590094452,\"scheduledPurgeDate\":1597870452,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4ceb44645ea94eeebc8ededf1183fde5\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uHN_aOpMriz3l0GjvOuGQeDOXnij7TA-ziGZ9rCd5dVoKGgD_jnE7HUmNelomNQYsevyuNzzf-AIlY3gylvBNLfji6WcIwiagIHUpbAOXi7D9d_ShjlkxGW5Bf4p3BaIbcFJ58xMyn-f2k_2zLx3TnCmWZDj7fXWcipdw22ZrAnZZnZz6S6CsSa6fGCO4ti_JLtlimTFVa0695a1dCbwUHXvU8B6vm0mOmAZw6m_ngQ8NI04VIz3ReiLsm_ggmMMZ4umOipcUrdlg-2vshd-Ir0uf19ZniOVz5kcp6gbSIkk0rWOGGqanQSeoNz_OVy-t1GPTaYJDWcbCCOCLMG_4w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094451,\"updated\":1590094451,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "990", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:20 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "34bc6751-048b-4b68-add2-695a0f78b482", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "00ca8ad5-1849-49d5-822e-bb20715460ea", "x-powered-by": "ASP.NET" } }, @@ -148,18 +144,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:20 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "41cdffdb-cc70-4165-be05-4433759cc7f7", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "4fd073e4-5c9b-4502-9e60-0bfc7b9e1808", "x-powered-by": "ASP.NET" } }, @@ -176,18 +171,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:20 GMT", + "date": "Thu, 21 May 2020 20:54:11 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7fb9bb96-a72f-4565-966b-b1a434de8141", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "713d3f8f-2bab-4f75-a08d-a4336a3776f7", "x-powered-by": "ASP.NET" } }, @@ -204,18 +198,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:22 GMT", + "date": "Thu, 21 May 2020 20:54:14 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "02aa3210-54bc-4c6c-a479-eb5708853438", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "7e4813db-1921-4ab7-b54b-969bba2c505e", "x-powered-by": "ASP.NET" } }, @@ -232,18 +225,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:24 GMT", + "date": "Thu, 21 May 2020 20:54:16 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0dcaded9-d644-452b-943c-20549b0357ac", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ee5e75e8-de2e-47e9-a7ee-950752b61f5c", "x-powered-by": "ASP.NET" } }, @@ -260,18 +252,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:27 GMT", + "date": "Thu, 21 May 2020 20:54:18 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f825ed48-6b9a-46f0-924a-bb462fbd135c", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5ccdd98d-3fa2-4ce7-bbe4-6894dbd90e20", "x-powered-by": "ASP.NET" } }, @@ -288,18 +279,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:29 GMT", + "date": "Thu, 21 May 2020 20:54:20 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5bebae07-681a-4cb6-bd9b-7be739ed8c29", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3e725f71-678d-4104-8e0a-d4e0f95e9710", "x-powered-by": "ASP.NET" } }, @@ -316,18 +306,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:31 GMT", + "date": "Thu, 21 May 2020 20:54:22 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2d37c92a-78cf-4294-9bb2-27afbc8af472", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "21c13e7d-6d53-4b2c-8a0f-528e5fd9e160", "x-powered-by": "ASP.NET" } }, @@ -344,18 +333,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:33 GMT", + "date": "Thu, 21 May 2020 20:54:24 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "93ad722b-cf40-4337-b516-9902a3d09280", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b997f51d-0b41-427c-9840-e05989a3cdae", "x-powered-by": "ASP.NET" } }, @@ -372,18 +360,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:35 GMT", + "date": "Thu, 21 May 2020 20:54:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2c200354-dade-447a-89eb-1f49f826d77a", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "18aaa616-cf0e-4366-8c55-58b8ba7a6ade", "x-powered-by": "ASP.NET" } }, @@ -400,18 +387,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:37 GMT", + "date": "Thu, 21 May 2020 20:54:28 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "68bff13d-8997-474f-9e00-ed99af8153a4", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3248fc51-fa55-4f17-ba1c-81662786dfe4", "x-powered-by": "ASP.NET" } }, @@ -428,18 +414,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:39 GMT", + "date": "Thu, 21 May 2020 20:54:29 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "22e30319-1fe9-4f3e-b691-8c9a1139c41e", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bc7ad76b-521b-427d-8a0b-e1a9cb80d114", "x-powered-by": "ASP.NET" } }, @@ -456,18 +441,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:41 GMT", + "date": "Thu, 21 May 2020 20:54:31 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d36a812b-50de-48c9-b5c6-731a81672949", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0da7c9d3-eef6-47c3-a196-ca839d0e7546", "x-powered-by": "ASP.NET" } }, @@ -484,18 +468,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:43 GMT", + "date": "Thu, 21 May 2020 20:54:34 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7cfe8345-77a5-4462-bb22-b51d8bd10b3a", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "49001081-ae30-4d52-8c6a-e323d6881513", "x-powered-by": "ASP.NET" } }, @@ -512,18 +495,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:45 GMT", + "date": "Thu, 21 May 2020 20:54:36 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "58f9e3c7-1d44-4716-bda0-eab83b92de74", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "57227b93-63bc-40f4-a437-aea54bb4aa71", "x-powered-by": "ASP.NET" } }, @@ -540,494 +522,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:47 GMT", + "date": "Thu, 21 May 2020 20:54:38 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "6d162689-183b-4940-a827-3558b8a4039f", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:49 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f730e81b-018e-40d8-a1c2-de0766ba784c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:51 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2e2e0000-c0c6-43d0-9580-e995d7fc4f0b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:53 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d760eee7-dd83-4081-a442-e909eb98356c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:55 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "81e46b2a-63fa-43d4-83dc-1678c64db8a2", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:50:57 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e952a89b-8fb6-4d24-9e06-1e75c2d7ec26", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:00 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4f5d1283-7e4f-442b-9111-41ea09998e10", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:02 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1d851555-369b-4e97-857d-a8832b67c3f4", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:04 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "52b83ff5-e1e8-4584-967e-8163ab8b21ce", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:06 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "99b62295-0818-4677-87b7-011b27b68dfe", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:08 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "47ab49cc-205e-4a31-89ce-01b69fc2c9d4", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:10 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c174ad4d-0bdc-49ad-9ce1-6ca3a3d474bc", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:12 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "edbfa704-f7ca-4ce4-9d71-c0f579b76789", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:14 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "73cb6fa5-c372-4761-bd42-9cef17a20043", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:16 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5dfe97cc-bc30-440f-9063-7c89b8b7cc09", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:18 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "779cfb29-fd2b-47d2-9409-a4ddb16d2e6c", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:20 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "9a127f7d-f7b0-4f96-9a3e-f52ff17da903", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:22 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f1ad7c42-31b3-4133-846e-55d7be1ace51", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1de9a6f1-b3d7-4dc0-b75c-3c3620ebcf60", "x-powered-by": "ASP.NET" } }, @@ -1039,23 +544,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1588816220,\"scheduledPurgeDate\":1596592220,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/8dda5952c9a04b389e103007b716fb3a\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"5xIkvjtQednksnq2s0_UWl3F6BwibhuBK1knLAhq2_GLWoTKjS9sgxgi5Wp914coCibNU42iUK9OrKF2TtEAjA1jIm6tmRN5O4azyWttw_JSzXT6WhYTaFGKrKkxGD8v5L7dq1QBVU-sXGGi24BP8WkunrHti_Z-Kc69JHbjfHMqhklLmjO-psAOilJM5w71SFdQfK6xPEuMrpPWLV_U_ypGMjNcKlbyF6kVJwdyKQBY2lYmb74acZqkbMoixufiEZUYlfAMeZ8Thl9pugOYmarfhAAR94PS07ibjsuyiZDpUp_vT0flIeBdBt_p3XkPYuDdoicB6xIXIcmSUT4_tw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590094452,\"scheduledPurgeDate\":1597870452,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/4ceb44645ea94eeebc8ededf1183fde5\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uHN_aOpMriz3l0GjvOuGQeDOXnij7TA-ziGZ9rCd5dVoKGgD_jnE7HUmNelomNQYsevyuNzzf-AIlY3gylvBNLfji6WcIwiagIHUpbAOXi7D9d_ShjlkxGW5Bf4p3BaIbcFJ58xMyn-f2k_2zLx3TnCmWZDj7fXWcipdw22ZrAnZZnZz6S6CsSa6fGCO4ti_JLtlimTFVa0695a1dCbwUHXvU8B6vm0mOmAZw6m_ngQ8NI04VIz3ReiLsm_ggmMMZ4umOipcUrdlg-2vshd-Ir0uf19ZniOVz5kcp6gbSIkk0rWOGGqanQSeoNz_OVy-t1GPTaYJDWcbCCOCLMG_4w\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094451,\"updated\":1590094451,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "990", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:24 GMT", + "date": "Thu, 21 May 2020 20:54:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c6753335-3745-44d2-aa79-556a697844f9", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0c6a5ad2-892e-4a1c-81e3-c2f4646deb7c", "x-powered-by": "ASP.NET" } }, @@ -1070,18 +574,17 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Thu, 07 May 2020 01:51:24 GMT", + "date": "Thu, 21 May 2020 20:54:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f5c67896-118c-4458-a0ff-db49b1a91852", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b47db32f-0659-4f88-8472-c1bcd39014cc", "x-powered-by": "ASP.NET" } }, @@ -1093,191 +596,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1588816285,\"scheduledPurgeDate\":1596592285,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/9f04e743ef9541bea9d62f8b41f59c3f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"wjnTKit2qtzPop6fu6AXYF4Nu6-zGyXVSf8IzLWTYxBDt2DEZ2m8Fm2k51Davp5Y2vAY1Y-jgaX7rliSBp-7QQSy2qaQFQeNVuuHRypgk4vQYjlcTSvrrW99DwIyMfzyNFaeTfe8ZZhBbVvXX2ko_YWJd3oVl6IaeLzP8EUliyB-T5aGhVqhawhyi1V2J3wr3Qd6GYz2Wqw5lZD2mA_3xhpcfnX2yKF6CkLdEdc6Tcxw19tsTjQy2EedOcmqxzoMEIQu1DjKZPzAnLIniCxBMtdjFGzJ_nwMRSr4taI-6hV65srj_TVvAaS5S5Whj77w-Q1M3okp4z7RQ1RIRD1oWw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590094481,\"scheduledPurgeDate\":1597870481,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/5ab1c73d095242619907cb5190c17d22\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tl2Xa-OpSz-pIPfSWDOFh3ZO2FEZTQoOSuLsaXk6cfOCiyYby0Cuoamb3OKzw0zEI9sosYg9riMAXbQkiLvYQ6y_hktsGPJXUPSqrH6Req36eJxRWNMztFk61ZQ9-MkM3Y11Xqv_hKoSaB9yILX_OJsVMzfxo2rMHeUf4mXSq7sETNG1N70VVBz-P9FLf2I9QBaI2ms5ir-1qBp6VeOs00FUCR91B-VWL_OnMuw-XEKPV-wjFM0xhH2xiFEGQsbgXXaiFXbuPj6Q_Nftzn1s3qtDprkA_ucNQdXWrbzDoxcXD-MvjMU0DQFPBxED2gmi9sQuhLqjIkcx5IWFnbUEhw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094452,\"updated\":1590094452,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "990", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:24 GMT", + "date": "Thu, 21 May 2020 20:54:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "2a1ad751-d802-4e45-abcc-ea078d1bbbea", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:24 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "bda4ecdc-c9d6-4b3b-8085-83fdbb8b03d7", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:24 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "6ed427b5-e959-4723-aa9c-1df22e4672b7", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:26 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "9659e993-b3a8-48e8-8d0f-954766ac9250", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:28 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "de9f90ed-3019-4747-93e9-5eb6c8beba4b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:30 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "9fa0faa4-8a8b-4f9a-8a71-4d86df998c82", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "162", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:32 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "be77e9f0-9541-4c94-ad89-722c6fdbd9e7", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "0aaf0714-e56d-4ae4-9edc-a4e1bc3de31b", "x-powered-by": "ASP.NET" } }, @@ -1294,18 +628,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:35 GMT", + "date": "Thu, 21 May 2020 20:54:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "4e406153-282d-43c8-9bed-69060fa76f3f", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "10446c8a-253d-4577-9314-b8054414e54e", "x-powered-by": "ASP.NET" } }, @@ -1322,18 +655,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:37 GMT", + "date": "Thu, 21 May 2020 20:54:40 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5460ae71-9de9-4b7b-b3c0-d136476b5946", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "47df47d2-eb41-4cfc-89d2-8a59dad0a2d2", "x-powered-by": "ASP.NET" } }, @@ -1350,18 +682,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:39 GMT", + "date": "Thu, 21 May 2020 20:54:42 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "57cad27c-ae0c-4544-8aa4-6d24b86ea9b2", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "99bc03a5-4fe9-4c6e-a756-4f8ed8ba047f", "x-powered-by": "ASP.NET" } }, @@ -1378,18 +709,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:41 GMT", + "date": "Thu, 21 May 2020 20:54:44 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "22e6b35a-62d5-447c-a7db-35b4b51bb01b", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2d9e71f7-d445-4613-b59a-95f90228afb5", "x-powered-by": "ASP.NET" } }, @@ -1406,18 +736,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:43 GMT", + "date": "Thu, 21 May 2020 20:54:46 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8da3b353-95e8-4caa-a244-6b29455356fb", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "047282f5-c88c-47ac-a6e3-7bb90df3ac73", "x-powered-by": "ASP.NET" } }, @@ -1434,18 +763,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:45 GMT", + "date": "Thu, 21 May 2020 20:54:48 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7f0de38d-eb67-4f4f-b957-cd9fffeb9000", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2c2df69a-2175-461a-b9b2-035e35001d44", "x-powered-by": "ASP.NET" } }, @@ -1462,18 +790,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:47 GMT", + "date": "Thu, 21 May 2020 20:54:50 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "366782c5-5aa0-48dc-a396-e7683330a4fa", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "72e1e754-a3e4-4b5f-8e09-351150826340", "x-powered-by": "ASP.NET" } }, @@ -1490,18 +817,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:49 GMT", + "date": "Thu, 21 May 2020 20:54:52 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "619aaba3-b04b-4164-b4e9-a4705c50e0c1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "30d322b0-a5cb-48f6-9b48-5a2b0d94104a", "x-powered-by": "ASP.NET" } }, @@ -1518,18 +844,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:51 GMT", + "date": "Thu, 21 May 2020 20:54:54 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1e61b47a-d34c-4b99-b4c7-6e10592007cf", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e5972c0a-3941-4fd2-8d69-d9564a2ae225", "x-powered-by": "ASP.NET" } }, @@ -1546,18 +871,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:53 GMT", + "date": "Thu, 21 May 2020 20:54:57 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d445f985-f938-4f14-bedf-44b5575fa385", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "08a02be0-24f1-4eba-9928-845d1aa52453", "x-powered-by": "ASP.NET" } }, @@ -1574,18 +898,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:55 GMT", + "date": "Thu, 21 May 2020 20:54:59 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e05687d5-93a6-4d37-afc5-7ff64f58dbf4", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d3217adb-347f-4256-b02c-b57660cfd21c", "x-powered-by": "ASP.NET" } }, @@ -1602,18 +925,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:57 GMT", + "date": "Thu, 21 May 2020 20:55:01 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "fc7b8772-868c-40f3-842c-cc4a86034255", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1f089d05-567f-43c6-8185-b731790983d1", "x-powered-by": "ASP.NET" } }, @@ -1630,18 +952,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:51:59 GMT", + "date": "Thu, 21 May 2020 20:55:03 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d56e48a8-eb37-4a41-aca7-f3621d73a057", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "546ba3b3-4070-4231-85c5-79b22bb4bf9a", "x-powered-by": "ASP.NET" } }, @@ -1658,18 +979,17 @@ "cache-control": "no-cache", "content-length": "162", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:52:01 GMT", + "date": "Thu, 21 May 2020 20:55:05 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "cdbce187-d7b4-4afc-a88f-9d2e27c77df2", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6c7cfa8f-9923-4c9b-ad94-93efef5c7f1c", "x-powered-by": "ASP.NET" } }, @@ -1681,23 +1001,22 @@ }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1588816285,\"scheduledPurgeDate\":1596592285,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/9f04e743ef9541bea9d62f8b41f59c3f\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"wjnTKit2qtzPop6fu6AXYF4Nu6-zGyXVSf8IzLWTYxBDt2DEZ2m8Fm2k51Davp5Y2vAY1Y-jgaX7rliSBp-7QQSy2qaQFQeNVuuHRypgk4vQYjlcTSvrrW99DwIyMfzyNFaeTfe8ZZhBbVvXX2ko_YWJd3oVl6IaeLzP8EUliyB-T5aGhVqhawhyi1V2J3wr3Qd6GYz2Wqw5lZD2mA_3xhpcfnX2yKF6CkLdEdc6Tcxw19tsTjQy2EedOcmqxzoMEIQu1DjKZPzAnLIniCxBMtdjFGzJ_nwMRSr4taI-6hV65srj_TVvAaS5S5Whj77w-Q1M3okp4z7RQ1RIRD1oWw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1588816220,\"updated\":1588816220,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590094481,\"scheduledPurgeDate\":1597870481,\"key\":{\"kid\":\"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/5ab1c73d095242619907cb5190c17d22\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tl2Xa-OpSz-pIPfSWDOFh3ZO2FEZTQoOSuLsaXk6cfOCiyYby0Cuoamb3OKzw0zEI9sosYg9riMAXbQkiLvYQ6y_hktsGPJXUPSqrH6Req36eJxRWNMztFk61ZQ9-MkM3Y11Xqv_hKoSaB9yILX_OJsVMzfxo2rMHeUf4mXSq7sETNG1N70VVBz-P9FLf2I9QBaI2ms5ir-1qBp6VeOs00FUCR91B-VWL_OnMuw-XEKPV-wjFM0xhH2xiFEGQsbgXXaiFXbuPj6Q_Nftzn1s3qtDprkA_ucNQdXWrbzDoxcXD-MvjMU0DQFPBxED2gmi9sQuhLqjIkcx5IWFnbUEhw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1590094452,\"updated\":1590094452,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "990", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 01:52:04 GMT", + "date": "Thu, 21 May 2020 20:55:07 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "1d491481-4f4a-4966-a01d-fdebbccae6e4", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d30f57b2-7a32-4f64-8992-b06d9df9daac", "x-powered-by": "ASP.NET" } }, @@ -1712,18 +1031,17 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Thu, 07 May 2020 01:52:04 GMT", + "date": "Thu, 21 May 2020 20:55:07 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "571b77fd-3168-4553-8c21-c2ca79865c71", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "919573c5-2453-4c39-8956-d492b2f564f8", "x-powered-by": "ASP.NET" } } @@ -1732,5 +1050,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "bbd27122d22f1055bdc31805f9dc088b" + "hash": "fc4277b213005c3e1c27c9e80f334bff" } \ No newline at end of file diff --git a/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..42c8c8960154 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "24a0217e498307856762e82a7f4438ce" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..ee52cb5f42ec --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "3a40c924262c7aef1e6f179bccbbd5c0" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js new file mode 100644 index 000000000000..30c4bd3d6995 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js @@ -0,0 +1,1291 @@ +let nock = require('nock'); + +module.exports.hash = "cccc295cd2446345a7c0c60f870c050f"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5dabc394-fe13-46c7-a8db-8ba6bad898f0', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/create') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '141ac79d-42ed-4b6c-b13f-608e29399500', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + 'eb2cde1a-c233-4838-99f0-7eaca96d6400', + 'x-ms-ests-server', + '2.1.10571.11 - NCUS ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=AgVP_9k73WVIs1y7qljhir0_aSJHAQAAABraWNYOAAAA; expires=Sat, 20-Jun-2020 20:22:51 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT', + 'Content-Length', + '1315' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '1240297c-5dca-4677-bc17-751f1f7d6700', + 'x-ms-ests-server', + '2.1.10571.11 - EUS ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=Ao3xQuqCaOhGunQN6BS211U_aSJHAQAAABraWNYOAAAA; expires=Sat, 20-Jun-2020 20:22:51 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT', + 'Content-Length', + '1315' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/create', {"kty":"RSA"}) + .query(true) + .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/41557be3a898495e818e54c2e18632f5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9hBVaH0Cwptww_wkWhX_dIyQw7TK88zks5MYfmAfyrbmlbSKjSrox6PHXcJey3RXgRreS_IYJuOSzIELyq3qpw3eHCsxonN4_uaP46j55qQ1M54X_zg_kmac7VlmjCWIWAn2BacySWxxFlwc86wVPfwobU1J1qGt_MXlOnM0gAa2nRmwPVvxEagCziS8zFBATkcGn0AetiWfKHYkfW6XRSoGjhP7dxr9Zh0FSMV-U3CGhBmQ7ey9LHfKwezRDQt-s_XFhcPsh84mW36GbWRtJTvqD72uK5Pu-cU30BHqXNe4nghvCl7LcOvlkv1p9UHXZlgyDUsT9ojE63O8VLc5rw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092571,"updated":1590092571,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e36afb46-a53f-4134-bc4c-4666bef804ff', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT', + 'Content-Length', + '757' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590092572,"scheduledPurgeDate":1597868572,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/41557be3a898495e818e54c2e18632f5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9hBVaH0Cwptww_wkWhX_dIyQw7TK88zks5MYfmAfyrbmlbSKjSrox6PHXcJey3RXgRreS_IYJuOSzIELyq3qpw3eHCsxonN4_uaP46j55qQ1M54X_zg_kmac7VlmjCWIWAn2BacySWxxFlwc86wVPfwobU1J1qGt_MXlOnM0gAa2nRmwPVvxEagCziS8zFBATkcGn0AetiWfKHYkfW6XRSoGjhP7dxr9Zh0FSMV-U3CGhBmQ7ey9LHfKwezRDQt-s_XFhcPsh84mW36GbWRtJTvqD72uK5Pu-cU30BHqXNe4nghvCl7LcOvlkv1p9UHXZlgyDUsT9ojE63O8VLc5rw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092571,"updated":1590092571,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b1e91b9b-89cb-4bb1-853f-7ca465e65baf', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:52 GMT', + 'Content-Length', + '968' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .post('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/create', {"kty":"RSA"}) + .query(true) + .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/0935ec8051da4ac7ae4e1239f70e353b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"69M_yNO9MkJIImQJRY89XLrx9hfHo6fBSkOS2rrrGeqIlQmXzmM0vMv8q-uX9Igaa8iekvsdsHj2j3kd5AhJDi7-YJfQgpSQ-9QHmsP9Ni39KONbI6RVLrwRzaZLO-Uym9s4_8pKWZdvd7pimBIkM-laXnejSGTYFothqhgWJDX5vnPiyy6wzBfbr-3o-xtBAumf1JFKvRucb9_plp9rAeeMJ-vRtZF9TD3JMMYDl-SdXBiIJBKs1x7m0jcxg-DmKMIiEOy92HV7oYgBThHLxbn_uswdwIZz5keV6p2Dw7vbxIOQxMvFw9y2ueNUYXnb9fqgG1NimGKgZ3sltNYFiw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092572,"updated":1590092572,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c668bb51-d274-4944-a14d-2007060e79d3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT', + 'Content-Length', + '757' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '678c7961-30b9-4c78-87fc-e4568896b50f', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:52 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b5d9803a-79e3-42e4-8923-8cba2de2b4da', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:51 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '83616d26-8ff2-42cb-aef2-972232bc7fb1', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:53 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ff132e9d-3851-4a8f-b89c-8f081f597d20', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:55 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '89abce25-ad00-4cef-a43f-15a2303473d8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:22:58 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3bd24ee2-9bd1-41dd-a97d-ae953e4185ab', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:00 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '4150ecdd-64f6-4037-90d0-fa73ada979ee', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:02 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '85797bae-756e-4ca6-a7d1-b0ea74c3d11e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:04 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'da09fd6b-45c4-473c-b1ef-bcb57023ccc2', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:05 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c45c21b5-8d28-46d5-9b9a-a665254aae2e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:08 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1bc88fa2-9149-4d39-bd83-fab7ef646d39', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:10 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6e2f6466-10dc-4c83-ac74-b32676f87740', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:12 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '49137776-9f77-4d1e-aac8-e0f6ea9061a5', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:14 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '68ce98c2-439a-4896-b004-e62ef7c97b8a', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:16 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6032c386-6feb-46f4-9b5e-d9398b11d453', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:17 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590092572,"scheduledPurgeDate":1597868572,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0/41557be3a898495e818e54c2e18632f5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9hBVaH0Cwptww_wkWhX_dIyQw7TK88zks5MYfmAfyrbmlbSKjSrox6PHXcJey3RXgRreS_IYJuOSzIELyq3qpw3eHCsxonN4_uaP46j55qQ1M54X_zg_kmac7VlmjCWIWAn2BacySWxxFlwc86wVPfwobU1J1qGt_MXlOnM0gAa2nRmwPVvxEagCziS8zFBATkcGn0AetiWfKHYkfW6XRSoGjhP7dxr9Zh0FSMV-U3CGhBmQ7ey9LHfKwezRDQt-s_XFhcPsh84mW36GbWRtJTvqD72uK5Pu-cU30BHqXNe4nghvCl7LcOvlkv1p9UHXZlgyDUsT9ojE63O8VLc5rw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092571,"updated":1590092571,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5baf4089-fc91-43bc-beb9-c6ad16ceab49', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:20 GMT', + 'Content-Length', + '968' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6fb1c1fb-42e4-4b22-a65f-bcb05aa8a3a6', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:21 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590092601,"scheduledPurgeDate":1597868601,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/0935ec8051da4ac7ae4e1239f70e353b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"69M_yNO9MkJIImQJRY89XLrx9hfHo6fBSkOS2rrrGeqIlQmXzmM0vMv8q-uX9Igaa8iekvsdsHj2j3kd5AhJDi7-YJfQgpSQ-9QHmsP9Ni39KONbI6RVLrwRzaZLO-Uym9s4_8pKWZdvd7pimBIkM-laXnejSGTYFothqhgWJDX5vnPiyy6wzBfbr-3o-xtBAumf1JFKvRucb9_plp9rAeeMJ-vRtZF9TD3JMMYDl-SdXBiIJBKs1x7m0jcxg-DmKMIiEOy92HV7oYgBThHLxbn_uswdwIZz5keV6p2Dw7vbxIOQxMvFw9y2ueNUYXnb9fqgG1NimGKgZ3sltNYFiw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092572,"updated":1590092572,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'afdec03f-492f-4acd-8759-fd3efcd5baea', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:20 GMT', + 'Content-Length', + '968' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd11c25ad-6262-4607-ae4c-5f767586ca35', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:21 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '41b9afd0-9e36-418c-b96f-a5f3868bee8d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:20 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b058cef0-0f3d-49af-984b-408a02b88c05', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:23 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '8722972b-fd54-4970-aed5-4908e13bd390', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:25 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a1d98f85-5a6f-4691-9739-f33db7bb6ac0', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:26 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c3c67d52-651e-4e26-a203-3b77e3a90e83', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:29 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'fc0a7b3e-7c4b-4f37-87de-f265c1a1ba58', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:30 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '33dab731-7d4c-427a-885b-d5e9197e59d8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:32 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c6fa7208-e9a3-4288-8410-f56b945c1233', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:35 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '10e23df7-097f-47fc-a8db-0f11e0099dfb', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:37 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '151', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '693ae555-4290-4c44-a1ec-c85c2575318c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:39 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590092601,"scheduledPurgeDate":1597868601,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1/0935ec8051da4ac7ae4e1239f70e353b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"69M_yNO9MkJIImQJRY89XLrx9hfHo6fBSkOS2rrrGeqIlQmXzmM0vMv8q-uX9Igaa8iekvsdsHj2j3kd5AhJDi7-YJfQgpSQ-9QHmsP9Ni39KONbI6RVLrwRzaZLO-Uym9s4_8pKWZdvd7pimBIkM-laXnejSGTYFothqhgWJDX5vnPiyy6wzBfbr-3o-xtBAumf1JFKvRucb9_plp9rAeeMJ-vRtZF9TD3JMMYDl-SdXBiIJBKs1x7m0jcxg-DmKMIiEOy92HV7oYgBThHLxbn_uswdwIZz5keV6p2Dw7vbxIOQxMvFw9y2ueNUYXnb9fqgG1NimGKgZ3sltNYFiw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092572,"updated":1590092572,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '629b5db3-cefc-44a5-9d98-0a6d896cb0f8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:41 GMT', + 'Content-Length', + '968' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedkeys/challengeAuthKeyName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '4d098506-ec45-4aeb-bda3-5ac1964082fd', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Thu, 21 May 2020 20:23:42 GMT' +]); diff --git a/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js index 8c6aac4354b4..993343f60d30 100644 --- a/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js +++ b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "2f2cf44decef8c12e1f93f5b880b76f3"; +module.exports.hash = "8e1ed616c8f98452f7d7e14d2faf4df5"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -18,18 +18,16 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'WWW-Authenticate', 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '773cfe99-9a48-4e28-8c96-66f5ea10da79', + '6c6e4e9e-d7b3-4483-9d37-3f0eccf21527', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -39,7 +37,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:31 GMT' + 'Thu, 21 May 2020 20:22:15 GMT' ]); nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -58,19 +56,19 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '03b8b4ac-d4bc-42c0-9ca5-cf5ab15d2700', + 'a314a69e-c30c-44c3-ad02-922c2cda6300', 'x-ms-ests-server', - '2.1.10519.7 - SCUS ProdSlices', + '2.1.10571.11 - SCUS ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AkVRsVjGELRIim65TNRlTiU_aSJHAQAAALNfRdYOAAAA; expires=Sat, 06-Jun-2020 01:47:32 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AlwJjwGfR15Cu35agPoPhH0_aSJHAQAAAPbZWNYOAAAA; expires=Sat, 20-Jun-2020 20:22:15 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 07 May 2020 01:47:31 GMT', + 'Thu, 21 May 2020 20:22:15 GMT', 'Content-Length', '1315' ]); @@ -78,7 +76,7 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .post('/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/create', {"kty":"RSA"}) .query(true) - .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/2cb7fe94cbb545a38229bf5046a11ea3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oKd900r3ffegZ68qidcmqueqcwCRwn23uB8KWSGZAUfh4FYebEuAorxQ90FkBzbmPaDvIg-d49r97I6HBTRU7TkWCkstIaqZxCU37-TFRE2cjaZgmvy7ccTUI_m_TheXNJQzVhY8qTvq1PLK-e6q4LWXYWrFHyFOEIJzo343SP92gn4jk31QSfXrvk_EOXzYvC1pk0jpK5xmyFknpu6xmZnwbH2mYvPjIAT-rvHeFbX4b9V0Lx2UWXo7_vkOzvIgtZ428wma07uyluhwtq02AlMW_BfSdtss1Lp5jGXbH4SKElGA_QeihunJAwlQxbJJKpVqWLLPd2lxVhJxB-d86w","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/b582f5800e9741a5adcd433459018104","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wMEHR4XFZ9yU5_Lzo1xCGtnFfJT5_wjqxpOVMxTiLDwsO1PFZCxkHqvaR4bgaODnWCvR9whRluTm9S1qJHHQZYyoYJZKao9h1AXa1UNKCcIT8xoCRgDzqc4f8W5VIb9fSmBQsxt1-tYK2O0HfDxN3UyKxMqSntiH3YVbsUgIECOf0dwgpbXE6ZG7clQN2Iv_nZo4tky1YES0L259Bz5qvMehrNtaXPncfUR-suZQusAPKS-hci_GnScbIyITIMEK5Rs0mCYaOLZ_ge39sPWTcPTln5rE16AUojQ6c8goClTIcR-x94-PhhZpGTVIwRqvrCx-MqiKpuFYmRYBkH8Uww","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -87,16 +85,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '34ec5b40-98cd-4a18-a187-948cca55d316', + '3fdd2a98-52b2-412b-8e58-36fa78fb3ae8', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -106,15 +102,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:32 GMT', + 'Thu, 21 May 2020 20:22:15 GMT', 'Content-Length', - '771' + '768' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .post('/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/create', {"kty":"RSA"}) .query(true) - .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/55bd34a183824f8b87cff4b9fc9e0949","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"v-bpwvetALVzqslISsbBt1sGEDBxraePn2Jc2veVO35pqkeyeFpJoCaaRmsxa0bRmwTThYGFiAWR-a3mq6BsQPBr6BbnGAeXKygKN0XLikuc3glOH_Ssl9NJEfE5OV6D_VUS3EDaAA2hTAyaf_qX0U9r5Uy6QbxLbz8Nw9YcZ-X1wh4LnY0HFAxDzHvcsQOZHEDxTSZa5bO6ZKj9PTPacISUsO7c4S-V1_wkVRCkyQgNdcrFs1oKLZHn-l3j8Mt-sh74Ng5VF1Cw2QhSmfH8uIFSq01xHFenhGrr2RMgs0GvPiiOYhZwPRLP7H3RxUCpsLnsoePJqUyOMF7RHZcZVw","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dc938c9ece7d4b2cb16b66a21d91b2a0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3WU7NBlPm9gOe4pRWhSSKE6LXD5zjWa6sJlnLfWyt6WOFuAPVL4aLKkIIeiw-Cdjtpv32C9mr8AMFxYg6Mz5homXKG3ycduM4pXUruYL2kmYWBs4eD7sYqMvFI9PfSv7Ri2sfjVyMFonATfyZWNu6oDBPVRalfzF_vk1xJ9UOCfc3jpUTdsMCG9oPQpb1t-3UzSu0i1AsnG_KGU_eCxyYM6DwqDDvcGW_-c3LzeFJ0eOFlHN-1tVfJnz1sttp-ncLXwiFG4ftuHzeIkLF6CQeMp7Y1LyWrAI921i9zvxO2DsRXU9DR_XuJJbcdmDk8xpofQrZ3U9VET0MZGbK0Jcxw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -123,16 +119,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '6dc198e7-3119-4599-ac60-e4f434b63e46', + 'f2cbfa3d-c5cb-4c6c-b4ce-b233396353e0', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -142,15 +136,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:32 GMT', + 'Thu, 21 May 2020 20:22:15 GMT', 'Content-Length', - '771' + '768' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .delete('/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1588816052,"scheduledPurgeDate":1596592052,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/2cb7fe94cbb545a38229bf5046a11ea3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oKd900r3ffegZ68qidcmqueqcwCRwn23uB8KWSGZAUfh4FYebEuAorxQ90FkBzbmPaDvIg-d49r97I6HBTRU7TkWCkstIaqZxCU37-TFRE2cjaZgmvy7ccTUI_m_TheXNJQzVhY8qTvq1PLK-e6q4LWXYWrFHyFOEIJzo343SP92gn4jk31QSfXrvk_EOXzYvC1pk0jpK5xmyFknpu6xmZnwbH2mYvPjIAT-rvHeFbX4b9V0Lx2UWXo7_vkOzvIgtZ428wma07uyluhwtq02AlMW_BfSdtss1Lp5jGXbH4SKElGA_QeihunJAwlQxbJJKpVqWLLPd2lxVhJxB-d86w","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590092535,"scheduledPurgeDate":1597868535,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/b582f5800e9741a5adcd433459018104","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wMEHR4XFZ9yU5_Lzo1xCGtnFfJT5_wjqxpOVMxTiLDwsO1PFZCxkHqvaR4bgaODnWCvR9whRluTm9S1qJHHQZYyoYJZKao9h1AXa1UNKCcIT8xoCRgDzqc4f8W5VIb9fSmBQsxt1-tYK2O0HfDxN3UyKxMqSntiH3YVbsUgIECOf0dwgpbXE6ZG7clQN2Iv_nZo4tky1YES0L259Bz5qvMehrNtaXPncfUR-suZQusAPKS-hci_GnScbIyITIMEK5Rs0mCYaOLZ_ge39sPWTcPTln5rE16AUojQ6c8goClTIcR-x94-PhhZpGTVIwRqvrCx-MqiKpuFYmRYBkH8Uww","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -159,16 +153,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'dd7d368f-7fcf-4620-8d61-0cc754fe32f9', + '1c4f848e-c686-4541-a70f-9f2086662d36', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -178,9 +170,9 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:32 GMT', + 'Thu, 21 May 2020 20:22:15 GMT', 'Content-Length', - '996' + '990' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -192,21 +184,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '4873c9df-8e4e-4049-8495-07e2588c2abe', + 'c6ca4405-383e-4685-b302-6b735f811d11', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -216,7 +206,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:32 GMT' + 'Thu, 21 May 2020 20:22:15 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -228,21 +218,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '44565cf0-aed6-4514-925a-714e59ab3f01', + '579a9c5f-c80e-42f7-a236-c12ab7e37eb4', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -252,7 +240,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:32 GMT' + 'Thu, 21 May 2020 20:22:16 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -264,21 +252,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e0b126d7-6fca-4d2f-a327-1de9ec0b188b', + '2a39f6da-4428-43a4-b22e-da4195d72f29', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -288,7 +274,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:34 GMT' + 'Thu, 21 May 2020 20:22:17 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -300,21 +286,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'a90b21b4-3f5e-46c6-bf3c-ee46a062ab43', + '55c33c75-3119-46a7-9509-38c5dc809a02', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -324,7 +308,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:36 GMT' + 'Thu, 21 May 2020 20:22:19 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -336,21 +320,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b8f3616f-f5c3-400e-bbd0-f714a00d460b', + '3de2baa5-27f1-48a5-9b34-c55a9c563d91', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -360,7 +342,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:38 GMT' + 'Thu, 21 May 2020 20:22:22 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -372,21 +354,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '2fef28b4-7097-4fb9-ba46-a13046eb1fd1', + 'b72dfe9b-7cc3-4633-9d85-980359df4fd6', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -396,7 +376,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:40 GMT' + 'Thu, 21 May 2020 20:22:23 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -408,21 +388,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '11b36f83-9236-4d40-94bb-3bb039befe37', + 'db457a40-2a78-4a11-ac06-e1ed3ac59f0e', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -432,1433 +410,29 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:47:42 GMT' + 'Thu, 21 May 2020 20:22:26 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7f69acf6-7821-48df-b31f-5fbecf2a244d', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:44 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'eb30adda-c642-47b6-aa0b-92a04b580f8f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:46 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '69388d5f-3fc4-4723-9218-e5a29162b462', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:48 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '257ef6de-4e0b-4c5c-9fbe-77ac023f1729', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:50 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '59ea99cf-2cb5-4899-ac66-f0cfeab8ec57', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:52 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '4865dc5c-3db1-45c3-ad1b-c00ae84c3357', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:54 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '9e31137f-c10b-4edd-a2c9-54a912042b4e', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:57 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7c0448da-bee1-40b2-971e-b81e82231b1c', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:47:59 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ff886f96-2b3b-478e-9213-5b18ee09ed8b', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:01 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '8fae28b4-0c1b-4dd7-b841-eb068adabe3e', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:03 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'efacc087-a74c-4bac-9203-629110fd475f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:05 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '167249b8-af0a-4871-bc40-1e6bbf18aa72', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:07 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'd610c5d7-1149-4c16-af81-654689a4a7c1', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:09 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ec5220c9-1810-493b-9e0f-6bf5f53bc429', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:11 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'd421bf42-c98b-412d-ae7a-e58719d51d06', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:13 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7db269f4-f553-4130-8c65-4fddeec22bf0', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:15 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7e862dc2-624c-44cd-a658-d9af430635cc', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:17 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '649af893-6341-4895-b151-75cfcdcd6e6f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:19 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '87ecc958-bb06-4ade-9fe9-f2b33008fe8f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:21 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '3893f0af-6885-4e46-b7fe-3a819f0ca677', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:23 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '2315a465-2fbc-4fec-bc6e-02fa147c08ce', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:25 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '813f83f5-8a6f-4f53-b4e7-17dd75a8af67', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:27 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '92cfa91c-bec8-4e76-83eb-611f587a5d16', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:29 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '31db46c1-b5ef-4158-9b97-67c1be23c8ae', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:31 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '975b24f0-1116-4326-abd2-3f221e1c7881', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:34 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7dff0112-bfcc-4173-89ad-a589f7e778cb', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:36 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1588816052,"scheduledPurgeDate":1596592052,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/2cb7fe94cbb545a38229bf5046a11ea3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oKd900r3ffegZ68qidcmqueqcwCRwn23uB8KWSGZAUfh4FYebEuAorxQ90FkBzbmPaDvIg-d49r97I6HBTRU7TkWCkstIaqZxCU37-TFRE2cjaZgmvy7ccTUI_m_TheXNJQzVhY8qTvq1PLK-e6q4LWXYWrFHyFOEIJzo343SP92gn4jk31QSfXrvk_EOXzYvC1pk0jpK5xmyFknpu6xmZnwbH2mYvPjIAT-rvHeFbX4b9V0Lx2UWXo7_vkOzvIgtZ428wma07uyluhwtq02AlMW_BfSdtss1Lp5jGXbH4SKElGA_QeihunJAwlQxbJJKpVqWLLPd2lxVhJxB-d86w","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '43f162a4-0f7b-43cf-97fb-008f8cc336a9', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:38 GMT', - 'Content-Length', - '996' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') - .query(true) - .reply(204, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '66c22a68-41cd-4be0-a503-a4f1327d64bd', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:38 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1588816118,"scheduledPurgeDate":1596592118,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/55bd34a183824f8b87cff4b9fc9e0949","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"v-bpwvetALVzqslISsbBt1sGEDBxraePn2Jc2veVO35pqkeyeFpJoCaaRmsxa0bRmwTThYGFiAWR-a3mq6BsQPBr6BbnGAeXKygKN0XLikuc3glOH_Ssl9NJEfE5OV6D_VUS3EDaAA2hTAyaf_qX0U9r5Uy6QbxLbz8Nw9YcZ-X1wh4LnY0HFAxDzHvcsQOZHEDxTSZa5bO6ZKj9PTPacISUsO7c4S-V1_wkVRCkyQgNdcrFs1oKLZHn-l3j8Mt-sh74Ng5VF1Cw2QhSmfH8uIFSq01xHFenhGrr2RMgs0GvPiiOYhZwPRLP7H3RxUCpsLnsoePJqUyOMF7RHZcZVw","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '0d7ab197-64be-424d-835e-0bb65cf22105', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:38 GMT', - 'Content-Length', - '996' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '5e42d006-cac8-41a0-8693-37bee9d3b297', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:38 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'b05d5f23-d16a-4d36-b95c-ad63fb21e206', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:38 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'a76de830-4a19-4522-ae31-aef3597b9888', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:40 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '7eb5c700-0948-411b-a036-662383df48e5', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:42 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'dd94b85f-63cc-4587-bf9b-b3527765d24e', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:44 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'e5dfdbfe-124b-4901-972b-143e94c64eed', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:46 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'b06f4b7b-29aa-479f-aafe-c0da7a2cf187', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:48 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '593b484e-5177-4807-99cf-398d84c8e42c', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:50 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'b9515ae0-de2f-44cc-be95-cba75faa2631', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:52 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '6920e307-05ae-47bf-a5fa-2c3940b12703', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:54 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590092535,"scheduledPurgeDate":1597868535,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/b582f5800e9741a5adcd433459018104","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wMEHR4XFZ9yU5_Lzo1xCGtnFfJT5_wjqxpOVMxTiLDwsO1PFZCxkHqvaR4bgaODnWCvR9whRluTm9S1qJHHQZYyoYJZKao9h1AXa1UNKCcIT8xoCRgDzqc4f8W5VIb9fSmBQsxt1-tYK2O0HfDxN3UyKxMqSntiH3YVbsUgIECOf0dwgpbXE6ZG7clQN2Iv_nZo4tky1YES0L259Bz5qvMehrNtaXPncfUR-suZQusAPKS-hci_GnScbIyITIMEK5Rs0mCYaOLZ_ge39sPWTcPTln5rE16AUojQ6c8goClTIcR-x94-PhhZpGTVIwRqvrCx-MqiKpuFYmRYBkH8Uww","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '165', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '72f88582-a276-48ad-8ef3-f5d653c20be7', + 'be9a9168-5dcd-4b56-a329-f895472d8bbd', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1868,69 +442,29 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:48:56 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', + 'Thu, 21 May 2020 20:22:28 GMT', 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '4d165927-79e9-492e-889a-b353f41caa37', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:48:58 GMT' + '990' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') + .delete('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ + .reply(204, "", [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e59879a4-1b0d-4989-8bff-3c9f1627829e', + 'f1f4cf3e-7c70-4ca6-9338-bae62083a7be', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1940,33 +474,29 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:00 GMT' + 'Thu, 21 May 2020 20:22:28 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') + .delete('/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590092548,"scheduledPurgeDate":1597868548,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dc938c9ece7d4b2cb16b66a21d91b2a0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3WU7NBlPm9gOe4pRWhSSKE6LXD5zjWa6sJlnLfWyt6WOFuAPVL4aLKkIIeiw-Cdjtpv32C9mr8AMFxYg6Mz5homXKG3ycduM4pXUruYL2kmYWBs4eD7sYqMvFI9PfSv7Ri2sfjVyMFonATfyZWNu6oDBPVRalfzF_vk1xJ9UOCfc3jpUTdsMCG9oPQpb1t-3UzSu0i1AsnG_KGU_eCxyYM6DwqDDvcGW_-c3LzeFJ0eOFlHN-1tVfJnz1sttp-ncLXwiFG4ftuHzeIkLF6CQeMp7Y1LyWrAI921i9zvxO2DsRXU9DR_XuJJbcdmDk8xpofQrZ3U9VET0MZGbK0Jcxw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '165', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '0e07925e-e910-46a1-acb0-246a222d6808', + '9580d603-5d02-4821-8277-d28c9e6d640f', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1976,43 +506,9 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:02 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') - .query(true) - .reply(404, {"error":{"code":"KeyNotFound","message":"Deleted Key not found: challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', + 'Thu, 21 May 2020 20:22:28 GMT', 'Content-Length', - '165', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '61cabe14-2704-48ce-a93f-1035e3430c40', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 01:49:04 GMT' + '990' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2024,21 +520,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8444ff06-90a5-4f7e-9255-66c698174702', + '2f6787d7-bd5e-4a39-af7e-b0050f2594ba', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2048,7 +542,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:06 GMT' + 'Thu, 21 May 2020 20:22:28 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2060,21 +554,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '42bd35b8-a845-4625-a4fc-767b3992cd5b', + 'caef0d4b-9794-44c3-9c9f-50653d3f1e71', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2084,7 +576,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:09 GMT' + 'Thu, 21 May 2020 20:22:28 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2096,21 +588,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '2a461d17-4e6d-40f8-915f-b9dd685750b7', + '86c81e33-4ad4-4efc-a4bf-866d7e1c7734', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2120,7 +610,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:11 GMT' + 'Thu, 21 May 2020 20:22:30 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2132,21 +622,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'de214850-c1e1-4587-ba36-f7ddf4cdae30', + '16593916-4c86-4215-a78c-c6f683eacfb5', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2156,7 +644,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:13 GMT' + 'Thu, 21 May 2020 20:22:31 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2168,21 +656,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '67e23f19-44da-4b57-ab20-9461b202d08d', + '834ae2d6-8ba3-4405-982d-9ef34d95d1f3', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2192,7 +678,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:15 GMT' + 'Thu, 21 May 2020 20:22:34 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2204,21 +690,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '29f4dd54-66ba-4b0d-bb9a-7a0a5c0e5629', + '447e5b52-f3e0-44e0-8a36-962ecc11d5cf', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2228,7 +712,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:17 GMT' + 'Thu, 21 May 2020 20:22:35 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2240,21 +724,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'a3526174-de20-4446-a2d8-385f2f9075b7', + '1ddd5242-76bb-4f63-b34d-f9cf46d1b089', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2264,7 +746,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:19 GMT' + 'Thu, 21 May 2020 20:22:38 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2276,21 +758,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'd9c85f0b-5368-4d1c-aa8f-547285ce9207', + '420233b4-c45d-4e9e-a8b5-b9341a6160b7', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2300,7 +780,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:21 GMT' + 'Thu, 21 May 2020 20:22:40 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2312,21 +792,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '1ab9cd93-1632-4064-a14e-fc6ff1efa874', + '089cdd38-b530-4c04-b9af-065dd3122218', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2336,7 +814,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:23 GMT' + 'Thu, 21 May 2020 20:22:42 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2348,21 +826,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e87bce70-1756-45ed-bec2-c5a152270bc2', + 'aadc5266-1f5a-4cc8-8a35-468aef0d9b23', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2372,7 +848,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:25 GMT' + 'Thu, 21 May 2020 20:22:44 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2384,21 +860,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '95a5c13d-c551-43e3-bdce-f8edbee95dd9', + '87543eaf-675b-4f16-8fab-b4b61aac775c', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2408,7 +882,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:27 GMT' + 'Thu, 21 May 2020 20:22:46 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2420,21 +894,19 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'Pragma', 'no-cache', 'Content-Length', - '165', + '162', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '27562d57-a3a2-4c7d-a5a0-7eda9a543cc0', + '936b3391-57fe-4ef8-adba-5bd6fbbbc46f', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2444,13 +916,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:30 GMT' + 'Thu, 21 May 2020 20:22:49 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .get('/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1588816118,"scheduledPurgeDate":1596592118,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/55bd34a183824f8b87cff4b9fc9e0949","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"v-bpwvetALVzqslISsbBt1sGEDBxraePn2Jc2veVO35pqkeyeFpJoCaaRmsxa0bRmwTThYGFiAWR-a3mq6BsQPBr6BbnGAeXKygKN0XLikuc3glOH_Ssl9NJEfE5OV6D_VUS3EDaAA2hTAyaf_qX0U9r5Uy6QbxLbz8Nw9YcZ-X1wh4LnY0HFAxDzHvcsQOZHEDxTSZa5bO6ZKj9PTPacISUsO7c4S-V1_wkVRCkyQgNdcrFs1oKLZHn-l3j8Mt-sh74Ng5VF1Cw2QhSmfH8uIFSq01xHFenhGrr2RMgs0GvPiiOYhZwPRLP7H3RxUCpsLnsoePJqUyOMF7RHZcZVw","e":"AQAB"},"attributes":{"enabled":true,"created":1588816052,"updated":1588816052,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedkeys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590092548,"scheduledPurgeDate":1597868548,"key":{"kid":"https://keyvault_name.vault.azure.net/keys/challengeAuthKeyName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dc938c9ece7d4b2cb16b66a21d91b2a0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3WU7NBlPm9gOe4pRWhSSKE6LXD5zjWa6sJlnLfWyt6WOFuAPVL4aLKkIIeiw-Cdjtpv32C9mr8AMFxYg6Mz5homXKG3ycduM4pXUruYL2kmYWBs4eD7sYqMvFI9PfSv7Ri2sfjVyMFonATfyZWNu6oDBPVRalfzF_vk1xJ9UOCfc3jpUTdsMCG9oPQpb1t-3UzSu0i1AsnG_KGU_eCxyYM6DwqDDvcGW_-c3LzeFJ0eOFlHN-1tVfJnz1sttp-ncLXwiFG4ftuHzeIkLF6CQeMp7Y1LyWrAI921i9zvxO2DsRXU9DR_XuJJbcdmDk8xpofQrZ3U9VET0MZGbK0Jcxw","e":"AQAB"},"attributes":{"enabled":true,"created":1590092535,"updated":1590092535,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -2459,16 +931,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'a5eafdef-dacd-4d21-aeda-13e6ce8c6910', + '837e7495-858e-4c95-87ef-7c258dae5062', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2478,9 +948,9 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:32 GMT', + 'Thu, 21 May 2020 20:22:50 GMT', 'Content-Length', - '996' + '990' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) @@ -2493,16 +963,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'no-cache', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e9d72e8e-4cf8-487d-875e-d3fd5a36bcd4', + 'aeac9a3e-0c16-4311-8845-82e79f31ab90', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.158.245.220;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2512,5 +980,5 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 01:49:32 GMT' + 'Thu, 21 May 2020 20:22:50 GMT' ]); diff --git a/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..a12fe75fce01 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "f8851461ab81166d2e1f6f85858e5084"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..3eeef0fd6fe5 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "f5b183e4c5eb527fe9ff5200083b7fb2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-keys/rollup.base.config.js b/sdk/keyvault/keyvault-keys/rollup.base.config.js index 533b7290d915..6f0642fefde0 100644 --- a/sdk/keyvault/keyvault-keys/rollup.base.config.js +++ b/sdk/keyvault/keyvault-keys/rollup.base.config.js @@ -33,7 +33,7 @@ export function nodeConfig(test = false) { const externalNodeBuiltins = ["crypto", "fs", "os", "url", "assert"]; const additionalExternals = ["keytar"]; const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-keys/src/index.js", external: depNames.concat(externalNodeBuiltins, additionalExternals), output: { file: "dist/index.js", @@ -57,7 +57,7 @@ export function nodeConfig(test = false) { if (test) { // entry point is every test file - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. @@ -83,7 +83,7 @@ export function nodeConfig(test = false) { export function browserConfig(test = false) { const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-keys/src/index.js", output: { file: "dist-browser/azure-keyvault-keys.js", banner: banner, @@ -119,7 +119,7 @@ export function browserConfig(test = false) { }), cjs({ namedExports: { - assert: ["ok", "equal", "strictEqual"], + assert: ["ok", "equal", "strictEqual", "deepEqual"], "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] } }) @@ -128,7 +128,7 @@ export function browserConfig(test = false) { baseConfig.external = ["fs-extra", "path", "crypto", "constants"]; if (test) { - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. diff --git a/sdk/keyvault/keyvault-keys/samples/typescript/src/cryptography.ts b/sdk/keyvault/keyvault-keys/samples/typescript/src/cryptography.ts index 4f06af4268d0..c5b852f26702 100644 --- a/sdk/keyvault/keyvault-keys/samples/typescript/src/cryptography.ts +++ b/sdk/keyvault/keyvault-keys/samples/typescript/src/cryptography.ts @@ -27,7 +27,7 @@ export async function main(): Promise { const keyName = `key${uniqueString}`; // Connection to Azure Key Vault Cryptography functionality - let myWorkKey = await client.createKey(keyName, "RSA"); + const myWorkKey = await client.createKey(keyName, "RSA"); const cryptoClient = new CryptographyClient(myWorkKey.id!, credential); diff --git a/sdk/keyvault/keyvault-keys/src/core/challengeBasedAuthenticationPolicy.ts b/sdk/keyvault/keyvault-keys/src/core/challengeBasedAuthenticationPolicy.ts deleted file mode 100644 index 058cb1e7e0ff..000000000000 --- a/sdk/keyvault/keyvault-keys/src/core/challengeBasedAuthenticationPolicy.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -import { TokenCredential } from "@azure/core-http"; -import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http"; -import { Constants } from "@azure/core-http"; -import { HttpOperationResponse } from "@azure/core-http"; -import { HttpHeaders } from "@azure/core-http"; -import { WebResource } from "@azure/core-http"; -import { AccessTokenCache, ExpiringAccessTokenCache } from "@azure/core-http"; - -/** - * Representation of the Authentication Challenge - */ -export class AuthenticationChallenge { - constructor(public authorization: string, public scope: string) { - } - - /** - * Checks that this AuthenticationChallenge is equal to another one given. - * @param other The other AuthenticationChallenge - */ - public equalTo(other: AuthenticationChallenge | undefined) { - if (!other) { - return false; - } - return this.authorization === other.authorization && this.scope === other.scope; - } -} - -/** - * Helps keep a copy of any previous authentication challenges, - * so that we can compare on any further request. - */ -export class AuthenticationChallengeCache { - public challenge?: AuthenticationChallenge; - - public setCachedChallenge(challenge: AuthenticationChallenge) { - this.challenge = challenge; - } -} - -/** - * Creates a new ChallengeBasedAuthenticationPolicy factory. - * - * @param credential The TokenCredential implementation that can supply the challenge token. - */ -export function challengeBasedAuthenticationPolicy(credential: TokenCredential): RequestPolicyFactory { - const tokenCache: AccessTokenCache = new ExpiringAccessTokenCache(); - const challengeCache = new AuthenticationChallengeCache(); - return { - create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => { - return new ChallengeBasedAuthenticationPolicy(nextPolicy, options, credential, tokenCache, challengeCache); - } - }; -} - -/** - * - * Provides a RequestPolicy that can request a token from a TokenCredential - * implementation and then apply it to the Authorization header of a request - * as a Bearer token. - * - */ -export class ChallengeBasedAuthenticationPolicy extends BaseRequestPolicy { - - /** - * Creates a new ChallengeBasedAuthenticationPolicy object. - * - * @param nextPolicy The next RequestPolicy in the request pipeline. - * @param options Options for this RequestPolicy. - * @param credential The TokenCredential implementation that can supply the bearer token. - * @param tokenCache The cache for the most recent AccessToken returned by the TokenCredential. - */ - constructor( - nextPolicy: RequestPolicy, - options: RequestPolicyOptions, - private credential: TokenCredential, - private tokenCache: AccessTokenCache, - private challengeCache: AuthenticationChallengeCache - ) { - super(nextPolicy, options); - } - - private parseWWWAuthenticate(www_authenticate: string): { - authorization: string, - resource: string - } { - const returnValue = { - authorization: "", - resource: "" - }; - // Parses an authentication message like: - // ``` - // Bearer authorization="some_authorization", resource="https://some.url" - // ``` - let spaceSep = www_authenticate.split(" "); - - // Split the KV comma-separated list - for (const spaceItem of spaceSep) { - const commaSep = spaceItem.split(","); - for (const commaItem of commaSep) { - // Split the key/value pairs - const kv = commaItem.split("="); - const key = kv[0].trim(); - const removeQuotes = (x: string): string => x.trim().replace(/['"]+/g, ''); - if (key == "authorization" || key == "authorization_uri") { - returnValue.authorization = removeQuotes(kv[1]); - } else if (key == "resource" || key == "scope") { - returnValue.resource = removeQuotes(kv[1]); - } - } - } - return returnValue; - } - - /** - * Applies the Bearer token to the request through the Authorization header. - * @param webResource - */ - public async sendRequest( - webResource: WebResource - ): Promise { - if (!webResource.headers) webResource.headers = new HttpHeaders(); - - // Ensure that we're about to use a secure connection - if (!webResource.url.startsWith("https:")) { - throw new Error("The resource address for authorization must use the 'https' protocol."); - } - - const originalBody = webResource.body; - - if (this.challengeCache.challenge == undefined) { - // Use a blank to start the challenge - webResource.body = ""; - } else { - // or use the cached token if we have one - await this.authenticateRequest(webResource); - } - - const response = await this._nextPolicy.sendRequest(webResource); - - if (response.status == 401) { - webResource.body = originalBody; - - let www_authenticate = response.headers.get("WWW-Authenticate"); - - if (www_authenticate) { - // The challenge based authentication will contain both an authorization URI with a token, - // and the resource to which that token is valid against (also called the scope). - const { authorization, resource } = this.parseWWWAuthenticate(www_authenticate); - const challenge = new AuthenticationChallenge(authorization, resource + "/.default") - - if (!challenge.equalTo(this.challengeCache.challenge)) { - this.challengeCache.setCachedChallenge(challenge); - this.tokenCache.setCachedToken(undefined); - - await this.authenticateRequest(webResource); - return this._nextPolicy.sendRequest(webResource); - } - return response; - } - return response; - } else { - return response; - } - } - - private async authenticateRequest(webResource: WebResource): Promise { - let accessToken = this.tokenCache.getCachedToken(); - if (accessToken === undefined) { - accessToken = (await this.credential.getToken(this.challengeCache.challenge!.scope)) || undefined; - this.tokenCache.setCachedToken(accessToken); - } - - if (accessToken) { - webResource.headers.set( - Constants.HeaderConstants.AUTHORIZATION, - `Bearer ${accessToken.token}` - ); - } - } -} diff --git a/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts b/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts index 9e0bede19bf7..61e810efe613 100644 --- a/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts +++ b/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts @@ -26,7 +26,7 @@ import { logger } from "./log"; import { parseKeyvaultIdentifier } from "./core/utils"; import { SDK_VERSION } from "./core/utils/constants"; import { KeyVaultClient } from "./core/keyVaultClient"; -import { challengeBasedAuthenticationPolicy } from "./core/challengeBasedAuthenticationPolicy"; +import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src"; import { createHash as cryptoCreateHash, createVerify, publicEncrypt } from "crypto"; import * as constants from "constants"; diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 36c80f616fb5..97ac11ef42e1 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. /* eslint @typescript-eslint/member-ordering: 0 */ +/// import { PipelineOptions, @@ -38,7 +39,7 @@ import { } from "./core/models"; import { KeyVaultClient } from "./core/keyVaultClient"; import { SDK_VERSION } from "./core/utils/constants"; -import { challengeBasedAuthenticationPolicy } from "./core/challengeBasedAuthenticationPolicy"; +import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src"; import { DeleteKeyPoller } from "./lro/delete/poller"; import { RecoverDeletedKeyPoller } from "./lro/recover/poller"; @@ -1144,11 +1145,9 @@ export class KeyClient { keyType: keyBundle.key ? keyBundle.key.kty : undefined, properties: { id: keyBundle.key ? keyBundle.key.kid : undefined, - name: parsedId.name, expiresOn: attributes.expires, createdOn: attributes.created, updatedOn: attributes.updated, - vaultUrl: parsedId.vaultUrl, ...keyBundle, ...parsedId, ...attributes @@ -1188,7 +1187,6 @@ export class KeyClient { const abstractProperties: any = { id: keyItem.kid, - name: parsedId.name, deletedOn: (attributes as any).deletedDate, expiresOn: attributes.expires, createdOn: attributes.created, @@ -1233,7 +1231,6 @@ export class KeyClient { const resultObject: any = { createdOn: attributes.created, updatedOn: attributes.updated, - vaultUrl: parsedId.vaultUrl, ...keyItem, ...parsedId, ...keyItem.attributes diff --git a/sdk/keyvault/keyvault-keys/test/challengeBasedAuthenticationPolicy.test.ts b/sdk/keyvault/keyvault-keys/test/challengeBasedAuthenticationPolicy.test.ts deleted file mode 100644 index 1b677b8dd8a7..000000000000 --- a/sdk/keyvault/keyvault-keys/test/challengeBasedAuthenticationPolicy.test.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import * as assert from "assert"; -import { KeyClient } from "../src"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { - AuthenticationChallengeCache, - AuthenticationChallenge -} from "../src/core/challengeBasedAuthenticationPolicy"; - -// Following the philosophy of not testing the insides if we can test the outsides... -// I present you with this "Get Out of Jail Free" card (in reference to Monopoly). -// Once we move to a common folder, and after some refactoring, -// we will be able to unit test the insides in detail. - -describe("Challenge based authentication tests", () => { - const keyPrefix = `challengeAuth${env.KEY_NAME || "KeyName"}`; - let keySuffix: string; - let client: KeyClient; - let testClient: TestClient; - let recorder: Recorder; - let originalSetCachedChallenge: any; - - beforeEach(async function() { - const authentication = await authenticate(this); - keySuffix = authentication.keySuffix; - client = authentication.client; - testClient = authentication.testClient; - recorder = authentication.recorder; - - // Since the Challenge based authentication is protected from writing normally, - // and is involved in considerable core-http machinery, - // the easiest way to test it is to hack into the `AuthenticationChallengeCache` class. - // We will restore it on the `afterEach`. - originalSetCachedChallenge = AuthenticationChallengeCache.prototype.setCachedChallenge; - }); - - afterEach(async function() { - recorder.stop(); - - // Restoring `AuthenticationChallengeCache` back to normal. - AuthenticationChallengeCache.prototype.setCachedChallenge = originalSetCachedChallenge; - }); - - // The tests follow - - it("Once authenticated, new requests should not authenticate again", async function() { - // Our goal is to intercept how our pipelines are storing the challenge. - // The first network call should indeed set the challenge in memory. - // Subsequent network calls should not set new challenges. - - const challenges: AuthenticationChallenge[] = []; - - AuthenticationChallengeCache.prototype.setCachedChallenge = function( - challenge: AuthenticationChallenge - ): void { - challenges.push(challenge); - originalSetCachedChallenge.call(this, challenge); - }; - - // Now we run what would be a normal use of the client. - // Here we will create two keys, then flush them. - // testClient.flushKey deletes, then purges the keys. - const keyName = testClient.formatName(`${keyPrefix}-${this!.test!.title}-${keySuffix}`); - const keyNames = [`${keyName}-0`, `${keyName}-1`]; - for (const name of keyNames) { - await client.createKey(name, "RSA"); - } - for (const name of keyNames) { - await testClient.flushKey(name); - } - - // We should have recorded a total of ONE challenge. - // Failing to authenticate will make network requests throw. - assert.equal(challenges.length, 1); - }); -}); diff --git a/sdk/keyvault/keyvault-keys/test/internal/challengeBasedAuthenticationPolicy.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/challengeBasedAuthenticationPolicy.spec.ts new file mode 100644 index 000000000000..e08a92a5f214 --- /dev/null +++ b/sdk/keyvault/keyvault-keys/test/internal/challengeBasedAuthenticationPolicy.spec.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as assert from "assert"; +import { createSandbox } from "sinon"; +import { env, Recorder } from "@azure/test-utils-recorder"; + +import { + AuthenticationChallengeCache, + AuthenticationChallenge, + parseWWWAuthenticate +} from "../../../keyvault-common/src"; +import { KeyClient } from "../../src"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + +// Following the philosophy of not testing the insides if we can test the outsides... +// I present you with this "Get Out of Jail Free" card (in reference to Monopoly). +// Once we move to a common folder, and after some refactoring, +// we will be able to unit test the insides in detail. + +describe("Challenge based authentication tests", () => { + const keyPrefix = `challengeAuth${env.KEY_NAME || "KeyName"}`; + let keySuffix: string; + let client: KeyClient; + let testClient: TestClient; + let recorder: Recorder; + + beforeEach(async function() { + const authentication = await authenticate(this); + keySuffix = authentication.keySuffix; + client = authentication.client; + testClient = authentication.testClient; + recorder = authentication.recorder; + }); + + afterEach(async function() { + recorder.stop(); + }); + + // The tests follow + + it("Once authenticated, new requests should not authenticate again", async function() { + // Our goal is to intercept how our pipelines are storing the challenge. + // The first network call should indeed set the challenge in memory. + // Subsequent network calls should not set new challenges. + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + + // Now we run what would be a normal use of the client. + // Here we will create two keys, then flush them. + // testClient.flushKey deletes, then purges the keys. + const keyName = testClient.formatName(`${keyPrefix}-${this!.test!.title}-${keySuffix}`); + const keyNames = [`${keyName}-0`, `${keyName}-1`]; + for (const name of keyNames) { + await client.createKey(name, "RSA"); + } + for (const name of keyNames) { + await testClient.flushKey(name); + } + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + + // Note: Failing to authenticate will make network requests throw. + }); + + it("Authentication should work for parallel requests", async function() { + const keyName = testClient.formatName(`${keyPrefix}-${this!.test!.title}-${keySuffix}`); + const keyNames = [`${keyName}-0`, `${keyName}-1`]; + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + const spyEqualTo = sandbox.spy(AuthenticationChallenge.prototype, "equalTo"); + + const promises = keyNames.map((name) => { + const promise = client.createKey(name, "RSA"); + return { promise, name }; + }); + + for (const promise of promises) { + await promise.promise; + await testClient.flushKey(promise.name); + } + + // Even though we had parallel requests, only one authentication should have happened. + + // This is determined by the comparison between the cached challenge and the new receive challenge. + // So, AuthenticationChallenge's equalTo should have returned true at least once. + assert.ok(spyEqualTo.returned(true)); + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + }); + + describe("parseWWWAuthenticate tests", () => { + it("Should work for known shapes of the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", resource="https://some.url"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + resource: "https://some.url" + }); + + const wwwAuthenticate2 = `Bearer authorization="some_authorization", scope="https://some.url"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + authorization: "some_authorization", + scope: "https://some.url" + }); + }); + + it("Should skip unexpected properties on the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", a="a", b="b"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + a: "a", + b: "b" + }); + + const wwwAuthenticate2 = `scope="https://some.url", a="a", c="c"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + scope: "https://some.url", + a: "a", + c: "c" + }); + }); + }); +}); diff --git a/sdk/keyvault/keyvault-keys/test/userAgent.test.ts b/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts similarity index 71% rename from sdk/keyvault/keyvault-keys/test/userAgent.test.ts rename to sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts index 17a3d4201934..6e5a998e6fc8 100644 --- a/sdk/keyvault/keyvault-keys/test/userAgent.test.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts @@ -2,9 +2,9 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { version } from "../package.json"; -import { SDK_VERSION } from "../src/core/utils/constants"; -import { packageVersion } from "../src/core/keyVaultClientContext"; +import { version } from "../../package.json"; +import { SDK_VERSION } from "../../src/core/utils/constants"; +import { packageVersion } from "../../src/core/keyVaultClientContext"; describe("Keys client's user agent", () => { // The tests follow diff --git a/sdk/keyvault/keyvault-keys/test/CRUD.test.ts b/sdk/keyvault/keyvault-keys/test/public/CRUD.spec.ts similarity index 98% rename from sdk/keyvault/keyvault-keys/test/CRUD.test.ts rename to sdk/keyvault/keyvault-keys/test/public/CRUD.spec.ts index a7fb4a6b2151..7afcc983bbc9 100644 --- a/sdk/keyvault/keyvault-keys/test/CRUD.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/CRUD.spec.ts @@ -2,14 +2,15 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient, CreateEcKeyOptions, UpdateKeyPropertiesOptions, GetKeyOptions } from "../src"; import { RestError } from "@azure/core-http"; -import { testPollerProperties } from "./utils/recorderUtils"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { AbortController } from "@azure/abort-controller"; -import { assertThrowsAbortError } from "./utils/utils.common"; +import { env, Recorder } from "@azure/test-utils-recorder"; + +import { KeyClient, CreateEcKeyOptions, UpdateKeyPropertiesOptions, GetKeyOptions } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Keys client - create, read, update and delete operations", () => { const keyPrefix = `recover${env.KEY_NAME || "KeyName"}`; diff --git a/sdk/keyvault/keyvault-keys/test/crypto.test.ts b/sdk/keyvault/keyvault-keys/test/public/crypto.spec.ts similarity index 92% rename from sdk/keyvault/keyvault-keys/test/crypto.test.ts rename to sdk/keyvault/keyvault-keys/test/public/crypto.spec.ts index 0cfa45ff642a..2a4d223d9bc6 100644 --- a/sdk/keyvault/keyvault-keys/test/crypto.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/crypto.spec.ts @@ -4,15 +4,16 @@ import * as assert from "assert"; import { createHash, publicEncrypt } from "crypto"; import * as constants from "constants"; -import { ClientSecretCredential } from "@azure/identity"; -import { CryptographyClient, KeyVaultKey, KeyClient } from "../src"; -import { convertJWKtoPEM } from "../src/cryptographyClient"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { stringToUint8Array, uint8ArrayToString } from "./utils/crypto"; import { isRecordMode, Recorder } from "@azure/test-utils-recorder"; +import { ClientSecretCredential } from "@azure/identity"; import { isNode } from "@azure/core-http"; +import { CryptographyClient, KeyVaultKey, KeyClient } from "../../src"; +import { convertJWKtoPEM } from "../../src/cryptographyClient"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; +import { stringToUint8Array, uint8ArrayToString } from "../utils/crypto"; + describe("CryptographyClient (all decrypts happen remotely)", () => { let client: KeyClient; let testClient: TestClient; @@ -85,7 +86,7 @@ describe("CryptographyClient (all decrypts happen remotely)", () => { } // Local encryption is only supported in NodeJS. - it("sign and verify with RS256", async function() { + it("sign and verify with RS256", async function(): Promise { recorder.skip("browser", "Local encryption is only supported in NodeJS"); if (!isNode) { // recorder.skip is not meant for TEST_MODE=live diff --git a/sdk/keyvault/keyvault-keys/test/import.test.ts b/sdk/keyvault/keyvault-keys/test/public/import.spec.ts similarity index 96% rename from sdk/keyvault/keyvault-keys/test/import.test.ts rename to sdk/keyvault/keyvault-keys/test/public/import.spec.ts index f6628fc0c545..86d0b00369a0 100644 --- a/sdk/keyvault/keyvault-keys/test/import.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/import.spec.ts @@ -2,12 +2,13 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient, JsonWebKey } from "../src"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { isNode } from "@azure/core-http"; +import { KeyClient, JsonWebKey } from "../../src"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + describe("Keys client - import keys", () => { const prefix = `merge${env.CERTIFICATE_NAME || "KeyName"}`; let suffix: string; diff --git a/sdk/keyvault/keyvault-keys/test/list.test.ts b/sdk/keyvault/keyvault-keys/test/public/list.spec.ts similarity index 96% rename from sdk/keyvault/keyvault-keys/test/list.test.ts rename to sdk/keyvault/keyvault-keys/test/public/list.spec.ts index 9acea8675df7..79ace4aaa2af 100644 --- a/sdk/keyvault/keyvault-keys/test/list.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/list.spec.ts @@ -2,12 +2,13 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder, isRecordMode } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { KeyClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Keys client - list keys in various ways", () => { const keyPrefix = `recover${env.KEY_NAME || "KeyName"}`; @@ -33,7 +34,7 @@ describe("Keys client - list keys in various ways", () => { // Use this while recording to make sure the target keyvault is clean. // The next tests will produce a more consistent output. // This test is only useful while developing locally. - it("can purge all keys", async function() { + it("can purge all keys", async function(): Promise { // WARNING: When TEST_MODE equals "record", all of the keys in the indicated KEYVAULT_NAME will be deleted as part of this test. if (!isRecordMode()) { return this.skip(); diff --git a/sdk/keyvault/keyvault-keys/test/lro.delete.test.ts b/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts similarity index 92% rename from sdk/keyvault/keyvault-keys/test/lro.delete.test.ts rename to sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts index 707abff6621f..a278f6ed02da 100644 --- a/sdk/keyvault/keyvault-keys/test/lro.delete.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient, DeletedKey } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; +import { KeyClient, DeletedKey } from "../../src"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + describe("Keys client - Long Running Operations - delete", () => { const keyPrefix = `recover${env.CERTIFICATE_NAME || "KeyName"}`; let keySuffix: string; diff --git a/sdk/keyvault/keyvault-keys/test/lro.recoverDelete.test.ts b/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts similarity index 92% rename from sdk/keyvault/keyvault-keys/test/lro.recoverDelete.test.ts rename to sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts index b85420148f0d..0b73af9c279b 100644 --- a/sdk/keyvault/keyvault-keys/test/lro.recoverDelete.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient, DeletedKey } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { KeyClient, DeletedKey } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Keys client - Long Running Operations - recoverDelete", () => { const keyPrefix = `recover${env.CERTIFICATE_NAME || "KeyName"}`; diff --git a/sdk/keyvault/keyvault-keys/test/recoverBackupRestore.test.ts b/sdk/keyvault/keyvault-keys/test/public/recoverBackupRestore.spec.ts similarity index 95% rename from sdk/keyvault/keyvault-keys/test/recoverBackupRestore.test.ts rename to sdk/keyvault/keyvault-keys/test/public/recoverBackupRestore.spec.ts index 8f3526b2abbf..e84b06477db7 100644 --- a/sdk/keyvault/keyvault-keys/test/recoverBackupRestore.test.ts +++ b/sdk/keyvault/keyvault-keys/test/public/recoverBackupRestore.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { KeyClient } from "../src"; import { isNode } from "@azure/core-http"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder, delay, isRecordMode, isPlaybackMode } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { KeyClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Keys client - restore keys and recover backups", () => { const keyPrefix = `recover${env.KEY_NAME || "KeyName"}`; diff --git a/sdk/keyvault/keyvault-keys/tests.yml b/sdk/keyvault/keyvault-keys/tests.yml index 8a0429b92025..28bd746f03a9 100644 --- a/sdk/keyvault/keyvault-keys/tests.yml +++ b/sdk/keyvault/keyvault-keys/tests.yml @@ -1,19 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/keyvault-keys" - ResourceServiceDirectory: keyvault - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/keyvault-keys" + ResourceServiceDirectory: keyvault + TestMinMax: true + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/keyvault/keyvault-keys/tsconfig.json b/sdk/keyvault/keyvault-keys/tsconfig.json index 9a0426a5d935..7a5252578c4f 100644 --- a/sdk/keyvault/keyvault-keys/tsconfig.json +++ b/sdk/keyvault/keyvault-keys/tsconfig.json @@ -1,27 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./types", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true, + "outDir": "./dist-esm", + "lib": ["dom"], "resolveJsonModule": true }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/**/*.ts"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "exclude": ["node_modules", "../keyvault-common/node_modules", "./samples/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../keyvault-common/**/*.ts"] } diff --git a/sdk/keyvault/keyvault-keys/tsconfig.samples.json b/sdk/keyvault/keyvault-keys/tsconfig.samples.json index 846639b2d955..a0b15abb027d 100644 --- a/sdk/keyvault/keyvault-keys/tsconfig.samples.json +++ b/sdk/keyvault/keyvault-keys/tsconfig.samples.json @@ -19,6 +19,5 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "include": ["./samples/**/*.ts"] } diff --git a/sdk/keyvault/keyvault-secrets/.eslintrc.json b/sdk/keyvault/keyvault-secrets/.eslintrc.json index f733ef036321..4f409a486c3f 100644 --- a/sdk/keyvault/keyvault-secrets/.eslintrc.json +++ b/sdk/keyvault/keyvault-secrets/.eslintrc.json @@ -4,6 +4,8 @@ "ignorePatterns": ["src/core"], "rules": { "@typescript-eslint/no-this-alias": "off", - "no-invalid-this": "off" + "no-invalid-this": "off", + "@azure/azure-sdk/ts-package-json-module": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "warn" } } diff --git a/sdk/keyvault/keyvault-secrets/.prettierignore b/sdk/keyvault/keyvault-secrets/.prettierignore index d53119f04d7f..656f37824af2 100644 --- a/sdk/keyvault/keyvault-secrets/.prettierignore +++ b/sdk/keyvault/keyvault-secrets/.prettierignore @@ -1 +1,2 @@ -src/core \ No newline at end of file +/src/core/* +!/src/core/challengeBasedAuthenticationPolicy.ts \ No newline at end of file diff --git a/sdk/keyvault/keyvault-secrets/CHANGELOG.md b/sdk/keyvault/keyvault-secrets/CHANGELOG.md index 292d9574be92..5a1cfabdfa8e 100644 --- a/sdk/keyvault/keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/keyvault-secrets/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.1.0-preview.2 (Unreleased) - Fixed [bug 8378](https://github.com/Azure/azure-sdk-for-js/issues/8378), which caused the challenge based authentication to re-authenticate on every new request. +- Fixed [bug 9005](https://github.com/Azure/azure-sdk-for-js/issues/9005), which caused parallel requests to throw if one of them needed to authenticate. ## 4.0.3 (2020-05-13) @@ -71,4 +72,4 @@ ## 4.0.0-preview.1 (2019-06-28) For release notes and more information please visit -https://aka.ms/azure-sdk-preview1-js +https://aka.ms/azsdk/releases/july2019preview diff --git a/sdk/keyvault/keyvault-secrets/api-extractor.json b/sdk/keyvault/keyvault-secrets/api-extractor.json index 16b707a5f8be..34f251274b38 100644 --- a/sdk/keyvault/keyvault-secrets/api-extractor.json +++ b/sdk/keyvault/keyvault-secrets/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "types/src/index.d.ts", + "mainEntryPointFilePath": "types/keyvault-secrets/src/index.d.ts", "docModel": { "enabled": false }, diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index 7f51e371af21..131b077da480 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "main": "./dist/index.js", - "module": "dist-esm/src/index.js", + "module": "dist-esm/keyvault-secrets/src/index.js", "types": "./types/keyvault-secrets.d.ts", "engine": { "node": ">=8.0.0" @@ -29,9 +29,11 @@ "node": ">=8.0.0" }, "files": [ - "types/keyvault-secrets.d.ts", + "types/", "dist/", - "dist-esm/src", + "dist-browser/", + "dist-esm/keyvault-secrets/src", + "dist-esm/keyvault-common/src", "README.md", "LICENSE" ], @@ -50,13 +52,13 @@ "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-esm dist-test types *.tgz *.log dist-browser statistics.html coverage && rimraf src/**/*.js && rimraf test/**/*.js", "execute:js-samples": "node ../../../common/scripts/run-samples.js samples/javascript/", - "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", + "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/keyvault-secrets/samples/typescript/src/", "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.test.js", - "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/**/*.spec.js", + "integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/**/*.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o keyvault-secrets-lintReport.html", @@ -93,7 +95,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -103,18 +105,19 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/fs-extra": "^8.0.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@types/query-string": "6.2.0", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -140,16 +143,17 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "query-string": "^5.0.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "source-map-support": "^0.5.9", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "uglify-js": "^3.4.9", "url": "^0.11.0" } diff --git a/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json new file mode 100644 index 000000000000..a32974af37c4 --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.json @@ -0,0 +1,753 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ecd35001-4b66-4dc3-8d4c-518f52959672", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "PUT", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "", + "status": 401, + "response": "{\"error\":{\"code\":\"Unauthorized\",\"message\":\"Request is missing a Bearer or PoP token.\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "87", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:57 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "401", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2c30b2a7-5fcb-40d4-8b2d-5637b20ee198", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10620.9 - WUS2 ProdSlices", + "x-ms-request-id": "902cc4a1-0632-4c89-bcd0-231ad4357200" + } + }, + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1315", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - NCUS ProdSlices", + "x-ms-request-id": "711264a4-89a7-44ce-a6fe-f9da2def0001" + } + }, + { + "method": "PUT", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"value\":\"value\",\"attributes\":{}}", + "status": 200, + "response": "{\"value\":\"value\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/1c59307e98e24ab5b28e0dd7279e7b14\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "328", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "cd4af778-eae9-4562-ab4f-66a275dbd6d5", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "PUT", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": "{\"value\":\"value\",\"attributes\":{}}", + "status": 200, + "response": "{\"value\":\"value\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/650ce2afdb3042e68fd1908db4d4a373\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "328", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bd4fea9f-338f-4072-ae98-9f3e945471d3", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590496198,\"scheduledPurgeDate\":1598272198,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/1c59307e98e24ab5b28e0dd7279e7b14\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "529", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1fdebc75-9b7b-462a-a6c0-000be7b1a30d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "eb2e1a42-fd30-4fa8-ac1e-738c6c12f492", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:29:58 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1242342d-7dd7-40aa-a8e3-c43ebe89c352", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:00 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5df6d08e-e663-4572-9a3d-5a97df6aca6d", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:02 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "5ad141ff-0006-4045-956c-e5ed5bca9a48", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:05 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "d430b4e8-3ed1-4951-951a-218f42f7a6a0", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:07 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a8896f6a-a790-4b0e-bf38-dce6d8a1b2dc", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:09 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "011e3dad-7318-4084-9fcc-4a4f188f41ce", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:11 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "34da7cd2-7a0c-4bc5-b6db-e25909684a47", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0\",\"deletedDate\":1590496198,\"scheduledPurgeDate\":1598272198,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/1c59307e98e24ab5b28e0dd7279e7b14\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "529", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2a9cc6c3-edc2-4f5a-a098-68627db440db", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Tue, 26 May 2020 12:30:12 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3d5edf00-e3b0-4e3f-9981-93c481055f34", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590496213,\"scheduledPurgeDate\":1598272213,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/650ce2afdb3042e68fd1908db4d4a373\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "529", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:13 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1f43257a-5fee-42f6-ab66-c22d2ee98ee8", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:13 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "665da971-a19d-44c5-8d9e-ba1191a1b988", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:13 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f8a4ee61-ba85-46bd-a65f-a9821d02f873", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:16 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "dc4f511a-af3d-4f79-a49b-8f15db05de77", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:18 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "a9606cda-1732-4e94-9f30-9d59b4140650", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:19 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "47a25d08-57db-4f7e-9ba5-11767f944cc6", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:21 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "be8d2d08-5ac1-4c37-80d2-b899e81329a1", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:23 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "06a14cc7-6c8f-4cc9-8f78-0015efac6efd", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 404, + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\"}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "160", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:26 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "404", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6e1f6883-a025-49f4-a1f9-9f7c0bec1a1c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "GET", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 200, + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1\",\"deletedDate\":1590496213,\"scheduledPurgeDate\":1598272213,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/650ce2afdb3042e68fd1908db4d4a373\",\"attributes\":{\"enabled\":true,\"created\":1590496198,\"updated\":1590496198,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "responseHeaders": { + "cache-control": "no-cache", + "content-length": "529", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 12:30:28 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "200", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "475ba25b-4c0a-4ec3-92b0-03453a71603c", + "x-powered-by": "ASP.NET" + } + }, + { + "method": "DELETE", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1", + "query": { + "api-version": "7.1-preview" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "cache-control": "no-cache", + "date": "Tue, 26 May 2020 12:30:28 GMT", + "expires": "-1", + "pragma": "no-cache", + "status": "204", + "strict-transport-security": "max-age=31536000;includeSubDomains", + "x-aspnet-version": "4.0.30319", + "x-content-type-options": "nosniff", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", + "x-ms-keyvault-region": "westus", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b5e34d0f-9c38-483f-8451-4ab71f68ee7d", + "x-powered-by": "ASP.NET" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "b1adc637e2b3e8b3aa63675c7d365f82" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json index 429194f28b90..043d23c81ce7 100644 --- a/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json +++ b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, @@ -13,19 +13,18 @@ "cache-control": "no-cache", "content-length": "87", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:26 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "401", "strict-transport-security": "max-age=31536000;includeSubDomains", "www-authenticate": "Bearer authorization=\"https://login.windows.net/azure_tenant_id\", resource=\"https://vault.azure.net\"", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "bddad6a7-1903-4043-bcef-98cc9f846081", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1e5675b8-d7f0-4392-9673-6959fe0052a3", "x-powered-by": "ASP.NET" } }, @@ -40,608 +39,344 @@ "cache-control": "no-cache, no-store", "content-length": "1315", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:26 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10519.7 - EUS ProdSlices", - "x-ms-request-id": "b9f1b6c2-3ace-4d8d-8c4d-e6f237f82800" + "x-ms-ests-server": "2.1.10571.11 - SCUS ProdSlices", + "x-ms-request-id": "0c4a8219-ee86-4507-9f4c-8d691b31ff00" } }, { "method": "PUT", - "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, - "requestBody": "{\"value\":\"RSA\",\"attributes\":{}}", + "requestBody": "{\"value\":\"value\",\"attributes\":{}}", "status": 200, - "response": "{\"value\":\"RSA\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/2333dd55b8e84bdfaf37c92603380072\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"value\":\"value\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/314c10355b23455fb4e51d1d1532f851\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "337", + "content-length": "339", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:27 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "463704de-895a-4994-a0e2-ddeb5d2141f1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "f9e997da-3f3f-4d7b-bf2d-08e8a295c7c5", "x-powered-by": "ASP.NET" } }, { "method": "PUT", - "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, - "requestBody": "{\"value\":\"RSA\",\"attributes\":{}}", + "requestBody": "{\"value\":\"value\",\"attributes\":{}}", "status": 200, - "response": "{\"value\":\"RSA\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/93077a71018a4018bac1717608f89d67\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"value\":\"value\",\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/27a27edd4ce848c0828b5f0bb2078a00\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", - "content-length": "337", + "content-length": "339", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:27 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "40068fad-e30c-4cd4-a2ea-d9c5c27329af", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "463dee0b-e1ee-4665-aa9a-62431f584761", "x-powered-by": "ASP.NET" } }, { "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\",\"deletedDate\":1588817307,\"scheduledPurgeDate\":1596593307,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/2333dd55b8e84bdfaf37c92603380072\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590496167,\"scheduledPurgeDate\":1598272167,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/314c10355b23455fb4e51d1d1532f851\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "551", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:27 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c0113791-462e-4800-9db6-159575c0fa99", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e387553c-4ce4-4275-988a-bf3d9895b6e7", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:27 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c08d806c-3e5c-40bc-8a34-a5c682d08986", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "57c5768c-19e7-4cea-8f16-73020656963a", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:27 GMT", + "date": "Tue, 26 May 2020 12:29:26 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "89608b86-ac54-4789-ae7f-eb2dfdcbdc96", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "6e44ad8b-c140-4bf4-9d36-b05a1c650aa9", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:29 GMT", + "date": "Tue, 26 May 2020 12:29:28 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "29e6b94d-50a5-41ec-9f74-edcbf8a8713e", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b0b0481d-1e3b-4148-b170-ddd4b326a86a", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:31 GMT", + "date": "Tue, 26 May 2020 12:29:30 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7f2b4b5b-8f78-4925-b04f-5001f01dd8d6", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "1950ce68-75e7-40b0-b937-515e359807ea", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:33 GMT", + "date": "Tue, 26 May 2020 12:29:33 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "b64af1a3-dc5b-4066-a166-a9041e946d84", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e7884982-5e96-40cf-9666-a2a147796762", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:35 GMT", + "date": "Tue, 26 May 2020 12:29:35 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d1e15f87-a5ad-426b-866d-e5edd4bb0548", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "659a7f90-7e82-4f6c-9ebc-27d1136bab2d", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:37 GMT", + "date": "Tue, 26 May 2020 12:29:36 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "7cd6f819-b5bb-410c-a8d7-9f3a61c8d271", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "ccb7a173-518a-4731-b806-0ed5b46f534c", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:39 GMT", + "date": "Tue, 26 May 2020 12:29:39 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8bd8e59b-dcc9-4860-ac8c-9bd656fe5c5d", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "023409ca-2ab3-49b8-9213-edaadb62beb9", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:41 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "df3efdea-ae2d-40ba-bc1b-d6637aef942b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:43 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f26fa175-6d9e-404e-8caa-5dff95dbbc91", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:46 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "377f2d28-79d1-4ea2-bbc5-e8dfdf7f00c8", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:48 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "809bfc08-1c3a-403f-88fa-764ca47eb5c8", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:50 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0e15e2df-1708-48ba-9d00-2d13132c363b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:52 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "3941c205-a140-4cdf-b9ed-f9bd3c51ef83", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:54 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "8cb7fb0a-8925-4b51-bf14-39c36aa0b0d6", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:56 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0bcfb8e6-f229-4c68-b8d0-e33b3267b9c7", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:08:58 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "671db4d0-ff0e-4ff8-9cb3-c9269796287e", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0\",\"deletedDate\":1588817307,\"scheduledPurgeDate\":1596593307,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/2333dd55b8e84bdfaf37c92603380072\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0\",\"deletedDate\":1590496167,\"scheduledPurgeDate\":1598272167,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/314c10355b23455fb4e51d1d1532f851\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "551", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:00 GMT", + "date": "Tue, 26 May 2020 12:29:41 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "31d9d98c-93af-4e3e-bd70-4c875b3c2ddb", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "b586a05d-42aa-4059-a262-9422c26942ab", "x-powered-by": "ASP.NET" } }, { "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0", "query": { "api-version": "7.1-preview" }, @@ -650,556 +385,320 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Thu, 07 May 2020 02:09:00 GMT", + "date": "Tue, 26 May 2020 12:29:41 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e834eda6-12c7-464e-ad70-968603e202ff", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e3a75149-aebb-4faa-aa64-fbf77db198a5", "x-powered-by": "ASP.NET" } }, { "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\",\"deletedDate\":1588817341,\"scheduledPurgeDate\":1596593341,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/93077a71018a4018bac1717608f89d67\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590496181,\"scheduledPurgeDate\":1598272181,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/27a27edd4ce848c0828b5f0bb2078a00\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "551", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:00 GMT", + "date": "Tue, 26 May 2020 12:29:41 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "e38e4243-6fb3-4abf-a71c-c9d2ad923c98", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:00 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a2cac0b2-baa0-4cd6-a88f-0a5fbd61549a", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:00 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f0a9f9b5-f08c-4fed-86b7-2a8e2392d325", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:02 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d5d2ad97-bacb-4fa7-9d94-25975e930a8f", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:04 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "740a1df3-e2d1-4447-ae3f-627f16939a0b", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:06 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "80145d29-73f8-46fd-8c9c-936943965cc0", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:08 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "72e4064f-f6a3-44e3-a092-0db01f1fc8b4", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:10 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", - "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "f5c41e6f-c740-4f3a-8e79-0e377695a375", - "x-powered-by": "ASP.NET" - } - }, - { - "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", - "query": { - "api-version": "7.1-preview" - }, - "requestBody": null, - "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", - "responseHeaders": { - "cache-control": "no-cache", - "content-length": "171", - "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:13 GMT", - "expires": "-1", - "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", - "status": "404", - "strict-transport-security": "max-age=31536000;includeSubDomains", - "x-aspnet-version": "4.0.30319", - "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "10f5c17d-6e3c-424f-b66e-70fc268f32e6", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3c5923cb-defb-4bee-ba18-06298a357c84", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:15 GMT", + "date": "Tue, 26 May 2020 12:29:41 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5df3f0a3-2849-4a3a-9ded-b7fa9bf04a6a", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "e875c5e7-c0cc-4e9c-ad5c-1d0f079f65a9", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:17 GMT", + "date": "Tue, 26 May 2020 12:29:41 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "bf535e61-6a24-4683-805a-0cca49dd4c40", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "bedb3eae-4f60-4a2c-b927-18daf8580c0f", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:20 GMT", + "date": "Tue, 26 May 2020 12:29:43 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "d6eb7498-2152-4803-81ca-895eb2aae8bb", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "24f14550-bdc6-465f-9bc3-28e3485ac75f", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:22 GMT", + "date": "Tue, 26 May 2020 12:29:45 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "a5136f2c-c142-4f30-bf6b-d55f139fbf87", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "777519de-4771-42d3-80cd-fd89badb8828", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:24 GMT", + "date": "Tue, 26 May 2020 12:29:48 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5cbca44e-03b6-4b8d-ba41-a323320b7478", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "c62efbfb-cf54-467d-960c-8881371be403", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:26 GMT", + "date": "Tue, 26 May 2020 12:29:50 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "5ee878b5-6484-43ca-81fe-b0a6ea539cab", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "fe278669-f288-4d07-90b1-b451632c097d", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:28 GMT", + "date": "Tue, 26 May 2020 12:29:51 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "0a397235-66f7-4518-9178-aa5bc310eec1", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "31bacdc6-aa81-43a2-b9b5-015da7eb7c49", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:30 GMT", + "date": "Tue, 26 May 2020 12:29:53 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "73499cf6-85e3-4da0-9085-2a32a4e71380", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "3e1c2649-1784-4580-b195-4769c47adb4d", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 404, - "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\"}}", + "response": "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\"}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "171", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:32 GMT", + "date": "Tue, 26 May 2020 12:29:55 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "404", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "c68e007e-d189-4ef8-846a-a64e57e84a1f", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "912458be-e9db-4116-b277-5c430d1cbc66", "x-powered-by": "ASP.NET" } }, { "method": "GET", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, "requestBody": null, "status": 200, - "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1\",\"deletedDate\":1588817341,\"scheduledPurgeDate\":1596593341,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/93077a71018a4018bac1717608f89d67\",\"attributes\":{\"enabled\":true,\"created\":1588817307,\"updated\":1588817307,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", + "response": "{\"recoveryId\":\"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1\",\"deletedDate\":1590496181,\"scheduledPurgeDate\":1598272181,\"id\":\"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/27a27edd4ce848c0828b5f0bb2078a00\",\"attributes\":{\"enabled\":true,\"created\":1590496166,\"updated\":1590496166,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "responseHeaders": { "cache-control": "no-cache", "content-length": "551", "content-type": "application/json; charset=utf-8", - "date": "Thu, 07 May 2020 02:09:34 GMT", + "date": "Tue, 26 May 2020 12:29:57 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "200", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "6a6037d9-0b21-4ef1-9b90-740c83c17ab7", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "2598b584-5700-4a68-826b-8f2bf523109a", "x-powered-by": "ASP.NET" } }, { "method": "DELETE", - "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1", + "url": "https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1", "query": { "api-version": "7.1-preview" }, @@ -1208,18 +707,17 @@ "response": "", "responseHeaders": { "cache-control": "no-cache", - "date": "Thu, 07 May 2020 02:09:34 GMT", + "date": "Tue, 26 May 2020 12:29:57 GMT", "expires": "-1", "pragma": "no-cache", - "server": "Microsoft-IIS/10.0", "status": "204", "strict-transport-security": "max-age=31536000;includeSubDomains", "x-aspnet-version": "4.0.30319", "x-content-type-options": "nosniff", - "x-ms-keyvault-network-info": "addr=52.250.6.243;act_addr_fam=InterNetwork;", + "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus", - "x-ms-keyvault-service-version": "1.1.0.898", - "x-ms-request-id": "dc30997a-c110-405f-9ae6-e2c50e4da62e", + "x-ms-keyvault-service-version": "1.1.5.0", + "x-ms-request-id": "53f9f21a-6f49-4c5e-964a-ae833eff79fe", "x-powered-by": "ASP.NET" } } @@ -1228,5 +726,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "fe07c8c906236fc015ffca14d4bb17e4" + "hash": "9703a6385f4987f56456b00043db7828" } \ No newline at end of file diff --git a/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..429827f44190 --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "88fb0559dde3dfd891fac1831ca5b2a8" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json new file mode 100644 index 000000000000..1e3b39f32421 --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/browsers/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.json @@ -0,0 +1,8 @@ +{ + "recordings": [], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "64c1ada2ea9c5d88c806f41185122471" +} \ No newline at end of file diff --git a/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js new file mode 100644 index 000000000000..aae55dc9ce9f --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_authentication_should_work_for_parallel_requests.js @@ -0,0 +1,985 @@ +let nock = require('nock'); + +module.exports.hash = "06f62d6a92535f08ab56c2a2e10c4a1a"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .put('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'd582458f-94f8-4a91-b9f1-2c1a07777d3d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:40 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .put('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '87', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'WWW-Authenticate', + 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '5af4df79-bc47-4e21-b244-1f1c67471474', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:39 GMT' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '711264a4-89a7-44ce-a6fe-f9dad3d90001', + 'x-ms-ests-server', + '2.1.10571.11 - NCUS ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=AlXQwA4czgdLqf3LZVMh1OU_aSJHAQAAAAACX9YOAAAA; expires=Thu, 25-Jun-2020 12:26:41 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 12:26:40 GMT', + 'Content-Length', + '1315' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fvault.azure.net%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '61fcff32-5ca3-4bc2-8888-d47bb7b8f600', + 'x-ms-ests-server', + '2.1.10571.11 - SCUS ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=AiKn59l7TcxDqiApvPZXzes_aSJHAQAAAAACX9YOAAAA; expires=Thu, 25-Jun-2020 12:26:41 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT', + 'Content-Length', + '1315' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .put('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1', {"value":"value","attributes":{}}) + .query(true) + .reply(200, {"value":"value","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/69b8e39c84f243d7aa75f25eeb0b516d","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '817b5375-8922-45a0-acf3-6c6f3b36c347', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT', + 'Content-Length', + '328' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .put('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0', {"value":"value","attributes":{}}) + .query(true) + .reply(200, {"value":"value","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/a2b957106fbc4ee98c5d8012fd474772","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '817e0ec0-9e9b-4823-b281-4256b38fe52d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT', + 'Content-Length', + '328' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590496001,"scheduledPurgeDate":1598272001,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/a2b957106fbc4ee98c5d8012fd474772","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6c971ee9-3809-4307-abce-0a112148f2ee', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT', + 'Content-Length', + '529' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '3c58cd10-372f-4044-824e-0b62703b3625', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '7d459e79-ff00-41e5-9267-aaa56dff4ce3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:41 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '2c6926a8-32b8-4d77-a2b8-41d75934dc86', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:43 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a3b7bc5b-871d-47e8-9bf8-d9771aabc932', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:45 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '189dd9ff-86ac-41c9-a703-a5b0077e774c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:47 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a7435945-9c55-4e87-a07e-5122b73983af', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:49 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ba38fadb-afd2-4161-b518-5825523241a4', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:50 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '1ed9107f-17b9-465d-aebb-21a405abf329', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:53 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0","deletedDate":1590496001,"scheduledPurgeDate":1598272001,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0/a2b957106fbc4ee98c5d8012fd474772","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'f38fd289-01ee-4e42-a9ad-cca71f5453c8', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:56 GMT', + 'Content-Length', + '529' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--0') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'c978928f-69c5-4b70-832c-577ac15ede2d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:55 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590496016,"scheduledPurgeDate":1598272016,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/69b8e39c84f243d7aa75f25eeb0b516d","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '17bef1ee-bb5a-4d1c-88b8-3cd1cf89f22d', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:56 GMT', + 'Content-Length', + '529' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'abb28082-620a-4817-8f3d-800d836c3269', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:55 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'bb5416ef-c0e1-4595-8434-07729e90064b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:56 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '40160fbc-6dea-41b8-b42d-b87edfa29f2b', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:57 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '303d26bd-d29d-423c-bbc6-9ec88763237e', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:26:59 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'ef9adc37-b979-4c20-aff2-1624681d9488', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:02 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '40ca7aac-2ad3-401e-ad43-081b6e00a261', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:03 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'e9fdce4d-c7ec-4ee3-b841-9c0f9de19d22', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:05 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'b9f02912-dd9c-46f6-b638-8b99979fb914', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:08 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1"}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Length', + '160', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '0179099e-78eb-48b6-8a4f-eb116fe2d8d3', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:09 GMT' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .get('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1","deletedDate":1590496016,"scheduledPurgeDate":1598272016,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1/69b8e39c84f243d7aa75f25eeb0b516d","attributes":{"enabled":true,"created":1590496001,"updated":1590496001,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + '6d1bdbd7-bd7e-45b2-be0b-bbb2560e78ec', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:11 GMT', + 'Content-Length', + '529' +]); + +nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) + .delete('/deletedsecrets/challengeAuthSecretName-Authenticationshouldworkforparallelrequests--1') + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'x-ms-keyvault-region', + 'westus', + 'x-ms-request-id', + 'a47d83e2-6d44-4017-8367-a7a4c3cb333c', + 'x-ms-keyvault-service-version', + '1.1.5.0', + 'x-ms-keyvault-network-info', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', + 'X-AspNet-Version', + '4.0.30319', + 'X-Powered-By', + 'ASP.NET', + 'Strict-Transport-Security', + 'max-age=31536000;includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 12:27:12 GMT' +]); diff --git a/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js index 57de0c192b67..fd4ad990c795 100644 --- a/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js +++ b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests/recording_once_authenticated_new_requests_should_not_authenticate_again.js @@ -1,11 +1,11 @@ let nock = require('nock'); -module.exports.hash = "77bcd123e90247cf60ae7e90edd45238"; +module.exports.hash = "73e834376bee4d652998a7a58eed9c0c"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing a Bearer or PoP token."}}, [ 'Cache-Control', @@ -18,18 +18,16 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'WWW-Authenticate', 'Bearer authorization="https://login.windows.net/azure_tenant_id", resource="https://vault.azure.net"', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '6d3b9b61-fb11-4f43-85df-3351ce492154', + '07a42d0b-2499-4a42-bfe1-c45735238a09', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -39,7 +37,7 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:40 GMT' + 'Tue, 26 May 2020 12:26:04 GMT' ]); nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -58,27 +56,27 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '1ddc5c18-9802-4005-a85e-0e84a1412700', + 'e777593c-381f-4261-acfe-10a9ec02ff00', 'x-ms-ests-server', - '2.1.10519.7 - EUS ProdSlices', + '2.1.10571.11 - NCUS ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Av7GqLarAUVJsUxDpe6N7Us_aSJHAQAAAPVjRdYOAAAA; expires=Sat, 06-Jun-2020 02:05:41 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AvyLi_kxbJFNt4tT9PrFhPY_aSJHAQAAANsBX9YOAAAA; expires=Thu, 25-Jun-2020 12:26:04 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 07 May 2020 02:05:40 GMT', + 'Tue, 26 May 2020 12:26:04 GMT', 'Content-Length', '1315' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0', {"value":"RSA","attributes":{}}) + .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0', {"value":"value","attributes":{}}) .query(true) - .reply(200, {"value":"RSA","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/043c846bc299488298981eee61ba91d7","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"value":"value","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/aa2e816a1940457cb947b7bd06872319","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -87,16 +85,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '7927f956-c1cf-42f5-ad4a-4821b5fd2fe5', + '98dcbe7a-611a-43b0-b0ea-5e01a437f6de', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -106,15 +102,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:41 GMT', + 'Tue, 26 May 2020 12:26:04 GMT', 'Content-Length', - '336' + '339' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1', {"value":"RSA","attributes":{}}) + .put('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1', {"value":"value","attributes":{}}) .query(true) - .reply(200, {"value":"RSA","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/4a0aec940d57411ab7b035cb4a8b9a7d","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"value":"value","id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dafcc4ba21da439093d5b77607bc4bf3","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -123,16 +119,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '9876353f-0137-4f6c-9ddf-ff15217bc06c', + '0bf7340d-d0a9-40db-86bb-8b880e6a29e1', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -142,15 +136,15 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:41 GMT', + 'Tue, 26 May 2020 12:26:04 GMT', 'Content-Length', - '336' + '339' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .delete('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0","deletedDate":1588817141,"scheduledPurgeDate":1596593141,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/043c846bc299488298981eee61ba91d7","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590495965,"scheduledPurgeDate":1598271965,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/aa2e816a1940457cb947b7bd06872319","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -159,16 +153,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '47f86253-162f-4015-a3db-98f12e85343c', + '0dd1ca27-66bf-4041-a4f7-77f74116d131', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -178,35 +170,33 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:41 GMT', + 'Tue, 26 May 2020 12:26:04 GMT', 'Content-Length', - '549' + '551' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '3aed9aca-0e89-4738-8157-7bc8b2e30dce', + 'cf6f3f60-0c85-4f2c-a8e5-1202f003a9d4', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -216,33 +206,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:41 GMT' + 'Tue, 26 May 2020 12:26:04 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '77f745aa-3924-48cd-9c74-32b4712bb5c4', + '0406d7d9-6049-471c-aabe-28ffd431ddbe', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -252,33 +240,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:41 GMT' + 'Tue, 26 May 2020 12:26:04 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'f1bccab4-48b9-4709-b673-837b1e1d642e', + '7f216b77-7f86-4018-900c-7961548f30af', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -288,33 +274,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:43 GMT' + 'Tue, 26 May 2020 12:26:06 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'a119c11b-dc3f-47a4-86c2-39bd9363f225', + 'a5c5157f-a5f7-4a69-969e-2f661c73c313', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -324,33 +308,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:45 GMT' + 'Tue, 26 May 2020 12:26:08 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '50659353-be34-4683-9e8b-347d037ae80c', + 'b4ea97f0-26a5-4748-96b3-92fb70f01ca1', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -360,33 +342,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:47 GMT' + 'Tue, 26 May 2020 12:26:10 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '96c038b7-7684-4ace-8ea9-877b9b2cfde8', + '074ff200-67e6-46b3-b2c2-de338d6e78bc', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -396,33 +376,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:49 GMT' + 'Tue, 26 May 2020 12:26:12 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b34078c0-6380-4c16-910a-65d0228049c4', + 'a0810091-3346-4323-8249-065bd5c4800d', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -432,33 +410,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:51 GMT' + 'Tue, 26 May 2020 12:26:14 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '928e9fe3-93d0-46f4-b78d-fa9686f29ff5', + '7c234c8f-2b2c-41b2-ad75-6603a9260782', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -468,33 +444,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:53 GMT' + 'Tue, 26 May 2020 12:26:16 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '63d99a1e-900f-42a0-8fd1-0f9cd5a7821a', + '72ffd839-d269-4328-9ba9-94ba0ae5f676', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -504,33 +478,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:56 GMT' + 'Tue, 26 May 2020 12:26:18 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'cbabfc0a-a01b-4f0f-be51-9d1003d356c2', + 'adb77d26-be1a-47fe-9f7b-f1ab6e37a219', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -540,769 +512,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:05:58 GMT' + 'Tue, 26 May 2020 12:26:21 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ca65e5aa-0123-4f00-9907-8cdf0afe12a4', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:00 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '4b56f491-ec43-488d-a8b9-f8646f295944', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:02 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '3294e55f-2da1-4d49-9caf-b39357bfe397', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:04 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ed909bb8-8fc7-410f-b279-2a26c80f4530', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:06 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '6fdd5d2f-3bf8-4528-8ea7-1449a4bafe74', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:08 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ffa2a1cb-d911-4d37-9897-ad10c4b7737c', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:10 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'c2e00fff-8bc6-4d6b-902c-d7eeba50a66d', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:12 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '68c2633c-2abc-4143-83f5-a602b3f42b2d', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:14 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '3ac0056e-45a4-4bb8-bdd4-d3a20e3cb449', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:16 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'fe34f860-b195-48cb-8f20-55e62f70ad58', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:18 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '2d089d71-3ca0-479d-83b5-d6aa57a71ce3', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:20 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'f4ba75fa-2c56-420b-b848-f1741d4fb7cf', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:22 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '07ecb699-5f9d-4f17-9ee7-e7885abee5d8', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:23 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'e3577f4e-9b1c-44cd-9909-2f998436ee9d', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:25 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '462bd62e-bd3f-4143-94c4-84b42251de9f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:27 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'd95f42de-3c86-4767-84f9-9c70cdda92be', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:30 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '778a45a7-911a-494c-90d6-64d2655f90e2', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:32 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '6176087c-417a-44de-a96a-51f7ccb5492f', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:34 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'f215a346-cae5-41ad-8b75-ce705f11fffe', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:36 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '9a82585f-83d4-47ea-b2db-fbbeb26b4b0e', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:38 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '69c38503-b7a5-446b-b259-0e22920ad5f9', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:40 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') - .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0","deletedDate":1588817141,"scheduledPurgeDate":1596593141,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0/043c846bc299488298981eee61ba91d7","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0","deletedDate":1590495965,"scheduledPurgeDate":1598271965,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0/aa2e816a1940457cb947b7bd06872319","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -1311,16 +527,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '1ab6b305-390d-496d-8153-709935b8c479', + '04bd2d12-cee9-4163-913f-0073d6a7cbc7', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1330,13 +544,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:42 GMT', + 'Tue, 26 May 2020 12:26:23 GMT', 'Content-Length', - '549' + '551' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-0') + .delete('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--0') .query(true) .reply(204, "", [ 'Cache-Control', @@ -1345,232 +559,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'no-cache', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'f96472db-7367-40f8-9865-69dac79c50a1', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:42 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1","deletedDate":1588817203,"scheduledPurgeDate":1596593203,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/4a0aec940d57411ab7b035cb4a8b9a7d","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'ba7f4c1b-9f77-44a2-9bf8-cc23050d982e', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:42 GMT', - 'Content-Length', - '549' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'dbabacfa-bac9-42d9-b73c-d56a410cf944', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:43 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '18478a3f-9afe-4142-b524-b46bd6169bc6', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:43 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '1117025c-ae37-4951-b35f-b2aca62bbebc', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:45 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - 'a25234b0-1591-4328-b8d9-d4a002df39f5', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:47 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'f5875453-90d1-42b2-b352-6520941c85e1', + '043a231a-1258-4b52-9f34-a39f733edba4', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1580,33 +576,29 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:49 GMT' + 'Tue, 26 May 2020 12:26:23 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .delete('/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590495983,"scheduledPurgeDate":1598271983,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dafcc4ba21da439093d5b77607bc4bf3","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '170', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'c23b6be6-34f8-4a9e-828a-bae784bc3092', + '31bb62b2-98a5-4961-b772-f67b05a1e25a', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1616,69 +608,33 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:51 GMT' -]); - -nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') - .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', + 'Tue, 26 May 2020 12:26:23 GMT', 'Content-Length', - '170', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-keyvault-region', - 'westus', - 'x-ms-request-id', - '83f7bea5-f32a-4004-8440-48830f51f613', - 'x-ms-keyvault-service-version', - '1.1.0.898', - 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'Strict-Transport-Security', - 'max-age=31536000;includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 07 May 2020 02:06:53 GMT' + '551' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b6c7e489-9191-4444-8edc-8ef9ac5da3db', + 'edcefcff-abc9-4f3e-af2b-4e27b948ce14', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1688,33 +644,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:55 GMT' + 'Tue, 26 May 2020 12:26:23 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '6a026313-fdb2-48fa-aa96-2076283716f3', + 'f4018b62-d067-499e-80db-4ab887de0bd0', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1724,33 +678,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:57 GMT' + 'Tue, 26 May 2020 12:26:23 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '2b241ec5-ac43-447b-8be1-1812ad0f4b16', + '5a419132-cf4e-41fc-9de8-f23664010ad2', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1760,33 +712,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:06:59 GMT' + 'Tue, 26 May 2020 12:26:25 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '2de22e0d-3cc7-4125-ae61-c628ed1200a3', + '2b95d136-5d4a-4b68-b596-1f02683d32cf', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1796,33 +746,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:02 GMT' + 'Tue, 26 May 2020 12:26:27 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '7349fc1b-33d7-4b0d-ad6e-2c72f185663b', + '3b41e9ee-9132-4cfa-b4c5-6410ee3731b4', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1832,33 +780,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:04 GMT' + 'Tue, 26 May 2020 12:26:29 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'b4e170d9-edbe-459e-9d1a-eacaa55b6120', + '995f4a54-c056-4f17-b541-f379a440dabb', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1868,33 +814,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:06 GMT' + 'Tue, 26 May 2020 12:26:31 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '87c79f14-65fe-47a8-8c42-56567eb5a6e8', + '5612f59d-f88d-42e3-b604-bb39cdfaa533', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1904,33 +848,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:08 GMT' + 'Tue, 26 May 2020 12:26:34 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '8a5738ab-c5b0-4e9c-ad06-4934962b8ed2', + '7f4283df-8264-47d2-b90b-42317388882e', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1940,33 +882,31 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:10 GMT' + 'Tue, 26 May 2020 12:26:36 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1"}}, [ + .reply(404, {"error":{"code":"SecretNotFound","message":"Deleted Secret not found: challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1"}}, [ 'Cache-Control', 'no-cache', 'Pragma', 'no-cache', 'Content-Length', - '170', + '171', 'Content-Type', 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'e151fb6e-23ac-4e10-adfc-d24615dfd34d', + 'a92263a4-6942-4255-a202-475ad2565edd', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -1976,13 +916,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:12 GMT' + 'Tue, 26 May 2020 12:26:37 GMT' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .get('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) - .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1","deletedDate":1588817203,"scheduledPurgeDate":1596593203,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1/4a0aec940d57411ab7b035cb4a8b9a7d","attributes":{"enabled":true,"created":1588817141,"updated":1588817141,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ + .reply(200, {"recoveryId":"https://keyvault_name.vault.azure.net/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1","deletedDate":1590495983,"scheduledPurgeDate":1598271983,"id":"https://keyvault_name.vault.azure.net/secrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1/dafcc4ba21da439093d5b77607bc4bf3","attributes":{"enabled":true,"created":1590495964,"updated":1590495964,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}, [ 'Cache-Control', 'no-cache', 'Pragma', @@ -1991,16 +931,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'application/json; charset=utf-8', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - 'd048c2a3-974d-4475-9ac8-de43b61b579a', + 'a9270c48-9d5b-4349-b891-04e64089d81b', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2010,13 +948,13 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:14 GMT', + 'Tue, 26 May 2020 12:26:39 GMT', 'Content-Length', - '549' + '551' ]); nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) - .delete('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain-1') + .delete('/deletedsecrets/challengeAuthSecretName-Onceauthenticatednewrequestsshouldnotauthenticateagain--1') .query(true) .reply(204, "", [ 'Cache-Control', @@ -2025,16 +963,14 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'no-cache', 'Expires', '-1', - 'Server', - 'Microsoft-IIS/10.0', 'x-ms-keyvault-region', 'westus', 'x-ms-request-id', - '7910b63e-9156-41b9-9048-002d543bcfb4', + '3379697a-b35b-4a01-ba06-d3114add40f9', 'x-ms-keyvault-service-version', - '1.1.0.898', + '1.1.5.0', 'x-ms-keyvault-network-info', - 'addr=52.250.6.243;act_addr_fam=InterNetwork;', + 'conn_type=Ipv4;addr=52.183.18.165;act_addr_fam=InterNetwork;', 'X-AspNet-Version', '4.0.30319', 'X-Powered-By', @@ -2044,5 +980,5 @@ nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'Date', - 'Thu, 07 May 2020 02:07:14 GMT' + 'Tue, 26 May 2020 12:26:39 GMT' ]); diff --git a/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..7040692b68be --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_skip_unexpected_properties_on_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "a4e6782787203da965d3cea21b9b1225"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js new file mode 100644 index 000000000000..86dc6025739d --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/recordings/node/challenge_based_authentication_tests_parsewwwauthenticate_tests/recording_should_work_for_known_shapes_of_the_wwwauthenticate_header.js @@ -0,0 +1,5 @@ +let nock = require('nock'); + +module.exports.hash = "fe38d4229e9f2d028f6211678c3b4865"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/keyvault/keyvault-secrets/rollup.base.config.js b/sdk/keyvault/keyvault-secrets/rollup.base.config.js index e2bbf34e01a5..b9aafc627dd1 100644 --- a/sdk/keyvault/keyvault-secrets/rollup.base.config.js +++ b/sdk/keyvault/keyvault-secrets/rollup.base.config.js @@ -33,7 +33,7 @@ export function nodeConfig(test = false) { const externalNodeBuiltins = ["crypto", "fs", "os", "url", "assert"]; const additionalExternals = ["keytar"]; const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-secrets/src/index.js", external: depNames.concat(externalNodeBuiltins, additionalExternals), output: { file: "dist/index.js", @@ -57,7 +57,7 @@ export function nodeConfig(test = false) { if (test) { // entry point is every test file - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. @@ -83,7 +83,7 @@ export function nodeConfig(test = false) { export function browserConfig(test = false) { const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/keyvault-secrets/src/index.js", output: { file: "dist-browser/azure-keyvault-secrets.js", banner: banner, @@ -119,7 +119,7 @@ export function browserConfig(test = false) { }), cjs({ namedExports: { - assert: ["ok", "equal", "strictEqual"], + assert: ["ok", "equal", "strictEqual", "deepEqual"], "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] } }) @@ -127,7 +127,7 @@ export function browserConfig(test = false) { }; if (test) { - baseConfig.input = ["dist-esm/test/*.test.js"]; + baseConfig.input = ["dist-esm/**/*.spec.js"]; baseConfig.plugins.unshift( multiEntry({ exports: false }), json() // This allows us to import/require the package.json file, to get the version and test it against the user agent. diff --git a/sdk/keyvault/keyvault-secrets/src/core/challengeBasedAuthenticationPolicy.ts b/sdk/keyvault/keyvault-secrets/src/core/challengeBasedAuthenticationPolicy.ts deleted file mode 100644 index 058cb1e7e0ff..000000000000 --- a/sdk/keyvault/keyvault-secrets/src/core/challengeBasedAuthenticationPolicy.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -import { TokenCredential } from "@azure/core-http"; -import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http"; -import { Constants } from "@azure/core-http"; -import { HttpOperationResponse } from "@azure/core-http"; -import { HttpHeaders } from "@azure/core-http"; -import { WebResource } from "@azure/core-http"; -import { AccessTokenCache, ExpiringAccessTokenCache } from "@azure/core-http"; - -/** - * Representation of the Authentication Challenge - */ -export class AuthenticationChallenge { - constructor(public authorization: string, public scope: string) { - } - - /** - * Checks that this AuthenticationChallenge is equal to another one given. - * @param other The other AuthenticationChallenge - */ - public equalTo(other: AuthenticationChallenge | undefined) { - if (!other) { - return false; - } - return this.authorization === other.authorization && this.scope === other.scope; - } -} - -/** - * Helps keep a copy of any previous authentication challenges, - * so that we can compare on any further request. - */ -export class AuthenticationChallengeCache { - public challenge?: AuthenticationChallenge; - - public setCachedChallenge(challenge: AuthenticationChallenge) { - this.challenge = challenge; - } -} - -/** - * Creates a new ChallengeBasedAuthenticationPolicy factory. - * - * @param credential The TokenCredential implementation that can supply the challenge token. - */ -export function challengeBasedAuthenticationPolicy(credential: TokenCredential): RequestPolicyFactory { - const tokenCache: AccessTokenCache = new ExpiringAccessTokenCache(); - const challengeCache = new AuthenticationChallengeCache(); - return { - create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => { - return new ChallengeBasedAuthenticationPolicy(nextPolicy, options, credential, tokenCache, challengeCache); - } - }; -} - -/** - * - * Provides a RequestPolicy that can request a token from a TokenCredential - * implementation and then apply it to the Authorization header of a request - * as a Bearer token. - * - */ -export class ChallengeBasedAuthenticationPolicy extends BaseRequestPolicy { - - /** - * Creates a new ChallengeBasedAuthenticationPolicy object. - * - * @param nextPolicy The next RequestPolicy in the request pipeline. - * @param options Options for this RequestPolicy. - * @param credential The TokenCredential implementation that can supply the bearer token. - * @param tokenCache The cache for the most recent AccessToken returned by the TokenCredential. - */ - constructor( - nextPolicy: RequestPolicy, - options: RequestPolicyOptions, - private credential: TokenCredential, - private tokenCache: AccessTokenCache, - private challengeCache: AuthenticationChallengeCache - ) { - super(nextPolicy, options); - } - - private parseWWWAuthenticate(www_authenticate: string): { - authorization: string, - resource: string - } { - const returnValue = { - authorization: "", - resource: "" - }; - // Parses an authentication message like: - // ``` - // Bearer authorization="some_authorization", resource="https://some.url" - // ``` - let spaceSep = www_authenticate.split(" "); - - // Split the KV comma-separated list - for (const spaceItem of spaceSep) { - const commaSep = spaceItem.split(","); - for (const commaItem of commaSep) { - // Split the key/value pairs - const kv = commaItem.split("="); - const key = kv[0].trim(); - const removeQuotes = (x: string): string => x.trim().replace(/['"]+/g, ''); - if (key == "authorization" || key == "authorization_uri") { - returnValue.authorization = removeQuotes(kv[1]); - } else if (key == "resource" || key == "scope") { - returnValue.resource = removeQuotes(kv[1]); - } - } - } - return returnValue; - } - - /** - * Applies the Bearer token to the request through the Authorization header. - * @param webResource - */ - public async sendRequest( - webResource: WebResource - ): Promise { - if (!webResource.headers) webResource.headers = new HttpHeaders(); - - // Ensure that we're about to use a secure connection - if (!webResource.url.startsWith("https:")) { - throw new Error("The resource address for authorization must use the 'https' protocol."); - } - - const originalBody = webResource.body; - - if (this.challengeCache.challenge == undefined) { - // Use a blank to start the challenge - webResource.body = ""; - } else { - // or use the cached token if we have one - await this.authenticateRequest(webResource); - } - - const response = await this._nextPolicy.sendRequest(webResource); - - if (response.status == 401) { - webResource.body = originalBody; - - let www_authenticate = response.headers.get("WWW-Authenticate"); - - if (www_authenticate) { - // The challenge based authentication will contain both an authorization URI with a token, - // and the resource to which that token is valid against (also called the scope). - const { authorization, resource } = this.parseWWWAuthenticate(www_authenticate); - const challenge = new AuthenticationChallenge(authorization, resource + "/.default") - - if (!challenge.equalTo(this.challengeCache.challenge)) { - this.challengeCache.setCachedChallenge(challenge); - this.tokenCache.setCachedToken(undefined); - - await this.authenticateRequest(webResource); - return this._nextPolicy.sendRequest(webResource); - } - return response; - } - return response; - } else { - return response; - } - } - - private async authenticateRequest(webResource: WebResource): Promise { - let accessToken = this.tokenCache.getCachedToken(); - if (accessToken === undefined) { - accessToken = (await this.credential.getToken(this.challengeCache.challenge!.scope)) || undefined; - this.tokenCache.setCachedToken(accessToken); - } - - if (accessToken) { - webResource.headers.set( - Constants.HeaderConstants.AUTHORIZATION, - `Bearer ${accessToken.token}` - ); - } - } -} diff --git a/sdk/keyvault/keyvault-secrets/src/index.ts b/sdk/keyvault/keyvault-secrets/src/index.ts index e95fd6deb226..915452b7659f 100644 --- a/sdk/keyvault/keyvault-secrets/src/index.ts +++ b/sdk/keyvault/keyvault-secrets/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. /* eslint @typescript-eslint/member-ordering: 0 */ +/// import { TokenCredential, @@ -34,7 +35,7 @@ import { } from "./core/models"; import { KeyVaultClient } from "./core/keyVaultClient"; import { SDK_VERSION } from "./core/utils/constants"; -import { challengeBasedAuthenticationPolicy } from "./core/challengeBasedAuthenticationPolicy"; +import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src"; import { DeleteSecretPoller } from "./lro/delete/poller"; import { RecoverDeletedSecretPoller } from "./lro/recover/poller"; @@ -954,7 +955,6 @@ export class SecretClient { value: secretBundle.value, name: parsedId.name, properties: { - vaultUrl: parsedId.vaultUrl, expiresOn: (attributes as any).expires, createdOn: (attributes as any).created, updatedOn: (attributes as any).updated, diff --git a/sdk/keyvault/keyvault-secrets/test/challengeBasedAuthenticationPolicy.test.ts b/sdk/keyvault/keyvault-secrets/test/challengeBasedAuthenticationPolicy.test.ts deleted file mode 100644 index 4886107a5816..000000000000 --- a/sdk/keyvault/keyvault-secrets/test/challengeBasedAuthenticationPolicy.test.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import * as assert from "assert"; -import { SecretClient } from "../src"; -import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { - AuthenticationChallengeCache, - AuthenticationChallenge -} from "../src/core/challengeBasedAuthenticationPolicy"; - -// Following the philosophy of not testing the insides if we can test the outsides... -// I present you with this "Get Out of Jail Free" card (in reference to Monopoly). -// Once we move to a common folder, and after some refactoring, -// we will be able to unit test the insides in detail. - -describe("Challenge based authentication tests", () => { - const secretPrefix = `challengeAuth${env.KEY_NAME || "SecretName"}`; - let secretSuffix: string; - let client: SecretClient; - let testClient: TestClient; - let recorder: Recorder; - let originalSetCachedChallenge: any; - - beforeEach(async function() { - const authentication = await authenticate(this); - secretSuffix = authentication.secretSuffix; - client = authentication.client; - testClient = authentication.testClient; - recorder = authentication.recorder; - - // Since the Challenge based authentication is protected from writing normally, - // and is involved in considerable core-http machinery, - // the easiest way to test it is to hack into the `AuthenticationChallengeCache` class. - // We will restore it on the `afterEach`. - originalSetCachedChallenge = AuthenticationChallengeCache.prototype.setCachedChallenge; - }); - - afterEach(async function() { - recorder.stop(); - - // Restoring `AuthenticationChallengeCache` back to normal. - AuthenticationChallengeCache.prototype.setCachedChallenge = originalSetCachedChallenge; - }); - - // The tests follow - - it("Once authenticated, new requests should not authenticate again", async function() { - // Our goal is to intercept how our pipelines are storing the challenge. - // The first network call should indeed set the challenge in memory. - // Subsequent network calls should not set new challenges. - - const challenges: AuthenticationChallenge[] = []; - - AuthenticationChallengeCache.prototype.setCachedChallenge = function( - challenge: AuthenticationChallenge - ): void { - challenges.push(challenge); - originalSetCachedChallenge.call(this, challenge); - }; - - // Now we run what would be a normal use of the client. - // Here we will create two secrets, then flush them. - // testClient.flushSecret deletes, then purges the secrets. - const secretName = testClient.formatName( - `${secretPrefix}-${this!.test!.title}-${secretSuffix}` - ); - const secretNames = [`${secretName}0`, `${secretName}1`]; - for (const name of secretNames) { - await client.setSecret(name, "RSA"); - } - for (const name of secretNames) { - await testClient.flushSecret(name); - } - - // We should have recorded a total of ONE challenge. - // Failing to authenticate will make network requests throw. - assert.equal(challenges.length, 1); - }); -}); diff --git a/sdk/keyvault/keyvault-secrets/test/internal/challengeBasedAuthenticationPolicy.spec.ts b/sdk/keyvault/keyvault-secrets/test/internal/challengeBasedAuthenticationPolicy.spec.ts new file mode 100644 index 000000000000..af362a4f19fb --- /dev/null +++ b/sdk/keyvault/keyvault-secrets/test/internal/challengeBasedAuthenticationPolicy.spec.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as assert from "assert"; +import { env, Recorder } from "@azure/test-utils-recorder"; +import { createSandbox } from "sinon"; + +import { + AuthenticationChallengeCache, + AuthenticationChallenge, + parseWWWAuthenticate +} from "../../../keyvault-common/src"; +import { SecretClient } from "../../src"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + +// Following the philosophy of not testing the insides if we can test the outsides... +// I present you with this "Get Out of Jail Free" card (in reference to Monopoly). +// Once we move to a common folder, and after some refactoring, +// we will be able to unit test the insides in detail. + +describe("Challenge based authentication tests", () => { + const secretPrefix = `challengeAuth${env.KEY_NAME || "SecretName"}`; + let secretSuffix: string; + let client: SecretClient; + let testClient: TestClient; + let recorder: Recorder; + + beforeEach(async function() { + const authentication = await authenticate(this); + secretSuffix = authentication.secretSuffix; + client = authentication.client; + testClient = authentication.testClient; + recorder = authentication.recorder; + }); + + afterEach(async function() { + recorder.stop(); + }); + + // The tests follow + + it("Once authenticated, new requests should not authenticate again", async function() { + // Our goal is to intercept how our pipelines are storing the challenge. + // The first network call should indeed set the challenge in memory. + // Subsequent network calls should not set new challenges. + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + + // Now we run what would be a normal use of the client. + // Here we will create two secrets, then flush them. + // testClient.flushSecret deletes, then purges the secrets. + const secretName = testClient.formatName( + `${secretPrefix}-${this!.test!.title}-${secretSuffix}` + ); + const secretNames = [`${secretName}-0`, `${secretName}-1`]; + for (const name of secretNames) { + await client.setSecret(name, "value"); + } + for (const name of secretNames) { + await testClient.flushSecret(name); + } + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + + // Note: Failing to authenticate will make network requests throw. + }); + + it("Authentication should work for parallel requests", async function() { + const secretName = testClient.formatName( + `${secretPrefix}-${this!.test!.title}-${secretSuffix}` + ); + const secretNames = [`${secretName}-0`, `${secretName}-1`]; + + const sandbox = createSandbox(); + const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge"); + const spyEqualTo = sandbox.spy(AuthenticationChallenge.prototype, "equalTo"); + + const promises = secretNames.map((name) => { + const promise = client.setSecret(name, "value"); + return { promise, name }; + }); + + for (const promise of promises) { + await promise.promise; + await testClient.flushSecret(promise.name); + } + + // Even though we had parallel requests, only one authentication should have happened. + + // This is determined by the comparison between the cached challenge and the new receive challenge. + // So, AuthenticationChallenge's equalTo should have returned true at least once. + assert.ok(spyEqualTo.returned(true)); + + // The challenge should have been written to the cache exactly ONCE. + assert.equal(spy.getCalls().length, 1); + + // Back to normal. + sandbox.restore(); + }); + + describe("parseWWWAuthenticate tests", () => { + it("Should work for known shapes of the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", resource="https://some.url"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + resource: "https://some.url" + }); + + const wwwAuthenticate2 = `Bearer authorization="some_authorization", scope="https://some.url"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + authorization: "some_authorization", + scope: "https://some.url" + }); + }); + + it("Should skip unexpected properties on the WWW-Authenticate header", () => { + const wwwAuthenticate1 = `Bearer authorization="some_authorization", a="a", b="b"`; + const parsed1 = parseWWWAuthenticate(wwwAuthenticate1); + assert.deepEqual(parsed1, { + authorization: "some_authorization", + a: "a", + b: "b" + }); + + const wwwAuthenticate2 = `scope="https://some.url", a="a", c="c"`; + const parsed2 = parseWWWAuthenticate(wwwAuthenticate2); + assert.deepEqual(parsed2, { + scope: "https://some.url", + a: "a", + c: "c" + }); + }); + }); +}); diff --git a/sdk/keyvault/keyvault-secrets/test/userAgent.test.ts b/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts similarity index 71% rename from sdk/keyvault/keyvault-secrets/test/userAgent.test.ts rename to sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts index 80eb627c1e0c..a4455589c5b6 100644 --- a/sdk/keyvault/keyvault-secrets/test/userAgent.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts @@ -2,9 +2,9 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { version } from "../package.json"; -import { SDK_VERSION } from "../src/core/utils/constants"; -import { packageVersion } from "../src/core/keyVaultClientContext"; +import { version } from "../../package.json"; +import { SDK_VERSION } from "../../src/core/utils/constants"; +import { packageVersion } from "../../src/core/keyVaultClientContext"; describe("Secrets client's user agent", () => { // The tests follow diff --git a/sdk/keyvault/keyvault-secrets/test/CRUD.test.ts b/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts similarity index 97% rename from sdk/keyvault/keyvault-secrets/test/CRUD.test.ts rename to sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts index 595dff12eff6..ec127fa594f3 100644 --- a/sdk/keyvault/keyvault-secrets/test/CRUD.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { SecretClient } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { AbortController } from "@azure/abort-controller"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { SecretClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Secret client - create, read, update and delete operations", () => { const secretValue = "SECRET_VALUE"; diff --git a/sdk/keyvault/keyvault-secrets/test/list.test.ts b/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts similarity index 96% rename from sdk/keyvault/keyvault-secrets/test/list.test.ts rename to sdk/keyvault/keyvault-secrets/test/public/list.spec.ts index a188a07a9d66..11ed3f520333 100644 --- a/sdk/keyvault/keyvault-secrets/test/list.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts @@ -3,12 +3,14 @@ import * as assert from "assert"; import chai from "chai"; -import { SecretClient } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder, isRecordMode } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { SecretClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; + const { expect } = chai; describe("Secret client - list secrets in various ways", () => { @@ -36,7 +38,7 @@ describe("Secret client - list secrets in various ways", () => { // Use this while recording to make sure the target keyvault is clean. // The next tests will produce a more consistent output. // This test is only useful while developing locally. - it("can purge all secrets", async function() { + it("can purge all secrets", async function(): Promise { // WARNING: When TEST_MODE equals "record", all of the secrets in the indicated KEYVAULT_NAME will be deleted as part of this test. if (!isRecordMode()) { return this.skip(); diff --git a/sdk/keyvault/keyvault-secrets/test/lro.delete.test.ts b/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts similarity index 92% rename from sdk/keyvault/keyvault-secrets/test/lro.delete.test.ts rename to sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts index a641ee067ce9..339f14fe59ba 100644 --- a/sdk/keyvault/keyvault-secrets/test/lro.delete.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { SecretClient, DeletedSecret } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { SecretClient, DeletedSecret } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Secrets client - Long Running Operations - delete", () => { const secretPrefix = `recover${env.CERTIFICATE_NAME || "SecretName"}`; diff --git a/sdk/keyvault/keyvault-secrets/test/lro.recover.test.ts b/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts similarity index 93% rename from sdk/keyvault/keyvault-secrets/test/lro.recover.test.ts rename to sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts index b6554394032f..c67c299ac2c7 100644 --- a/sdk/keyvault/keyvault-secrets/test/lro.recover.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { SecretClient, SecretProperties } from "../src"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, Recorder } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; import { PollerStoppedError } from "@azure/core-lro"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { SecretClient, SecretProperties } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Secrets client - Long Running Operations - recoverDelete", () => { const secretPrefix = `recover${env.CERTIFICATE_NAME || "SecretName"}`; diff --git a/sdk/keyvault/keyvault-secrets/test/recoverBackupRestore.test.ts b/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts similarity index 95% rename from sdk/keyvault/keyvault-secrets/test/recoverBackupRestore.test.ts rename to sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts index 0dbe35ed7709..fa9d14678df3 100644 --- a/sdk/keyvault/keyvault-secrets/test/recoverBackupRestore.test.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts @@ -2,13 +2,14 @@ // Licensed under the MIT license. import * as assert from "assert"; -import { SecretClient } from "../src"; import { isNode } from "@azure/core-http"; -import { testPollerProperties } from "./utils/recorderUtils"; import { env, isPlaybackMode, Recorder, delay, isRecordMode } from "@azure/test-utils-recorder"; -import { authenticate } from "./utils/testAuthentication"; -import TestClient from "./utils/testClient"; -import { assertThrowsAbortError } from "./utils/utils.common"; + +import { SecretClient } from "../../src"; +import { assertThrowsAbortError } from "../utils/utils.common"; +import { testPollerProperties } from "../utils/recorderUtils"; +import { authenticate } from "../utils/testAuthentication"; +import TestClient from "../utils/testClient"; describe("Secret client - restore secrets and recover backups", () => { const secretPrefix = `CRUD${env.SECRET_NAME || "SecretName"}`; diff --git a/sdk/keyvault/keyvault-secrets/tests.yml b/sdk/keyvault/keyvault-secrets/tests.yml index 4429b59dfe78..bfed000c8807 100644 --- a/sdk/keyvault/keyvault-secrets/tests.yml +++ b/sdk/keyvault/keyvault-secrets/tests.yml @@ -1,19 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/keyvault-secrets" - ResourceServiceDirectory: keyvault - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/keyvault-secrets" + ResourceServiceDirectory: keyvault + TestMinMax: true + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/keyvault/keyvault-secrets/tsconfig.json b/sdk/keyvault/keyvault-secrets/tsconfig.json index 9a0426a5d935..7a5252578c4f 100644 --- a/sdk/keyvault/keyvault-secrets/tsconfig.json +++ b/sdk/keyvault/keyvault-secrets/tsconfig.json @@ -1,27 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./types", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true, + "outDir": "./dist-esm", + "lib": ["dom"], "resolveJsonModule": true }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/**/*.ts"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "exclude": ["node_modules", "../keyvault-common/node_modules", "./samples/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../keyvault-common/**/*.ts"] } diff --git a/sdk/keyvault/keyvault-secrets/tsconfig.samples.json b/sdk/keyvault/keyvault-secrets/tsconfig.samples.json index 846639b2d955..a0b15abb027d 100644 --- a/sdk/keyvault/keyvault-secrets/tsconfig.samples.json +++ b/sdk/keyvault/keyvault-secrets/tsconfig.samples.json @@ -19,6 +19,5 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "include": ["./samples/**/*.ts"] } diff --git a/sdk/mediaservices/arm-mediaservices/LICENSE.txt b/sdk/mediaservices/arm-mediaservices/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/mediaservices/arm-mediaservices/LICENSE.txt +++ b/sdk/mediaservices/arm-mediaservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index 4294e685ca38..81f83a885a2c 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-mediaservices", "author": "Microsoft Corporation", "description": "AzureMediaServices Library with typescript type definitions for node.js and browser.", - "version": "7.1.0", + "version": "7.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts index 50aa7cfc68fa..69a3d868873c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServicesContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mediaservices"; -const packageVersion = "7.1.0"; +const packageVersion = "7.2.0"; export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -37,7 +37,7 @@ export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +52,10 @@ export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/mediaservices/arm-mediaservices/src/models/index.ts b/sdk/mediaservices/arm-mediaservices/src/models/index.ts index a6a14ca891f5..27f2e0f9a292 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/index.ts @@ -372,6 +372,64 @@ export interface MediaService extends TrackedResource { storageAccounts?: StorageAccount[]; } +/** + * An interface representing ListEdgePoliciesInput. + */ +export interface ListEdgePoliciesInput { + /** + * Unique identifier of the edge device. + */ + deviceId?: string; +} + +/** + * An interface representing EdgeUsageDataEventHub. + */ +export interface EdgeUsageDataEventHub { + /** + * Name of the Event Hub where usage will be reported. + */ + name?: string; + /** + * Namespace of the Event Hub where usage will be reported. + */ + namespace?: string; + /** + * SAS token needed to interact with Event Hub. + */ + token?: string; +} + +/** + * An interface representing EdgeUsageDataCollectionPolicy. + */ +export interface EdgeUsageDataCollectionPolicy { + /** + * Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. + */ + dataCollectionFrequency?: string; + /** + * Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H. + */ + dataReportingFrequency?: string; + /** + * Maximum time for which the functionality of the device will not be hampered for not reporting + * the usage data. + */ + maxAllowedUnreportedUsageDuration?: string; + /** + * Details of Event Hub where the usage will be reported. + */ + eventHubDetails?: EdgeUsageDataEventHub; +} + +/** + * An interface representing EdgePolicies. + */ +export interface EdgePolicies { + usageDataCollectionPolicy?: EdgeUsageDataCollectionPolicy; +} + /** * A Media Services account. */ @@ -4400,6 +4458,26 @@ export type MediaservicesUpdateResponse = MediaService & { }; }; +/** + * Contains response data for the listEdgePolicies operation. + */ +export type MediaservicesListEdgePoliciesResponse = EdgePolicies & { + /** + * 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: EdgePolicies; + }; +}; + /** * Contains response data for the listBySubscription operation. */ diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index e7406f2f05ee..90045ee066ae 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -630,6 +630,102 @@ export const MediaService: msRest.CompositeMapper = { } }; +export const ListEdgePoliciesInput: msRest.CompositeMapper = { + serializedName: "ListEdgePoliciesInput", + type: { + name: "Composite", + className: "ListEdgePoliciesInput", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + } + } + } +}; + +export const EdgeUsageDataEventHub: msRest.CompositeMapper = { + serializedName: "EdgeUsageDataEventHub", + type: { + name: "Composite", + className: "EdgeUsageDataEventHub", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + namespace: { + serializedName: "namespace", + type: { + name: "String" + } + }, + token: { + serializedName: "token", + type: { + name: "String" + } + } + } + } +}; + +export const EdgeUsageDataCollectionPolicy: msRest.CompositeMapper = { + serializedName: "EdgeUsageDataCollectionPolicy", + type: { + name: "Composite", + className: "EdgeUsageDataCollectionPolicy", + modelProperties: { + dataCollectionFrequency: { + serializedName: "dataCollectionFrequency", + type: { + name: "String" + } + }, + dataReportingFrequency: { + serializedName: "dataReportingFrequency", + type: { + name: "String" + } + }, + maxAllowedUnreportedUsageDuration: { + serializedName: "maxAllowedUnreportedUsageDuration", + type: { + name: "String" + } + }, + eventHubDetails: { + serializedName: "eventHubDetails", + type: { + name: "Composite", + className: "EdgeUsageDataEventHub" + } + } + } + } +}; + +export const EdgePolicies: msRest.CompositeMapper = { + serializedName: "EdgePolicies", + type: { + name: "Composite", + className: "EdgePolicies", + modelProperties: { + usageDataCollectionPolicy: { + serializedName: "usageDataCollectionPolicy", + type: { + name: "Composite", + className: "EdgeUsageDataCollectionPolicy" + } + } + } + } +}; + export const SubscriptionMediaService: msRest.CompositeMapper = { serializedName: "SubscriptionMediaService", type: { diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts index 77108f268767..edb31ff40d85 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mediaservicesMappers.ts @@ -56,6 +56,9 @@ export { CrossSiteAccessPolicies, DefaultKey, Deinterlace, + EdgePolicies, + EdgeUsageDataCollectionPolicy, + EdgeUsageDataEventHub, EnabledProtocols, EnvelopeEncryption, FaceDetectorPreset, @@ -85,6 +88,7 @@ export { JpgImage, JpgLayer, Layer, + ListEdgePoliciesInput, LiveEvent, LiveEventEncoding, LiveEventEndpoint, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts index 7cc6495c02ac..92537cb6726a 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts @@ -233,6 +233,43 @@ export class Mediaservices { callback); } + /** + * List the media edge policies associated with the Media Services account. + * @summary List the media edge policies associated with the Media Services account. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param callback The callback + */ + listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + listEdgePoliciesOperationSpec, + callback) as Promise; + } + /** * List Media Services accounts in the subscription. * @summary List Media Services accounts @@ -517,6 +554,38 @@ const syncStorageKeysOperationSpec: msRest.OperationSpec = { serializer }; +const listEdgePoliciesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/listEdgePolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ListEdgePoliciesInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.EdgePolicies + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices", diff --git a/sdk/mixedreality/arm-mixedreality/LICENSE.txt b/sdk/mixedreality/arm-mixedreality/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/mixedreality/arm-mixedreality/LICENSE.txt +++ b/sdk/mixedreality/arm-mixedreality/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/mixedreality/arm-mixedreality/README.md b/sdk/mixedreality/arm-mixedreality/README.md index 6770ab2b8849..c84af2850f43 100644 --- a/sdk/mixedreality/arm-mixedreality/README.md +++ b/sdk/mixedreality/arm-mixedreality/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-mixedreality ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fmixedreality%2Farm-mixedreality%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/mixedreality/arm-mixedreality/README.png) diff --git a/sdk/mixedreality/arm-mixedreality/package.json b/sdk/mixedreality/arm-mixedreality/package.json index 5223196ddb6e..720ecf92e3a8 100644 --- a/sdk/mixedreality/arm-mixedreality/package.json +++ b/sdk/mixedreality/arm-mixedreality/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-mixedreality", "author": "Microsoft Corporation", "description": "MixedRealityClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/mixedRealityClient.js", "types": "./esm/mixedRealityClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/mixedreality/arm-mixedreality", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/mixedreality/arm-mixedreality", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/mixedreality/arm-mixedreality/rollup.config.js b/sdk/mixedreality/arm-mixedreality/rollup.config.js index a40468ce3499..8ee230806bb5 100644 --- a/sdk/mixedreality/arm-mixedreality/rollup.config.js +++ b/sdk/mixedreality/arm-mixedreality/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts index 1739208f7d99..08b9d7c4afee 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts @@ -20,21 +20,24 @@ class MixedRealityClient extends MixedRealityClientContext { // Operation groups operations: operations.Operations; spatialAnchorsAccounts: operations.SpatialAnchorsAccounts; + remoteRenderingAccounts: operations.RemoteRenderingAccounts; /** * Initializes a new instance of the MixedRealityClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure subscription ID. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MixedRealityClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.spatialAnchorsAccounts = new operations.SpatialAnchorsAccounts(this); + this.remoteRenderingAccounts = new operations.RemoteRenderingAccounts(this); } /** - * Check Name Availability for global uniqueness + * Check Name Availability for local uniqueness * @param location The location in which uniqueness will be verified. * @param checkNameAvailability Check Name Availability Request. * @param [options] The optional parameters @@ -76,7 +79,7 @@ const checkNameAvailabilityLocalOperationSpec: msRest.OperationSpec = { Parameters.location ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -93,7 +96,7 @@ const checkNameAvailabilityLocalOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CheckNameAvailabilityResponse }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts index bdcc1248e003..2691545c852c 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts @@ -13,17 +13,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-mixedreality"; -const packageVersion = "1.0.0"; +const packageVersion = "2.0.0"; export class MixedRealityClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the MixedRealityClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure subscription ID. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MixedRealityClientOptions) { @@ -37,14 +37,13 @@ export class MixedRealityClientContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2019-02-28-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +51,10 @@ export class MixedRealityClientContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/mixedreality/arm-mixedreality/src/models/index.ts b/sdk/mixedreality/arm-mixedreality/src/models/index.ts index b9e4c449e1ea..03a32ebb6e5f 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/index.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/index.ts @@ -43,30 +43,6 @@ export interface CheckNameAvailabilityResponse { message?: string; } -/** - * Response on Error - */ -export interface ErrorResponse { - /** - * Describes the error in detail and provides debugging information - */ - message: string; - /** - * String that can be used to programmatically identify the error. - */ - code: string; - /** - * The target of the particular error - */ - target?: string; - /** - * An array of JSON objects that MUST contain name/value pairs for code and message, and MAY - * contain a name/value pair for target, as described above.The contents of this section are - * service-defined but must adhere to the aforementioned schema. - */ - details?: string; -} - /** * The object that represents the operation. */ @@ -145,7 +121,7 @@ export interface TrackedResource extends Resource { */ export interface SpatialAnchorsAccount extends TrackedResource { /** - * unique id of certain Spatial Anchors Account data contract. + * unique id of certain account. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountId?: string; @@ -157,9 +133,27 @@ export interface SpatialAnchorsAccount extends TrackedResource { } /** - * Spatial Anchors Account Keys + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. */ -export interface SpatialAnchorsAccountKeys { +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * Developer Keys of account + */ +export interface AccountKeys { /** * value of primary key. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -173,9 +167,9 @@ export interface SpatialAnchorsAccountKeys { } /** - * Spatial Anchors Account Regenerate Key + * Request for account key regeneration */ -export interface SpatialAnchorsAccountKeyRegenerateRequest { +export interface AccountKeyRegenerateRequest { /** * serial of key to be regenerated. Default value: 1. */ @@ -183,21 +177,180 @@ export interface SpatialAnchorsAccountKeyRegenerateRequest { } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * Identity for the resource. */ -export interface ProxyResource extends Resource { +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned' + */ + type?: ResourceIdentityType; } /** - * The resource model definition for a Azure Resource Manager resource with an etag. + * An interface representing RemoteRenderingAccountIdentity. */ -export interface AzureEntityResource extends Resource { +export interface RemoteRenderingAccountIdentity extends Identity { +} + +/** + * RemoteRenderingAccount Response. + */ +export interface RemoteRenderingAccount extends TrackedResource { + identity?: RemoteRenderingAccountIdentity; /** - * Resource Etag. + * unique id of certain account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Correspond domain name of certain Spatial Anchors Account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountDomain?: string; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetIdentity. + */ +export interface ResourceModelWithAllowedPropertySetIdentity extends Identity { +} + +/** + * The resource model definition representing SKU + */ +export interface Sku { + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code + */ + name: string; + /** + * This field is required to be implemented by the Resource Provider if the service has more than + * one tier, but is not required on a PUT. Possible values include: 'Free', 'Basic', 'Standard', + * 'Premium' + */ + tier?: SkuTier; + /** + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. + */ + size?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ + family?: string; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. + */ + capacity?: number; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetSku. + */ +export interface ResourceModelWithAllowedPropertySetSku extends Sku { +} + +/** + * Plan for the resource. + */ +export interface Plan { + /** + * A user defined name of the 3rd Party Artifact that is being procured. + */ + name: string; + /** + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + publisher: string; + /** + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + * specified for the artifact at the time of Data Market onboarding. + */ + product: string; + /** + * A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + */ + promotionCode?: string; + /** + * The version of the desired product/artifact. + */ + version?: string; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetPlan. + */ +export interface ResourceModelWithAllowedPropertySetPlan extends Plan { +} + +/** + * The resource model definition containing the full set of allowed properties for a resource. + * Except properties bag, there cannot be a top level property outside of this set. + */ +export interface ResourceModelWithAllowedPropertySet extends BaseResource { + /** + * 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.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The geo-location where the resource lives + */ + location?: string; + /** + * The fully qualified resource ID of the resource that manages this resource. Indicates if this + * resource is managed by another azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another + * resource. + */ + managedBy?: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource + * provider must validate and persist this value. + */ + kind?: string; + /** + * The etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal etag convention. Entity tags are used for comparing two + * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag + * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + * (section 14.27) header fields. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + identity?: ResourceModelWithAllowedPropertySetIdentity; + sku?: ResourceModelWithAllowedPropertySetSku; + plan?: ResourceModelWithAllowedPropertySetPlan; } /** @@ -213,7 +366,7 @@ export interface MixedRealityClientOptions extends AzureServiceClientOptions { * a URL link to get the next set of results. * @extends Array */ -export interface OperationList extends Array { +export interface OperationPage extends Array { /** * URL to get the next set of operation list results if there are any. */ @@ -226,7 +379,20 @@ export interface OperationList extends Array { * to get the next set of results. * @extends Array */ -export interface SpatialAnchorsAccountList extends Array { +export interface SpatialAnchorsAccountPage extends Array { + /** + * URL to get the next set of resource list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to get resource collection. It contains a list of resources and a URL link + * to get the next set of results. + * @extends Array + */ +export interface RemoteRenderingAccountPage extends Array { /** * URL to get the next set of resource list results if there are any. */ @@ -249,10 +415,26 @@ export type NameAvailability = 'true' | 'false'; */ export type NameUnavailableReason = 'Invalid' | 'AlreadyExists'; +/** + * Defines values for SkuTier. + * Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Free' | 'Basic' | 'Standard' | 'Premium'; + +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned'; + /** * Contains response data for the list operation. */ -export type OperationsListResponse = OperationList & { +export type OperationsListResponse = OperationPage & { /** * The underlying HTTP response. */ @@ -265,14 +447,14 @@ export type OperationsListResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: OperationPage; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationList & { +export type OperationsListNextResponse = OperationPage & { /** * The underlying HTTP response. */ @@ -285,7 +467,7 @@ export type OperationsListNextResponse = OperationList & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: OperationPage; }; }; @@ -312,7 +494,7 @@ export type CheckNameAvailabilityLocalResponse = CheckNameAvailabilityResponse & /** * Contains response data for the listBySubscription operation. */ -export type SpatialAnchorsAccountsListBySubscriptionResponse = SpatialAnchorsAccountList & { +export type SpatialAnchorsAccountsListBySubscriptionResponse = SpatialAnchorsAccountPage & { /** * The underlying HTTP response. */ @@ -325,14 +507,14 @@ export type SpatialAnchorsAccountsListBySubscriptionResponse = SpatialAnchorsAcc /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountList; + parsedBody: SpatialAnchorsAccountPage; }; }; /** * Contains response data for the listByResourceGroup operation. */ -export type SpatialAnchorsAccountsListByResourceGroupResponse = SpatialAnchorsAccountList & { +export type SpatialAnchorsAccountsListByResourceGroupResponse = SpatialAnchorsAccountPage & { /** * The underlying HTTP response. */ @@ -345,7 +527,7 @@ export type SpatialAnchorsAccountsListByResourceGroupResponse = SpatialAnchorsAc /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountList; + parsedBody: SpatialAnchorsAccountPage; }; }; @@ -410,9 +592,189 @@ export type SpatialAnchorsAccountsCreateResponse = SpatialAnchorsAccount & { }; /** - * Contains response data for the getKeys operation. + * Contains response data for the listKeys operation. + */ +export type SpatialAnchorsAccountsListKeysResponse = AccountKeys & { + /** + * 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: AccountKeys; + }; +}; + +/** + * Contains response data for the regenerateKeys operation. + */ +export type SpatialAnchorsAccountsRegenerateKeysResponse = AccountKeys & { + /** + * 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: AccountKeys; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type SpatialAnchorsAccountsListBySubscriptionNextResponse = SpatialAnchorsAccountPage & { + /** + * 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: SpatialAnchorsAccountPage; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type SpatialAnchorsAccountsListByResourceGroupNextResponse = SpatialAnchorsAccountPage & { + /** + * 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: SpatialAnchorsAccountPage; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type RemoteRenderingAccountsListBySubscriptionResponse = RemoteRenderingAccountPage & { + /** + * 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: RemoteRenderingAccountPage; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type RemoteRenderingAccountsListByResourceGroupResponse = RemoteRenderingAccountPage & { + /** + * 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: RemoteRenderingAccountPage; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RemoteRenderingAccountsGetResponse = RemoteRenderingAccount & { + /** + * 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: RemoteRenderingAccount; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type RemoteRenderingAccountsUpdateResponse = RemoteRenderingAccount & { + /** + * 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: RemoteRenderingAccount; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type RemoteRenderingAccountsCreateResponse = RemoteRenderingAccount & { + /** + * 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: RemoteRenderingAccount; + }; +}; + +/** + * Contains response data for the listKeys operation. */ -export type SpatialAnchorsAccountsGetKeysResponse = SpatialAnchorsAccountKeys & { +export type RemoteRenderingAccountsListKeysResponse = AccountKeys & { /** * The underlying HTTP response. */ @@ -425,14 +787,14 @@ export type SpatialAnchorsAccountsGetKeysResponse = SpatialAnchorsAccountKeys & /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountKeys; + parsedBody: AccountKeys; }; }; /** * Contains response data for the regenerateKeys operation. */ -export type SpatialAnchorsAccountsRegenerateKeysResponse = SpatialAnchorsAccountKeys & { +export type RemoteRenderingAccountsRegenerateKeysResponse = AccountKeys & { /** * The underlying HTTP response. */ @@ -445,14 +807,14 @@ export type SpatialAnchorsAccountsRegenerateKeysResponse = SpatialAnchorsAccount /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountKeys; + parsedBody: AccountKeys; }; }; /** * Contains response data for the listBySubscriptionNext operation. */ -export type SpatialAnchorsAccountsListBySubscriptionNextResponse = SpatialAnchorsAccountList & { +export type RemoteRenderingAccountsListBySubscriptionNextResponse = RemoteRenderingAccountPage & { /** * The underlying HTTP response. */ @@ -465,14 +827,14 @@ export type SpatialAnchorsAccountsListBySubscriptionNextResponse = SpatialAnchor /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountList; + parsedBody: RemoteRenderingAccountPage; }; }; /** * Contains response data for the listByResourceGroupNext operation. */ -export type SpatialAnchorsAccountsListByResourceGroupNextResponse = SpatialAnchorsAccountList & { +export type RemoteRenderingAccountsListByResourceGroupNextResponse = RemoteRenderingAccountPage & { /** * The underlying HTTP response. */ @@ -485,6 +847,6 @@ export type SpatialAnchorsAccountsListByResourceGroupNextResponse = SpatialAncho /** * The response body as parsed JSON or XML */ - parsedBody: SpatialAnchorsAccountList; + parsedBody: RemoteRenderingAccountPage; }; }; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts index 0e124f482c1d..d48d32381b05 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts @@ -65,42 +65,6 @@ export const CheckNameAvailabilityResponse: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - message: { - required: true, - serializedName: "message", - type: { - name: "String" - } - }, - code: { - required: true, - serializedName: "code", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - type: { - name: "String" - } - } - } - } -}; - export const OperationDisplay: msRest.CompositeMapper = { serializedName: "OperationDisplay", type: { @@ -247,11 +211,40 @@ export const SpatialAnchorsAccount: msRest.CompositeMapper = { } }; -export const SpatialAnchorsAccountKeys: msRest.CompositeMapper = { - serializedName: "SpatialAnchorsAccountKeys", +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", type: { name: "Composite", - className: "SpatialAnchorsAccountKeys", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const AccountKeys: msRest.CompositeMapper = { + serializedName: "AccountKeys", + type: { + name: "Composite", + className: "AccountKeys", modelProperties: { primaryKey: { readOnly: true, @@ -271,11 +264,11 @@ export const SpatialAnchorsAccountKeys: msRest.CompositeMapper = { } }; -export const SpatialAnchorsAccountKeyRegenerateRequest: msRest.CompositeMapper = { - serializedName: "SpatialAnchorsAccountKeyRegenerateRequest", +export const AccountKeyRegenerateRequest: msRest.CompositeMapper = { + serializedName: "AccountKeyRegenerateRequest", type: { name: "Composite", - className: "SpatialAnchorsAccountKeyRegenerateRequest", + className: "AccountKeyRegenerateRequest", modelProperties: { serial: { serializedName: "serial", @@ -288,40 +281,301 @@ export const SpatialAnchorsAccountKeyRegenerateRequest: msRest.CompositeMapper = } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", type: { name: "Composite", - className: "ProxyResource", + className: "Identity", modelProperties: { - ...Resource.type.modelProperties + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] + } + } } } }; -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", +export const RemoteRenderingAccountIdentity: msRest.CompositeMapper = { + serializedName: "RemoteRenderingAccount_identity", type: { name: "Composite", - className: "AzureEntityResource", + className: "RemoteRenderingAccountIdentity", modelProperties: { - ...Resource.type.modelProperties, + ...Identity.type.modelProperties + } + } +}; + +export const RemoteRenderingAccount: msRest.CompositeMapper = { + serializedName: "RemoteRenderingAccount", + type: { + name: "Composite", + className: "RemoteRenderingAccount", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "RemoteRenderingAccountIdentity" + } + }, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "String" + } + }, + accountDomain: { + readOnly: true, + serializedName: "properties.accountDomain", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceModelWithAllowedPropertySetIdentity: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_identity", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity", + modelProperties: { + ...Identity.type.modelProperties + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "Enum", + allowedValues: [ + "Free", + "Basic", + "Standard", + "Premium" + ] + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const ResourceModelWithAllowedPropertySetSku: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_sku", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku", + modelProperties: { + ...Sku.type.modelProperties + } + } +}; + +export const Plan: msRest.CompositeMapper = { + serializedName: "Plan", + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + publisher: { + required: true, + serializedName: "publisher", + type: { + name: "String" + } + }, + product: { + required: true, + serializedName: "product", + type: { + name: "String" + } + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceModelWithAllowedPropertySetPlan: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_plan", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetPlan", + modelProperties: { + ...Plan.type.modelProperties + } + } +}; + +export const ResourceModelWithAllowedPropertySet: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySet", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + constraints: { + Pattern: /^[-\w\._,\(\)]+$/ + }, + type: { + name: "String" + } + }, etag: { readOnly: true, serializedName: "etag", type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku" + } + }, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetPlan" + } } } } }; -export const OperationList: msRest.CompositeMapper = { - serializedName: "OperationList", +export const OperationPage: msRest.CompositeMapper = { + serializedName: "OperationPage", type: { name: "Composite", - className: "OperationList", + className: "OperationPage", modelProperties: { value: { serializedName: "", @@ -345,11 +599,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const SpatialAnchorsAccountList: msRest.CompositeMapper = { - serializedName: "SpatialAnchorsAccountList", +export const SpatialAnchorsAccountPage: msRest.CompositeMapper = { + serializedName: "SpatialAnchorsAccountPage", type: { name: "Composite", - className: "SpatialAnchorsAccountList", + className: "SpatialAnchorsAccountPage", modelProperties: { value: { serializedName: "", @@ -372,3 +626,31 @@ export const SpatialAnchorsAccountList: msRest.CompositeMapper = { } } }; + +export const RemoteRenderingAccountPage: msRest.CompositeMapper = { + serializedName: "RemoteRenderingAccountPage", + type: { + name: "Composite", + className: "RemoteRenderingAccountPage", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemoteRenderingAccount" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/operationsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/operationsMappers.ts index 1bffa63f4cc5..0aa51a7fa757 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/operationsMappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/operationsMappers.ts @@ -7,8 +7,8 @@ */ export { - ErrorResponse, + CloudError, Operation, OperationDisplay, - OperationList + OperationPage } from "../models/mappers"; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/parameters.ts b/sdk/mixedreality/arm-mixedreality/src/models/parameters.ts index 22760b651c29..e55a33b18252 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/parameters.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/parameters.ts @@ -20,11 +20,40 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const accountName: msRest.OperationURLParameter = { + parameterPath: "accountName", + mapper: { + required: true, + serializedName: "accountName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2020-05-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-04-06-preview', type: { name: "String" } @@ -71,21 +100,6 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; -export const spatialAnchorsAccountName: msRest.OperationURLParameter = { - parameterPath: "spatialAnchorsAccountName", - mapper: { - required: true, - serializedName: "spatialAnchorsAccountName", - constraints: { - MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ - }, - type: { - name: "String" - } - } -}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts new file mode 100644 index 000000000000..85d0bf38e66f --- /dev/null +++ b/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts @@ -0,0 +1,29 @@ +/* + * 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 { + AccountKeyRegenerateRequest, + AccountKeys, + AzureEntityResource, + BaseResource, + CloudError, + Identity, + Plan, + ProxyResource, + RemoteRenderingAccount, + RemoteRenderingAccountIdentity, + RemoteRenderingAccountPage, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + Sku, + SpatialAnchorsAccount, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts index 13ccb0be4f01..19410b8ece4a 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts @@ -7,14 +7,23 @@ */ export { + AccountKeyRegenerateRequest, + AccountKeys, AzureEntityResource, BaseResource, - ErrorResponse, + CloudError, + Identity, + Plan, ProxyResource, + RemoteRenderingAccount, + RemoteRenderingAccountIdentity, Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + Sku, SpatialAnchorsAccount, - SpatialAnchorsAccountKeyRegenerateRequest, - SpatialAnchorsAccountKeys, - SpatialAnchorsAccountList, + SpatialAnchorsAccountPage, TrackedResource } from "../models/mappers"; diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/index.ts b/sdk/mixedreality/arm-mixedreality/src/operations/index.ts index 6bba7bbb00e3..8f8c5a7d4aa5 100644 --- a/sdk/mixedreality/arm-mixedreality/src/operations/index.ts +++ b/sdk/mixedreality/arm-mixedreality/src/operations/index.ts @@ -10,3 +10,4 @@ export * from "./operations"; export * from "./spatialAnchorsAccounts"; +export * from "./remoteRenderingAccounts"; diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/operations.ts b/sdk/mixedreality/arm-mixedreality/src/operations/operations.ts index cf190bf2d7c5..df395bf971b2 100644 --- a/sdk/mixedreality/arm-mixedreality/src/operations/operations.ts +++ b/sdk/mixedreality/arm-mixedreality/src/operations/operations.ts @@ -35,13 +35,13 @@ export class Operations { /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + 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 { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,14 +61,14 @@ export class Operations { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + 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 { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -85,17 +85,17 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.MixedReality/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -113,10 +113,10 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/remoteRenderingAccounts.ts b/sdk/mixedreality/arm-mixedreality/src/operations/remoteRenderingAccounts.ts new file mode 100644 index 000000000000..65007d1b57fd --- /dev/null +++ b/sdk/mixedreality/arm-mixedreality/src/operations/remoteRenderingAccounts.ts @@ -0,0 +1,604 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/remoteRenderingAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { MixedRealityClientContext } from "../mixedRealityClientContext"; + +/** Class representing a RemoteRenderingAccounts. */ +export class RemoteRenderingAccounts { + private readonly client: MixedRealityClientContext; + + /** + * Create a RemoteRenderingAccounts. + * @param {MixedRealityClientContext} client Reference to the service client. + */ + constructor(client: MixedRealityClientContext) { + this.client = client; + } + + /** + * List Remote Rendering Accounts by Subscription + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * List Resources by Resource Group + * @param resourceGroupName Name of an Azure resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Delete a Remote Rendering Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Retrieve a Remote Rendering Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updating a Remote Rendering Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + remoteRenderingAccount, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creating or Updating a Remote Rendering Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param remoteRenderingAccount Remote Rendering Account parameter. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, remoteRenderingAccount: Models.RemoteRenderingAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + remoteRenderingAccount, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * List Both of the 2 Keys of a Remote Rendering Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + listKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerate specified Key of a Remote Rendering Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param options The optional parameters + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + regenerate, + options + }, + regenerateKeysOperationSpec, + callback) as Promise; + } + + /** + * List Remote Rendering Accounts by Subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * List Resources by 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "remoteRenderingAccount", + mapper: { + ...Mappers.RemoteRenderingAccount, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "remoteRenderingAccount", + mapper: { + ...Mappers.RemoteRenderingAccount, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccount + }, + 201: { + bodyMapper: Mappers.RemoteRenderingAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const regenerateKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "regenerate", + mapper: { + ...Mappers.AccountKeyRegenerateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccountKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RemoteRenderingAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/spatialAnchorsAccounts.ts b/sdk/mixedreality/arm-mixedreality/src/operations/spatialAnchorsAccounts.ts index 7223a7fbe9df..3e02cbb076cd 100644 --- a/sdk/mixedreality/arm-mixedreality/src/operations/spatialAnchorsAccounts.ts +++ b/sdk/mixedreality/arm-mixedreality/src/operations/spatialAnchorsAccounts.ts @@ -35,13 +35,13 @@ export class SpatialAnchorsAccounts { /** * @param callback The callback */ - listBySubscription(callback: msRest.ServiceCallback): void; + listBySubscription(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,14 +61,14 @@ export class SpatialAnchorsAccounts { * @param resourceGroupName Name of an Azure resource group. * @param callback The callback */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure 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 { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -81,29 +81,29 @@ export class SpatialAnchorsAccounts { /** * Delete a Spatial Anchors Account. * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param callback The callback */ - deleteMethod(resourceGroupName: string, spatialAnchorsAccountName: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, spatialAnchorsAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, + accountName, options }, deleteMethodOperationSpec, @@ -113,29 +113,29 @@ export class SpatialAnchorsAccounts { /** * Retrieve a Spatial Anchors Account. * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param callback The callback */ - get(resourceGroupName: string, spatialAnchorsAccountName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, spatialAnchorsAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, + accountName, options }, getOperationSpec, @@ -145,32 +145,32 @@ export class SpatialAnchorsAccounts { /** * Updating a Spatial Anchors Account * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param callback The callback */ - update(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, + accountName, spatialAnchorsAccount, options }, @@ -181,32 +181,32 @@ export class SpatialAnchorsAccounts { /** * Creating or Updating a Spatial Anchors Account. * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; + create(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param callback The callback */ - create(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param spatialAnchorsAccount Spatial Anchors Account parameter. * @param options The optional parameters * @param callback The callback */ - create(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, spatialAnchorsAccount: Models.SpatialAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, + accountName, spatialAnchorsAccount, options }, @@ -215,67 +215,67 @@ export class SpatialAnchorsAccounts { } /** - * Get Both of the 2 Keys of a Spatial Anchors Account + * List Both of the 2 Keys of a Spatial Anchors Account * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getKeys(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase): Promise; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param callback The callback */ - getKeys(resourceGroupName: string, spatialAnchorsAccountName: string, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. + * @param accountName Name of an Mixed Reality Account. * @param options The optional parameters * @param callback The callback */ - getKeys(resourceGroupName: string, spatialAnchorsAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getKeys(resourceGroupName: string, spatialAnchorsAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, + accountName, options }, - getKeysOperationSpec, - callback) as Promise; + listKeysOperationSpec, + callback) as Promise; } /** - * Regenerate 1 Key of a Spatial Anchors Account + * Regenerate specified Key of a Spatial Anchors Account * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. - * @param spatialAnchorsAccountKeyRegenerate Specifying which key to be regenerated. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. * @param [options] The optional parameters * @returns Promise */ - regenerateKeys(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccountKeyRegenerate: Models.SpatialAnchorsAccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase): Promise; + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. - * @param spatialAnchorsAccountKeyRegenerate Specifying which key to be regenerated. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. * @param callback The callback */ - regenerateKeys(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccountKeyRegenerate: Models.SpatialAnchorsAccountKeyRegenerateRequest, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure resource group. - * @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. - * @param spatialAnchorsAccountKeyRegenerate Specifying which key to be regenerated. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. * @param options The optional parameters * @param callback The callback */ - regenerateKeys(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccountKeyRegenerate: Models.SpatialAnchorsAccountKeyRegenerateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - regenerateKeys(resourceGroupName: string, spatialAnchorsAccountName: string, spatialAnchorsAccountKeyRegenerate: Models.SpatialAnchorsAccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, - spatialAnchorsAccountName, - spatialAnchorsAccountKeyRegenerate, + accountName, + regenerate, options }, regenerateKeysOperationSpec, @@ -293,14 +293,14 @@ export class SpatialAnchorsAccounts { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(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 */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -321,14 +321,14 @@ export class SpatialAnchorsAccounts { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -348,17 +348,17 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountList + bodyMapper: Mappers.SpatialAnchorsAccountPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -372,17 +372,17 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountList + bodyMapper: Mappers.SpatialAnchorsAccountPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -390,14 +390,14 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -406,7 +406,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -414,14 +414,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -431,7 +431,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SpatialAnchorsAccount }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -439,14 +439,14 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -463,7 +463,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SpatialAnchorsAccount }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -471,14 +471,14 @@ const updateOperationSpec: msRest.OperationSpec = { const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -498,32 +498,32 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SpatialAnchorsAccount }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer }; -const getKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}/keys", +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountKeys + bodyMapper: Mappers.AccountKeys }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -531,31 +531,31 @@ const getKeysOperationSpec: msRest.OperationSpec = { const regenerateKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}/keys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.spatialAnchorsAccountName + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { - parameterPath: "spatialAnchorsAccountKeyRegenerate", + parameterPath: "regenerate", mapper: { - ...Mappers.SpatialAnchorsAccountKeyRegenerateRequest, + ...Mappers.AccountKeyRegenerateRequest, required: true } }, responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountKeys + bodyMapper: Mappers.AccountKeys }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -573,10 +573,10 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountList + bodyMapper: Mappers.SpatialAnchorsAccountPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer @@ -594,10 +594,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SpatialAnchorsAccountList + bodyMapper: Mappers.SpatialAnchorsAccountPage }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/mixedreality/arm-mixedreality/tsconfig.json b/sdk/mixedreality/arm-mixedreality/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/mixedreality/arm-mixedreality/tsconfig.json +++ b/sdk/mixedreality/arm-mixedreality/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt +++ b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/operationalinsights/arm-operationalinsights/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index 798fcfba4dea..1bd65f51f8b9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/README.md @@ -9,23 +9,24 @@ This package contains an isomorphic SDK for OperationalInsightsManagementClient. ### How to Install -``` +```bash npm install @azure/arm-operationalinsights ``` ### How to use -#### nodejs - Authentication, client creation and get linkedServices as an example written in TypeScript. +#### nodejs - Authentication, client creation and listByWorkspace dataExports as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```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"; @@ -36,8 +37,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const client = new OperationalInsightsManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const workspaceName = "testworkspaceName"; - const linkedServiceName = "testlinkedServiceName"; - client.linkedServices.get(resourceGroupName, workspaceName, linkedServiceName).then((result) => { + client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -46,11 +46,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get linkedServices as an example written in JavaScript. +#### browser - Authentication, client creation and listByWorkspace dataExports as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -82,8 +82,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const client = new Azure.ArmOperationalinsights.OperationalInsightsManagementClient(res.creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const workspaceName = "testworkspaceName"; - const linkedServiceName = "testlinkedServiceName"; - client.linkedServices.get(resourceGroupName, workspaceName, linkedServiceName).then((result) => { + client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -101,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Foperationalinsights%2Farm-operationalinsights%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/operationalinsights/arm-operationalinsights/README.png) diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index afde6a376e01..7c0ab0ee610a 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-operationalinsights", "author": "Microsoft Corporation", "description": "OperationalInsightsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/operationalInsightsManagementClient.js", "types": "./esm/operationalInsightsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js index d21129e749d0..8675ec4b06f7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js +++ b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/operationalInsightsManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/operationalInsightsManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-operationalinsights.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/availableServiceTiersMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/availableServiceTiersMappers.ts new file mode 100644 index 000000000000..2d5b5d794a83 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/availableServiceTiersMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 { + AvailableServiceTier, + CloudError +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts new file mode 100644 index 000000000000..0b727683b2bf --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + Cluster, + ClusterErrorResponse, + ClusterListResult, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts new file mode 100644 index 000000000000..0f6c87194aa7 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataExportErrorResponse, + DataExportListResult, + DataSource, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts index aee58af1b707..869e7f6d08fe 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts @@ -1,21 +1,37 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - DataSource, + AzureEntityResource, BaseResource, CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, DataSourceListResult, + Identity, + KeyVaultProperties, LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, Workspace, - Sku, - Resource + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts new file mode 100644 index 000000000000..f235c793e581 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspaceListResult, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts new file mode 100644 index 000000000000..67c5a45e0449 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts @@ -0,0 +1,11 @@ +/* + * 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 +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index f0b2fa91cae0..69e1c27dd2f8 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/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. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,513 +11,2116 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * The top level data export resource container. + */ +export interface DataExport extends BaseResource { + /** + * The data export rule ID. + */ + dataExportId?: string; + /** + * When ‘true’, all workspace's tables are exported. + */ + allTables?: boolean; + /** + * An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + */ + tableNames?: string[]; + /** + * The destination resource ID. This can be copied from the Properties entry of the destination + * resource in Azure. + */ + resourceId: string; + /** + * The type of the destination resource. Possible values include: 'StorageAccount', 'EventHub' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataExportType?: Type; + /** + * Optional. Allows to define an Event Hub name. Not applicable when destination is Storage + * Account. + */ + eventHubName?: string; + /** + * Active when enabled. + */ + enable?: boolean; + /** + * The latest data export rule modification time. + */ + createdDate?: string; + /** + * Date and time when the export was last modified. + */ + lastModifiedDate?: string; +} /** - * @interface - * An interface representing OperationDisplay. - * Display metadata associated with the operation. - * + * The resource management error additional info. */ -export interface OperationDisplay { +export interface ErrorAdditionalInfo { /** - * @member {string} [provider] Service provider: Microsoft - * OperationsManagement. + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provider?: string; + readonly type?: string; /** - * @member {string} [resource] Resource on which the operation is performed - * etc. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resource?: string; + readonly info?: any; +} + +/** + * The resource management error response. + */ +export interface ErrorResponse { /** - * @member {string} [operation] Type of operation: get, read, delete, etc. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operation?: string; + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * @interface - * An interface representing Operation. - * Supported operation of OperationalInsights resource provider. - * + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. */ -export interface Operation { +export interface DataExportErrorResponse { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * The details of the error. */ - name?: string; + error?: ErrorResponse; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { /** - * @member {OperationDisplay} [display] Display metadata associated with the - * operation. + * 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.** */ - display?: OperationDisplay; + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; } /** - * @interface - * An interface representing LinkedService. - * The top level Linked service resource container. - * - * @extends BaseResource + * The resource model definition for a ARM tracked top level resource */ -export interface LinkedService extends BaseResource { +export interface TrackedResource extends Resource { /** - * @member {string} resourceId The resource id of the resource that will be - * linked to the workspace. + * Resource tags. */ - resourceId: string; + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { } /** - * @interface - * An interface representing DataSource. * Datasources under OMS Workspace. - * - * @extends BaseResource */ -export interface DataSource extends BaseResource { +export interface DataSource extends ProxyResource { /** - * @member {any} properties The data source properties in raw json format, - * each kind of data source have it's own schema. + * The data source properties in raw json format, each kind of data source have it's own schema. */ properties: any; /** - * @member {string} [eTag] The ETag of the data source. + * The ETag of the data source. */ eTag?: string; /** - * @member {DataSourceKind} kind Possible values include: 'AzureActivityLog', - * 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', + * 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', + * 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', + * 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', + * 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification' */ kind: DataSourceKind; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing DataSourceFilter. * DataSource filter. Right now, only filter by kind is supported. - * */ export interface DataSourceFilter { /** - * @member {DataSourceKind} [kind] Possible values include: - * 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', + * 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', + * 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', + * 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', + * 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification' */ kind?: DataSourceKind; } /** - * @interface - * An interface representing IntelligencePack. - * Intelligence Pack containing a string name and boolean indicating if it's - * enabled. - * + * Intelligence Pack containing a string name and boolean indicating if it's enabled. */ export interface IntelligencePack { /** - * @member {string} [name] The name of the intelligence pack. + * The name of the intelligence pack. */ name?: string; /** - * @member {boolean} [enabled] The enabled boolean for the intelligence pack. + * The enabled boolean for the intelligence pack. */ enabled?: boolean; /** - * @member {string} [displayName] The display name of the intelligence pack. + * The display name of the intelligence pack. */ displayName?: string; } /** - * @interface - * An interface representing SharedKeys. + * The top level Linked service resource container. + */ +export interface LinkedService extends ProxyResource { + /** + * The resource id of the resource that will be linked to the workspace. This should be used for + * linking resources which require read access + */ + resourceId?: string; + /** + * The resource id of the resource that will be linked to the workspace. This should be used for + * linking resources which require write access + */ + writeAccessResourceId?: string; + /** + * The provisioning state of the linked service. Possible values include: 'Succeeded', + * 'Deleting', 'ProvisioningAccount', 'Updating' + */ + provisioningState?: LinkedServiceEntityStatus; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Linked storage accounts top level resource container. + */ +export interface LinkedStorageAccountsResource extends ProxyResource { + /** + * Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataSourceType?: DataSourceType; + /** + * Linked storage accounts resources ids. + */ + storageAccountIds?: string[]; +} + +/** + * A management group that is connected to a workspace + */ +export interface ManagementGroup { + /** + * The number of servers connected to the management group. + */ + serverCount?: number; + /** + * Gets or sets a value indicating whether the management group is a gateway. + */ + isGateway?: boolean; + /** + * The name of the management group. + */ + name?: string; + /** + * The unique ID of the management group. + */ + id?: string; + /** + * The datetime that the management group was created. + */ + created?: Date; + /** + * The last datetime that the management group received data. + */ + dataReceived?: Date; + /** + * The version of System Center that is managing the management group. + */ + version?: string; + /** + * The SKU of System Center that is managing the management group. + */ + sku?: string; +} + +/** + * Display metadata associated with the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft OperationsManagement. + */ + provider?: string; + /** + * Resource on which the operation is performed etc. + */ + resource?: string; + /** + * Type of operation: get, read, delete, etc. + */ + operation?: string; + /** + * Description of operation + */ + description?: string; +} + +/** + * Supported operation of OperationalInsights resource provider. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * Display metadata associated with the operation. + */ + display?: OperationDisplay; +} + +/** + * The status of operation. + */ +export interface OperationStatus { + /** + * The operation Id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; +} + +/** * The shared keys for a workspace. - * */ export interface SharedKeys { /** - * @member {string} [primarySharedKey] The primary shared key of a workspace. + * The primary shared key of a workspace. */ primarySharedKey?: string; /** - * @member {string} [secondarySharedKey] The secondary shared key of a - * workspace. + * The secondary shared key of a workspace. */ secondarySharedKey?: string; } /** - * @interface - * An interface representing MetricName. * The name of a metric. - * */ export interface MetricName { /** - * @member {string} [value] The system name of the metric. + * The system name of the metric. */ value?: string; /** - * @member {string} [localizedValue] The localized name of the metric. + * The localized name of the metric. */ localizedValue?: string; } /** - * @interface - * An interface representing UsageMetric. * A metric describing the usage of a resource. - * */ export interface UsageMetric { /** - * @member {MetricName} [name] The name of the metric. + * The name of the metric. */ name?: MetricName; /** - * @member {string} [unit] The units used for the metric. + * The units used for the metric. */ unit?: string; /** - * @member {number} [currentValue] The current value of the metric. + * The current value of the metric. */ currentValue?: number; /** - * @member {number} [limit] The quota limit for the metric. + * The quota limit for the metric. */ limit?: number; /** - * @member {Date} [nextResetTime] The time that the metric's value will - * reset. + * The time that the metric's value will reset. */ nextResetTime?: Date; /** - * @member {string} [quotaPeriod] The quota period that determines the length - * of time between value resets. + * The quota period that determines the length of time between value resets. */ quotaPeriod?: string; } /** - * @interface - * An interface representing ManagementGroup. - * A management group that is connected to a workspace - * + * The SKU (tier) of a workspace. */ -export interface ManagementGroup { - /** - * @member {number} [serverCount] The number of servers connected to the - * management group. - */ - serverCount?: number; +export interface WorkspaceSku { /** - * @member {boolean} [isGateway] Gets or sets a value indicating whether the - * management group is a gateway. + * The name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', + * 'PerGB2018', 'Standalone', 'CapacityReservation' */ - isGateway?: boolean; + name: WorkspaceSkuNameEnum; /** - * @member {string} [name] The name of the management group. + * The capacity reservation level for this workspace, when CapacityReservation sku is selected. */ - name?: string; + capacityReservationLevel?: number; /** - * @member {string} [id] The unique ID of the management group. + * The maximum capacity reservation level available for this workspace, when CapacityReservation + * sku is selected. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - id?: string; + readonly maxCapacityReservationLevel?: number; /** - * @member {Date} [created] The datetime that the management group was - * created. + * The last time when the sku was updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - created?: Date; + readonly lastSkuUpdate?: string; +} + +/** + * The daily volume cap for ingestion. + */ +export interface WorkspaceCapping { /** - * @member {Date} [dataReceived] The last datetime that the management group - * received data. + * The workspace daily quota for ingestion. -1 means unlimited. */ - dataReceived?: Date; + dailyQuotaGb?: number; /** - * @member {string} [version] The version of System Center that is managing - * the management group. + * The time when the quota will be rest. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - version?: string; + readonly quotaNextResetTime?: string; /** - * @member {string} [sku] The SKU of System Center that is managing the - * management group. + * The status of data ingestion for this workspace. Possible values include: 'RespectQuota', + * 'ForceOn', 'ForceOff', 'OverQuota', 'SubscriptionSuspended', 'ApproachingQuota' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sku?: string; + readonly dataIngestionStatus?: DataIngestionStatus; } /** - * @interface - * An interface representing Sku. - * The SKU (tier) of a workspace. - * + * The private link scope resource reference. */ -export interface Sku { +export interface PrivateLinkScopedResource { + /** + * The full resource Id of the private link scope resource. + */ + resourceId?: string; /** - * @member {SkuNameEnum} name The name of the SKU. Possible values include: - * 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' + * The private link scope unique Identifier. */ - name: SkuNameEnum; + scopeId?: string; } /** - * @interface - * An interface representing Workspace. * The top level Workspace resource container. - * - * @extends BaseResource */ -export interface Workspace extends BaseResource { +export interface Workspace extends TrackedResource { /** - * @member {EntityStatus} [provisioningState] The provisioning state of the - * workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', - * 'Canceled', 'Deleting', 'ProvisioningAccount' + * The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' */ - provisioningState?: EntityStatus; + provisioningState?: WorkspaceEntityStatus; /** - * @member {string} [source] The source of the workspace. Source defines - * where the workspace was created. 'Azure' implies it was created in Azure. - * 'External' implies it was created via the Operational Insights Portal. - * This value is set on the service side and read-only on the client side. + * This is a read-only property. Represents the ID associated with the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - source?: string; + readonly customerId?: string; /** - * @member {string} [customerId] The ID associated with the workspace. - * Setting this value at creation time allows the workspace being created to - * be linked to an existing workspace. + * The SKU of the workspace. */ - customerId?: string; + sku?: WorkspaceSku; /** - * @member {string} [portalUrl] The URL of the Operational Insights portal - * for this workspace. This value is set on the service side and read-only - * on the client side. + * The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 + * days is the maximum allowed for all other Skus. */ - portalUrl?: string; + retentionInDays?: number; /** - * @member {Sku} [sku] The SKU of the workspace. + * The daily volume cap for ingestion. */ - sku?: Sku; + workspaceCapping?: WorkspaceCapping; /** - * @member {number} [retentionInDays] The workspace data retention in days. - * -1 means Unlimited retention for the Unlimited Sku. 730 days is the - * maximum allowed for all other Skus. + * The network access type for accessing Log Analytics ingestion. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. */ - retentionInDays?: number; + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + /** + * The network access type for accessing Log Analytics query. Possible values include: 'Enabled', + * 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForQuery?: PublicNetworkAccessType; + /** + * List of linked private link scope resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; /** - * @member {string} [eTag] The ETag of the workspace. + * The ETag of the workspace. */ eTag?: string; } /** - * @interface - * An interface representing Resource. - * The resource definition. - * - * @extends BaseResource + * The top level Workspace resource container. */ -export interface Resource extends BaseResource { +export interface WorkspacePatch extends AzureEntityResource { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' */ - readonly id?: string; + provisioningState?: WorkspaceEntityStatus; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is a read-only property. Represents the ID associated with the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly customerId?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The SKU of the workspace. */ - readonly type?: string; + sku?: WorkspaceSku; + /** + * The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 + * days is the maximum allowed for all other Skus. + */ + retentionInDays?: number; + /** + * The daily volume cap for ingestion. + */ + workspaceCapping?: WorkspaceCapping; + /** + * The network access type for accessing Log Analytics ingestion. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + /** + * The network access type for accessing Log Analytics query. Possible values include: 'Enabled', + * 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForQuery?: PublicNetworkAccessType; /** - * @member {string} [location] Resource location + * List of linked private link scope resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - location?: string; + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags. Optional. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing ProxyResource. - * Common properties of proxy resource. - * + * The key vault properties. */ -export interface ProxyResource { +export interface KeyVaultProperties { /** - * @member {string} [id] Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Key Vault uri which holds they key associated with the Log Analytics cluster. */ - readonly id?: string; + keyVaultUri?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the key associated with the Log Analytics cluster. */ - readonly name?: string; + keyName?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The version of the key associated with the Log Analytics cluster. */ - readonly type?: string; + keyVersion?: string; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ClusterErrorResponse { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * The details of the error. */ - tags?: { [propertyName: string]: string }; + error?: ErrorResponse; } /** - * @interface - * An interface representing DataSourcesListByWorkspaceOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The cluster sku definition. + */ +export interface ClusterSku { + /** + * The capacity value + */ + capacity?: number; + /** + * The name of the SKU. Possible values include: 'CapacityReservation' + */ + name?: ClusterSkuNameEnum; +} + +/** + * The top level Log Analytics cluster resource container. + */ +export interface ClusterPatch extends BaseResource { + /** + * The associated key properties. + */ + keyVaultProperties?: KeyVaultProperties; + /** + * The sku properties. + */ + sku?: ClusterSku; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Identity for the resource. + */ +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned', 'None' + */ + type: IdentityType; +} + +/** + * The top level Log Analytics cluster resource container. + */ +export interface Cluster extends TrackedResource { + /** + * The identity of the resource. + */ + identity?: Identity; + /** + * The sku properties. + */ + sku?: ClusterSku; + /** + * The link used to get the next page of recommendations. + */ + nextLink?: string; + /** + * The ID associated with the cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: string; + /** + * The provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ClusterEntityStatus; + /** + * The associated key properties. + */ + keyVaultProperties?: KeyVaultProperties; +} + +/** + * Describes a storage account connection. + */ +export interface StorageAccount { + /** + * The Azure Resource Manager ID of the storage account resource. + */ + id: string; + /** + * The storage account key. + */ + key: string; +} + +/** + * The status of the storage insight. + */ +export interface StorageInsightStatus { + /** + * The state of the storage insight connection to the workspace. Possible values include: 'OK', + * 'ERROR' + */ + state: StorageInsightState; + /** + * Description of the state of the storage insight. + */ + description?: string; +} + +/** + * The top level storage insight resource container. + */ +export interface StorageInsight extends ProxyResource { + /** + * The names of the blob containers that the workspace should read + */ + containers?: string[]; + /** + * The names of the Azure tables that the workspace should read + */ + tables?: string[]; + /** + * The storage account connection details + */ + storageAccount: StorageAccount; + /** + * The status of the storage insight + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: StorageInsightStatus; + /** + * The ETag of the storage insight. + */ + eTag?: string; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * A tag of a saved search. + */ +export interface Tag { + /** + * The tag name. + */ + name: string; + /** + * The tag value. + */ + value: string; +} + +/** + * Value object for saved search results. + */ +export interface SavedSearch extends ProxyResource { + /** + * The ETag of the saved search. + */ + eTag?: string; + /** + * The category of the saved search. This helps the user to find a saved search faster. + */ + category: string; + /** + * Saved search display name. + */ + displayName: string; + /** + * The query expression for the saved search. + */ + query: string; + /** + * The function alias if query serves as a function. + */ + functionAlias?: string; + /** + * The optional function parameters if query serves as a function. Value should be in the + * following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. + * For more examples and proper syntax please refer to + * https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. + */ + functionParameters?: string; + /** + * The version number of the query language. The current version is 2 and is the default. + */ + version?: number; + /** + * The tags attached to the saved search. + */ + tags?: Tag[]; +} + +/** + * The saved search list operation response. + */ +export interface SavedSearchesListResult { + /** + * The array of result values. + */ + value?: SavedSearch[]; +} + +/** + * Service Tier details. + */ +export interface AvailableServiceTier { + /** + * The name of the Service Tier. Possible values include: 'Free', 'Standard', 'Premium', + * 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceTier?: SkuNameEnum; + /** + * True if the Service Tier is enabled for the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enabled?: boolean; + /** + * The minimum retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly minimumRetention?: number; + /** + * The maximum retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly maximumRetention?: number; + /** + * The default retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly defaultRetention?: number; + /** + * The capacity reservation level in GB per day. Returned for the Capacity Reservation Service + * Tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capacityReservationLevel?: number; + /** + * Time when the sku was last updated for the workspace. Returned for the Capacity Reservation + * Service Tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastSkuUpdate?: string; +} + +/** + * The core summary of a search. + */ +export interface CoreSummary { + /** + * The status of a core summary. + */ + status?: string; + /** + * The number of documents of a core summary. + */ + numberOfDocuments: number; +} + +/** + * The sort parameters for search. + */ +export interface SearchSort { + /** + * The name of the field the search query is sorted on. + */ + name?: string; + /** + * The sort order of the search. Possible values include: 'asc', 'desc' + */ + order?: SearchSortEnum; +} + +/** + * Schema metadata for search. + */ +export interface SearchMetadataSchema { + /** + * The name of the metadata schema. + */ + name?: string; + /** + * The version of the metadata schema. + */ + version?: number; +} + +/** + * Metadata for search results. + */ +export interface SearchMetadata { + /** + * The request id of the search. + */ + searchId?: string; + /** + * The search result type. + */ + resultType?: string; + /** + * The total number of search results. + */ + total?: number; + /** + * The number of top search results. + */ + top?: number; + /** + * The id of the search results request. + */ + id?: string; + /** + * The core summaries. + */ + coreSummaries?: CoreSummary[]; + /** + * The status of the search results. + */ + status?: string; + /** + * The start time for the search. + */ + startTime?: Date; + /** + * The time of last update. + */ + lastUpdated?: Date; + /** + * The ETag of the search results. + */ + eTag?: string; + /** + * How the results are sorted. + */ + sort?: SearchSort[]; + /** + * The request time. + */ + requestTime?: number; + /** + * The aggregated value field. + */ + aggregatedValueField?: string; + /** + * The aggregated grouping fields. + */ + aggregatedGroupingFields?: string; + /** + * The sum of all aggregates returned in the result set. + */ + sum?: number; + /** + * The max of all aggregates returned in the result set. + */ + max?: number; + /** + * The schema. + */ + schema?: SearchMetadataSchema; +} + +/** + * Value object for schema results. + */ +export interface SearchSchemaValue { + /** + * The name of the schema. + */ + name?: string; + /** + * The display name of the schema. + */ + displayName?: string; + /** + * The type. + */ + type?: string; + /** + * The boolean that indicates the field is searchable as free text. + */ + indexed: boolean; + /** + * The boolean that indicates whether or not the field is stored. + */ + stored: boolean; + /** + * The boolean that indicates whether or not the field is a facet. + */ + facet: boolean; + /** + * The array of workflows containing the field. + */ + ownerType?: string[]; +} + +/** + * The get schema operation response. + */ +export interface SearchGetSchemaResponse { + /** + * The metadata from search results. + */ + metadata?: SearchMetadata; + /** + * The array of result values. + */ + value?: SearchSchemaValue[]; +} + +/** + * User-defined filters to return data which will be purged from the table. + */ +export interface WorkspacePurgeBodyFilters { + /** + * The column of the table over which the given query should run + */ + column?: string; + /** + * A query operator to evaluate over the provided column and value(s). Supported operators are + * ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL + * query. + */ + operator?: string; + /** + * the value for the operator to function over. This can be a number (e.g., > 100), a string + * (timestamp >= '2017-09-01') or array of values. + */ + value?: any; + /** + * When filtering over custom dimensions, this key will be used as the name of the custom + * dimension. + */ + key?: string; +} + +/** + * Describes the body of a purge request for an App Insights Workspace + */ +export interface WorkspacePurgeBody { + /** + * Table from which to purge data. + */ + table: string; + /** + * The set of columns and filters (queries) to run over them to purge the resulting data. + */ + filters: WorkspacePurgeBodyFilters[]; +} + +/** + * Response containing operationId for a specific purge action. + */ +export interface WorkspacePurgeResponse { + /** + * Id to use when querying for status for a particular purge operation. + */ + operationId: string; +} + +/** + * Response containing status for a specific purge operation. + */ +export interface WorkspacePurgeStatusResponse { + /** + * Status of the operation represented by the requested Id. Possible values include: 'pending', + * 'completed' + */ + status: PurgeState; +} + +/** + * Workspace data table definition. + */ +export interface Table extends ProxyResource { + /** + * The data table data retention in days, between 30 and 730. Setting this property to null will + * default to the workspace retention. + */ + retentionInDays?: number; +} + +/** + * Contains details when the response code indicates an error. + * @summary Error details. + */ +export interface ErrorContract { + /** + * The details of the error. + */ + error?: ErrorResponse; +} + +/** + * Optional Parameters. + */ +export interface DataSourcesListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { + /** + * Starting point of the collection of data source instances. + */ + skiptoken?: string; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Deletes the workspace without the recovery option. A workspace that was deleted with this flag + * cannot be recovered. + */ + force?: boolean; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Deletes the workspace without the recovery option. A workspace that was deleted with this flag + * cannot be recovered. + */ + force?: boolean; +} + +/** + * An interface representing OperationalInsightsManagementClientOptions. + */ +export interface OperationalInsightsManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Purge operation. + */ +export interface WorkspacePurgePurgeHeaders { + /** + * The location from which to request the operation status. + */ + xMsStatusLocation: string; +} + +/** + * @interface + * Result of the request to list data exports. + * @extends Array + */ +export interface DataExportListResult extends Array { +} + +/** + * @interface + * The list data source by workspace operation response. + * @extends Array + */ +export interface DataSourceListResult extends Array { + /** + * The link (url) to the next page of datasources. + */ + nextLink?: string; +} + +/** + * @interface + * The list linked service operation response. + * @extends Array + */ +export interface LinkedServiceListResult extends Array { +} + +/** + * @interface + * The list linked storage accounts service operation response. + * @extends Array + */ +export interface LinkedStorageAccountsListResult extends Array { +} + +/** + * @interface + * The list workspace management groups operation response. + * @extends Array + */ +export interface WorkspaceListManagementGroupsResult extends Array { +} + +/** + * @interface + * Result of the request to list solution operations. + * @extends Array + */ +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; +} + +/** + * @interface + * The list workspace usages operation response. + * @extends Array + */ +export interface WorkspaceListUsagesResult extends Array { +} + +/** + * @interface + * The list workspaces operation response. + * @extends Array + */ +export interface WorkspaceListResult extends Array { +} + +/** + * @interface + * The list clusters operation response. + * @extends Array + */ +export interface ClusterListResult extends Array { + /** + * The link used to get the next page of recommendations. + */ + nextLink?: string; +} + +/** + * @interface + * The list storage insights operation response. + * @extends Array + */ +export interface StorageInsightListResult extends Array { + /** + * The link (url) to the next page of results. + */ + odataNextLink?: string; +} + +/** + * @interface + * The list tables operation response. + * @extends Array + */ +export interface TablesListResult extends Array
{ +} + +/** + * Defines values for Type. + * Possible values include: 'StorageAccount', 'EventHub' + * @readonly + * @enum {string} + */ +export type Type = 'StorageAccount' | 'EventHub'; + +/** + * Defines values for DataSourceKind. + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + * 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', + * 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + * 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', + * 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', + * 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + * 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', + * 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', + * 'SqlDataClassification' + * @readonly + * @enum {string} + */ +export type DataSourceKind = 'WindowsEvent' | 'WindowsPerformanceCounter' | 'IISLogs' | 'LinuxSyslog' | 'LinuxSyslogCollection' | 'LinuxPerformanceObject' | 'LinuxPerformanceCollection' | 'CustomLog' | 'CustomLogCollection' | 'AzureAuditLog' | 'AzureActivityLog' | 'GenericDataSource' | 'ChangeTrackingCustomPath' | 'ChangeTrackingPath' | 'ChangeTrackingServices' | 'ChangeTrackingDataTypeConfiguration' | 'ChangeTrackingDefaultRegistry' | 'ChangeTrackingRegistry' | 'ChangeTrackingLinuxPath' | 'LinuxChangeTrackingPath' | 'ChangeTrackingContentLocation' | 'WindowsTelemetry' | 'Office365' | 'SecurityWindowsBaselineConfiguration' | 'SecurityCenterSecurityWindowsBaselineConfiguration' | 'SecurityEventCollectionConfiguration' | 'SecurityInsightsSecurityEventCollectionConfiguration' | 'ImportComputerGroup' | 'NetworkMonitoring' | 'Itsm' | 'DnsAnalytics' | 'ApplicationInsights' | 'SqlDataClassification'; + +/** + * Defines values for LinkedServiceEntityStatus. + * Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type LinkedServiceEntityStatus = 'Succeeded' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for DataSourceType. + * Possible values include: 'CustomLogs', 'AzureWatson' + * @readonly + * @enum {string} + */ +export type DataSourceType = 'CustomLogs' | 'AzureWatson'; + +/** + * Defines values for WorkspaceSkuNameEnum. + * Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type WorkspaceSkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'PerNode' | 'PerGB2018' | 'Standalone' | 'CapacityReservation'; + +/** + * Defines values for DataIngestionStatus. + * Possible values include: 'RespectQuota', 'ForceOn', 'ForceOff', 'OverQuota', + * 'SubscriptionSuspended', 'ApproachingQuota' + * @readonly + * @enum {string} + */ +export type DataIngestionStatus = 'RespectQuota' | 'ForceOn' | 'ForceOff' | 'OverQuota' | 'SubscriptionSuspended' | 'ApproachingQuota'; + +/** + * Defines values for WorkspaceEntityStatus. + * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkspaceEntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; + +/** + * Defines values for ClusterEntityStatus. + * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type ClusterEntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for ClusterSkuNameEnum. + * Possible values include: 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type ClusterSkuNameEnum = 'CapacityReservation'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for StorageInsightState. + * Possible values include: 'OK', 'ERROR' + * @readonly + * @enum {string} + */ +export type StorageInsightState = 'OK' | 'ERROR'; + +/** + * Defines values for SkuNameEnum. + * Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'PerNode' | 'PerGB2018' | 'Standalone' | 'CapacityReservation'; + +/** + * Defines values for SearchSortEnum. + * Possible values include: 'asc', 'desc' + * @readonly + * @enum {string} + */ +export type SearchSortEnum = 'asc' | 'desc'; + +/** + * Defines values for PurgeState. + * Possible values include: 'pending', 'completed' + * @readonly + * @enum {string} + */ +export type PurgeState = 'pending' | 'completed'; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type DataExportsListByWorkspaceResponse = DataExportListResult & { + /** + * 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: DataExportListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataExportsCreateOrUpdateResponse = DataExport & { + /** + * 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: DataExport; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataExportsGetResponse = DataExport & { + /** + * 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: DataExport; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DataExportsBeginCreateOrUpdateResponse = DataExport & { + /** + * 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: DataExport; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataSourcesCreateOrUpdateResponse = DataSource & { + /** + * 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: DataSource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataSourcesGetResponse = DataSource & { + /** + * 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: DataSource; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { + /** + * 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: DataSourceListResult; + }; +}; + +/** + * Contains response data for the listByWorkspaceNext operation. + */ +export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { + /** + * 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: DataSourceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IntelligencePacksListResponse = Array & { + /** + * 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: IntelligencePack[]; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type LinkedServicesCreateOrUpdateResponse = LinkedService & { + /** + * 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: LinkedService; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type LinkedServicesDeleteMethodResponse = LinkedService & { + /** + * 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: LinkedService; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LinkedServicesGetResponse = LinkedService & { + /** + * 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: LinkedService; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { + /** + * 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: LinkedServiceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type LinkedServicesBeginCreateOrUpdateResponse = LinkedService & { + /** + * 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: LinkedService; + }; +}; + +/** + * Contains response data for the beginDeleteMethod operation. + */ +export type LinkedServicesBeginDeleteMethodResponse = LinkedService & { + /** + * 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: LinkedService; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type LinkedStorageAccountsCreateOrUpdateResponse = LinkedStorageAccountsResource & { + /** + * 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: LinkedStorageAccountsResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LinkedStorageAccountsGetResponse = LinkedStorageAccountsResource & { + /** + * 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: LinkedStorageAccountsResource; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type LinkedStorageAccountsListByWorkspaceResponse = LinkedStorageAccountsListResult & { + /** + * 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: LinkedStorageAccountsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagementGroupsListResponse = WorkspaceListManagementGroupsResult & { + /** + * 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: WorkspaceListManagementGroupsResult; + }; +}; + +/** + * 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; + }; +}; + +/** + * 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; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationStatusesGetResponse = OperationStatus & { + /** + * 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: OperationStatus; + }; +}; + +/** + * Contains response data for the getSharedKeys operation. + */ +export type SharedKeysGetSharedKeysResponse = SharedKeys & { + /** + * 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: SharedKeys; + }; +}; + +/** + * Contains response data for the regenerate operation. + */ +export type SharedKeysRegenerateResponse = SharedKeys & { + /** + * 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: SharedKeys; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type UsagesListResponse = WorkspaceListUsagesResult & { + /** + * 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: WorkspaceListUsagesResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WorkspacesListResponse = WorkspaceListResult & { + /** + * 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: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { + /** + * 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: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WorkspacesCreateOrUpdateResponse = Workspace & { + /** + * 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: Workspace; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WorkspacesGetResponse = Workspace & { + /** + * 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: Workspace; + }; +}; + +/** + * Contains response data for the update operation. */ -export interface DataSourcesListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { +export type WorkspacesUpdateResponse = Workspace & { /** - * @member {string} [skiptoken] Starting point of the collection of data - * source instances. + * The underlying HTTP response. */ - skiptoken?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing OperationalInsightsManagementClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the beginCreateOrUpdate operation. */ -export interface OperationalInsightsManagementClientOptions extends AzureServiceClientOptions { +export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} - + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the LinkedServiceListResult. - * The list linked service operation response. - * - * @extends Array - */ -export interface LinkedServiceListResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing the DataSourceListResult. - * The list data source by workspace operation response. - * - * @extends Array + * Contains response data for the list operation. */ -export interface DataSourceListResult extends Array { +export type DeletedWorkspacesListResponse = WorkspaceListResult & { /** - * @member {string} [nextLink] The link (url) to the next page of - * datasources. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the WorkspaceListUsagesResult. - * The list workspace usages operation response. - * - * @extends Array - */ -export interface WorkspaceListUsagesResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing the WorkspaceListManagementGroupsResult. - * The list workspace managmement groups operation response. - * - * @extends Array + * Contains response data for the listByResourceGroup operation. */ -export interface WorkspaceListManagementGroupsResult extends Array { -} +export type DeletedWorkspacesListByResourceGroupResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the WorkspaceListResult. - * The list workspaces operation response. - * - * @extends Array - */ -export interface WorkspaceListResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result of the request to list solution operations. - * - * @extends Array + * Contains response data for the listByResourceGroup operation. */ -export interface OperationListResult extends Array { +export type ClustersListByResourceGroupResponse = ClusterListResult & { /** - * @member {string} [nextLink] 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.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for DataSourceKind. - * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', - * 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', - * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', - * 'WindowsPerformanceCounter' - * @readonly - * @enum {string} - */ -export type DataSourceKind = 'AzureActivityLog' | 'ChangeTrackingPath' | 'ChangeTrackingDefaultPath' | 'ChangeTrackingDefaultRegistry' | 'ChangeTrackingCustomRegistry' | 'CustomLog' | 'CustomLogCollection' | 'GenericDataSource' | 'IISLogs' | 'LinuxPerformanceObject' | 'LinuxPerformanceCollection' | 'LinuxSyslog' | 'LinuxSyslogCollection' | 'WindowsEvent' | 'WindowsPerformanceCounter'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterListResult; + }; +}; /** - * Defines values for SkuNameEnum. - * Possible values include: 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'Unlimited' | 'PerNode' | 'PerGB2018' | 'Standalone'; +export type ClustersListResponse = ClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for EntityStatus. - * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', - * 'ProvisioningAccount' - * @readonly - * @enum {string} - */ -export type EntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterListResult; + }; +}; /** * Contains response data for the createOrUpdate operation. */ -export type LinkedServicesCreateOrUpdateResponse = LinkedService & { +export type ClustersCreateOrUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -528,17 +2129,18 @@ export type LinkedServicesCreateOrUpdateResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedService; + parsedBody: Cluster; }; }; /** * Contains response data for the get operation. */ -export type LinkedServicesGetResponse = LinkedService & { +export type ClustersGetResponse = Cluster & { /** * The underlying HTTP response. */ @@ -547,17 +2149,18 @@ export type LinkedServicesGetResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedService; + parsedBody: Cluster; }; }; /** - * Contains response data for the listByWorkspace operation. + * Contains response data for the update operation. */ -export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { +export type ClustersUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -566,17 +2169,18 @@ export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedServiceListResult; + parsedBody: Cluster; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type DataSourcesCreateOrUpdateResponse = DataSource & { +export type ClustersBeginCreateOrUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -585,17 +2189,18 @@ export type DataSourcesCreateOrUpdateResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: Cluster; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type DataSourcesGetResponse = DataSource & { +export type ClustersListByResourceGroupNextResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -604,17 +2209,18 @@ export type DataSourcesGetResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: ClusterListResult; }; }; /** - * Contains response data for the listByWorkspace operation. + * Contains response data for the listNext operation. */ -export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { +export type ClustersListNextResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -623,17 +2229,18 @@ export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSourceListResult; + parsedBody: ClusterListResult; }; }; /** - * Contains response data for the listByWorkspaceNext operation. + * Contains response data for the createOrUpdate operation. */ -export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { +export type StorageInsightConfigsCreateOrUpdateResponse = StorageInsight & { /** * The underlying HTTP response. */ @@ -642,17 +2249,18 @@ export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSourceListResult; + parsedBody: StorageInsight; }; }; /** - * Contains response data for the listIntelligencePacks operation. + * Contains response data for the get operation. */ -export type WorkspacesListIntelligencePacksResponse = Array & { +export type StorageInsightConfigsGetResponse = StorageInsight & { /** * The underlying HTTP response. */ @@ -661,17 +2269,18 @@ export type WorkspacesListIntelligencePacksResponse = Array & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: IntelligencePack[]; + parsedBody: StorageInsight; }; }; /** - * Contains response data for the getSharedKeys operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesGetSharedKeysResponse = SharedKeys & { +export type StorageInsightConfigsListByWorkspaceResponse = StorageInsightListResult & { /** * The underlying HTTP response. */ @@ -680,17 +2289,18 @@ export type WorkspacesGetSharedKeysResponse = SharedKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SharedKeys; + parsedBody: StorageInsightListResult; }; }; /** - * Contains response data for the listUsages operation. + * Contains response data for the listByWorkspaceNext operation. */ -export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { +export type StorageInsightConfigsListByWorkspaceNextResponse = StorageInsightListResult & { /** * The underlying HTTP response. */ @@ -699,17 +2309,18 @@ export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListUsagesResult; + parsedBody: StorageInsightListResult; }; }; /** - * Contains response data for the listManagementGroups operation. + * Contains response data for the createOrUpdate operation. */ -export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGroupsResult & { +export type SavedSearchesCreateOrUpdateResponse = SavedSearch & { /** * The underlying HTTP response. */ @@ -718,17 +2329,18 @@ export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGrou * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListManagementGroupsResult; + parsedBody: SavedSearch; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { +export type SavedSearchesGetResponse = SavedSearch & { /** * The underlying HTTP response. */ @@ -737,17 +2349,18 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: SavedSearch; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesListResponse = WorkspaceListResult & { +export type SavedSearchesListByWorkspaceResponse = SavedSearchesListResult & { /** * The underlying HTTP response. */ @@ -756,17 +2369,18 @@ export type WorkspacesListResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: SavedSearchesListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesCreateOrUpdateResponse = Workspace & { +export type AvailableServiceTiersListByWorkspaceResponse = Array & { /** * The underlying HTTP response. */ @@ -775,17 +2389,18 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: AvailableServiceTier[]; }; }; /** * Contains response data for the get operation. */ -export type WorkspacesGetResponse = Workspace & { +export type SchemaGetResponse = SearchGetSchemaResponse & { /** * The underlying HTTP response. */ @@ -794,36 +2409,43 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: SearchGetSchemaResponse; }; }; /** - * Contains response data for the update operation. + * Contains response data for the purge operation. */ -export type WorkspacesUpdateResponse = Workspace & { +export type WorkspacePurgePurgeResponse = WorkspacePurgeResponse & WorkspacePurgePurgeHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: WorkspacePurgePurgeHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: WorkspacePurgeResponse; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the getPurgeStatus operation. */ -export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { +export type WorkspacePurgeGetPurgeStatusResponse = WorkspacePurgeStatusResponse & { /** * The underlying HTTP response. */ @@ -832,17 +2454,18 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: WorkspacePurgeStatusResponse; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByWorkspace operation. */ -export type OperationsListResponse = OperationListResult & { +export type TablesListByWorkspaceResponse = TablesListResult & { /** * The underlying HTTP response. */ @@ -851,17 +2474,18 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: TablesListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type TablesUpdateResponse = Table & { /** * The underlying HTTP response. */ @@ -870,9 +2494,30 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: Table; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TablesGetResponse = Table & { + /** + * 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: Table; }; }; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts new file mode 100644 index 000000000000..b387037b5598 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts @@ -0,0 +1,12 @@ +/* + * 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, + IntelligencePack +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts index 3dc8e75684e0..bcc548c5fe71 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts @@ -1,21 +1,37 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - LinkedService, + AzureEntityResource, BaseResource, CloudError, - LinkedServiceListResult, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedServiceListResult, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, Workspace, - Sku, - Resource + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts new file mode 100644 index 000000000000..4ca05a3dbc5a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsListResult, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts new file mode 100644 index 000000000000..09119a8bdfef --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts @@ -0,0 +1,13 @@ +/* + * 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, + ManagementGroup, + WorkspaceListManagementGroupsResult +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 8ecc014974bd..5fed2c074d98 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.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. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,26 +12,69 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const DataExport: msRest.CompositeMapper = { + serializedName: "DataExport", type: { name: "Composite", - className: "OperationDisplay", + className: "DataExport", modelProperties: { - provider: { - serializedName: "provider", + dataExportId: { + serializedName: "properties.dataExportId", type: { name: "String" } }, - resource: { - serializedName: "resource", + allTables: { + serializedName: "properties.allTables", + type: { + name: "Boolean" + } + }, + tableNames: { + serializedName: "properties.tableNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceId: { + required: true, + serializedName: "properties.destination.resourceId", type: { name: "String" } }, - operation: { - serializedName: "operation", + dataExportType: { + readOnly: true, + serializedName: "properties.destination.type", + type: { + name: "String" + } + }, + eventHubName: { + serializedName: "properties.destination.metaData.eventHubName", + type: { + name: "String" + } + }, + enable: { + serializedName: "properties.enable", + type: { + name: "Boolean" + } + }, + createdDate: { + serializedName: "properties.createdDate", + type: { + name: "String" + } + }, + lastModifiedDate: { + serializedName: "properties.lastModifiedDate", type: { name: "String" } @@ -42,38 +83,174 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "Operation", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const DataExportErrorResponse: msRest.CompositeMapper = { + serializedName: "DataExportErrorResponse", + type: { + name: "Composite", + className: "DataExportErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, name: { + readOnly: true, serializedName: "name", type: { name: "String" } }, - display: { - serializedName: "display", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const LinkedService: msRest.CompositeMapper = { - serializedName: "LinkedService", +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", type: { name: "Composite", - className: "LinkedService", + className: "TrackedResource", modelProperties: { - resourceId: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { required: true, - serializedName: "properties.resourceId", + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } @@ -82,12 +259,24 @@ export const LinkedService: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const DataSource: msRest.CompositeMapper = { serializedName: "DataSource", type: { name: "Composite", className: "DataSource", modelProperties: { + ...ProxyResource.type.modelProperties, properties: { required: true, serializedName: "properties", @@ -107,6 +296,17 @@ export const DataSource: msRest.CompositeMapper = { type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -156,73 +356,308 @@ export const IntelligencePack: msRest.CompositeMapper = { } }; -export const SharedKeys: msRest.CompositeMapper = { - serializedName: "SharedKeys", +export const LinkedService: msRest.CompositeMapper = { + serializedName: "LinkedService", type: { name: "Composite", - className: "SharedKeys", + className: "LinkedService", modelProperties: { - primarySharedKey: { - serializedName: "primarySharedKey", + ...ProxyResource.type.modelProperties, + resourceId: { + serializedName: "properties.resourceId", type: { name: "String" } }, - secondarySharedKey: { - serializedName: "secondarySharedKey", + writeAccessResourceId: { + serializedName: "properties.writeAccessResourceId", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } }; -export const MetricName: msRest.CompositeMapper = { - serializedName: "MetricName", +export const LinkedStorageAccountsResource: msRest.CompositeMapper = { + serializedName: "LinkedStorageAccountsResource", type: { name: "Composite", - className: "MetricName", + className: "LinkedStorageAccountsResource", modelProperties: { - value: { - serializedName: "value", + ...ProxyResource.type.modelProperties, + dataSourceType: { + readOnly: true, + serializedName: "properties.dataSourceType", type: { - name: "String" + name: "Enum", + allowedValues: [ + "CustomLogs", + "AzureWatson" + ] } }, - localizedValue: { - serializedName: "localizedValue", + storageAccountIds: { + serializedName: "properties.storageAccountIds", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const UsageMetric: msRest.CompositeMapper = { - serializedName: "UsageMetric", +export const ManagementGroup: msRest.CompositeMapper = { + serializedName: "ManagementGroup", type: { name: "Composite", - className: "UsageMetric", + className: "ManagementGroup", modelProperties: { - name: { - serializedName: "name", + serverCount: { + serializedName: "properties.serverCount", type: { - name: "Composite", - className: "MetricName" + name: "Number" } }, - unit: { - serializedName: "unit", + isGateway: { + serializedName: "properties.isGateway", type: { - name: "String" + name: "Boolean" } }, - currentValue: { - serializedName: "currentValue", + name: { + serializedName: "properties.name", type: { - name: "Number" + name: "String" + } + }, + id: { + serializedName: "properties.id", + type: { + name: "String" + } + }, + created: { + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + dataReceived: { + serializedName: "properties.dataReceived", + type: { + name: "DateTime" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const SharedKeys: msRest.CompositeMapper = { + serializedName: "SharedKeys", + type: { + name: "Composite", + className: "SharedKeys", + modelProperties: { + primarySharedKey: { + serializedName: "primarySharedKey", + type: { + name: "String" + } + }, + secondarySharedKey: { + serializedName: "secondarySharedKey", + type: { + name: "String" + } + } + } + } +}; + +export const MetricName: msRest.CompositeMapper = { + serializedName: "MetricName", + type: { + name: "Composite", + className: "MetricName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const UsageMetric: msRest.CompositeMapper = { + serializedName: "UsageMetric", + type: { + name: "Composite", + className: "UsageMetric", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "Composite", + className: "MetricName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" } }, limit: { @@ -247,56 +682,1044 @@ export const UsageMetric: msRest.CompositeMapper = { } }; -export const ManagementGroup: msRest.CompositeMapper = { - serializedName: "ManagementGroup", +export const WorkspaceSku: msRest.CompositeMapper = { + serializedName: "WorkspaceSku", type: { name: "Composite", - className: "ManagementGroup", + className: "WorkspaceSku", modelProperties: { - serverCount: { - serializedName: "properties.serverCount", + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + capacityReservationLevel: { + serializedName: "capacityReservationLevel", type: { name: "Number" } }, - isGateway: { - serializedName: "properties.isGateway", + maxCapacityReservationLevel: { + readOnly: true, + serializedName: "maxCapacityReservationLevel", type: { - name: "Boolean" + name: "Number" } }, - name: { - serializedName: "properties.name", + lastSkuUpdate: { + readOnly: true, + serializedName: "lastSkuUpdate", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceCapping: msRest.CompositeMapper = { + serializedName: "WorkspaceCapping", + type: { + name: "Composite", + className: "WorkspaceCapping", + modelProperties: { + dailyQuotaGb: { + serializedName: "dailyQuotaGb", + type: { + name: "Number" + } + }, + quotaNextResetTime: { + readOnly: true, + serializedName: "quotaNextResetTime", type: { name: "String" } }, - id: { - serializedName: "properties.id", + dataIngestionStatus: { + readOnly: true, + serializedName: "dataIngestionStatus", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopedResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkScopedResource", + type: { + name: "Composite", + className: "PrivateLinkScopedResource", + modelProperties: { + resourceId: { + serializedName: "resourceId", type: { name: "String" } }, - created: { - serializedName: "properties.created", + scopeId: { + serializedName: "scopeId", + type: { + name: "String" + } + } + } + } +}; + +export const Workspace: msRest.CompositeMapper = { + serializedName: "Workspace", + type: { + name: "Composite", + className: "Workspace", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "WorkspaceSku" + } + }, + retentionInDays: { + serializedName: "properties.retentionInDays", + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: -1 + }, + type: { + name: "Number" + } + }, + workspaceCapping: { + serializedName: "properties.workspaceCapping", + type: { + name: "Composite", + className: "WorkspaceCapping" + } + }, + publicNetworkAccessForIngestion: { + serializedName: "properties.publicNetworkAccessForIngestion", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + serializedName: "properties.publicNetworkAccessForQuery", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspacePatch: msRest.CompositeMapper = { + serializedName: "WorkspacePatch", + type: { + name: "Composite", + className: "WorkspacePatch", + modelProperties: { + ...AzureEntityResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "WorkspaceSku" + } + }, + retentionInDays: { + serializedName: "properties.retentionInDays", + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: -1 + }, + type: { + name: "Number" + } + }, + workspaceCapping: { + serializedName: "properties.workspaceCapping", + type: { + name: "Composite", + className: "WorkspaceCapping" + } + }, + publicNetworkAccessForIngestion: { + serializedName: "properties.publicNetworkAccessForIngestion", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + serializedName: "properties.publicNetworkAccessForQuery", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyVaultUri: { + serializedName: "keyVaultUri", + type: { + name: "String" + } + }, + keyName: { + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterErrorResponse: msRest.CompositeMapper = { + serializedName: "ClusterErrorResponse", + type: { + name: "Composite", + className: "ClusterErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const ClusterSku: msRest.CompositeMapper = { + serializedName: "ClusterSku", + type: { + name: "Composite", + className: "ClusterSku", + modelProperties: { + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPatch: msRest.CompositeMapper = { + serializedName: "ClusterPatch", + type: { + name: "Composite", + className: "ClusterPatch", + modelProperties: { + keyVaultProperties: { + serializedName: "properties.keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ClusterSku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "None" + ] + } + } + } + } +}; + +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ClusterSku" + } + }, + nextLink: { + serializedName: "properties.nextLink", + type: { + name: "String" + } + }, + clusterId: { + readOnly: true, + serializedName: "properties.clusterId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "properties.keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + } +}; + +export const StorageAccount: msRest.CompositeMapper = { + serializedName: "StorageAccount", + type: { + name: "Composite", + className: "StorageAccount", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + key: { + required: true, + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const StorageInsightStatus: msRest.CompositeMapper = { + serializedName: "StorageInsightStatus", + type: { + name: "Composite", + className: "StorageInsightStatus", + modelProperties: { + state: { + required: true, + serializedName: "state", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const StorageInsight: msRest.CompositeMapper = { + serializedName: "StorageInsight", + type: { + name: "Composite", + className: "StorageInsight", + modelProperties: { + ...ProxyResource.type.modelProperties, + containers: { + serializedName: "properties.containers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tables: { + serializedName: "properties.tables", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccount: { + required: true, + serializedName: "properties.storageAccount", + type: { + name: "Composite", + className: "StorageAccount" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "Composite", + className: "StorageInsightStatus" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Tag: msRest.CompositeMapper = { + serializedName: "Tag", + type: { + name: "Composite", + className: "Tag", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const SavedSearch: msRest.CompositeMapper = { + serializedName: "SavedSearch", + type: { + name: "Composite", + className: "SavedSearch", + modelProperties: { + ...ProxyResource.type.modelProperties, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + category: { + required: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + displayName: { + required: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + query: { + required: true, + serializedName: "properties.query", + type: { + name: "String" + } + }, + functionAlias: { + serializedName: "properties.functionAlias", + type: { + name: "String" + } + }, + functionParameters: { + serializedName: "properties.functionParameters", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "Number" + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Tag" + } + } + } + } + } + } +}; + +export const SavedSearchesListResult: msRest.CompositeMapper = { + serializedName: "SavedSearchesListResult", + type: { + name: "Composite", + className: "SavedSearchesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SavedSearch" + } + } + } + } + } + } +}; + +export const AvailableServiceTier: msRest.CompositeMapper = { + serializedName: "AvailableServiceTier", + type: { + name: "Composite", + className: "AvailableServiceTier", + modelProperties: { + serviceTier: { + readOnly: true, + serializedName: "serviceTier", + type: { + name: "String" + } + }, + enabled: { + readOnly: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + minimumRetention: { + readOnly: true, + serializedName: "minimumRetention", + type: { + name: "Number" + } + }, + maximumRetention: { + readOnly: true, + serializedName: "maximumRetention", + type: { + name: "Number" + } + }, + defaultRetention: { + readOnly: true, + serializedName: "defaultRetention", + type: { + name: "Number" + } + }, + capacityReservationLevel: { + readOnly: true, + serializedName: "capacityReservationLevel", + type: { + name: "Number" + } + }, + lastSkuUpdate: { + readOnly: true, + serializedName: "lastSkuUpdate", + type: { + name: "String" + } + } + } + } +}; + +export const CoreSummary: msRest.CompositeMapper = { + serializedName: "CoreSummary", + type: { + name: "Composite", + className: "CoreSummary", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + numberOfDocuments: { + required: true, + serializedName: "numberOfDocuments", + type: { + name: "Number" + } + } + } + } +}; + +export const SearchSort: msRest.CompositeMapper = { + serializedName: "SearchSort", + type: { + name: "Composite", + className: "SearchSort", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "String" + } + } + } + } +}; + +export const SearchMetadataSchema: msRest.CompositeMapper = { + serializedName: "SearchMetadataSchema", + type: { + name: "Composite", + className: "SearchMetadataSchema", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const SearchMetadata: msRest.CompositeMapper = { + serializedName: "SearchMetadata", + type: { + name: "Composite", + className: "SearchMetadata", + modelProperties: { + searchId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + resultType: { + serializedName: "resultType", + type: { + name: "String" + } + }, + total: { + serializedName: "total", + type: { + name: "Number" + } + }, + top: { + serializedName: "top", + type: { + name: "Number" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + coreSummaries: { + serializedName: "coreSummaries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CoreSummary" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + sort: { + serializedName: "sort", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SearchSort" + } + } + } + }, + requestTime: { + serializedName: "requestTime", + type: { + name: "Number" + } + }, + aggregatedValueField: { + serializedName: "aggregatedValueField", + type: { + name: "String" + } + }, + aggregatedGroupingFields: { + serializedName: "aggregatedGroupingFields", + type: { + name: "String" + } + }, + sum: { + serializedName: "sum", + type: { + name: "Number" + } + }, + max: { + serializedName: "max", + type: { + name: "Number" + } + }, + schema: { + serializedName: "schema", + type: { + name: "Composite", + className: "SearchMetadataSchema" + } + } + } + } +}; + +export const SearchSchemaValue: msRest.CompositeMapper = { + serializedName: "SearchSchemaValue", + type: { + name: "Composite", + className: "SearchSchemaValue", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + indexed: { + required: true, + serializedName: "indexed", + type: { + name: "Boolean" + } + }, + stored: { + required: true, + serializedName: "stored", + type: { + name: "Boolean" + } + }, + facet: { + required: true, + serializedName: "facet", + type: { + name: "Boolean" + } + }, + ownerType: { + serializedName: "ownerType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SearchGetSchemaResponse: msRest.CompositeMapper = { + serializedName: "SearchGetSchemaResponse", + type: { + name: "Composite", + className: "SearchGetSchemaResponse", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "SearchMetadata" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SearchSchemaValue" + } + } + } + } + } + } +}; + +export const WorkspacePurgeBodyFilters: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeBodyFilters", + type: { + name: "Composite", + className: "WorkspacePurgeBodyFilters", + modelProperties: { + column: { + serializedName: "column", type: { - name: "DateTime" + name: "String" } }, - dataReceived: { - serializedName: "properties.dataReceived", + operator: { + serializedName: "operator", type: { - name: "DateTime" + name: "String" } }, - version: { - serializedName: "properties.version", + value: { + serializedName: "value", type: { - name: "String" + name: "Object" } }, - sku: { - serializedName: "properties.sku", + key: { + serializedName: "key", type: { name: "String" } @@ -305,120 +1728,138 @@ export const ManagementGroup: msRest.CompositeMapper = { } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const WorkspacePurgeBody: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeBody", type: { name: "Composite", - className: "Sku", + className: "WorkspacePurgeBody", modelProperties: { - name: { + table: { required: true, - serializedName: "name", + serializedName: "table", type: { name: "String" } + }, + filters: { + required: true, + serializedName: "filters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspacePurgeBodyFilters" + } + } + } } } } }; -export const Workspace: msRest.CompositeMapper = { - serializedName: "Workspace", +export const WorkspacePurgeResponse: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeResponse", type: { name: "Composite", - className: "Workspace", + className: "WorkspacePurgeResponse", modelProperties: { - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - source: { - serializedName: "properties.source", - type: { - name: "String" - } - }, - customerId: { - serializedName: "properties.customerId", + operationId: { + required: true, + serializedName: "operationId", type: { name: "String" } - }, - portalUrl: { - serializedName: "properties.portalUrl", + } + } + } +}; + +export const WorkspacePurgeStatusResponse: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeStatusResponse", + type: { + name: "Composite", + className: "WorkspacePurgeStatusResponse", + modelProperties: { + status: { + required: true, + serializedName: "status", type: { name: "String" } - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "Sku" - } - }, + } + } + } +}; + +export const Table: msRest.CompositeMapper = { + serializedName: "Table", + type: { + name: "Composite", + className: "Table", + modelProperties: { + ...ProxyResource.type.modelProperties, retentionInDays: { serializedName: "properties.retentionInDays", constraints: { InclusiveMaximum: 730, - InclusiveMinimum: -1 + InclusiveMinimum: 30 }, type: { name: "Number" } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const ErrorContract: msRest.CompositeMapper = { + serializedName: "ErrorContract", type: { name: "Composite", - className: "Resource", + className: "ErrorContract", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorResponse" } - }, - location: { - serializedName: "location", + } + } + } +}; + +export const WorkspacePurgePurgeHeaders: msRest.CompositeMapper = { + serializedName: "workspacepurge-purge-headers", + type: { + name: "Composite", + className: "WorkspacePurgePurgeHeaders", + modelProperties: { + xMsStatusLocation: { + serializedName: "x-ms-status-location", type: { name: "String" } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const DataExportListResult: msRest.CompositeMapper = { + serializedName: "DataExportListResult", + type: { + name: "Composite", + className: "DataExportListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "DataExport" } } } @@ -427,40 +1868,70 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const DataSourceListResult: msRest.CompositeMapper = { + serializedName: "DataSourceListResult", type: { name: "Composite", - className: "ProxyResource", + className: "DataSourceListResult", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataSource" + } + } } }, - name: { - readOnly: true, - serializedName: "name", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const LinkedServiceListResult: msRest.CompositeMapper = { + serializedName: "LinkedServiceListResult", + type: { + name: "Composite", + className: "LinkedServiceListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkedService" + } + } } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const LinkedStorageAccountsListResult: msRest.CompositeMapper = { + serializedName: "LinkedStorageAccountsListResult", + type: { + name: "Composite", + className: "LinkedStorageAccountsListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "LinkedStorageAccountsResource" } } } @@ -469,11 +1940,11 @@ export const ProxyResource: msRest.CompositeMapper = { } }; -export const LinkedServiceListResult: msRest.CompositeMapper = { - serializedName: "LinkedServiceListResult", +export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { + serializedName: "WorkspaceListManagementGroupsResult", type: { name: "Composite", - className: "LinkedServiceListResult", + className: "WorkspaceListManagementGroupsResult", modelProperties: { value: { serializedName: "", @@ -482,7 +1953,7 @@ export const LinkedServiceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "LinkedService" + className: "ManagementGroup" } } } @@ -491,11 +1962,11 @@ export const LinkedServiceListResult: msRest.CompositeMapper = { } }; -export const DataSourceListResult: msRest.CompositeMapper = { - serializedName: "DataSourceListResult", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "DataSourceListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "", @@ -504,12 +1975,13 @@ export const DataSourceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "DataSource" + className: "Operation" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -541,11 +2013,11 @@ export const WorkspaceListUsagesResult: msRest.CompositeMapper = { } }; -export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { - serializedName: "WorkspaceListManagementGroupsResult", +export const WorkspaceListResult: msRest.CompositeMapper = { + serializedName: "WorkspaceListResult", type: { name: "Composite", - className: "WorkspaceListManagementGroupsResult", + className: "WorkspaceListResult", modelProperties: { value: { serializedName: "", @@ -554,7 +2026,7 @@ export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ManagementGroup" + className: "Workspace" } } } @@ -563,12 +2035,18 @@ export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { } }; -export const WorkspaceListResult: msRest.CompositeMapper = { - serializedName: "WorkspaceListResult", +export const ClusterListResult: msRest.CompositeMapper = { + serializedName: "ClusterListResult", type: { name: "Composite", - className: "WorkspaceListResult", + className: "ClusterListResult", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "", type: { @@ -576,7 +2054,7 @@ export const WorkspaceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Workspace" + className: "Cluster" } } } @@ -585,11 +2063,11 @@ export const WorkspaceListResult: msRest.CompositeMapper = { } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const StorageInsightListResult: msRest.CompositeMapper = { + serializedName: "StorageInsightListResult", type: { name: "Composite", - className: "OperationListResult", + className: "StorageInsightListResult", modelProperties: { value: { serializedName: "", @@ -598,14 +2076,13 @@ export const OperationListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "StorageInsight" } } } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + odataNextLink: { + serializedName: "@odata\\.nextLink", type: { name: "String" } @@ -613,3 +2090,25 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const TablesListResult: msRest.CompositeMapper = { + serializedName: "TablesListResult", + type: { + name: "Composite", + className: "TablesListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Table" + } + } + } + } + } + } +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts new file mode 100644 index 000000000000..6661f04509dc --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts @@ -0,0 +1,14 @@ +/* + * 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, + ErrorAdditionalInfo, + ErrorResponse, + OperationStatus +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts index b0f08de703a7..200a64a58ac4 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -25,6 +25,69 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const asyncOperationId: msRest.OperationURLParameter = { + parameterPath: "asyncOperationId", + mapper: { + required: true, + serializedName: "asyncOperationId", + type: { + name: "String" + } + } +}; +export const clusterName0: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + constraints: { + MaxLength: 63, + MinLength: 4, + Pattern: /^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$/ + }, + type: { + name: "String" + } + } +}; +export const clusterName1: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + type: { + name: "String" + } + } +}; +export const dataExportName0: msRest.OperationURLParameter = { + parameterPath: "dataExportName", + mapper: { + required: true, + serializedName: "dataExportName", + constraints: { + MaxLength: 63, + MinLength: 4, + Pattern: /^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$/ + }, + type: { + name: "String" + } + } +}; +export const dataExportName1: msRest.OperationURLParameter = { + parameterPath: "dataExportName", + mapper: { + required: true, + serializedName: "dataExportName", type: { name: "String" } @@ -40,6 +103,20 @@ export const dataSourceName: msRest.OperationURLParameter = { } } }; +export const dataSourceType: msRest.OperationURLParameter = { + parameterPath: "dataSourceType", + mapper: { + required: true, + serializedName: "dataSourceType", + type: { + name: "Enum", + allowedValues: [ + "CustomLogs", + "AzureWatson" + ] + } + } +}; export const filter: msRest.OperationQueryParameter = { parameterPath: "filter", mapper: { @@ -50,6 +127,28 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const force: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "force" + ], + mapper: { + serializedName: "force", + type: { + name: "Boolean" + } + } +}; +export const gatewayId: msRest.OperationURLParameter = { + parameterPath: "gatewayId", + mapper: { + required: true, + serializedName: "gatewayId", + type: { + name: "String" + } + } +}; export const intelligencePackName: msRest.OperationURLParameter = { parameterPath: "intelligencePackName", mapper: { @@ -70,6 +169,16 @@ export const linkedServiceName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -81,7 +190,17 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const resourceGroupName0: msRest.OperationURLParameter = { +export const purgeId: msRest.OperationURLParameter = { + parameterPath: "purgeId", + mapper: { + required: true, + serializedName: "purgeId", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, @@ -96,11 +215,11 @@ export const resourceGroupName0: msRest.OperationURLParameter = { } } }; -export const resourceGroupName1: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const savedSearchId: msRest.OperationURLParameter = { + parameterPath: "savedSearchId", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "savedSearchId", type: { name: "String" } @@ -118,27 +237,40 @@ export const skiptoken: msRest.OperationQueryParameter = { } } }; +export const storageInsightName: msRest.OperationURLParameter = { + parameterPath: "storageInsightName", + mapper: { + required: true, + serializedName: "storageInsightName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } } }; -export const workspaceName0: msRest.OperationURLParameter = { - parameterPath: "workspaceName", +export const tableName: msRest.OperationURLParameter = { + parameterPath: "tableName", mapper: { required: true, - serializedName: "workspaceName", + serializedName: "tableName", type: { name: "String" } } }; -export const workspaceName1: msRest.OperationURLParameter = { +export const workspaceName: msRest.OperationURLParameter = { parameterPath: "workspaceName", mapper: { required: true, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts new file mode 100644 index 000000000000..107b1645ab22 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + SavedSearchesListResult, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts new file mode 100644 index 000000000000..8ce5a9ebcf29 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts @@ -0,0 +1,17 @@ +/* + * 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, + CoreSummary, + SearchGetSchemaResponse, + SearchMetadata, + SearchMetadataSchema, + SearchSchemaValue, + SearchSort +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts new file mode 100644 index 000000000000..91053133130d --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts @@ -0,0 +1,12 @@ +/* + * 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, + SharedKeys +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts new file mode 100644 index 000000000000..b2cba896f2c6 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightListResult, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/tablesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/tablesMappers.ts new file mode 100644 index 000000000000..af15d0168782 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/tablesMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + ErrorAdditionalInfo, + ErrorContract, + ErrorResponse, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + TablesListResult, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts new file mode 100644 index 000000000000..2c5ce37aa312 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts @@ -0,0 +1,14 @@ +/* + * 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, + MetricName, + UsageMetric, + WorkspaceListUsagesResult +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts new file mode 100644 index 000000000000..4a438d48eb3e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts @@ -0,0 +1,16 @@ +/* + * 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, + WorkspacePurgeBody, + WorkspacePurgeBodyFilters, + WorkspacePurgePurgeHeaders, + WorkspacePurgeResponse, + WorkspacePurgeStatusResponse +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts index 1d18205a1490..f235c793e581 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts @@ -1,28 +1,37 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CloudError, - IntelligencePack, - SharedKeys, - WorkspaceListUsagesResult, - UsageMetric, - MetricName, - WorkspaceListManagementGroupsResult, - ManagementGroup, - WorkspaceListResult, - Workspace, + AzureEntityResource, BaseResource, - Sku, - LinkedService, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, DataSource, - Resource + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Table, + Tag, + TrackedResource, + Workspace, + WorkspaceCapping, + WorkspaceListResult, + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index b06840df7055..e76361aef2f5 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -17,24 +17,55 @@ import { OperationalInsightsManagementClientContext } from "./operationalInsight class OperationalInsightsManagementClient extends OperationalInsightsManagementClientContext { // Operation groups - linkedServices: operations.LinkedServices; + dataExports: operations.DataExports; dataSources: operations.DataSources; - workspaces: operations.Workspaces; + intelligencePacks: operations.IntelligencePacks; + linkedServices: operations.LinkedServices; + linkedStorageAccounts: operations.LinkedStorageAccounts; + managementGroups: operations.ManagementGroups; operations: operations.Operations; + operationStatuses: operations.OperationStatuses; + sharedKeys: operations.SharedKeysOperations; + usages: operations.Usages; + workspaces: operations.Workspaces; + deletedWorkspaces: operations.DeletedWorkspaces; + clusters: operations.Clusters; + storageInsightConfigs: operations.StorageInsightConfigs; + savedSearches: operations.SavedSearches; + availableServiceTiers: operations.AvailableServiceTiers; + gateways: operations.Gateways; + schema: operations.Schema; + workspacePurge: operations.WorkspacePurge; + tables: operations.Tables; /** * Initializes a new instance of the OperationalInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { super(credentials, subscriptionId, options); - this.linkedServices = new operations.LinkedServices(this); + this.dataExports = new operations.DataExports(this); this.dataSources = new operations.DataSources(this); - this.workspaces = new operations.Workspaces(this); + this.intelligencePacks = new operations.IntelligencePacks(this); + this.linkedServices = new operations.LinkedServices(this); + this.linkedStorageAccounts = new operations.LinkedStorageAccounts(this); + this.managementGroups = new operations.ManagementGroups(this); this.operations = new operations.Operations(this); + this.operationStatuses = new operations.OperationStatuses(this); + this.sharedKeys = new operations.SharedKeysOperations(this); + this.usages = new operations.Usages(this); + this.workspaces = new operations.Workspaces(this); + this.deletedWorkspaces = new operations.DeletedWorkspaces(this); + this.clusters = new operations.Clusters(this); + this.storageInsightConfigs = new operations.StorageInsightConfigs(this); + this.savedSearches = new operations.SavedSearches(this); + this.availableServiceTiers = new operations.AvailableServiceTiers(this); + this.gateways = new operations.Gateways(this); + this.schema = new operations.Schema(this); + this.workspacePurge = new operations.WorkspacePurge(this); + this.tables = new operations.Tables(this); } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts index b7e62e1ece9f..891ad39f05bc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts @@ -13,18 +13,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-operationalinsights"; -const packageVersion = "0.1.0"; +const packageVersion = "2.0.0"; export class OperationalInsightsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the OperationalInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { @@ -38,14 +37,14 @@ export class OperationalInsightsManagementClientContext extends msRestAzure.Azur if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2015-11-01-preview'; + this.apiVersion = '2020-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -53,10 +52,10 @@ export class OperationalInsightsManagementClientContext extends msRestAzure.Azur this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts new file mode 100644 index 000000000000..23a08add5e5e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts @@ -0,0 +1,98 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/availableServiceTiersMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a AvailableServiceTiers. */ +export class AvailableServiceTiers { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a AvailableServiceTiers. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the available service tiers for the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableServiceTier" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts new file mode 100644 index 000000000000..3f6acfafae5b --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts @@ -0,0 +1,476 @@ +/* + * 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. + */ + +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/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Clusters. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets Log Analytics clusters in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets the Log Analytics clusters in a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Create or update a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,clusterName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a Log Analytics cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Create or update a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets Log Analytics clusters 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the Log Analytics clusters in a 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 + */ + 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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.clusterName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ClusterPatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.clusterName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.clusterName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts new file mode 100644 index 000000000000..e12a5d11fbe9 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts @@ -0,0 +1,284 @@ +/* + * 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. + */ + +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/dataExportsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a DataExports. */ +export class DataExports { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a DataExports. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Lists the data export instances within a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Create or update a data export. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,dataExportName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a data export instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataExportName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified data export in a given workspace.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataExportName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Create or update a data export. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + dataExportName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataExportListResult + }, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataExport + }, + 404: {}, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 404: {}, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataExport, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataExport + }, + 201: { + bodyMapper: Mappers.DataExport + }, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts index 2ec14ba4b4c3..20305162d14e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts @@ -28,8 +28,8 @@ export class DataSources { /** * Create or update a data source. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param [options] The optional parameters @@ -37,16 +37,16 @@ export class DataSources { */ createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceName: string, parameters: Models.DataSource, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param callback The callback */ createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceName: string, parameters: Models.DataSource, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param options The optional parameters @@ -68,23 +68,23 @@ export class DataSources { /** * Deletes a data source instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param callback The callback */ deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param options The optional parameters * @param callback The callback @@ -104,23 +104,23 @@ export class DataSources { /** * Gets a datasource instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, dataSourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param options The optional parameters * @param callback The callback @@ -140,23 +140,23 @@ export class DataSources { /** * Gets the first page of data source instances in a workspace with the link to the next page. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param [options] The optional parameters * @returns Promise */ listByWorkspace(resourceGroupName: string, workspaceName: string, filter: string, options?: Models.DataSourcesListByWorkspaceOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param callback The callback */ listByWorkspace(resourceGroupName: string, workspaceName: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param options The optional parameters * @param callback The callback @@ -209,8 +209,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -245,8 +245,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -270,8 +270,8 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -296,8 +296,8 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts new file mode 100644 index 000000000000..b6dff36141d2 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts @@ -0,0 +1,129 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/deletedWorkspacesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a DeletedWorkspaces. */ +export class DeletedWorkspaces { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a DeletedWorkspaces. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/deletedWorkspaces", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts new file mode 100644 index 000000000000..e47561515ea9 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts @@ -0,0 +1,89 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Mappers from "../models/gatewaysMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Gateways. */ +export class Gateways { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Gateways. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Delete a Log Analytics gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + gatewayId, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.gatewayId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts index bcfdc7b26a31..b893fbaf2583 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts @@ -8,7 +8,23 @@ * regenerated. */ -export * from "./linkedServices"; +export * from "./dataExports"; export * from "./dataSources"; -export * from "./workspaces"; +export * from "./intelligencePacks"; +export * from "./linkedServices"; +export * from "./linkedStorageAccounts"; +export * from "./managementGroups"; export * from "./operations"; +export * from "./operationStatuses"; +export * from "./sharedKeysOperations"; +export * from "./usages"; +export * from "./workspaces"; +export * from "./deletedWorkspaces"; +export * from "./clusters"; +export * from "./storageInsightConfigs"; +export * from "./savedSearches"; +export * from "./availableServiceTiers"; +export * from "./gateways"; +export * from "./schema"; +export * from "./workspacePurge"; +export * from "./tables"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts new file mode 100644 index 000000000000..be569798e782 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts @@ -0,0 +1,219 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/intelligencePacksMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a IntelligencePacks. */ +export class IntelligencePacks { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a IntelligencePacks. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Disables an intelligence pack for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param [options] The optional parameters + * @returns Promise + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param callback The callback + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param options The optional parameters + * @param callback The callback + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + intelligencePackName, + options + }, + disableOperationSpec, + callback); + } + + /** + * Enables an intelligence pack for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param [options] The optional parameters + * @returns Promise + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param callback The callback + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param options The optional parameters + * @param callback The callback + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + intelligencePackName, + options + }, + enableOperationSpec, + callback); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const disableOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.intelligencePackName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.intelligencePackName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IntelligencePack" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts index 4aba88b32c2d..b83b0ae15593 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts @@ -9,6 +9,7 @@ */ 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/linkedServicesMappers"; import * as Parameters from "../models/parameters"; @@ -28,108 +29,50 @@ export class LinkedServices { /** * Create or update a linked service. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linkedServices resource * @param parameters The parameters required to create or update a linked service. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource - * @param linkedServiceName Name of the linkedServices resource - * @param parameters The parameters required to create or update a linked service. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource - * @param linkedServiceName Name of the linkedServices resource - * @param parameters The parameters required to create or update a linked service. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - linkedServiceName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,linkedServiceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Deletes a linked service instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource - * @param linkedServiceName Name of the linked service. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource - * @param linkedServiceName Name of the linked service. - * @param options The optional parameters - * @param callback The callback + * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - linkedServiceName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,linkedServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Gets a linked service instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param options The optional parameters * @param callback The callback @@ -149,21 +92,21 @@ export class LinkedServices { /** * Gets the linked services instances in a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param callback The callback */ listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ @@ -178,16 +121,58 @@ export class LinkedServices { listByWorkspaceOperationSpec, callback) as Promise; } + + /** + * Create or update a linked service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + linkedServiceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a linked service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + linkedServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.linkedServiceName, Parameters.subscriptionId ], @@ -197,20 +182,10 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LinkedService, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.LinkedService }, - 201: { - bodyMapper: Mappers.LinkedService - }, default: { bodyMapper: Mappers.CloudError } @@ -218,13 +193,12 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.linkedServiceName, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -234,8 +208,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.LinkedServiceListResult + }, default: { bodyMapper: Mappers.CloudError } @@ -243,12 +218,12 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.linkedServiceName, Parameters.subscriptionId ], @@ -258,10 +233,20 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LinkedService, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.LinkedService }, + 201: { + bodyMapper: Mappers.LinkedService + }, default: { bodyMapper: Mappers.CloudError } @@ -269,12 +254,13 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listByWorkspaceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.linkedServiceName, Parameters.subscriptionId ], queryParameters: [ @@ -285,8 +271,9 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.LinkedServiceListResult + bodyMapper: Mappers.LinkedService }, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts new file mode 100644 index 000000000000..0c3a6e5e4332 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts @@ -0,0 +1,295 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/linkedStorageAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a LinkedStorageAccounts. */ +export class LinkedStorageAccounts { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a LinkedStorageAccounts. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a + * specific data source type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will + * be sorted by their data source type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LinkedStorageAccountsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts new file mode 100644 index 000000000000..ed62f7d12d9e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managementGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a ManagementGroups. */ +export class ManagementGroups { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a ManagementGroups. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of management groups connected to a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListManagementGroupsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts new file mode 100644 index 000000000000..72d394a84c97 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationStatusesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a OperationStatuses. */ +export class OperationStatuses { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a OperationStatuses. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Get the status of a long running azure asynchronous operation. + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param callback The callback + */ + get(location: string, asyncOperationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, asyncOperationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + asyncOperationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}", + urlParameters: [ + Parameters.location, + Parameters.asyncOperationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts new file mode 100644 index 000000000000..fbb704069419 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts @@ -0,0 +1,282 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/savedSearchesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a SavedSearches. */ +export class SavedSearches { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a SavedSearches. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Deletes the specified saved search in a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Creates or updates a saved search for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified saved search for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the saved searches for a given Log Analytics Workspace + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SavedSearch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SavedSearch + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SavedSearch + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SavedSearchesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts new file mode 100644 index 000000000000..b2e3fba87525 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/schemaMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Schema. */ +export class Schema { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Schema. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the schema for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SearchGetSchemaResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts new file mode 100644 index 000000000000..4aa5882712df --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts @@ -0,0 +1,145 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sharedKeysOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a SharedKeysOperations. */ +export class SharedKeysOperations { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a SharedKeysOperations. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the shared keys for a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + getSharedKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect + * Microsoft Operational Insights agents to the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + regenerate(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + regenerate(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + regenerate(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerate(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + regenerateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getSharedKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const regenerateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts new file mode 100644 index 000000000000..57e41f9aa542 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts @@ -0,0 +1,335 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/storageInsightConfigsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a StorageInsightConfigs. */ +export class StorageInsightConfigs { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a StorageInsightConfigs. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Create or update a storage insight. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a storage insight instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a storageInsightsConfigs resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the storage insight instances within a workspace + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Lists the storage insight instances within a workspace + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(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 + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StorageInsight, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StorageInsight + }, + 201: { + bodyMapper: Mappers.StorageInsight + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsight + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsightListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsightListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts new file mode 100644 index 000000000000..7c4d811ab624 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts @@ -0,0 +1,222 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/tablesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Tables. */ +export class Tables { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Tables. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets all the tables for the specified Log Analytics workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Updates a Log Analytics workspace table properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Models.Table, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param callback The callback + */ + update(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Models.Table, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Models.Table, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Models.Table, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + tableName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + tableName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TablesListResult + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Table, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts new file mode 100644 index 000000000000..6e9f23fec48a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/usagesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Usages. */ +export class Usages { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Usages. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of usage metrics for a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListUsagesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts new file mode 100644 index 000000000000..7d0f2a9ecce8 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts @@ -0,0 +1,173 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/workspacePurgeMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a WorkspacePurge. */ +export class WorkspacePurge { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a WorkspacePurge. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You + * should batch the execution of purge requests by sending a single command whose predicate + * includes all user identities that require purging. Use the in operator to specify multiple + * identities. You should run the query prior to using for a purge request to verify that the + * results are expected. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param [options] The optional parameters + * @returns Promise + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param callback The callback + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param options The optional parameters + * @param callback The callback + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + body, + options + }, + purgeOperationSpec, + callback) as Promise; + } + + /** + * Gets status of an ongoing purge operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param [options] The optional parameters + * @returns Promise + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param callback The callback + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param options The optional parameters + * @param callback The callback + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + purgeId, + options + }, + getPurgeStatusOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const purgeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.WorkspacePurgeBody, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.WorkspacePurgeResponse, + headersMapper: Mappers.WorkspacePurgePurgeHeaders + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getPurgeStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.workspaceName, + Parameters.purgeId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspacePurgeStatusResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts index e06fc4746ca9..a9e4f24092e0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts @@ -28,220 +28,43 @@ export class Workspaces { } /** - * Disables an intelligence pack for a given workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param [options] The optional parameters - * @returns Promise - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param callback The callback - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param options The optional parameters - * @param callback The callback - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - intelligencePackName, - options - }, - disableIntelligencePackOperationSpec, - callback); - } - - /** - * Enables an intelligence pack for a given workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param [options] The optional parameters - * @returns Promise - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param callback The callback - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param options The optional parameters - * @param callback The callback - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - intelligencePackName, - options - }, - enableIntelligencePackOperationSpec, - callback); - } - - /** - * Lists all the intelligence packs possible and whether they are enabled or disabled for a given - * workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param [options] The optional parameters - * @returns Promise - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - listIntelligencePacksOperationSpec, - callback) as Promise; - } - - /** - * Gets the shared keys for a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param [options] The optional parameters - * @returns Promise - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - getSharedKeysOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of usage metrics for a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param [options] The optional parameters - * @returns Promise - */ - listUsages(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param callback The callback - */ - listUsages(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param options The optional parameters - * @param callback The callback - */ - listUsages(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listUsages(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - listUsagesOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of management groups connected to a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. + * Gets the workspaces in a subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listManagementGroups(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. * @param callback The callback */ - listManagementGroups(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ - listManagementGroups(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listManagementGroups(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, - workspaceName, options }, - listManagementGroupsOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; } /** * Gets workspaces in a resource group. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -256,33 +79,9 @@ export class Workspaces { callback) as Promise; } - /** - * Gets the workspaces in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - 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 - }, - listOperationSpec, - callback) as Promise; - } - /** * Create or update a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to create or update a workspace. * @param [options] The optional parameters @@ -294,54 +93,37 @@ export class Workspaces { } /** - * Deletes a workspace instance. - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in + * the same subscription, resource group and location. The name is kept for 14 days and cannot be + * used for another workspace. To remove the workspace completely and release the name, use the + * force flag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, options?: Models.WorkspacesDeleteMethodOptionalParams): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Gets a workspace instance. - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ @@ -359,29 +141,29 @@ export class Workspaces { /** * Updates a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param callback The callback */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -395,7 +177,7 @@ export class Workspaces { /** * Create or update a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to create or update a workspace. * @param [options] The optional parameters @@ -412,150 +194,35 @@ export class Workspaces { beginCreateOrUpdateOperationSpec, options); } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in + * the same subscription, resource group and location. The name is kept for 14 days and cannot be + * used for another workspace. To remove the workspace completely and release the name, use the + * force flag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, options?: Models.WorkspacesBeginDeleteMethodOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const disableIntelligencePackOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.intelligencePackName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const enableIntelligencePackOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.intelligencePackName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listIntelligencePacksOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntelligencePack" - } - } - } - } - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getSharedKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SharedKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listUsagesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.WorkspaceListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listManagementGroupsOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, Parameters.subscriptionId ], queryParameters: [ @@ -566,7 +233,7 @@ const listManagementGroupsOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.WorkspaceListManagementGroupsResult + bodyMapper: Mappers.WorkspaceListResult }, default: { bodyMapper: Mappers.CloudError @@ -579,7 +246,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces", urlParameters: [ - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ @@ -599,10 +266,12 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -613,7 +282,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.WorkspaceListResult + bodyMapper: Mappers.Workspace }, default: { bodyMapper: Mappers.CloudError @@ -622,12 +291,12 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -636,30 +305,13 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WorkspacePatch, + required: true } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", - urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.Workspace @@ -671,12 +323,12 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName1, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -696,6 +348,10 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, + 201: { + bodyMapper: Mappers.Workspace + }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -703,34 +359,25 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName1, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.force ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Workspace, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.Workspace - }, - 201: { - bodyMapper: Mappers.Workspace - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json +++ b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/operationalinsights/ci.yml b/sdk/operationalinsights/ci.yml deleted file mode 100644 index 6132d63b27cd..000000000000 --- a/sdk/operationalinsights/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/operationalinsights/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/operationalinsights/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: operationalinsights - Artifacts: - - name: azure-loganalytics - safeName: azureloganalytics diff --git a/sdk/redis/arm-rediscache/LICENSE.txt b/sdk/redis/arm-rediscache/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/redis/arm-rediscache/LICENSE.txt +++ b/sdk/redis/arm-rediscache/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/redis/arm-rediscache/README.md b/sdk/redis/arm-rediscache/README.md index a8ca56405c75..9fd3b180eb27 100644 --- a/sdk/redis/arm-rediscache/README.md +++ b/sdk/redis/arm-rediscache/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-rediscache ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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) diff --git a/sdk/redis/arm-rediscache/package.json b/sdk/redis/arm-rediscache/package.json index 10c020bce840..5f56a181672c 100644 --- a/sdk/redis/arm-rediscache/package.json +++ b/sdk/redis/arm-rediscache/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-rediscache", "author": "Microsoft Corporation", "description": "RedisManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.0.1", + "version": "4.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.1", - "@azure/ms-rest-js": "^1.2.6", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/redisManagementClient.js", "types": "./esm/redisManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/redis/arm-rediscache", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/redis/arm-rediscache", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/redis/arm-rediscache/rollup.config.js b/sdk/redis/arm-rediscache/rollup.config.js index c1601cdebdd9..8d2642be4eba 100644 --- a/sdk/redis/arm-rediscache/rollup.config.js +++ b/sdk/redis/arm-rediscache/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts b/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts index 5a4867d02467..cf356274183a 100644 --- a/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts @@ -14,6 +14,7 @@ export { RedisFirewallRule, RedisFirewallRuleCreateParameters, RedisFirewallRuleListResult, + RedisInstanceDetails, RedisLinkedServer, RedisLinkedServerWithProperties, RedisPatchSchedule, diff --git a/sdk/redis/arm-rediscache/src/models/index.ts b/sdk/redis/arm-rediscache/src/models/index.ts index 862426991df8..b61bfc6cd69f 100644 --- a/sdk/redis/arm-rediscache/src/models/index.ts +++ b/sdk/redis/arm-rediscache/src/models/index.ts @@ -59,6 +59,38 @@ export interface RedisLinkedServer { readonly id?: string; } +/** + * Details of single instance of redis. + */ +export interface RedisInstanceDetails { + /** + * Redis instance SSL port. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sslPort?: number; + /** + * 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.** + */ + readonly nonSslPort?: number; + /** + * 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.** + */ + readonly zone?: 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.** + */ + readonly shardId?: number; + /** + * Specifies whether the instance is a master node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMaster?: boolean; +} + /** * The Resource definition. */ @@ -115,6 +147,10 @@ export interface RedisCreateParameters { * Specifies whether the non-ssl Redis server port (6379) is enabled. */ enableNonSslPort?: boolean; + /** + * The number of replicas to be created per master. + */ + replicasPerMaster?: number; /** * A dictionary of tenant settings */ @@ -171,6 +207,10 @@ export interface RedisUpdateParameters { * Specifies whether the non-ssl Redis server port (6379) is enabled. */ enableNonSslPort?: boolean; + /** + * The number of replicas to be created per master. + */ + replicasPerMaster?: number; /** * A dictionary of tenant settings */ @@ -251,6 +291,10 @@ export interface RedisResource extends TrackedResource { * Specifies whether the non-ssl Redis server port (6379) is enabled. */ enableNonSslPort?: boolean; + /** + * The number of replicas to be created per master. + */ + replicasPerMaster?: number; /** * A dictionary of tenant settings */ @@ -317,6 +361,11 @@ export interface RedisResource extends TrackedResource { * **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. */ @@ -341,11 +390,15 @@ export interface RedisRebootParameters { * Which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values * include: 'PrimaryNode', 'SecondaryNode', 'AllNodes' */ - rebootType: RebootType; + rebootType?: RebootType; /** * 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. + */ + ports?: number[]; } /** diff --git a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts b/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts index 33b9d969addd..8c4b9cc9739d 100644 --- a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts @@ -12,6 +12,7 @@ export { ProxyResource, RedisAccessKeys, RedisFirewallRule, + RedisInstanceDetails, RedisLinkedServer, RedisLinkedServerCreateParameters, RedisLinkedServerWithProperties, diff --git a/sdk/redis/arm-rediscache/src/models/mappers.ts b/sdk/redis/arm-rediscache/src/models/mappers.ts index 788facd33ad9..07812bd8021c 100644 --- a/sdk/redis/arm-rediscache/src/models/mappers.ts +++ b/sdk/redis/arm-rediscache/src/models/mappers.ts @@ -84,6 +84,51 @@ export const RedisLinkedServer: msRest.CompositeMapper = { } }; +export const RedisInstanceDetails: msRest.CompositeMapper = { + serializedName: "RedisInstanceDetails", + type: { + name: "Composite", + className: "RedisInstanceDetails", + modelProperties: { + sslPort: { + readOnly: true, + serializedName: "sslPort", + type: { + name: "Number" + } + }, + nonSslPort: { + readOnly: true, + serializedName: "nonSslPort", + type: { + name: "Number" + } + }, + zone: { + readOnly: true, + serializedName: "zone", + type: { + name: "String" + } + }, + shardId: { + readOnly: true, + serializedName: "shardId", + type: { + name: "Number" + } + }, + isMaster: { + readOnly: true, + serializedName: "isMaster", + type: { + name: "Boolean" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -178,6 +223,12 @@ export const RedisCreateParameters: msRest.CompositeMapper = { name: "Boolean" } }, + replicasPerMaster: { + serializedName: "properties.replicasPerMaster", + type: { + name: "Number" + } + }, tenantSettings: { serializedName: "properties.tenantSettings", type: { @@ -283,6 +334,12 @@ export const RedisUpdateParameters: msRest.CompositeMapper = { name: "Boolean" } }, + replicasPerMaster: { + serializedName: "properties.replicasPerMaster", + type: { + name: "Number" + } + }, tenantSettings: { serializedName: "properties.tenantSettings", type: { @@ -425,6 +482,12 @@ export const RedisResource: msRest.CompositeMapper = { name: "Boolean" } }, + replicasPerMaster: { + serializedName: "properties.replicasPerMaster", + type: { + name: "Number" + } + }, tenantSettings: { serializedName: "properties.tenantSettings", type: { @@ -530,6 +593,19 @@ export const RedisResource: msRest.CompositeMapper = { } } }, + instances: { + readOnly: true, + serializedName: "properties.instances", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RedisInstanceDetails" + } + } + } + }, zones: { serializedName: "zones", type: { @@ -573,7 +649,6 @@ export const RedisRebootParameters: msRest.CompositeMapper = { className: "RedisRebootParameters", modelProperties: { rebootType: { - required: true, serializedName: "rebootType", type: { name: "String" @@ -584,6 +659,17 @@ export const RedisRebootParameters: msRest.CompositeMapper = { type: { name: "Number" } + }, + ports: { + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } } } } diff --git a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts b/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts index 8674e556397f..3f414b53ae84 100644 --- a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts @@ -12,6 +12,7 @@ export { ProxyResource, RedisAccessKeys, RedisFirewallRule, + RedisInstanceDetails, RedisLinkedServer, RedisLinkedServerWithProperties, RedisPatchSchedule, diff --git a/sdk/redis/arm-rediscache/src/models/redisMappers.ts b/sdk/redis/arm-rediscache/src/models/redisMappers.ts index 0ae784ef7db5..597dbcc9fdc7 100644 --- a/sdk/redis/arm-rediscache/src/models/redisMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/redisMappers.ts @@ -18,6 +18,7 @@ export { RedisCreateParameters, RedisFirewallRule, RedisForceRebootResponse, + RedisInstanceDetails, RedisLinkedServer, RedisLinkedServerWithProperties, RedisListResult, diff --git a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts index 14274b443822..286d06abeb1f 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-rediscache"; -const packageVersion = "3.0.1"; +const packageVersion = "4.0.0"; export class RedisManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -45,7 +45,7 @@ export class RedisManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2018-03-01'; + this.apiVersion = '2019-07-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/redis/arm-rediscache/tsconfig.json b/sdk/redis/arm-rediscache/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/redis/arm-rediscache/tsconfig.json +++ b/sdk/redis/arm-rediscache/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/resources/arm-resources/LICENSE.txt b/sdk/resources/arm-resources/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/resources/arm-resources/LICENSE.txt +++ b/sdk/resources/arm-resources/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/resources/arm-resources/README.md b/sdk/resources/arm-resources/README.md index bcf213c43571..3db118a758f7 100644 --- a/sdk/resources/arm-resources/README.md +++ b/sdk/resources/arm-resources/README.md @@ -96,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fresources%2Farm-resources%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/resources/arm-resources/README.png) diff --git a/sdk/resources/arm-resources/package.json b/sdk/resources/arm-resources/package.json index a12ba653261e..44908a9f405c 100644 --- a/sdk/resources/arm-resources/package.json +++ b/sdk/resources/arm-resources/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-resources", "author": "Microsoft Corporation", "description": "ResourceManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "version": "3.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts index 24da4cc917df..61286227b9da 100644 --- a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts +++ b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts @@ -7,8 +7,9 @@ */ export { - AliasPathType, - AliasType, + Alias, + AliasPath, + AliasPattern, BaseResource, BasicDependency, CloudError, @@ -29,6 +30,7 @@ export { ErrorAdditionalInfo, ErrorResponse, GenericResource, + GenericResourceExpanded, Identity, IdentityUserAssignedIdentitiesValue, OnErrorDeployment, @@ -40,9 +42,14 @@ export { Resource, ResourceGroup, ResourceGroupProperties, + ResourceReference, + ScopedDeployment, Sku, SubResource, TagCount, + TagDetails, + Tags, + TagsResource, TagValue, TemplateHashResult, TemplateLink, diff --git a/sdk/resources/arm-resources/src/models/index.ts b/sdk/resources/arm-resources/src/models/index.ts index f5faeb25a2e2..0916795083fc 100644 --- a/sdk/resources/arm-resources/src/models/index.ts +++ b/sdk/resources/arm-resources/src/models/index.ts @@ -169,6 +169,28 @@ export interface Deployment { * The deployment properties. */ properties: DeploymentProperties; + /** + * Deployment tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Deployment operation parameters. + */ +export interface ScopedDeployment { + /** + * The location to store the deployment data. + */ + location: string; + /** + * The deployment properties. + */ + properties: DeploymentProperties; + /** + * Deployment tags + */ + tags?: { [propertyName: string]: string }; } /** @@ -263,10 +285,28 @@ export interface ErrorResponse { readonly additionalInfo?: ErrorAdditionalInfo[]; } +/** + * The type of the pattern for an alias path. + */ +export interface AliasPattern { + /** + * The alias pattern phrase. + */ + phrase?: string; + /** + * The alias pattern variable. + */ + variable?: string; + /** + * The type of alias pattern. Possible values include: 'NotSpecified', 'Extract' + */ + type?: AliasPatternType; +} + /** * The type of the paths for alias. */ -export interface AliasPathType { +export interface AliasPath { /** * The path of an alias. */ @@ -275,12 +315,16 @@ export interface AliasPathType { * The API versions. */ apiVersions?: string[]; + /** + * The pattern for an alias path. + */ + pattern?: AliasPattern; } /** * The alias type. */ -export interface AliasType { +export interface Alias { /** * The alias name. */ @@ -288,7 +332,19 @@ export interface AliasType { /** * The paths for an alias. */ - paths?: AliasPathType[]; + paths?: AliasPath[]; + /** + * The type of the alias. Possible values include: 'NotSpecified', 'PlainText', 'Mask' + */ + type?: AliasType; + /** + * The default path for an alias. + */ + defaultPath?: string; + /** + * The default pattern for an alias. + */ + defaultPattern?: AliasPattern; } /** @@ -306,7 +362,7 @@ export interface ProviderResourceType { /** * The aliases that are supported by this resource type. */ - aliases?: AliasType[]; + aliases?: Alias[]; /** * The API version. */ @@ -411,6 +467,17 @@ export interface OnErrorDeploymentExtended { deploymentName?: string; } +/** + * The resource Id model. + */ +export interface ResourceReference { + /** + * The fully qualified resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + /** * Deployment properties with additional details. */ @@ -437,45 +504,70 @@ export interface DeploymentPropertiesExtended { readonly duration?: string; /** * Key/value pairs that represent deployment output. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - outputs?: any; + readonly outputs?: any; /** * The list of resource providers needed for the deployment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - providers?: Provider[]; + readonly providers?: Provider[]; /** * The list of deployment dependencies. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dependencies?: Dependency[]; - /** - * The template content. Use only one of Template or TemplateLink. - */ - template?: any; + readonly dependencies?: Dependency[]; /** - * The URI referencing the template. Use only one of Template or TemplateLink. + * The URI referencing the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - templateLink?: TemplateLink; + readonly templateLink?: TemplateLink; /** - * Deployment parameters. Use only one of Parameters or ParametersLink. + * Deployment parameters. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - parameters?: any; + readonly parameters?: any; /** - * The URI referencing the parameters. Use only one of Parameters or ParametersLink. + * The URI referencing the parameters. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - parametersLink?: ParametersLink; + readonly parametersLink?: ParametersLink; /** * The deployment mode. Possible values are Incremental and Complete. Possible values include: * 'Incremental', 'Complete' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - mode?: DeploymentMode; + readonly mode?: DeploymentMode; /** * The debug setting of the deployment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - debugSetting?: DebugSetting; + readonly debugSetting?: DebugSetting; /** * The deployment on error behavior. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly onErrorDeployment?: OnErrorDeploymentExtended; + /** + * The hash produced for the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - onErrorDeployment?: OnErrorDeploymentExtended; + readonly templateHash?: string; + /** + * Array of provisioned resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly outputResources?: ResourceReference[]; + /** + * Array of validated resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly validatedResources?: ResourceReference[]; + /** + * The deployment error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: ErrorResponse; } /** @@ -484,8 +576,9 @@ export interface DeploymentPropertiesExtended { export interface DeploymentValidateResult { /** * The deployment validation error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ErrorResponse; + readonly error?: ErrorResponse; /** * The template deployment properties. */ @@ -519,6 +612,10 @@ export interface DeploymentExtended extends BaseResource { * Deployment properties. */ properties?: DeploymentPropertiesExtended; + /** + * Deployment tags + */ + tags?: { [propertyName: string]: string }; } /** @@ -679,6 +776,30 @@ export interface GenericResource extends Resource { identity?: Identity; } +/** + * Resource information. + */ +export interface GenericResourceExpanded extends GenericResource { + /** + * The created time of the resource. This is only present if requested via the $expand query + * parameter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdTime?: Date; + /** + * The changed time of the resource. This is only present if requested via the $expand query + * parameter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly changedTime?: Date; + /** + * The provisioning state of the resource. This is only present if requested via the $expand + * query parameter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + /** * The resource group properties. */ @@ -800,7 +921,7 @@ export interface TagCount { */ export interface TagValue extends BaseResource { /** - * The tag ID. + * The tag value ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; @@ -817,9 +938,9 @@ export interface TagValue extends BaseResource { /** * Tag details. */ -export interface TagDetails { +export interface TagDetails extends BaseResource { /** - * The tag ID. + * The tag name ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; @@ -870,6 +991,13 @@ export interface HttpMessage { * Deployment operation properties. */ export interface DeploymentOperationProperties { + /** + * The name of the current provisioning operation. Possible values include: 'NotSpecified', + * 'Create', 'Delete', 'Waiting', 'AzureAsyncOperationWaiting', 'ResourceCacheWaiting', 'Action', + * 'Read', 'EvaluateDeploymentOutput', 'DeploymentCleanup' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningOperation?: ProvisioningOperation; /** * The state of the provisioning. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1110,6 +1238,52 @@ export interface WhatIfOperationResult { error?: ErrorResponse; } +/** + * A dictionary of name and value pairs. + */ +export interface Tags { + tags?: { [propertyName: string]: string }; +} + +/** + * Wrapper resource for tags patch API request only. + */ +export interface TagsPatchResource { + /** + * The operation type for the patch API. Possible values include: 'Replace', 'Merge', 'Delete' + */ + operation?: OperationEnum; + /** + * The set of tags. + */ + properties?: Tags; +} + +/** + * Wrapper resource for tags API requests and responses. + */ +export interface TagsResource extends BaseResource { + /** + * The ID of the tags wrapper resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the tags wrapper resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the tags wrapper resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The set of tags. + */ + properties: Tags; +} + /** * Optional Parameters. */ @@ -1253,15 +1427,17 @@ export interface ResourcesListByResourceGroupOptionalParams extends msRest.Reque * and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, * use: $filter=substringof('demo', name)

You can link more than one substringof together * by adding and/or operators.

You can filter by tag names and values. For example, to - * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq - * 'Value1'

You can use some properties together when filtering. The combinations you can + * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When + * you filter by a tag name and value, the tags for each resource are not returned in the + * results.

You can use some properties together when filtering. The combinations you can * use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and * identity/principalId. */ filter?: string; /** - * The $expand query parameter. You can expand createdTime and changedTime. For example, to - * expand both properties, use $expand=changedTime,createdTime + * Comma-separated list of additional properties to be included in the response. Valid values + * include `createdTime`, `changedTime` and `provisioningState`. For example, + * `$expand=createdTime,changedTime`. */ expand?: string; /** @@ -1284,15 +1460,17 @@ export interface ResourcesListOptionalParams extends msRest.RequestOptionsBase { * and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, * use: $filter=substringof('demo', name)

You can link more than one substringof together * by adding and/or operators.

You can filter by tag names and values. For example, to - * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq - * 'Value1'

You can use some properties together when filtering. The combinations you can + * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When + * you filter by a tag name and value, the tags for each resource are not returned in the + * results.

You can use some properties together when filtering. The combinations you can * use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and * identity/principalId. */ filter?: string; /** - * The $expand query parameter. You can expand createdTime and changedTime. For example, to - * expand both properties, use $expand=changedTime,createdTime + * Comma-separated list of additional properties to be included in the response. Valid values + * include `createdTime`, `changedTime` and `provisioningState`. For example, + * `$expand=createdTime,changedTime`. */ expand?: string; /** @@ -1444,9 +1622,9 @@ export interface ProviderListResult extends Array { /** * @interface * List of resource groups. - * @extends Array + * @extends Array */ -export interface ResourceListResult extends Array { +export interface ResourceListResult extends Array { /** * The URL to use for getting the next set of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1517,6 +1695,22 @@ export type OnErrorDeploymentType = 'LastSuccessful' | 'SpecificDeployment'; */ export type WhatIfResultFormat = 'ResourceIdOnly' | 'FullResourcePayloads'; +/** + * Defines values for AliasPatternType. + * Possible values include: 'NotSpecified', 'Extract' + * @readonly + * @enum {string} + */ +export type AliasPatternType = 'NotSpecified' | 'Extract'; + +/** + * Defines values for AliasType. + * Possible values include: 'NotSpecified', 'PlainText', 'Mask' + * @readonly + * @enum {string} + */ +export type AliasType = 'NotSpecified' | 'PlainText' | 'Mask'; + /** * Defines values for ResourceIdentityType. * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', @@ -1526,6 +1720,16 @@ export type WhatIfResultFormat = 'ResourceIdOnly' | 'FullResourcePayloads'; */ export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; +/** + * Defines values for ProvisioningOperation. + * Possible values include: 'NotSpecified', 'Create', 'Delete', 'Waiting', + * 'AzureAsyncOperationWaiting', 'ResourceCacheWaiting', 'Action', 'Read', + * 'EvaluateDeploymentOutput', 'DeploymentCleanup' + * @readonly + * @enum {string} + */ +export type ProvisioningOperation = 'NotSpecified' | 'Create' | 'Delete' | 'Waiting' | 'AzureAsyncOperationWaiting' | 'ResourceCacheWaiting' | 'Action' | 'Read' | 'EvaluateDeploymentOutput' | 'DeploymentCleanup'; + /** * Defines values for PropertyChangeType. * Possible values include: 'Create', 'Delete', 'Modify', 'Array' @@ -1542,6 +1746,14 @@ export type PropertyChangeType = 'Create' | 'Delete' | 'Modify' | 'Array'; */ export type ChangeType = 'Create' | 'Delete' | 'Ignore' | 'Deploy' | 'NoChange' | 'Modify'; +/** + * Defines values for OperationEnum. + * Possible values include: 'Replace', 'Merge', 'Delete' + * @readonly + * @enum {string} + */ +export type OperationEnum = 'Replace' | 'Merge' | 'Delete'; + /** * Contains response data for the list operation. */ @@ -2297,6 +2509,26 @@ export type DeploymentsBeginCreateOrUpdateAtScopeResponse = DeploymentExtended & }; }; +/** + * Contains response data for the beginValidateAtScope operation. + */ +export type DeploymentsBeginValidateAtScopeResponse = DeploymentValidateResult & { + /** + * 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: DeploymentValidateResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdateAtTenantScope operation. */ @@ -2317,6 +2549,26 @@ export type DeploymentsBeginCreateOrUpdateAtTenantScopeResponse = DeploymentExte }; }; +/** + * Contains response data for the beginValidateAtTenantScope operation. + */ +export type DeploymentsBeginValidateAtTenantScopeResponse = DeploymentValidateResult & { + /** + * 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: DeploymentValidateResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdateAtManagementGroupScope operation. */ @@ -2337,6 +2589,26 @@ export type DeploymentsBeginCreateOrUpdateAtManagementGroupScopeResponse = Deplo }; }; +/** + * Contains response data for the beginValidateAtManagementGroupScope operation. + */ +export type DeploymentsBeginValidateAtManagementGroupScopeResponse = DeploymentValidateResult & { + /** + * 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: DeploymentValidateResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdateAtSubscriptionScope operation. */ @@ -2357,6 +2629,26 @@ export type DeploymentsBeginCreateOrUpdateAtSubscriptionScopeResponse = Deployme }; }; +/** + * Contains response data for the beginValidateAtSubscriptionScope operation. + */ +export type DeploymentsBeginValidateAtSubscriptionScopeResponse = DeploymentValidateResult & { + /** + * 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: DeploymentValidateResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -2377,6 +2669,26 @@ export type DeploymentsBeginCreateOrUpdateResponse = DeploymentExtended & { }; }; +/** + * Contains response data for the beginValidate operation. + */ +export type DeploymentsBeginValidateResponse = DeploymentValidateResult & { + /** + * 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: DeploymentValidateResult; + }; +}; + /** * Contains response data for the listAtScopeNext operation. */ @@ -3092,6 +3404,26 @@ export type ResourceGroupsListResponse = ResourceGroupListResult & { }; }; +/** + * Contains response data for the beginExportTemplate operation. + */ +export type ResourceGroupsBeginExportTemplateResponse = ResourceGroupExportResult & { + /** + * 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: ResourceGroupExportResult; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -3172,6 +3504,66 @@ export type TagsListResponse = TagsListResult & { }; }; +/** + * Contains response data for the createOrUpdateAtScope operation. + */ +export type TagsCreateOrUpdateAtScopeResponse = TagsResource & { + /** + * 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: TagsResource; + }; +}; + +/** + * Contains response data for the updateAtScope operation. + */ +export type TagsUpdateAtScopeResponse = TagsResource & { + /** + * 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: TagsResource; + }; +}; + +/** + * Contains response data for the getAtScope operation. + */ +export type TagsGetAtScopeResponse = TagsResource & { + /** + * 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: TagsResource; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/sdk/resources/arm-resources/src/models/mappers.ts b/sdk/resources/arm-resources/src/models/mappers.ts index e311aa0b456d..69a63e536f3f 100644 --- a/sdk/resources/arm-resources/src/models/mappers.ts +++ b/sdk/resources/arm-resources/src/models/mappers.ts @@ -246,6 +246,53 @@ export const Deployment: msRest.CompositeMapper = { name: "Composite", className: "DeploymentProperties" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ScopedDeployment: msRest.CompositeMapper = { + serializedName: "ScopedDeployment", + type: { + name: "Composite", + className: "ScopedDeployment", + modelProperties: { + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "DeploymentProperties" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -410,11 +457,43 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; -export const AliasPathType: msRest.CompositeMapper = { - serializedName: "AliasPathType", +export const AliasPattern: msRest.CompositeMapper = { + serializedName: "AliasPattern", + type: { + name: "Composite", + className: "AliasPattern", + modelProperties: { + phrase: { + serializedName: "phrase", + type: { + name: "String" + } + }, + variable: { + serializedName: "variable", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "NotSpecified", + "Extract" + ] + } + } + } + } +}; + +export const AliasPath: msRest.CompositeMapper = { + serializedName: "AliasPath", type: { name: "Composite", - className: "AliasPathType", + className: "AliasPath", modelProperties: { path: { serializedName: "path", @@ -432,16 +511,23 @@ export const AliasPathType: msRest.CompositeMapper = { } } } + }, + pattern: { + serializedName: "pattern", + type: { + name: "Composite", + className: "AliasPattern" + } } } } }; -export const AliasType: msRest.CompositeMapper = { - serializedName: "AliasType", +export const Alias: msRest.CompositeMapper = { + serializedName: "Alias", type: { name: "Composite", - className: "AliasType", + className: "Alias", modelProperties: { name: { serializedName: "name", @@ -456,10 +542,34 @@ export const AliasType: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AliasPathType" + className: "AliasPath" } } } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "NotSpecified", + "PlainText", + "Mask" + ] + } + }, + defaultPath: { + serializedName: "defaultPath", + type: { + name: "String" + } + }, + defaultPattern: { + serializedName: "defaultPattern", + type: { + name: "Composite", + className: "AliasPattern" + } } } } @@ -495,7 +605,7 @@ export const ProviderResourceType: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AliasType" + className: "Alias" } } } @@ -683,6 +793,23 @@ export const OnErrorDeploymentExtended: msRest.CompositeMapper = { } }; +export const ResourceReference: msRest.CompositeMapper = { + serializedName: "ResourceReference", + type: { + name: "Composite", + className: "ResourceReference", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + export const DeploymentPropertiesExtended: msRest.CompositeMapper = { serializedName: "DeploymentPropertiesExtended", type: { @@ -718,12 +845,14 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, outputs: { + readOnly: true, serializedName: "outputs", type: { name: "Object" } }, providers: { + readOnly: true, serializedName: "providers", type: { name: "Sequence", @@ -736,6 +865,7 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, dependencies: { + readOnly: true, serializedName: "dependencies", type: { name: "Sequence", @@ -747,13 +877,8 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } } }, - template: { - serializedName: "template", - type: { - name: "Object" - } - }, templateLink: { + readOnly: true, serializedName: "templateLink", type: { name: "Composite", @@ -761,12 +886,14 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, parameters: { + readOnly: true, serializedName: "parameters", type: { name: "Object" } }, parametersLink: { + readOnly: true, serializedName: "parametersLink", type: { name: "Composite", @@ -774,6 +901,7 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, mode: { + readOnly: true, serializedName: "mode", type: { name: "Enum", @@ -784,6 +912,7 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, debugSetting: { + readOnly: true, serializedName: "debugSetting", type: { name: "Composite", @@ -791,11 +920,53 @@ export const DeploymentPropertiesExtended: msRest.CompositeMapper = { } }, onErrorDeployment: { + readOnly: true, serializedName: "onErrorDeployment", type: { name: "Composite", className: "OnErrorDeploymentExtended" } + }, + templateHash: { + readOnly: true, + serializedName: "templateHash", + type: { + name: "String" + } + }, + outputResources: { + readOnly: true, + serializedName: "outputResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + validatedResources: { + readOnly: true, + serializedName: "validatedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + }, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } } } } @@ -808,6 +979,7 @@ export const DeploymentValidateResult: msRest.CompositeMapper = { className: "DeploymentValidateResult", modelProperties: { error: { + readOnly: true, serializedName: "error", type: { name: "Composite", @@ -864,6 +1036,17 @@ export const DeploymentExtended: msRest.CompositeMapper = { name: "Composite", className: "DeploymentPropertiesExtended" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -1128,6 +1311,38 @@ export const GenericResource: msRest.CompositeMapper = { } }; +export const GenericResourceExpanded: msRest.CompositeMapper = { + serializedName: "GenericResourceExpanded", + type: { + name: "Composite", + className: "GenericResourceExpanded", + modelProperties: { + ...GenericResource.type.modelProperties, + createdTime: { + readOnly: true, + serializedName: "createdTime", + type: { + name: "DateTime" + } + }, + changedTime: { + readOnly: true, + serializedName: "changedTime", + type: { + name: "DateTime" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const ResourceGroupProperties: msRest.CompositeMapper = { serializedName: "ResourceGroupProperties", type: { @@ -1445,6 +1660,25 @@ export const DeploymentOperationProperties: msRest.CompositeMapper = { name: "Composite", className: "DeploymentOperationProperties", modelProperties: { + provisioningOperation: { + readOnly: true, + serializedName: "provisioningOperation", + type: { + name: "Enum", + allowedValues: [ + "NotSpecified", + "Create", + "Delete", + "Waiting", + "AzureAsyncOperationWaiting", + "ResourceCacheWaiting", + "Action", + "Read", + "EvaluateDeploymentOutput", + "DeploymentCleanup" + ] + } + }, provisioningState: { readOnly: true, serializedName: "provisioningState", @@ -1849,6 +2083,89 @@ export const WhatIfOperationResult: msRest.CompositeMapper = { } }; +export const Tags: msRest.CompositeMapper = { + serializedName: "Tags", + type: { + name: "Composite", + className: "Tags", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TagsPatchResource: msRest.CompositeMapper = { + serializedName: "TagsPatchResource", + type: { + name: "Composite", + className: "TagsPatchResource", + modelProperties: { + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "Tags" + } + } + } + } +}; + +export const TagsResource: msRest.CompositeMapper = { + serializedName: "TagsResource", + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "Tags" + } + } + } + } +}; + export const DeploymentsWhatIfAtSubscriptionScopeHeaders: msRest.CompositeMapper = { serializedName: "deployments-whatifatsubscriptionscope-headers", type: { @@ -1992,7 +2309,7 @@ export const ResourceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "GenericResource" + className: "GenericResourceExpanded" } } } diff --git a/sdk/resources/arm-resources/src/models/parameters.ts b/sdk/resources/arm-resources/src/models/parameters.ts index 8810048870e6..50629a1cd649 100644 --- a/sdk/resources/arm-resources/src/models/parameters.ts +++ b/sdk/resources/arm-resources/src/models/parameters.ts @@ -180,7 +180,8 @@ export const scope: msRest.OperationURLParameter = { type: { name: "String" } - } + }, + skipEncoding: true }; export const sourceResourceGroupName: msRest.OperationURLParameter = { parameterPath: "sourceResourceGroupName", diff --git a/sdk/resources/arm-resources/src/models/providersMappers.ts b/sdk/resources/arm-resources/src/models/providersMappers.ts index 73efdacde7a1..d85326cf880c 100644 --- a/sdk/resources/arm-resources/src/models/providersMappers.ts +++ b/sdk/resources/arm-resources/src/models/providersMappers.ts @@ -7,8 +7,9 @@ */ export { - AliasPathType, - AliasType, + Alias, + AliasPath, + AliasPattern, CloudError, ErrorAdditionalInfo, ErrorResponse, diff --git a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts index eb263b58a93a..aa848f724f61 100644 --- a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts @@ -7,8 +7,9 @@ */ export { - AliasPathType, - AliasType, + Alias, + AliasPath, + AliasPattern, BaseResource, BasicDependency, CloudError, @@ -20,6 +21,7 @@ export { ErrorResponse, ExportTemplateRequest, GenericResource, + GenericResourceExpanded, Identity, IdentityUserAssignedIdentitiesValue, OnErrorDeploymentExtended, @@ -33,9 +35,13 @@ export { ResourceGroupListResult, ResourceGroupPatchable, ResourceGroupProperties, + ResourceReference, Sku, SubResource, TagCount, + TagDetails, + Tags, + TagsResource, TagValue, TemplateLink } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/resourcesMappers.ts b/sdk/resources/arm-resources/src/models/resourcesMappers.ts index e660fb32bcc4..f843f4e6bfbb 100644 --- a/sdk/resources/arm-resources/src/models/resourcesMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourcesMappers.ts @@ -7,8 +7,9 @@ */ export { - AliasPathType, - AliasType, + Alias, + AliasPath, + AliasPattern, BaseResource, BasicDependency, CloudError, @@ -19,6 +20,7 @@ export { ErrorAdditionalInfo, ErrorResponse, GenericResource, + GenericResourceExpanded, Identity, IdentityUserAssignedIdentitiesValue, OnErrorDeploymentExtended, @@ -30,10 +32,14 @@ export { ResourceGroup, ResourceGroupProperties, ResourceListResult, + ResourceReference, ResourcesMoveInfo, Sku, SubResource, TagCount, + TagDetails, + Tags, + TagsResource, TagValue, TemplateLink } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/tagsMappers.ts b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts similarity index 86% rename from sdk/resources/arm-resources/src/models/tagsMappers.ts rename to sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts index ef9dcf708953..39fb6b2cbe62 100644 --- a/sdk/resources/arm-resources/src/models/tagsMappers.ts +++ b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts @@ -7,8 +7,9 @@ */ export { - AliasPathType, - AliasType, + Alias, + AliasPath, + AliasPattern, BaseResource, BasicDependency, CloudError, @@ -19,6 +20,7 @@ export { ErrorAdditionalInfo, ErrorResponse, GenericResource, + GenericResourceExpanded, Identity, IdentityUserAssignedIdentitiesValue, OnErrorDeploymentExtended, @@ -29,11 +31,15 @@ export { Resource, ResourceGroup, ResourceGroupProperties, + ResourceReference, Sku, SubResource, TagCount, TagDetails, + Tags, TagsListResult, + TagsPatchResource, + TagsResource, TagValue, TemplateLink } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/operations/deploymentOperations.ts b/sdk/resources/arm-resources/src/operations/deploymentOperations.ts index ddb4d2cb4926..f7c968e55a0b 100644 --- a/sdk/resources/arm-resources/src/operations/deploymentOperations.ts +++ b/sdk/resources/arm-resources/src/operations/deploymentOperations.ts @@ -28,7 +28,7 @@ export class DeploymentOperations { /** * Gets a deployments operation. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param operationId The ID of the operation to get. * @param [options] The optional parameters @@ -36,14 +36,14 @@ export class DeploymentOperations { */ getAtScope(scope: string, deploymentName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param operationId The ID of the operation to get. * @param callback The callback */ getAtScope(scope: string, deploymentName: string, operationId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param operationId The ID of the operation to get. * @param options The optional parameters @@ -64,20 +64,20 @@ export class DeploymentOperations { /** * Gets all deployments operations for a deployment. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise */ listAtScope(scope: string, deploymentName: string, options?: Models.DeploymentOperationsListAtScopeOptionalParams): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param callback The callback */ listAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param options The optional parameters * @param callback The callback diff --git a/sdk/resources/arm-resources/src/operations/deployments.ts b/sdk/resources/arm-resources/src/operations/deployments.ts index 96afac3143f8..571323f26ffd 100644 --- a/sdk/resources/arm-resources/src/operations/deployments.ts +++ b/sdk/resources/arm-resources/src/operations/deployments.ts @@ -36,7 +36,7 @@ export class Deployments { * process finishes, the URI in the Location header returns a status of 204 on success. If the * asynchronous request failed, the URI in the Location header returns an error-level status code. * @summary Deletes a deployment from the deployment history. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise @@ -48,20 +48,20 @@ export class Deployments { /** * Checks whether the deployment exists. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise */ checkExistenceAtScope(scope: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param callback The callback */ checkExistenceAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param options The optional parameters * @param callback The callback @@ -81,7 +81,7 @@ export class Deployments { /** * You can provide the template and parameters directly in the request or link to JSON files. * @summary Deploys resources at a given scope. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param parameters Additional parameters supplied to the operation. * @param [options] The optional parameters @@ -94,20 +94,20 @@ export class Deployments { /** * Gets a deployment. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise */ getAtScope(scope: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param callback The callback */ getAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param options The optional parameters * @param callback The callback @@ -130,20 +130,20 @@ export class Deployments { * deployment stops the currently running template deployment and leaves the resources partially * deployed. * @summary Cancels a currently running template deployment. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise */ cancelAtScope(scope: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param callback The callback */ cancelAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param options The optional parameters * @param callback The callback @@ -163,56 +163,33 @@ export class Deployments { /** * Validates whether the specified template is syntactically correct and will be accepted by Azure * Resource Manager.. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param parameters Parameters to validate. * @param [options] The optional parameters * @returns Promise */ - validateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param scope The scope of a deployment. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param callback The callback - */ - validateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, callback: msRest.ServiceCallback): void; - /** - * @param scope The scope of a deployment. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param options The optional parameters - * @param callback The callback - */ - validateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - scope, - deploymentName, - parameters, - options - }, - validateAtScopeOperationSpec, - callback) as Promise; + validateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateAtScope(scope,deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Exports the template used for specified deployment. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise */ exportTemplateAtScope(scope: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param callback The callback */ exportTemplateAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param options The optional parameters * @param callback The callback @@ -231,18 +208,18 @@ export class Deployments { /** * Get all the deployments at the given scope. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param [options] The optional parameters * @returns Promise */ listAtScope(scope: string, options?: Models.DeploymentsListAtScopeOptionalParams): Promise; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param callback The callback */ listAtScope(scope: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param options The optional parameters * @param callback The callback */ @@ -311,7 +288,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - createOrUpdateAtTenantScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + createOrUpdateAtTenantScope(deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { return this.beginCreateOrUpdateAtTenantScope(deploymentName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -384,29 +361,9 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - validateAtTenantScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param callback The callback - */ - validateAtTenantScope(deploymentName: string, parameters: Models.Deployment, callback: msRest.ServiceCallback): void; - /** - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param options The optional parameters - * @param callback The callback - */ - validateAtTenantScope(deploymentName: string, parameters: Models.Deployment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateAtTenantScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - deploymentName, - parameters, - options - }, - validateAtTenantScopeOperationSpec, - callback) as Promise; + validateAtTenantScope(deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateAtTenantScope(deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -521,7 +478,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - createOrUpdateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + createOrUpdateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { return this.beginCreateOrUpdateAtManagementGroupScope(groupId,deploymentName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -603,32 +560,9 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - validateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param groupId The management group ID. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param callback The callback - */ - validateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, callback: msRest.ServiceCallback): void; - /** - * @param groupId The management group ID. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param options The optional parameters - * @param callback The callback - */ - validateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - groupId, - deploymentName, - parameters, - options - }, - validateAtManagementGroupScopeOperationSpec, - callback) as Promise; + validateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateAtManagementGroupScope(groupId,deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -818,29 +752,9 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - validateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param callback The callback - */ - validateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, callback: msRest.ServiceCallback): void; - /** - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param options The optional parameters - * @param callback The callback - */ - validateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - deploymentName, - parameters, - options - }, - validateAtSubscriptionScopeOperationSpec, - callback) as Promise; + validateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateAtSubscriptionScope(deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -1057,34 +971,9 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - validate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group the template will be deployed to. The - * name is case insensitive. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param callback The callback - */ - validate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group the template will be deployed to. The - * name is case insensitive. - * @param deploymentName The name of the deployment. - * @param parameters Parameters to validate. - * @param options The optional parameters - * @param callback The callback - */ - validate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - deploymentName, - parameters, - options - }, - validateOperationSpec, - callback) as Promise; + validate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidate(resourceGroupName,deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -1202,7 +1091,7 @@ export class Deployments { * process finishes, the URI in the Location header returns a status of 204 on success. If the * asynchronous request failed, the URI in the Location header returns an error-level status code. * @summary Deletes a deployment from the deployment history. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param [options] The optional parameters * @returns Promise @@ -1221,7 +1110,7 @@ export class Deployments { /** * You can provide the template and parameters directly in the request or link to JSON files. * @summary Deploys resources at a given scope. - * @param scope The scope of a deployment. + * @param scope The resource scope. * @param deploymentName The name of the deployment. * @param parameters Additional parameters supplied to the operation. * @param [options] The optional parameters @@ -1239,6 +1128,27 @@ export class Deployments { options); } + /** + * Validates whether the specified template is syntactically correct and will be accepted by Azure + * Resource Manager.. + * @param scope The resource scope. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateAtScope(scope: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + scope, + deploymentName, + parameters, + options + }, + beginValidateAtScopeOperationSpec, + options); + } + /** * A template deployment that is currently running cannot be deleted. Deleting a template * deployment removes the associated deployment operations. This is an asynchronous operation that @@ -1270,7 +1180,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdateAtTenantScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdateAtTenantScope(deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { deploymentName, @@ -1281,6 +1191,25 @@ export class Deployments { options); } + /** + * Validates whether the specified template is syntactically correct and will be accepted by Azure + * Resource Manager.. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateAtTenantScope(deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deploymentName, + parameters, + options + }, + beginValidateAtTenantScopeOperationSpec, + options); + } + /** * A template deployment that is currently running cannot be deleted. Deleting a template * deployment removes the associated deployment operations. This is an asynchronous operation that @@ -1315,7 +1244,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { groupId, @@ -1327,6 +1256,27 @@ export class Deployments { options); } + /** + * Validates whether the specified template is syntactically correct and will be accepted by Azure + * Resource Manager.. + * @param groupId The management group ID. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeployment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + groupId, + deploymentName, + parameters, + options + }, + beginValidateAtManagementGroupScopeOperationSpec, + options); + } + /** * A template deployment that is currently running cannot be deleted. Deleting a template * deployment removes the associated deployment operations. This is an asynchronous operation that @@ -1369,6 +1319,25 @@ export class Deployments { options); } + /** + * Validates whether the specified template is syntactically correct and will be accepted by Azure + * Resource Manager.. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateAtSubscriptionScope(deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deploymentName, + parameters, + options + }, + beginValidateAtSubscriptionScopeOperationSpec, + options); + } + /** * Returns changes that will be made by the deployment if executed at the scope of the * subscription. @@ -1437,6 +1406,28 @@ export class Deployments { options); } + /** + * Validates whether the specified template is syntactically correct and will be accepted by Azure + * Resource Manager.. + * @param resourceGroupName The name of the resource group the template will be deployed to. The + * name is case insensitive. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginValidate(resourceGroupName: string, deploymentName: string, parameters: Models.Deployment, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + deploymentName, + parameters, + options + }, + beginValidateOperationSpec, + options); + } + /** * Returns changes that will be made by the deployment if executed at the scope of the resource * group. @@ -1671,40 +1662,6 @@ const cancelAtScopeOperationSpec: msRest.OperationSpec = { serializer }; -const validateAtScopeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", - urlParameters: [ - Parameters.scope, - Parameters.deploymentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Deployment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DeploymentValidateResult - }, - 400: { - bodyMapper: Mappers.DeploymentValidateResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const exportTemplateAtScopeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", @@ -1820,39 +1777,6 @@ const cancelAtTenantScopeOperationSpec: msRest.OperationSpec = { serializer }; -const validateAtTenantScopeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.Resources/deployments/{deploymentName}/validate", - urlParameters: [ - Parameters.deploymentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Deployment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DeploymentValidateResult - }, - 400: { - bodyMapper: Mappers.DeploymentValidateResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const exportTemplateAtTenantScopeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", @@ -1967,43 +1891,9 @@ const cancelAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { serializer }; -const validateAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { +const exportTemplateAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", - urlParameters: [ - Parameters.groupId, - Parameters.deploymentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Deployment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DeploymentValidateResult - }, - 400: { - bodyMapper: Mappers.DeploymentValidateResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const exportTemplateAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", + path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", urlParameters: [ Parameters.groupId, Parameters.deploymentName @@ -2119,40 +2009,6 @@ const cancelAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { serializer }; -const validateAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", - urlParameters: [ - Parameters.deploymentName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Deployment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DeploymentValidateResult - }, - 400: { - bodyMapper: Mappers.DeploymentValidateResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const exportTemplateAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", @@ -2274,41 +2130,6 @@ const cancelOperationSpec: msRest.OperationSpec = { serializer }; -const validateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.deploymentName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Deployment, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DeploymentValidateResult - }, - 400: { - bodyMapper: Mappers.DeploymentValidateResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const exportTemplateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", @@ -2447,6 +2268,41 @@ const beginCreateOrUpdateAtScopeOperationSpec: msRest.OperationSpec = { serializer }; +const beginValidateAtScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", + urlParameters: [ + Parameters.scope, + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Deployment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeploymentValidateResult + }, + 202: {}, + 400: { + bodyMapper: Mappers.DeploymentValidateResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginDeleteAtTenantScopeOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "providers/Microsoft.Resources/deployments/{deploymentName}", @@ -2484,7 +2340,7 @@ const beginCreateOrUpdateAtTenantScopeOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.Deployment, + ...Mappers.ScopedDeployment, required: true } }, @@ -2502,6 +2358,40 @@ const beginCreateOrUpdateAtTenantScopeOperationSpec: msRest.OperationSpec = { serializer }; +const beginValidateAtTenantScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Resources/deployments/{deploymentName}/validate", + urlParameters: [ + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScopedDeployment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeploymentValidateResult + }, + 202: {}, + 400: { + bodyMapper: Mappers.DeploymentValidateResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginDeleteAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", @@ -2541,7 +2431,7 @@ const beginCreateOrUpdateAtManagementGroupScopeOperationSpec: msRest.OperationSp requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.Deployment, + ...Mappers.ScopedDeployment, required: true } }, @@ -2559,6 +2449,41 @@ const beginCreateOrUpdateAtManagementGroupScopeOperationSpec: msRest.OperationSp serializer }; +const beginValidateAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", + urlParameters: [ + Parameters.groupId, + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScopedDeployment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeploymentValidateResult + }, + 202: {}, + 400: { + bodyMapper: Mappers.DeploymentValidateResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginDeleteAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", @@ -2616,6 +2541,41 @@ const beginCreateOrUpdateAtSubscriptionScopeOperationSpec: msRest.OperationSpec serializer }; +const beginValidateAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", + urlParameters: [ + Parameters.deploymentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Deployment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeploymentValidateResult + }, + 202: {}, + 400: { + bodyMapper: Mappers.DeploymentValidateResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginWhatIfAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf", @@ -2710,6 +2670,42 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; +const beginValidateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.deploymentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Deployment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeploymentValidateResult + }, + 202: {}, + 400: { + bodyMapper: Mappers.DeploymentValidateResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginWhatIfOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf", diff --git a/sdk/resources/arm-resources/src/operations/index.ts b/sdk/resources/arm-resources/src/operations/index.ts index 542b40b96c2d..a7cec76246cd 100644 --- a/sdk/resources/arm-resources/src/operations/index.ts +++ b/sdk/resources/arm-resources/src/operations/index.ts @@ -13,5 +13,5 @@ export * from "./deployments"; export * from "./providers"; export * from "./resources"; export * from "./resourceGroups"; -export * from "./tags"; +export * from "./tagsOperations"; export * from "./deploymentOperations"; diff --git a/sdk/resources/arm-resources/src/operations/resourceGroups.ts b/sdk/resources/arm-resources/src/operations/resourceGroups.ts index 6411c09ca1ed..617190a57bc6 100644 --- a/sdk/resources/arm-resources/src/operations/resourceGroups.ts +++ b/sdk/resources/arm-resources/src/operations/resourceGroups.ts @@ -171,34 +171,14 @@ export class ResourceGroups { /** * Captures the specified resource group as a template. - * @param resourceGroupName The name of the resource group to export as a template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Parameters for exporting the template. * @param [options] The optional parameters * @returns Promise */ - exportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to export as a template. - * @param parameters Parameters for exporting the template. - * @param callback The callback - */ - exportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to export as a template. - * @param parameters Parameters for exporting the template. - * @param options The optional parameters - * @param callback The callback - */ - exportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - exportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - parameters, - options - }, - exportTemplateOperationSpec, - callback) as Promise; + exportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginExportTemplate(resourceGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -243,6 +223,24 @@ export class ResourceGroups { options); } + /** + * Captures the specified resource group as a template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Parameters for exporting the template. + * @param [options] The optional parameters + * @returns Promise + */ + beginExportTemplate(resourceGroupName: string, parameters: Models.ExportTemplateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + parameters, + options + }, + beginExportTemplateOperationSpec, + options); + } + /** * Gets all the resource groups for a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -386,29 +384,23 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const exportTemplateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate", +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups", urlParameters: [ - Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ + Parameters.filter, + Parameters.top, Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ExportTemplateRequest, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ResourceGroupExportResult + bodyMapper: Mappers.ResourceGroupListResult }, default: { bodyMapper: Mappers.CloudError @@ -417,24 +409,22 @@ const exportTemplateOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", urlParameters: [ + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ - Parameters.filter, - Parameters.top, Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.ResourceGroupListResult - }, + 200: {}, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -442,12 +432,12 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", +const beginExportTemplateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate", urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], queryParameters: [ Parameters.apiVersion @@ -455,8 +445,17 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ExportTemplateRequest, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.ResourceGroupExportResult + }, 202: {}, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/resources/arm-resources/src/operations/tags.ts b/sdk/resources/arm-resources/src/operations/tagsOperations.ts similarity index 51% rename from sdk/resources/arm-resources/src/operations/tags.ts rename to sdk/resources/arm-resources/src/operations/tagsOperations.ts index ca365271243a..74aec7cd47e6 100644 --- a/sdk/resources/arm-resources/src/operations/tags.ts +++ b/sdk/resources/arm-resources/src/operations/tagsOperations.ts @@ -10,16 +10,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; -import * as Mappers from "../models/tagsMappers"; +import * as Mappers from "../models/tagsOperationsMappers"; import * as Parameters from "../models/parameters"; import { ResourceManagementClientContext } from "../resourceManagementClientContext"; -/** Class representing a Tags. */ -export class Tags { +/** Class representing a TagsOperations. */ +export class TagsOperations { private readonly client: ResourceManagementClientContext; /** - * Create a Tags. + * Create a TagsOperations. * @param {ResourceManagementClientContext} client Reference to the service client. */ constructor(client: ResourceManagementClientContext) { @@ -27,7 +27,10 @@ export class Tags { } /** - * Deletes a tag value. + * This operation allows deleting a value from the list of predefined values for an existing + * predefined tag name. The value being deleted must not be in use as a tag value for the given tag + * name for any resource. + * @summary Deletes a predefined tag value for a predefined tag name. * @param tagName The name of the tag. * @param tagValue The value of the tag to delete. * @param [options] The optional parameters @@ -59,7 +62,9 @@ export class Tags { } /** - * Creates a tag value. The name of the tag must already exist. + * This operation allows adding a value to the list of predefined values for an existing predefined + * tag name. A tag value can have a maximum of 256 characters. + * @summary Creates a predefined value for a predefined tag name. * @param tagName The name of the tag. * @param tagValue The value of the tag to create. * @param [options] The optional parameters @@ -91,10 +96,11 @@ export class Tags { } /** - * The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by - * Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these - * prefixes. - * @summary Creates a tag in the subscription. + * This operation allows adding a name to the list of predefined tag names for the given + * subscription. A tag name can have a maximum of 512 characters and is case-insensitive. Tag names + * cannot have the following prefixes which are reserved for Azure use: 'microsoft', 'azure', + * 'windows'. + * @summary Creates a predefined tag name. * @param tagName The name of the tag to create. * @param [options] The optional parameters * @returns Promise @@ -122,8 +128,10 @@ export class Tags { } /** - * You must remove all values from a resource tag before you can delete it. - * @summary Deletes a tag from the subscription. + * This operation allows deleting a name from the list of predefined tag names for the given + * subscription. The name being deleted must not be in use as a tag name for any resource. All + * predefined values for the given name must have already been deleted. + * @summary Deletes a predefined tag name. * @param tagName The name of the tag. * @param [options] The optional parameters * @returns Promise @@ -151,7 +159,11 @@ export class Tags { } /** - * Gets the names and values of all resource tags that are defined in a subscription. + * This operation performs a union of predefined tags, resource tags, resource group tags and + * subscription tags, and returns a summary of usage for each tag name and value under the given + * subscription. In case of a large number of tags, this operation may return a previously cached + * result. + * @summary Gets a summary of tag usage under the subscription. * @param [options] The optional parameters * @returns Promise */ @@ -175,7 +187,138 @@ export class Tags { } /** - * Gets the names and values of all resource tags that are defined in a subscription. + * This operation allows adding or replacing the entire set of tags on the specified resource or + * subscription. The specified entity can have a maximum of 50 tags. + * @summary Creates or updates the entire set of tags on a resource or subscription. + * @param scope The resource scope. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The resource scope. + * @param parameters + * @param callback The callback + */ + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, callback: msRest.ServiceCallback): void; + /** + * @param scope The resource scope. + * @param parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + parameters, + options + }, + createOrUpdateAtScopeOperationSpec, + callback) as Promise; + } + + /** + * This operation allows replacing, merging or selectively deleting tags on the specified resource + * or subscription. The specified entity can have a maximum of 50 tags at the end of the operation. + * The 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option + * allows adding tags with new names and updating the values of tags with existing names. The + * 'delete' option allows selectively deleting tags based on given names or name/value pairs. + * @summary Selectively updates the set of tags on a resource or subscription. + * @param scope The resource scope. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The resource scope. + * @param parameters + * @param callback The callback + */ + updateAtScope(scope: string, parameters: Models.TagsPatchResource, callback: msRest.ServiceCallback): void; + /** + * @param scope The resource scope. + * @param parameters + * @param options The optional parameters + * @param callback The callback + */ + updateAtScope(scope: string, parameters: Models.TagsPatchResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + parameters, + options + }, + updateAtScopeOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets the entire set of tags on a resource or subscription. + * @param scope The resource scope. + * @param [options] The optional parameters + * @returns Promise + */ + getAtScope(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The resource scope. + * @param callback The callback + */ + getAtScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The resource scope. + * @param options The optional parameters + * @param callback The callback + */ + getAtScope(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAtScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + getAtScopeOperationSpec, + callback) as Promise; + } + + /** + * @summary Deletes the entire set of tags on a resource or subscription. + * @param scope The resource scope. + * @param [options] The optional parameters + * @returns Promise + */ + deleteAtScope(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The resource scope. + * @param callback The callback + */ + deleteAtScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The resource scope. + * @param options The optional parameters + * @param callback The callback + */ + deleteAtScope(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteAtScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + deleteAtScopeOperationSpec, + callback); + } + + /** + * This operation performs a union of predefined tags, resource tags, resource group tags and + * subscription tags, and returns a summary of usage for each tag name and value under the given + * subscription. In case of a large number of tags, this operation may return a previously cached + * result. + * @summary Gets a summary of tag usage under the subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -330,6 +473,110 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; +const createOrUpdateAtScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Resources/tags/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TagsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateAtScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "{scope}/providers/Microsoft.Resources/tags/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsPatchResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TagsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getAtScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Resources/tags/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TagsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteAtScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{scope}/providers/Microsoft.Resources/tags/default", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/sdk/resources/arm-resources/src/resourceManagementClient.ts b/sdk/resources/arm-resources/src/resourceManagementClient.ts index b712764c2a93..535cd08e4b20 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClient.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClient.ts @@ -22,7 +22,7 @@ class ResourceManagementClient extends ResourceManagementClientContext { providers: operations.Providers; resources: operations.Resources; resourceGroups: operations.ResourceGroups; - tags: operations.Tags; + tags: operations.TagsOperations; deploymentOperations: operations.DeploymentOperations; /** @@ -38,7 +38,7 @@ class ResourceManagementClient extends ResourceManagementClientContext { this.providers = new operations.Providers(this); this.resources = new operations.Resources(this); this.resourceGroups = new operations.ResourceGroups(this); - this.tags = new operations.Tags(this); + this.tags = new operations.TagsOperations(this); this.deploymentOperations = new operations.DeploymentOperations(this); } } diff --git a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts index 1dc03c3fa11f..0259767defe2 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-resources"; -const packageVersion = "2.1.0"; +const packageVersion = "3.0.0"; export class ResourceManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class ResourceManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2019-07-01'; + this.apiVersion = '2019-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/search/ci.yml b/sdk/search/ci.yml index 4e86d2cb01a9..c95840e56809 100644 --- a/sdk/search/ci.yml +++ b/sdk/search/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/search/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: search - Artifacts: - - name: azure-search-documents - safeName: azuresearchdocuments +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: search + Artifacts: + - name: azure-search-documents + safeName: azuresearchdocuments diff --git a/sdk/search/search-documents/CHANGELOG.md b/sdk/search/search-documents/CHANGELOG.md index 009158887f57..9f5def6039c2 100644 --- a/sdk/search/search-documents/CHANGELOG.md +++ b/sdk/search/search-documents/CHANGELOG.md @@ -1,7 +1,26 @@ # Release History -## 1.0.0-preview.4 (Unreleased) - +## 1.0.0-preview.5 (Unreleased) + + +## 1.0.0-preview.4 (2020-06-08) + +- [Breaking] Changed `ListIndexes` operation to a pageable operation. +- [Breaking] Added `onlyIfUnchanged` parameter for CreateOrUpdate and Delete operations. +- [Breaking] Removed `$select` property for the List operations. +- [Breaking] Refactored `SearchServiceClient` and split it to `SearchIndexClient` and `SearchIndexerClient` and changed `SearchIndexClient` class to `SearchClient` class. +- [Breaking] Moved non-optional parameters from options bag. +- [Breaking] Renamed `countDocuments` method to `getDocumentsCount` method. +- [Breaking] In `search` method, moved the `searchText` parameter from the options bag to method parameter. +- [Breaking] In `indexDocuments` method, the options parameter is renamed to `IndexDocumentsOptions`. +- [Breaking] Modified `deleteDocuments` method to get documents as a parameter. +- [Breaking] In `getIndexStatistics` method, renamed the return type from `GetIndexStatisticsResult` to `SearchIndexStatistics`. +- [Breaking] In `getServiceStatistics` method, renamed the return type from `ServiceStatistics` to `SearchServiceStatistics`. +- [Breaking] Modified `DataSource` model name to `DataSourceConnection`. Changed all references in the method names, parameters, etc. +- [Breaking] Renamed `SimpleDataType` model to `SearchFieldDataType` model. +- [Breaking] Modified the names of several models & parameters. Please refer [#8984](https://github.com/Azure/azure-sdk-for-js/issues/8984), [#9037](https://github.com/Azure/azure-sdk-for-js/issues/9037) and [#8383](https://github.com/Azure/azure-sdk-for-js/issues/8383) for a detailed list of renames. +- Added separate methods for getting just names such as `listIndexesNames`, `listSynonymMapsNames`, etc. +- Added `getSearchClient` method to the `SearchIndexClient` class. ## 1.0.0-preview.3 (2020-05-05) diff --git a/sdk/search/search-documents/README.md b/sdk/search/search-documents/README.md index 82f66136c6f4..c966cd048ca9 100644 --- a/sdk/search/search-documents/README.md +++ b/sdk/search/search-documents/README.md @@ -19,11 +19,12 @@ Use the client library to: [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/search/search/) | [Package (NPM)](https://www.npmjs.com/package/@azure/search-documents) | -[API reference documentation](https://aka.ms/azsdk-js-search-ref-docs) | +[API reference documentation](https://aka.ms/azsdk/js/search/docs) | [Product documentation](https://docs.microsoft.com/azure/search/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/search/samples) ## Getting started + ### Install the `@azure/search-documents` package ```bash @@ -44,7 +45,6 @@ az search service create --resource-group --name ", new AzureKeyCredenti ``` ### Send your first search query -To get running immediately, we're going to connect to a well known sandbox Search service provided by Microsoft. This means you do not need an Azure subscription or Azure Cognitive Search service to try out this query. + +To get running immediately, we're going to connect to a well known sandbox Search service provided by Microsoft. This means you do not need an Azure subscription or Azure Cognitive Search service to try out this query. ```js const { SearchClient, AzureKeyCredential } = require("@azure/search-documents"); @@ -102,7 +103,7 @@ const client = new SearchClient( async function main() { // Let's get the top 5 jobs related to Microsoft - const searchResults = await client.search({ searchText: "Microsoft", top: 5 }); + const searchResults = await client.search("Microsoft", { top: 5 }); for await (const result of searchResults.results) { console.log(`${result.business_title}\n${result.job_description}\n`); } @@ -117,11 +118,11 @@ Azure Cognitive Search has the concepts of search services and indexes and docum There are several types of operations that can be executed against the service: -- [Index management operations](https://docs.microsoft.com/rest/api/searchservice/index-operations). Create, delete, update, or configure a search index. -- [Document operations](https://docs.microsoft.com/rest/api/searchservice/document-operations). Add, update, or delete documents in the index, query the index, or look up specific documents by ID. -- [Indexer operations](https://docs.microsoft.com/rest/api/searchservice/indexer-operations). Automate aspects of an indexing operation by configuring a data source and an indexer that you can schedule or run on demand. This feature is supported for a limited number of data source types. -- [Skillset operations](https://docs.microsoft.com/rest/api/searchservice/skillset-operations). Part of a cognitive search workload, a skillset defines a series of enrichment processing steps. A skillset is consumed by an indexer. -- [Synonym map operations](https://docs.microsoft.com/rest/api/searchservice/synonym-map-operations). A synonym map is a service-level resource that contains user-defined synonyms. This resource is maintained independently from search indexes. Once uploaded, you can point any searchable field to the synonym map (one per field). +- [Index management operations](https://docs.microsoft.com/rest/api/searchservice/index-operations). Create, delete, update, or configure a search index. +- [Document operations](https://docs.microsoft.com/rest/api/searchservice/document-operations). Add, update, or delete documents in the index, query the index, or look up specific documents by ID. +- [Indexer operations](https://docs.microsoft.com/rest/api/searchservice/indexer-operations). Automate aspects of an indexing operation by configuring a data source and an indexer that you can schedule or run on demand. This feature is supported for a limited number of data source types. +- [Skillset operations](https://docs.microsoft.com/rest/api/searchservice/skillset-operations). Part of a cognitive search workload, a skillset defines a series of enrichment processing steps. A skillset is consumed by an indexer. +- [Synonym map operations](https://docs.microsoft.com/rest/api/searchservice/synonym-map-operations). A synonym map is a service-level resource that contains user-defined synonyms. This resource is maintained independently from search indexes. Once uploaded, you can point any searchable field to the synonym map (one per field). ## TypeScript/JavaScript specific concepts ### SearchClient @@ -170,19 +171,19 @@ async function main() { { type: "Edm.String", name: "id", - key: true + key: true, }, { type: "Edm.Double", name: "awesomenessLevel", sortable: true, filterable: true, - facetable: true + facetable: true, }, { type: "Edm.String", name: "description", - searchable: true + searchable: true, }, { type: "Edm.ComplexType", @@ -191,16 +192,16 @@ async function main() { { type: "Collection(Edm.String)", name: "tags", - searchable: true - } - ] + searchable: true, + }, + ], }, { type: "Edm.Int32", name: "hiddenWeight", - hidden: true - } - ] + hidden: true, + }, + ], }); console.log(result); @@ -227,7 +228,7 @@ async function main() { // JSON objects matching the shape of the client's index {}, {}, - {} + {}, ]); for (const result of uploadResult.results) { console.log(`Uploaded ${result.key}; succeeded? ${result.succeeded}`); @@ -258,7 +259,6 @@ async function main() { main(); ``` - ### Perform a search on documents To list all results of a particular query, you can use `search` with a search string that uses [simple query syntax](https://docs.microsoft.com/azure/search/query-simple-syntax): @@ -297,7 +297,7 @@ async function main() { const searchResults = await client.search({ searchText: 'Category:budget AND "recently renovated"^3', queryType: "full", - searchMode: "all" + searchMode: "all", }); for await (const result of searchResults.results) { console.log(result); @@ -335,7 +335,7 @@ async function main() { searchText: "wifi -luxury", // Only fields in Hotel can be added to this array. // TS will complain if one is misspelled. - select: ["HotelId", "HotelName", "Rating"] + select: ["HotelId", "HotelName", "Rating"], }); for await (const result of searchResults.results) { @@ -368,7 +368,7 @@ async function main() { searchText: "WiFi", filter: odata`Rooms/any(room: room/BaseRate lt ${baseRateMax}) and Rating ge ${ratingMin}`, orderBy: ["Rating desc"], - select: ["HotelId", "HotelName", "Rating"] + select: ["HotelId", "HotelName", "Rating"], }); for await (const result of searchResults.results) { // Each result will have "HotelId", "HotelName", and "Rating" @@ -396,7 +396,7 @@ const client = new SearchClient( async function main() { const searchResults = await client.search({ searchText: "WiFi", - facets: ["Category,count:3,sort:count", "Rooms/BaseRate,interval:100"] + facets: ["Category,count:3,sort:count", "Rooms/BaseRate,interval:100"], }); console.log(searchResults.facets); // Output will look like: @@ -441,7 +441,7 @@ async function main() { select: ["HotelId", "HotelName"], highlightPreTag: "", highlightPostTag: "", - top: 3 + top: 3, }); for (const result of suggestResult.results) { @@ -470,7 +470,7 @@ const client = new SearchClient( async function main() { const autocompleteResult = await client.autocomplete({ searchText: "de", - suggesterName: "sg" + suggesterName: "sg", }); for (const result of autocompleteResult.results || []) { @@ -491,7 +491,7 @@ In order to ensure that analysis is configured correctly, developers can directl const { SearchIndexClient, AzureKeyCredential, - KnownTokenFilterNames + KnownTokenFilterNames, } = require("@azure/search-documents"); const client = new SearchIndexClient("", new AzureKeyCredential("")); @@ -501,24 +501,24 @@ async function main() { index.tokenizers.push({ name: "example-tokenizer", odatatype: "#Microsoft.Azure.Search.StandardTokenizerV2", - maxTokenLength: 125 + maxTokenLength: 125, }); index.charFilters.push({ name: "example-char-filter", odatatype: "#Microsoft.Azure.Search.MappingCharFilter", - mappings: ["MSFT=>Microsoft"] + mappings: ["MSFT=>Microsoft"], }); index.tokenFilters.push({ name: "example-token-filter", odatatype: "#Microsoft.Azure.Search.StopwordsTokenFilter", - stopwords: ["xyzzy"] + stopwords: ["xyzzy"], }); index.analyzers.push({ name: "example-analyzer", odatatype: "#Microsoft.Azure.Search.CustomAnalyzer", tokenizer: "example-tokenizer", charFilters: ["example-char-filter"], - tokenFilters: [KnownTokenFilterNames.Lowercase, "example-token-filter"] + tokenFilters: [KnownTokenFilterNames.Lowercase, "example-token-filter"], }); // Note adding this analyzer to an existing index will cause it to be unresponsive @@ -527,7 +527,7 @@ async function main() { const result = await client.analyzeText("example-index", { text: "MSFT is xyzzy Great!", - analyzer: "example-analyzer" + analyzer: "example-analyzer", }); console.log(result.tokens); diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index 419669e03a02..4ed8a6928971 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -1,6 +1,6 @@ { "name": "@azure/search-documents", - "version": "1.0.0-preview.4", + "version": "1.0.0-preview.5", "description": "Azure client library to use Cognitive Search for node.js and browser.", "sdk-type": "client", "main": "dist/index.js", @@ -82,7 +82,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -94,11 +94,11 @@ "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "chai": "^4.2.0", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -126,14 +126,14 @@ "rimraf": "^3.0.0", "rollup": "^1.16.3", "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "sinon": "^7.1.0", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/search/search-documents/review/search-documents.api.md b/sdk/search/search-documents/review/search-documents.api.md index f201f98d8cb3..6cccd9663f89 100644 --- a/sdk/search/search-documents/review/search-documents.api.md +++ b/sdk/search/search-documents/review/search-documents.api.md @@ -11,26 +11,25 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PipelineOptions } from '@azure/core-http'; // @public -export interface AccessCondition { - ifMatch?: string; - ifNoneMatch?: string; +export interface AnalyzedTokenInfo { + readonly endOffset: number; + readonly position: number; + readonly startOffset: number; + readonly token: string; } -// @public -export type Analyzer = CustomAnalyzer | PatternAnalyzer | StandardAnalyzer | StopAnalyzer; - // @public export interface AnalyzeRequest { - analyzer?: string; + analyzerName?: string; charFilters?: string[]; text: string; tokenFilters?: string[]; - tokenizer?: string; + tokenizerName?: string; } // @public export interface AnalyzeResult { - tokens: TokenInfo[]; + tokens: AnalyzedTokenInfo[]; } // @public @@ -50,7 +49,7 @@ export interface AutocompleteItem { } // @public -export type AutocompleteMode = "oneTerm" | "twoTerms" | "oneTermWithContext"; +export type AutocompleteMode = 'oneTerm' | 'twoTerms' | 'oneTermWithContext'; // @public export type AutocompleteOptions = OperationOptions & AutocompleteRequest; @@ -63,8 +62,6 @@ export interface AutocompleteRequest { highlightPreTag?: string; minimumCoverage?: number; searchFields?: Fields[]; - searchText: string; - suggesterName: string; top?: number; useFuzzyMatching?: boolean; } @@ -83,6 +80,13 @@ export interface AzureActiveDirectoryApplicationCredentials { export { AzureKeyCredential } +// @public +export interface BM25Similarity { + b?: number; + k1?: number; + odatatype: "#Microsoft.Azure.Search.BM25Similarity"; +} + // @public export type CharFilter = MappingCharFilter | PatternReplaceCharFilter; @@ -97,6 +101,11 @@ export interface CjkBigramTokenFilter { // @public export type CjkBigramTokenFilterScripts = 'han' | 'hiragana' | 'katakana' | 'hangul'; +// @public +export interface ClassicSimilarity { + odatatype: "#Microsoft.Azure.Search.ClassicSimilarity"; +} + // @public export interface ClassicTokenizer { maxTokenLength?: number; @@ -128,7 +137,7 @@ export type ComplexDataType = "Edm.ComplexType" | "Collection(Edm.ComplexType)"; // @public export interface ComplexField { - fields: Field[]; + fields: SearchField[]; name: string; type: ComplexDataType; } @@ -153,7 +162,7 @@ export interface CorsOptions { export type CountDocumentsOptions = OperationOptions; // @public -export type CreateDataSourceOptions = OperationOptions; +export type CreateDataSourceConnectionOptions = OperationOptions; // @public export type CreateIndexerOptions = OperationOptions; @@ -162,21 +171,30 @@ export type CreateIndexerOptions = OperationOptions; export type CreateIndexOptions = OperationOptions; // @public -export type CreateorUpdateDataSourceOptions = OperationOptions & ETagOperationOptions; +export interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type CreateorUpdateIndexerOptions = OperationOptions & ETagOperationOptions; +export interface CreateorUpdateIndexerOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export interface CreateOrUpdateIndexOptions extends OperationOptions, ETagOperationOptions { +export interface CreateOrUpdateIndexOptions extends OperationOptions { allowIndexDowntime?: boolean; + onlyIfUnchanged?: boolean; } // @public -export type CreateOrUpdateSkillsetOptions = OperationOptions & ETagOperationOptions; +export interface CreateOrUpdateSkillsetOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type CreateOrUpdateSynonymMapOptions = OperationOptions & ETagOperationOptions; +export interface CreateOrUpdateSynonymMapOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public export type CreateSkillsetOptions = OperationOptions; @@ -190,41 +208,15 @@ export interface CustomAnalyzer { name: string; odatatype: "#Microsoft.Azure.Search.CustomAnalyzer"; tokenFilters?: string[]; - tokenizer: string; + tokenizerName: string; } // @public export type DataChangeDetectionPolicy = HighWaterMarkChangeDetectionPolicy | SqlIntegratedChangeTrackingPolicy; -// @public -export interface DataContainer { - name: string; - query?: string; -} - // @public export type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolicy; -// @public -export interface DataSource { - container: DataContainer; - credentials: DataSourceCredentials; - dataChangeDetectionPolicy?: DataChangeDetectionPolicy; - dataDeletionDetectionPolicy?: DataDeletionDetectionPolicy; - description?: string; - etag?: string; - name: string; - type: DataSourceType; -} - -// @public -export interface DataSourceCredentials { - connectionString?: string; -} - -// @public -export type DataSourceType = 'azuresql' | 'cosmosdb' | 'azureblob' | 'azuretable' | 'mysql'; - // @public export interface DefaultCognitiveServicesAccount { description?: string; @@ -232,22 +224,32 @@ export interface DefaultCognitiveServicesAccount { } // @public -export type DeleteDataSourceOptions = OperationOptions & ETagOperationOptions; +export interface DeleteDataSourceConnectionOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type DeleteDocumentsOptions = IndexDocuments; +export type DeleteDocumentsOptions = IndexDocumentsOptions; // @public -export type DeleteIndexerOptions = OperationOptions & ETagOperationOptions; +export interface DeleteIndexerOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type DeleteIndexOptions = OperationOptions & ETagOperationOptions; +export interface DeleteIndexOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type DeleteSkillsetOptions = OperationOptions & ETagOperationOptions; +export interface DeleteSkillsetOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public -export type DeleteSynonymMapOptions = OperationOptions & ETagOperationOptions; +export interface DeleteSynonymMapOptions extends OperationOptions { + onlyIfUnchanged?: boolean; +} // @public export interface DictionaryDecompounderTokenFilter { @@ -280,22 +282,13 @@ export interface EdgeNGramTokenFilter { maxGram?: number; minGram?: number; name: string; - odatatype: "#Microsoft.Azure.Search.EdgeNGramTokenFilter"; + odatatype: "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2" | "#Microsoft.Azure.Search.EdgeNGramTokenFilter"; side?: EdgeNGramTokenFilterSide; } // @public export type EdgeNGramTokenFilterSide = 'front' | 'back'; -// @public -export interface EdgeNGramTokenFilterV2 { - maxGram?: number; - minGram?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2"; - side?: EdgeNGramTokenFilterSide; -} - // @public export interface EdgeNGramTokenizer { maxGram?: number; @@ -312,14 +305,6 @@ export interface ElisionTokenFilter { odatatype: "#Microsoft.Azure.Search.ElisionTokenFilter"; } -// @public -export interface EncryptionKey { - accessCredentials?: AzureActiveDirectoryApplicationCredentials; - keyVaultKeyName: string; - keyVaultKeyVersion: string; - keyVaultUri: string; -} - // @public export type EntityCategory = 'location' | 'organization' | 'person' | 'quantity' | 'datetime' | 'url' | 'email'; @@ -340,20 +325,12 @@ export interface EntityRecognitionSkill { // @public export type EntityRecognitionSkillLanguage = 'ar' | 'cs' | 'zh-Hans' | 'zh-Hant' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'el' | 'hu' | 'it' | 'ja' | 'ko' | 'no' | 'pl' | 'pt-PT' | 'pt-BR' | 'ru' | 'es' | 'sv' | 'tr'; -// @public -export interface ETagOperationOptions { - accessCondition?: AccessCondition; -} - // @public export interface FacetResult { [property: string]: any; readonly count?: number; } -// @public -export type Field = SimpleField | ComplexField; - // @public export interface FieldMapping { mappingFunction?: FieldMappingFunction; @@ -392,7 +369,7 @@ export class GeographyPoint { } // @public -export type GetDataSourceOptions = OperationOptions; +export type GetDataSourceConnectionOptions = OperationOptions; // @public export interface GetDocumentOptions extends OperationOptions { @@ -411,12 +388,6 @@ export type GetIndexOptions = OperationOptions; // @public export type GetIndexStatisticsOptions = OperationOptions; -// @public -export interface GetIndexStatisticsResult { - readonly documentCount: number; - readonly storageSize: number; -} - // @public export type GetServiceStatisticsOptions = OperationOptions; @@ -452,28 +423,7 @@ export type ImageAnalysisSkillLanguage = 'en' | 'es' | 'ja' | 'pt' | 'zh'; export type ImageDetail = 'celebrities' | 'landmarks'; // @public -export interface Index { - analyzers?: Analyzer[]; - charFilters?: CharFilter[]; - corsOptions?: CorsOptions; - defaultScoringProfile?: string; - encryptionKey?: EncryptionKey; - etag?: string; - fields: Field[]; - name: string; - scoringProfiles?: ScoringProfile[]; - suggesters?: Suggester[]; - tokenFilters?: TokenFilter[]; - tokenizers?: Tokenizer[]; -} - -// @public -export type IndexActionType = "upload" | "merge" | "mergeOrUpload" | "delete"; - -// @public -export interface IndexDocuments extends OperationOptions { - throwOnAnyFailure?: boolean; -} +export type IndexActionType = 'upload' | 'merge' | 'mergeOrUpload' | 'delete'; // @public export type IndexDocumentsAction = { @@ -485,63 +435,39 @@ export class IndexDocumentsBatch { constructor(actions?: IndexDocumentsAction[]); readonly actions: IndexDocumentsAction[]; delete(keyName: keyof T, keyValues: string[]): void; + delete(documents: T[]): void; merge(documents: T[]): void; mergeOrUpload(documents: T[]): void; upload(documents: T[]): void; } // @public -export interface IndexDocumentsResult { - readonly results: IndexingResult[]; -} - -// @public -export interface Indexer { - dataSourceName: string; - description?: string; - etag?: string; - fieldMappings?: FieldMapping[]; - isDisabled?: boolean; - name: string; - outputFieldMappings?: FieldMapping[]; - parameters?: IndexingParameters; - schedule?: IndexingSchedule; - skillsetName?: string; - targetIndexName: string; +export interface IndexDocumentsOptions extends OperationOptions { + throwOnAnyFailure?: boolean; } // @public -export interface IndexerExecutionInfo { - readonly executionHistory: IndexerExecutionResult[]; - readonly lastResult?: IndexerExecutionResult; - readonly limits: IndexerLimits; - readonly status: IndexerStatus; +export interface IndexDocumentsResult { + readonly results: IndexingResult[]; } // @public export interface IndexerExecutionResult { readonly endTime?: Date; readonly errorMessage?: string; - readonly errors: ItemError[]; + readonly errors: SearchIndexerError[]; readonly failedItemCount: number; readonly finalTrackingState?: string; readonly initialTrackingState?: string; readonly itemCount: number; readonly startTime?: Date; readonly status: IndexerExecutionStatus; - readonly warnings: ItemWarning[]; + readonly warnings: SearchIndexerWarning[]; } // @public export type IndexerExecutionStatus = 'transientFailure' | 'success' | 'inProgress' | 'reset'; -// @public -export interface IndexerLimits { - readonly maxDocumentContentCharactersToExtract?: number; - readonly maxDocumentExtractionSize?: number; - readonly maxRunTime?: string; -} - // @public export type IndexerStatus = 'unknown' | 'error' | 'running'; @@ -569,6 +495,12 @@ export interface IndexingSchedule { startTime?: Date; } +// @public +export type IndexIterator = PagedAsyncIterableIterator; + +// @public +export type IndexNameIterator = PagedAsyncIterableIterator; + // @public export interface InputFieldMappingEntry { inputs?: InputFieldMappingEntry[]; @@ -577,25 +509,6 @@ export interface InputFieldMappingEntry { sourceContext?: string; } -// @public -export interface ItemError { - readonly details?: string; - readonly documentationLink?: string; - readonly errorMessage: string; - readonly key?: string; - readonly name?: string; - readonly statusCode: number; -} - -// @public -export interface ItemWarning { - readonly details?: string; - readonly documentationLink?: string; - readonly key?: string; - readonly message: string; - readonly name?: string; -} - // @public export interface KeepTokenFilter { keepWords: string[]; @@ -629,16 +542,9 @@ export interface KeywordMarkerTokenFilter { // @public export interface KeywordTokenizer { - bufferSize?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.KeywordTokenizer"; -} - -// @public -export interface KeywordTokenizerV2 { maxTokenLength?: number; name: string; - odatatype: "#Microsoft.Azure.Search.KeywordTokenizerV2"; + odatatype: "#Microsoft.Azure.Search.KeywordTokenizerV2" | "#Microsoft.Azure.Search.KeywordTokenizer"; } // @public @@ -810,12 +716,21 @@ export interface LanguageDetectionSkill { // @public export interface LengthTokenFilter { - max?: number; - min?: number; + maxLength?: number; + minLength?: number; name: string; odatatype: "#Microsoft.Azure.Search.LengthTokenFilter"; } +// @public +export type LexicalAnalyzer = CustomAnalyzer | PatternAnalyzer | LuceneStandardAnalyzer | StopAnalyzer; + +// @public +export type LexicalAnalyzerName = 'ar.microsoft' | 'ar.lucene' | 'hy.lucene' | 'bn.microsoft' | 'eu.lucene' | 'bg.microsoft' | 'bg.lucene' | 'ca.microsoft' | 'ca.lucene' | 'zh-Hans.microsoft' | 'zh-Hans.lucene' | 'zh-Hant.microsoft' | 'zh-Hant.lucene' | 'hr.microsoft' | 'cs.microsoft' | 'cs.lucene' | 'da.microsoft' | 'da.lucene' | 'nl.microsoft' | 'nl.lucene' | 'en.microsoft' | 'en.lucene' | 'et.microsoft' | 'fi.microsoft' | 'fi.lucene' | 'fr.microsoft' | 'fr.lucene' | 'gl.lucene' | 'de.microsoft' | 'de.lucene' | 'el.microsoft' | 'el.lucene' | 'gu.microsoft' | 'he.microsoft' | 'hi.microsoft' | 'hi.lucene' | 'hu.microsoft' | 'hu.lucene' | 'is.microsoft' | 'id.microsoft' | 'id.lucene' | 'ga.lucene' | 'it.microsoft' | 'it.lucene' | 'ja.microsoft' | 'ja.lucene' | 'kn.microsoft' | 'ko.microsoft' | 'ko.lucene' | 'lv.microsoft' | 'lv.lucene' | 'lt.microsoft' | 'ml.microsoft' | 'ms.microsoft' | 'mr.microsoft' | 'nb.microsoft' | 'no.lucene' | 'fa.lucene' | 'pl.microsoft' | 'pl.lucene' | 'pt-BR.microsoft' | 'pt-BR.lucene' | 'pt-PT.microsoft' | 'pt-PT.lucene' | 'pa.microsoft' | 'ro.microsoft' | 'ro.lucene' | 'ru.microsoft' | 'ru.lucene' | 'sr-cyrillic.microsoft' | 'sr-latin.microsoft' | 'sk.microsoft' | 'sl.microsoft' | 'es.microsoft' | 'es.lucene' | 'sv.microsoft' | 'sv.lucene' | 'ta.microsoft' | 'te.microsoft' | 'th.microsoft' | 'th.lucene' | 'tr.microsoft' | 'tr.lucene' | 'uk.microsoft' | 'ur.microsoft' | 'vi.microsoft' | 'standard.lucene' | 'standardasciifolding.lucene' | 'keyword' | 'pattern' | 'simple' | 'stop' | 'whitespace'; + +// @public +export type LexicalTokenizer = ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer | PathHierarchyTokenizer | PatternTokenizer | LuceneStandardTokenizer | UaxUrlEmailTokenizer; + // @public export interface LimitTokenFilter { consumeAllTokens?: boolean; @@ -825,7 +740,7 @@ export interface LimitTokenFilter { } // @public -export type ListDataSourcesOptions = OperationOptions; +export type ListDataSourceConnectionsOptions = OperationOptions; // @public export type ListIndexersOptions = OperationOptions; @@ -844,6 +759,21 @@ export type ListSkillsetsOptions = OperationOptions; // @public export type ListSynonymMapsOptions = OperationOptions; +// @public +export interface LuceneStandardAnalyzer { + maxTokenLength?: number; + name: string; + odatatype: "#Microsoft.Azure.Search.StandardAnalyzer"; + stopwords?: string[]; +} + +// @public +export interface LuceneStandardTokenizer { + maxTokenLength?: number; + name: string; + odatatype: "#Microsoft.Azure.Search.StandardTokenizerV2" | "#Microsoft.Azure.Search.StandardTokenizer"; +} + // @public export interface MagnitudeScoringFunction { boost: number; @@ -868,10 +798,10 @@ export interface MappingCharFilter { } // @public -export type MergeDocumentsOptions = IndexDocuments; +export type MergeDocumentsOptions = IndexDocumentsOptions; // @public -export type MergeOrUploadDocumentsOptions = IndexDocuments; +export type MergeOrUploadDocumentsOptions = IndexDocumentsOptions; // @public export interface MergeSkill { @@ -914,15 +844,7 @@ export interface NGramTokenFilter { maxGram?: number; minGram?: number; name: string; - odatatype: "#Microsoft.Azure.Search.NGramTokenFilter"; -} - -// @public -export interface NGramTokenFilterV2 { - maxGram?: number; - minGram?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.NGramTokenFilterV2"; + odatatype: "#Microsoft.Azure.Search.NGramTokenFilterV2" | "#Microsoft.Azure.Search.NGramTokenFilter"; } // @public @@ -944,7 +866,6 @@ export interface OcrSkill { odatatype: "#Microsoft.Skills.Vision.OcrSkill"; outputs: OutputFieldMappingEntry[]; shouldDetectOrientation?: boolean; - textExtractionAlgorithm?: TextExtractionAlgorithm; } // @public @@ -960,7 +881,7 @@ export interface OutputFieldMappingEntry { } // @public -export interface PathHierarchyTokenizerV2 { +export interface PathHierarchyTokenizer { delimiter?: string; maxTokenLength?: number; name: string; @@ -1025,28 +946,7 @@ export interface PhoneticTokenFilter { } // @public -export type QueryType = "simple" | "full"; - -// @public -export interface RawSearchRequest { - facets?: string[]; - filter?: string; - highlightFields?: string; - highlightPostTag?: string; - highlightPreTag?: string; - includeTotalResultCount?: boolean; - minimumCoverage?: number; - orderBy?: string; - queryType?: QueryType; - scoringParameters?: string[]; - scoringProfile?: string; - searchFields?: string; - searchMode?: SearchMode; - searchText?: string; - select?: string; - skip?: number; - top?: number; -} +export type QueryType = 'simple' | 'full'; // @public export type RegexFlags = 'CANON_EQ' | 'CASE_INSENSITIVE' | 'COMMENTS' | 'DOTALL' | 'LITERAL' | 'MULTILINE' | 'UNICODE_CASE' | 'UNIX_LINES'; @@ -1084,17 +984,18 @@ export interface ScoringProfile { export class SearchClient { constructor(endpoint: string, indexName: string, credential: KeyCredential, options?: SearchClientOptions); readonly apiVersion: string; - autocomplete(options: AutocompleteOptions): Promise; - countDocuments(options?: CountDocumentsOptions): Promise; + autocomplete(searchText: string, suggesterName: string, options: AutocompleteOptions): Promise; + deleteDocuments(documents: T[], options?: DeleteDocumentsOptions): Promise; deleteDocuments(keyName: keyof T, keyValues: string[], options?: DeleteDocumentsOptions): Promise; readonly endpoint: string; getDocument(key: string, options?: GetDocumentOptions): Promise; - indexDocuments(batch: IndexDocumentsBatch, options?: IndexDocuments): Promise; + getDocumentsCount(options?: CountDocumentsOptions): Promise; + indexDocuments(batch: IndexDocumentsBatch, options?: IndexDocumentsOptions): Promise; readonly indexName: string; mergeDocuments(documents: T[], options?: MergeDocumentsOptions): Promise; mergeOrUploadDocuments(documents: T[], options?: MergeOrUploadDocumentsOptions): Promise; - search(options?: SearchOptions): Promise>>; - suggest(options: SuggestOptions): Promise>>; + search(searchText?: string, options?: SearchOptions): Promise>>; + suggest(searchText: string, suggesterName: string, options: SuggestOptions): Promise>>; uploadDocuments(documents: T[], options?: UploadDocumentsOptions): Promise; } @@ -1121,54 +1022,93 @@ export interface SearchDocumentsResultBase { }; } +// @public +export type SearchField = SimpleField | ComplexField; + +// @public +export type SearchFieldDataType = "Edm.String" | "Edm.Int32" | "Edm.Int64" | "Edm.Double" | "Edm.Boolean" | "Edm.DateTimeOffset" | "Edm.GeographyPoint" | "Collection(Edm.String)" | "Collection(Edm.Int32)" | "Collection(Edm.Int64)" | "Collection(Edm.Double)" | "Collection(Edm.Boolean)" | "Collection(Edm.DateTimeOffset)" | "Collection(Edm.GeographyPoint)"; + +// @public +export interface SearchIndex { + analyzers?: LexicalAnalyzer[]; + charFilters?: CharFilter[]; + corsOptions?: CorsOptions; + defaultScoringProfile?: string; + encryptionKey?: SearchResourceEncryptionKey; + etag?: string; + fields: SearchField[]; + name: string; + scoringProfiles?: ScoringProfile[]; + similarity?: SimilarityAlgorithm; + suggesters?: SearchSuggester[]; + tokenFilters?: TokenFilter[]; + tokenizers?: LexicalTokenizer[]; +} + // @public export class SearchIndexClient { constructor(endpoint: string, credential: KeyCredential, options?: SearchIndexClientOptions); analyzeText(indexName: string, options: AnalyzeTextOptions): Promise; readonly apiVersion: string; - createIndex(index: Index, options?: CreateIndexOptions): Promise; - createOrUpdateIndex(index: Index, options?: CreateOrUpdateIndexOptions): Promise; + createIndex(index: SearchIndex, options?: CreateIndexOptions): Promise; + createOrUpdateIndex(index: SearchIndex, options?: CreateOrUpdateIndexOptions): Promise; createOrUpdateSynonymMap(synonymMap: SynonymMap, options?: CreateOrUpdateSynonymMapOptions): Promise; createSynonymMap(synonymMap: SynonymMap, options?: CreateSynonymMapOptions): Promise; - deleteIndex(index: string | Index, options?: DeleteIndexOptions): Promise; + deleteIndex(index: string | SearchIndex, options?: DeleteIndexOptions): Promise; deleteSynonymMap(synonymMap: string | SynonymMap, options?: DeleteSynonymMapOptions): Promise; readonly endpoint: string; - getIndex(indexName: string, options?: GetIndexOptions): Promise; - getIndexStatistics(indexName: string, options?: GetIndexStatisticsOptions): Promise; - getServiceStatistics(options?: GetServiceStatisticsOptions): Promise; + getIndex(indexName: string, options?: GetIndexOptions): Promise; + getIndexStatistics(indexName: string, options?: GetIndexStatisticsOptions): Promise; + getSearchClient(indexName: string, options?: SearchClientOptions): SearchClient; + getServiceStatistics(options?: GetServiceStatisticsOptions): Promise; getSynonymMap(synonymMapName: string, options?: GetSynonymMapsOptions): Promise; - listIndexes(options?: ListIndexesOptions): Promise>; - listIndexesNames(options?: ListIndexesOptions): Promise>; + listIndexes(options?: ListIndexesOptions): IndexIterator; + listIndexesNames(options?: ListIndexesOptions): IndexNameIterator; listSynonymMaps(options?: ListSynonymMapsOptions): Promise>; listSynonymMapsNames(options?: ListSynonymMapsOptions): Promise>; -} + } // @public export type SearchIndexClientOptions = PipelineOptions; +// @public +export interface SearchIndexer { + dataSourceName: string; + description?: string; + etag?: string; + fieldMappings?: FieldMapping[]; + isDisabled?: boolean; + name: string; + outputFieldMappings?: FieldMapping[]; + parameters?: IndexingParameters; + schedule?: IndexingSchedule; + skillsetName?: string; + targetIndexName: string; +} + // @public export class SearchIndexerClient { constructor(endpoint: string, credential: KeyCredential, options?: SearchIndexerClientOptions); readonly apiVersion: string; - createDataSource(dataSource: DataSource, options?: CreateDataSourceOptions): Promise; - createIndexer(indexer: Indexer, options?: CreateIndexerOptions): Promise; - createOrUpdateDataSource(dataSource: DataSource, options?: CreateorUpdateDataSourceOptions): Promise; - createOrUpdateIndexer(indexer: Indexer, options?: CreateorUpdateIndexerOptions): Promise; - createOrUpdateSkillset(skillset: Skillset, options?: CreateOrUpdateSkillsetOptions): Promise; - createSkillset(skillset: Skillset, options?: CreateSkillsetOptions): Promise; - deleteDataSource(dataSource: string | DataSource, options?: DeleteDataSourceOptions): Promise; - deleteIndexer(indexer: string | Indexer, options?: DeleteIndexerOptions): Promise; - deleteSkillset(skillset: string | Skillset, options?: DeleteSkillsetOptions): Promise; + createDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: CreateDataSourceConnectionOptions): Promise; + createIndexer(indexer: SearchIndexer, options?: CreateIndexerOptions): Promise; + createOrUpdateDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: CreateorUpdateDataSourceConnectionOptions): Promise; + createOrUpdateIndexer(indexer: SearchIndexer, options?: CreateorUpdateIndexerOptions): Promise; + createOrUpdateSkillset(skillset: SearchIndexerSkillset, options?: CreateOrUpdateSkillsetOptions): Promise; + createSkillset(skillset: SearchIndexerSkillset, options?: CreateSkillsetOptions): Promise; + deleteDataSourceConnection(dataSourceConnection: string | SearchIndexerDataSourceConnection, options?: DeleteDataSourceConnectionOptions): Promise; + deleteIndexer(indexer: string | SearchIndexer, options?: DeleteIndexerOptions): Promise; + deleteSkillset(skillset: string | SearchIndexerSkillset, options?: DeleteSkillsetOptions): Promise; readonly endpoint: string; - getDataSource(dataSourceName: string, options?: GetDataSourceOptions): Promise; - getIndexer(indexerName: string, options?: GetIndexerOptions): Promise; - getIndexerStatus(indexerName: string, options?: GetIndexerStatusOptions): Promise; - getSkillset(skillsetName: string, options?: GetSkillSetOptions): Promise; - listDataSources(options?: ListDataSourcesOptions): Promise>; - listDataSourcesNames(options?: ListDataSourcesOptions): Promise>; - listIndexers(options?: ListIndexersOptions): Promise>; + getDataSourceConnection(dataSourceConnectionName: string, options?: GetDataSourceConnectionOptions): Promise; + getIndexer(indexerName: string, options?: GetIndexerOptions): Promise; + getIndexerStatus(indexerName: string, options?: GetIndexerStatusOptions): Promise; + getSkillset(skillsetName: string, options?: GetSkillSetOptions): Promise; + listDataSourceConnections(options?: ListDataSourceConnectionsOptions): Promise>; + listDataSourceConnectionsNames(options?: ListDataSourceConnectionsOptions): Promise>; + listIndexers(options?: ListIndexersOptions): Promise>; listIndexersNames(options?: ListIndexersOptions): Promise>; - listSkillsets(options?: ListSkillsetsOptions): Promise>; + listSkillsets(options?: ListSkillsetsOptions): Promise>; listSkillsetsNames(options?: ListSkillsetsOptions): Promise>; resetIndexer(indexerName: string, options?: ResetIndexerOptions): Promise; runIndexer(indexerName: string, options?: RunIndexerOptions): Promise; @@ -1177,23 +1117,117 @@ export class SearchIndexerClient { // @public export type SearchIndexerClientOptions = PipelineOptions; +// @public +export interface SearchIndexerDataContainer { + name: string; + query?: string; +} + +// @public +export interface SearchIndexerDataSourceConnection { + connectionString?: string; + container: SearchIndexerDataContainer; + dataChangeDetectionPolicy?: DataChangeDetectionPolicy; + dataDeletionDetectionPolicy?: DataDeletionDetectionPolicy; + description?: string; + etag?: string; + name: string; + type: SearchIndexerDataSourceType; +} + +// @public +export type SearchIndexerDataSourceType = 'azuresql' | 'cosmosdb' | 'azureblob' | 'azuretable' | 'mysql'; + +// @public +export interface SearchIndexerError { + readonly details?: string; + readonly documentationLink?: string; + readonly errorMessage: string; + readonly key?: string; + readonly name?: string; + readonly statusCode: number; +} + +// @public +export interface SearchIndexerLimits { + readonly maxDocumentContentCharactersToExtract?: number; + readonly maxDocumentExtractionSize?: number; + readonly maxRunTime?: string; +} + +// @public +export type SearchIndexerSkill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | TextTranslationSkill | WebApiSkill; + +// @public +export interface SearchIndexerSkillset { + cognitiveServicesAccount?: CognitiveServicesAccount; + description?: string; + etag?: string; + name: string; + skills: SearchIndexerSkill[]; +} + +// @public +export interface SearchIndexerStatus { + readonly executionHistory: IndexerExecutionResult[]; + readonly lastResult?: IndexerExecutionResult; + readonly limits: SearchIndexerLimits; + readonly status: IndexerStatus; +} + +// @public +export interface SearchIndexerWarning { + readonly details?: string; + readonly documentationLink?: string; + readonly key?: string; + readonly message: string; + readonly name?: string; +} + +// @public +export interface SearchIndexStatistics { + readonly documentCount: number; + readonly storageSize: number; +} + // @public export type SearchIterator = PagedAsyncIterableIterator, SearchDocumentsPageResult, ListSearchResultsPageSettings>; // @public -export type SearchMode = "any" | "all"; +export type SearchMode = 'any' | 'all'; + +// @public +export type SearchOptions = OperationOptions & SearchRequestOptions; // @public -export type SearchOptions = OperationOptions & SearchRequest; +export interface SearchRequest { + facets?: string[]; + filter?: string; + highlightFields?: string; + highlightPostTag?: string; + highlightPreTag?: string; + includeTotalCount?: boolean; + minimumCoverage?: number; + orderBy?: string; + queryType?: QueryType; + scoringParameters?: string[]; + scoringProfile?: string; + searchFields?: string; + searchMode?: SearchMode; + searchText?: string; + select?: string; + skip?: number; + top?: number; +} // @public -export interface SearchRequest { +export interface SearchRequestOptions { facets?: string[]; filter?: string; highlightFields?: string; highlightPostTag?: string; highlightPreTag?: string; - includeTotalResultCount?: boolean; + includeTotalCount?: boolean; minimumCoverage?: number; orderBy?: string[]; queryType?: QueryType; @@ -1201,12 +1235,20 @@ export interface SearchRequest { scoringProfile?: string; searchFields?: Fields[]; searchMode?: SearchMode; - searchText?: string; select?: Fields[]; skip?: number; top?: number; } +// @public +export interface SearchResourceEncryptionKey { + applicationId?: string; + applicationSecret?: string; + keyName: string; + keyVersion: string; + vaultUrl: string; +} + // @public export type SearchResult = { readonly score: number; @@ -1215,6 +1257,18 @@ export type SearchResult = { }; } & T; +// @public +export interface SearchServiceStatistics { + counters: ServiceCounters; + limits: ServiceLimits; +} + +// @public +export interface SearchSuggester { + name: string; + sourceFields: string[]; +} + // @public export interface SentimentSkill { context?: string; @@ -1248,12 +1302,6 @@ export interface ServiceLimits { maxFieldsPerIndex?: number; } -// @public -export interface ServiceStatistics { - counters: ServiceCounters; - limits: ServiceLimits; -} - // @public export interface ShaperSkill { context?: string; @@ -1277,34 +1325,22 @@ export interface ShingleTokenFilter { } // @public -export type SimpleDataType = "Edm.String" | "Edm.Int32" | "Edm.Int64" | "Edm.Double" | "Edm.Boolean" | "Edm.DateTimeOffset" | "Edm.GeographyPoint" | "Collection(Edm.String)" | "Collection(Edm.Int32)" | "Collection(Edm.Int64)" | "Collection(Edm.Double)" | "Collection(Edm.Boolean)" | "Collection(Edm.DateTimeOffset)" | "Collection(Edm.GeographyPoint)"; +export type SimilarityAlgorithm = ClassicSimilarity | BM25Similarity; // @public export interface SimpleField { - analyzer?: string; + analyzerName?: LexicalAnalyzerName; facetable?: boolean; filterable?: boolean; hidden?: boolean; - indexAnalyzer?: string; + indexAnalyzerName?: LexicalAnalyzerName; key?: boolean; name: string; searchable?: boolean; - searchAnalyzer?: string; + searchAnalyzerName?: LexicalAnalyzerName; sortable?: boolean; - synonymMaps?: string[]; - type: SimpleDataType; -} - -// @public -export type Skill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | TextTranslationSkill | WebApiSkill; - -// @public -export interface Skillset { - cognitiveServicesAccount?: CognitiveServicesAccount; - description: string; - etag?: string; - name: string; - skills: Skill[]; + synonymMapNames?: string[]; + type: SearchFieldDataType; } // @public @@ -1345,28 +1381,6 @@ export interface SqlIntegratedChangeTrackingPolicy { odatatype: "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy"; } -// @public -export interface StandardAnalyzer { - maxTokenLength?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.StandardAnalyzer"; - stopwords?: string[]; -} - -// @public -export interface StandardTokenizer { - maxTokenLength?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.StandardTokenizer"; -} - -// @public -export interface StandardTokenizerV2 { - maxTokenLength?: number; - name: string; - odatatype: "#Microsoft.Azure.Search.StandardTokenizerV2"; -} - // @public export interface StemmerOverrideTokenFilter { name: string; @@ -1410,12 +1424,6 @@ export interface SuggestDocumentsResult { readonly results: SuggestResult[]; } -// @public -export interface Suggester { - name: string; - sourceFields: string[]; -} - // @public export type SuggestOptions = OperationOptions & SuggestRequest; @@ -1427,9 +1435,7 @@ export interface SuggestRequest { minimumCoverage?: number; orderBy?: string[]; searchFields?: Fields[]; - searchText: string; select?: Fields[]; - suggesterName: string; top?: number; useFuzzyMatching?: boolean; } @@ -1441,7 +1447,7 @@ export type SuggestResult = { // @public export interface SynonymMap { - encryptionKey?: EncryptionKey; + encryptionKey?: SearchResourceEncryptionKey; etag?: string; name: string; synonyms: string[]; @@ -1470,9 +1476,6 @@ export interface TagScoringParameters { tagsParameter: string; } -// @public -export type TextExtractionAlgorithm = 'printed' | 'handwritten'; - // @public export type TextSplitMode = 'pages' | 'sentences'; @@ -1503,18 +1506,7 @@ export interface TextWeights { export type TokenCharacterKind = 'letter' | 'digit' | 'whitespace' | 'punctuation' | 'symbol'; // @public -export type TokenFilter = AsciiFoldingTokenFilter | CjkBigramTokenFilter | CommonGramTokenFilter | DictionaryDecompounderTokenFilter | EdgeNGramTokenFilter | EdgeNGramTokenFilterV2 | ElisionTokenFilter | KeepTokenFilter | KeywordMarkerTokenFilter | LengthTokenFilter | LimitTokenFilter | NGramTokenFilter | NGramTokenFilterV2 | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PhoneticTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerTokenFilter | StemmerOverrideTokenFilter | StopwordsTokenFilter | SynonymTokenFilter | TruncateTokenFilter | UniqueTokenFilter | WordDelimiterTokenFilter; - -// @public -export interface TokenInfo { - readonly endOffset: number; - readonly position: number; - readonly startOffset: number; - readonly token: string; -} - -// @public -export type Tokenizer = ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer | KeywordTokenizerV2 | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer | PathHierarchyTokenizerV2 | PatternTokenizer | StandardTokenizer | StandardTokenizerV2 | UaxUrlEmailTokenizer; +export type TokenFilter = AsciiFoldingTokenFilter | CjkBigramTokenFilter | CommonGramTokenFilter | DictionaryDecompounderTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | KeepTokenFilter | KeywordMarkerTokenFilter | LengthTokenFilter | LimitTokenFilter | NGramTokenFilter | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PhoneticTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerTokenFilter | StemmerOverrideTokenFilter | StopwordsTokenFilter | SynonymTokenFilter | TruncateTokenFilter | UniqueTokenFilter | WordDelimiterTokenFilter; // @public export interface TruncateTokenFilter { @@ -1538,7 +1530,7 @@ export interface UniqueTokenFilter { } // @public -export type UploadDocumentsOptions = IndexDocuments; +export type UploadDocumentsOptions = IndexDocumentsOptions; // @public export type VisualFeature = 'adult' | 'brands' | 'categories' | 'description' | 'faces' | 'objects' | 'tags'; diff --git a/sdk/search/search-documents/samples/javascript/README.md b/sdk/search/search-documents/samples/javascript/README.md index 0bf5d79033ce..2a89419b42ed 100644 --- a/sdk/search/search-documents/samples/javascript/README.md +++ b/sdk/search/search-documents/samples/javascript/README.md @@ -43,7 +43,7 @@ npx cross-env SEARCH_API_ENDPOINT="" SEARCH_API_KEY="" node r Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [readonly]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/search/samples/javascript/readonlyQuery.js -[apiref]: https://aka.ms/azsdk-js-search-ref-docs +[apiref]: https://aka.ms/azsdk/js/search/docs [search_resource]: https://docs.microsoft.com/azure/search/search-create-service-portal [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/search/README.md diff --git a/sdk/search/search-documents/samples/javascript/readonlyQuery.js b/sdk/search/search-documents/samples/javascript/readonlyQuery.js index f528f52bbd81..5923c691f85d 100644 --- a/sdk/search/search-documents/samples/javascript/readonlyQuery.js +++ b/sdk/search/search-documents/samples/javascript/readonlyQuery.js @@ -21,13 +21,14 @@ async function main() { const credential = new AzureKeyCredential(apiKey); const client = new SearchClient(endpoint, indexName, credential); - const count = await client.countDocuments(); + const count = await client.getDocumentsCount(); console.log(`${count} documents in index ${client.indexName}`); const state = "FL"; const country = "USA"; - const searchResults = await client.search({ - searchText: "WiFi", + const searchResults = await client.search( + "WiFi", + { filter: odata`Address/StateProvince eq ${state} and Address/Country eq ${country}`, orderBy: ["Rating desc"], select: ["HotelId", "HotelName", "Rating"] diff --git a/sdk/search/search-documents/samples/typescript/README.md b/sdk/search/search-documents/samples/typescript/README.md index e0457262b50f..26dd52e8181b 100644 --- a/sdk/search/search-documents/samples/typescript/README.md +++ b/sdk/search/search-documents/samples/typescript/README.md @@ -55,7 +55,7 @@ npx cross-env SEARCH_API_ENDPOINT="" SEARCH_API_KEY="" node d Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [readonly]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/search/samples/typescript/src/readonlyQuery.ts -[apiref]: https://aka.ms/azsdk-js-search-ref-docs +[apiref]: https://aka.ms/azsdk/js/search/docs [search_resource]: https://docs.microsoft.com/azure/search/search-create-service-portal [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/search/README.md diff --git a/sdk/search/search-documents/samples/typescript/src/readonlyQuery.ts b/sdk/search/search-documents/samples/typescript/src/readonlyQuery.ts index 5b8b601c4267..9d362aa4a7df 100644 --- a/sdk/search/search-documents/samples/typescript/src/readonlyQuery.ts +++ b/sdk/search/search-documents/samples/typescript/src/readonlyQuery.ts @@ -51,13 +51,12 @@ export async function main() { const credential = new AzureKeyCredential(apiKey); const client = new SearchClient(endpoint, indexName, credential); - const count = await client.countDocuments(); + const count = await client.getDocumentsCount(); console.log(`${count} documents in index ${client.indexName}`); const state = "FL"; const country = "USA"; - const searchResults = await client.search({ - searchText: "WiFi", + const searchResults = await client.search("WiFi", { filter: odata`Address/StateProvince eq ${state} and Address/Country eq ${country}`, orderBy: ["Rating desc"], select: ["HotelId", "HotelName", "Rating"] diff --git a/sdk/search/search-documents/src/constants.ts b/sdk/search/search-documents/src/constants.ts index 9e3556bfcee3..0ce59c1d5d93 100644 --- a/sdk/search/search-documents/src/constants.ts +++ b/sdk/search/search-documents/src/constants.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "1.0.0-preview.4"; +export const SDK_VERSION: string = "1.0.0-preview.5"; diff --git a/sdk/search/search-documents/src/generated/data/models/index.ts b/sdk/search/search-documents/src/generated/data/models/index.ts index 2637bc1825e9..eb109406f4d9 100644 --- a/sdk/search/search-documents/src/generated/data/models/index.ts +++ b/sdk/search/search-documents/src/generated/data/models/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import * as coreHttp from "@azure/core-http"; /** @@ -107,7 +108,7 @@ export interface SearchRequest { orderBy?: string; /** * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if - * your query uses the Lucene query syntax. Possible values include: 'simple', 'full' + * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full' */ queryType?: QueryType; /** @@ -732,7 +733,7 @@ export interface DocumentsAutocompleteGetOptionalParams extends coreHttp.Request * @readonly * @enum {string} */ -export type QueryType = "simple" | "full"; +export type QueryType = 'simple' | 'full'; /** * Defines values for SearchMode. @@ -740,7 +741,7 @@ export type QueryType = "simple" | "full"; * @readonly * @enum {string} */ -export type SearchMode = "any" | "all"; +export type SearchMode = 'any' | 'all'; /** * Defines values for IndexActionType. @@ -748,7 +749,7 @@ export type SearchMode = "any" | "all"; * @readonly * @enum {string} */ -export type IndexActionType = "upload" | "merge" | "mergeOrUpload" | "delete"; +export type IndexActionType = 'upload' | 'merge' | 'mergeOrUpload' | 'delete'; /** * Defines values for AutocompleteMode. @@ -756,7 +757,7 @@ export type IndexActionType = "upload" | "merge" | "mergeOrUpload" | "delete"; * @readonly * @enum {string} */ -export type AutocompleteMode = "oneTerm" | "twoTerms" | "oneTermWithContext"; +export type AutocompleteMode = 'oneTerm' | 'twoTerms' | 'oneTermWithContext'; /** * Contains response data for the count operation. @@ -771,16 +772,16 @@ export type DocumentsCountResponse = { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: number; + }; }; /** @@ -791,16 +792,16 @@ export type DocumentsSearchGetResponse = SearchDocumentsResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SearchDocumentsResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SearchDocumentsResult; + }; }; /** @@ -811,16 +812,16 @@ export type DocumentsSearchPostResponse = SearchDocumentsResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SearchDocumentsResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SearchDocumentsResult; + }; }; /** @@ -836,16 +837,16 @@ export type DocumentsGetResponse = { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; }; /** @@ -856,16 +857,16 @@ export type DocumentsSuggestGetResponse = SuggestDocumentsResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SuggestDocumentsResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SuggestDocumentsResult; + }; }; /** @@ -876,16 +877,16 @@ export type DocumentsSuggestPostResponse = SuggestDocumentsResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SuggestDocumentsResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SuggestDocumentsResult; + }; }; /** @@ -896,16 +897,16 @@ export type DocumentsIndexResponse = IndexDocumentsResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IndexDocumentsResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IndexDocumentsResult; + }; }; /** @@ -916,16 +917,16 @@ export type DocumentsAutocompleteGetResponse = AutocompleteResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AutocompleteResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutocompleteResult; + }; }; /** @@ -936,14 +937,14 @@ export type DocumentsAutocompletePostResponse = AutocompleteResult & { * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AutocompleteResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AutocompleteResult; + }; }; diff --git a/sdk/search/search-documents/src/generated/data/searchClientContext.ts b/sdk/search/search-documents/src/generated/data/searchClientContext.ts index 7602bf2c7375..98f2706bceca 100644 --- a/sdk/search/search-documents/src/generated/data/searchClientContext.ts +++ b/sdk/search/search-documents/src/generated/data/searchClientContext.ts @@ -11,7 +11,7 @@ import * as coreHttp from "@azure/core-http"; const packageName = "@azure/search-documents"; -const packageVersion = "1.0.0-preview.4"; +const packageVersion = "1.0.0-preview.5"; export class SearchClientContext extends coreHttp.ServiceClient { apiVersion: string; diff --git a/sdk/search/search-documents/src/generated/service/models/dataSourcesMappers.ts b/sdk/search/search-documents/src/generated/service/models/dataSourcesMappers.ts index d0a2324e7b2c..5f83f7bc7b1b 100644 --- a/sdk/search/search-documents/src/generated/service/models/dataSourcesMappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/dataSourcesMappers.ts @@ -9,13 +9,13 @@ export { discriminators, DataChangeDetectionPolicy, - DataContainer, DataDeletionDetectionPolicy, - DataSource, DataSourceCredentials, HighWaterMarkChangeDetectionPolicy, ListDataSourcesResult, SearchError, + SearchIndexerDataContainer, + SearchIndexerDataSource, SoftDeleteColumnDeletionDetectionPolicy, SqlIntegratedChangeTrackingPolicy } from "../models/mappers"; diff --git a/sdk/search/search-documents/src/generated/service/models/index.ts b/sdk/search/search-documents/src/generated/service/models/index.ts index fdbce304835f..6b6967e655b1 100644 --- a/sdk/search/search-documents/src/generated/service/models/index.ts +++ b/sdk/search/search-documents/src/generated/service/models/index.ts @@ -44,7 +44,7 @@ export interface AnalyzeRequest { /** * Information about a token returned by an analyzer. */ -export interface TokenInfo { +export interface AnalyzedTokenInfo { /** * The token returned by the analyzer. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -76,22 +76,22 @@ export interface AnalyzeResult { /** * The list of tokens returned by the analyzer specified in the request. */ - tokens: TokenInfo[]; + tokens: AnalyzedTokenInfo[]; } /** - * Contains the possible cases for Analyzer. + * Contains the possible cases for LexicalAnalyzer. */ -export type AnalyzerUnion = Analyzer | CustomAnalyzer | PatternAnalyzer | StandardAnalyzer | StopAnalyzer; +export type LexicalAnalyzerUnion = LexicalAnalyzer | CustomAnalyzer | PatternAnalyzer | LuceneStandardAnalyzer | StopAnalyzer; /** * Base type for analyzers. */ -export interface Analyzer { +export interface LexicalAnalyzer { /** * Polymorphic Discriminator */ - odatatype: "Analyzer"; + odatatype: "LexicalAnalyzer"; /** * The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, * can only start and end with alphanumeric characters, and is limited to 128 characters. @@ -154,7 +154,7 @@ export interface PatternAnalyzer { lowerCaseTerms?: boolean; /** * A regular expression pattern to match token separators. Default is an expression that matches - * one or more whitespace characters. Default value: '\W+'. + * one or more non-word characters. Default value: '\W+'. */ pattern?: string; /** @@ -171,7 +171,7 @@ export interface PatternAnalyzer { * Standard Apache Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop * filter. */ -export interface StandardAnalyzer { +export interface LuceneStandardAnalyzer { /** * Polymorphic Discriminator */ @@ -213,18 +213,18 @@ export interface StopAnalyzer { } /** - * Contains the possible cases for Tokenizer. + * Contains the possible cases for LexicalTokenizer. */ -export type TokenizerUnion = Tokenizer | ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer | KeywordTokenizerV2 | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer | PathHierarchyTokenizerV2 | PatternTokenizer | StandardTokenizer | StandardTokenizerV2 | UaxUrlEmailTokenizer; +export type LexicalTokenizerUnion = LexicalTokenizer | ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer | KeywordTokenizerV2 | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer | PathHierarchyTokenizerV2 | PatternTokenizer | LuceneStandardTokenizer | LuceneStandardTokenizerV2 | UaxUrlEmailTokenizer; /** * Base type for tokenizers. */ -export interface Tokenizer { +export interface LexicalTokenizer { /** * Polymorphic Discriminator */ - odatatype: "Tokenizer"; + odatatype: "LexicalTokenizer"; /** * The name of the tokenizer. It must only contain letters, digits, spaces, dashes or * underscores, can only start and end with alphanumeric characters, and is limited to 128 @@ -353,13 +353,13 @@ export interface MicrosoftLanguageTokenizer { */ isSearchTokenizer?: boolean; /** - * The language to use. The default is English. Possible values include: 'bangla', 'bulgarian', - * 'catalan', 'chineseSimplified', 'chineseTraditional', 'croatian', 'czech', 'danish', 'dutch', - * 'english', 'french', 'german', 'greek', 'gujarati', 'hindi', 'icelandic', 'indonesian', - * 'italian', 'japanese', 'kannada', 'korean', 'malay', 'malayalam', 'marathi', - * 'norwegianBokmaal', 'polish', 'portuguese', 'portugueseBrazilian', 'punjabi', 'romanian', - * 'russian', 'serbianCyrillic', 'serbianLatin', 'slovenian', 'spanish', 'swedish', 'tamil', - * 'telugu', 'thai', 'ukrainian', 'urdu', 'vietnamese' + * The language to use. The default is English. Possible values include: 'Bangla', 'Bulgarian', + * 'Catalan', 'ChineseSimplified', 'ChineseTraditional', 'Croatian', 'Czech', 'Danish', 'Dutch', + * 'English', 'French', 'German', 'Greek', 'Gujarati', 'Hindi', 'Icelandic', 'Indonesian', + * 'Italian', 'Japanese', 'Kannada', 'Korean', 'Malay', 'Malayalam', 'Marathi', + * 'NorwegianBokmaal', 'Polish', 'Portuguese', 'PortugueseBrazilian', 'Punjabi', 'Romanian', + * 'Russian', 'SerbianCyrillic', 'SerbianLatin', 'Slovenian', 'Spanish', 'Swedish', 'Tamil', + * 'Telugu', 'Thai', 'Ukrainian', 'Urdu', 'Vietnamese' */ language?: MicrosoftTokenizerLanguage; } @@ -391,13 +391,13 @@ export interface MicrosoftLanguageStemmingTokenizer { */ isSearchTokenizer?: boolean; /** - * The language to use. The default is English. Possible values include: 'arabic', 'bangla', - * 'bulgarian', 'catalan', 'croatian', 'czech', 'danish', 'dutch', 'english', 'estonian', - * 'finnish', 'french', 'german', 'greek', 'gujarati', 'hebrew', 'hindi', 'hungarian', - * 'icelandic', 'indonesian', 'italian', 'kannada', 'latvian', 'lithuanian', 'malay', - * 'malayalam', 'marathi', 'norwegianBokmaal', 'polish', 'portuguese', 'portugueseBrazilian', - * 'punjabi', 'romanian', 'russian', 'serbianCyrillic', 'serbianLatin', 'slovak', 'slovenian', - * 'spanish', 'swedish', 'tamil', 'telugu', 'turkish', 'ukrainian', 'urdu' + * The language to use. The default is English. Possible values include: 'Arabic', 'Bangla', + * 'Bulgarian', 'Catalan', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'Estonian', + * 'Finnish', 'French', 'German', 'Greek', 'Gujarati', 'Hebrew', 'Hindi', 'Hungarian', + * 'Icelandic', 'Indonesian', 'Italian', 'Kannada', 'Latvian', 'Lithuanian', 'Malay', + * 'Malayalam', 'Marathi', 'NorwegianBokmaal', 'Polish', 'Portuguese', 'PortugueseBrazilian', + * 'Punjabi', 'Romanian', 'Russian', 'SerbianCyrillic', 'SerbianLatin', 'Slovak', 'Slovenian', + * 'Spanish', 'Swedish', 'Tamil', 'Telugu', 'Turkish', 'Ukrainian', 'Urdu' */ language?: MicrosoftStemmingTokenizerLanguage; } @@ -486,7 +486,7 @@ export interface PatternTokenizer { name: string; /** * A regular expression pattern to match token separators. Default is an expression that matches - * one or more whitespace characters. Default value: '\W+'. + * one or more non-word characters. Default value: '\W+'. */ pattern?: string; /** @@ -505,7 +505,7 @@ export interface PatternTokenizer { * Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using * Apache Lucene. */ -export interface StandardTokenizer { +export interface LuceneStandardTokenizer { /** * Polymorphic Discriminator */ @@ -527,7 +527,7 @@ export interface StandardTokenizer { * Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using * Apache Lucene. */ -export interface StandardTokenizerV2 { +export interface LuceneStandardTokenizerV2 { /** * Polymorphic Discriminator */ @@ -611,7 +611,7 @@ export interface AsciiFoldingTokenFilter { } /** - * Forms bigrams of CJK terms that are generated from StandardTokenizer. This token filter is + * Forms bigrams of CJK terms that are generated from the standard tokenizer. This token filter is * implemented using Apache Lucene. */ export interface CjkBigramTokenFilter { @@ -735,7 +735,7 @@ export interface EdgeNGramTokenFilter { maxGram?: number; /** * Specifies which side of the input the n-gram should be generated from. Default is "front". - * Possible values include: 'front', 'back' + * Possible values include: 'Front', 'Back' */ side?: EdgeNGramTokenFilterSide; } @@ -766,7 +766,7 @@ export interface EdgeNGramTokenFilterV2 { maxGram?: number; /** * Specifies which side of the input the n-gram should be generated from. Default is "front". - * Possible values include: 'front', 'back' + * Possible values include: 'Front', 'Back' */ side?: EdgeNGramTokenFilterSide; } @@ -862,11 +862,11 @@ export interface LengthTokenFilter { * The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of * max. Default value: 0. */ - min?: number; + minLength?: number; /** * The maximum length in characters. Default and maximum is 300. Default value: 300. */ - max?: number; + maxLength?: number; } /** @@ -1014,9 +1014,9 @@ export interface PhoneticTokenFilter { */ name: string; /** - * The phonetic encoder to use. Default is "metaphone". Possible values include: 'metaphone', - * 'doubleMetaphone', 'soundex', 'refinedSoundex', 'caverphone1', 'caverphone2', 'cologne', - * 'nysiis', 'koelnerPhonetik', 'haasePhonetik', 'beiderMorse' + * The phonetic encoder to use. Default is "metaphone". Possible values include: 'Metaphone', + * 'DoubleMetaphone', 'Soundex', 'RefinedSoundex', 'Caverphone1', 'Caverphone2', 'Cologne', + * 'Nysiis', 'KoelnerPhonetik', 'HaasePhonetik', 'BeiderMorse' */ encoder?: PhoneticEncoder; /** @@ -1089,10 +1089,10 @@ export interface SnowballTokenFilter { */ name: string; /** - * The language to use. Possible values include: 'armenian', 'basque', 'catalan', 'danish', - * 'dutch', 'english', 'finnish', 'french', 'german', 'german2', 'hungarian', 'italian', 'kp', - * 'lovins', 'norwegian', 'porter', 'portuguese', 'romanian', 'russian', 'spanish', 'swedish', - * 'turkish' + * The language to use. Possible values include: 'Armenian', 'Basque', 'Catalan', 'Danish', + * 'Dutch', 'English', 'Finnish', 'French', 'German', 'German2', 'Hungarian', 'Italian', 'Kp', + * 'Lovins', 'Norwegian', 'Porter', 'Portuguese', 'Romanian', 'Russian', 'Spanish', 'Swedish', + * 'Turkish' */ language: SnowballTokenFilterLanguage; } @@ -1112,15 +1112,15 @@ export interface StemmerTokenFilter { */ name: string; /** - * The language to use. Possible values include: 'arabic', 'armenian', 'basque', 'brazilian', - * 'bulgarian', 'catalan', 'czech', 'danish', 'dutch', 'dutchKp', 'english', 'lightEnglish', - * 'minimalEnglish', 'possessiveEnglish', 'porter2', 'lovins', 'finnish', 'lightFinnish', - * 'french', 'lightFrench', 'minimalFrench', 'galician', 'minimalGalician', 'german', 'german2', - * 'lightGerman', 'minimalGerman', 'greek', 'hindi', 'hungarian', 'lightHungarian', 'indonesian', - * 'irish', 'italian', 'lightItalian', 'sorani', 'latvian', 'norwegian', 'lightNorwegian', - * 'minimalNorwegian', 'lightNynorsk', 'minimalNynorsk', 'portuguese', 'lightPortuguese', - * 'minimalPortuguese', 'portugueseRslp', 'romanian', 'russian', 'lightRussian', 'spanish', - * 'lightSpanish', 'swedish', 'lightSwedish', 'turkish' + * The language to use. Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', + * 'Bulgarian', 'Catalan', 'Czech', 'Danish', 'Dutch', 'DutchKp', 'English', 'LightEnglish', + * 'MinimalEnglish', 'PossessiveEnglish', 'Porter2', 'Lovins', 'Finnish', 'LightFinnish', + * 'French', 'LightFrench', 'MinimalFrench', 'Galician', 'MinimalGalician', 'German', 'German2', + * 'LightGerman', 'MinimalGerman', 'Greek', 'Hindi', 'Hungarian', 'LightHungarian', 'Indonesian', + * 'Irish', 'Italian', 'LightItalian', 'Sorani', 'Latvian', 'Norwegian', 'LightNorwegian', + * 'MinimalNorwegian', 'LightNynorsk', 'MinimalNynorsk', 'Portuguese', 'LightPortuguese', + * 'MinimalPortuguese', 'PortugueseRslp', 'Romanian', 'Russian', 'LightRussian', 'Spanish', + * 'LightSpanish', 'Swedish', 'LightSwedish', 'Turkish' */ language: StemmerTokenFilterLanguage; } @@ -1168,11 +1168,11 @@ export interface StopwordsTokenFilter { stopwords?: string[]; /** * A predefined list of stopwords to use. This property and the stopwords property cannot both be - * set. Default is English. Possible values include: 'arabic', 'armenian', 'basque', 'brazilian', - * 'bulgarian', 'catalan', 'czech', 'danish', 'dutch', 'english', 'finnish', 'french', - * 'galician', 'german', 'greek', 'hindi', 'hungarian', 'indonesian', 'irish', 'italian', - * 'latvian', 'norwegian', 'persian', 'portuguese', 'romanian', 'russian', 'sorani', 'spanish', - * 'swedish', 'thai', 'turkish' + * set. Default is English. Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', + * 'Bulgarian', 'Catalan', 'Czech', 'Danish', 'Dutch', 'English', 'Finnish', 'French', + * 'Galician', 'German', 'Greek', 'Hindi', 'Hungarian', 'Indonesian', 'Irish', 'Italian', + * 'Latvian', 'Norwegian', 'Persian', 'Portuguese', 'Romanian', 'Russian', 'Sorani', 'Spanish', + * 'Swedish', 'Thai', 'Turkish' */ stopwordsList?: StopwordsList; /** @@ -1406,6 +1406,59 @@ export interface PatternReplaceCharFilter { replacement: string; } +/** + * Contains the possible cases for Similarity. + */ +export type SimilarityUnion = Similarity | ClassicSimilarity | BM25Similarity; + +/** + * Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie + * queries to documents. The higher the score, the more relevant the document is to that specific + * query. Those scores are used to rank the search results. + */ +export interface Similarity { + /** + * Polymorphic Discriminator + */ + odatatype: "Similarity"; +} + +/** + * Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF. This + * variation of TF-IDF introduces static document length normalization as well as coordinating + * factors that penalize documents that only partially match the searched queries. + */ +export interface ClassicSimilarity { + /** + * Polymorphic Discriminator + */ + odatatype: "#Microsoft.Azure.Search.ClassicSimilarity"; +} + +/** + * Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a TF-IDF-like algorithm + * that includes length normalization (controlled by the 'b' parameter) as well as term frequency + * saturation (controlled by the 'k1' parameter). + */ +export interface BM25Similarity { + /** + * Polymorphic Discriminator + */ + odatatype: "#Microsoft.Azure.Search.BM25Similarity"; + /** + * This property controls the scaling function between the term frequency of each matching terms + * and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A + * value of 0.0 means the score does not scale with an increase in term frequency. + */ + k1?: number; + /** + * This property controls how the length of a document affects the relevance score. By default, a + * value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value + * of 1.0 means the score is fully normalized by the length of the document. + */ + b?: number; +} + /** * Represents credentials that can be used to connect to a datasource. */ @@ -1420,7 +1473,7 @@ export interface DataSourceCredentials { * Represents information about the entity (such as Azure SQL table or CosmosDB collection) that * will be indexed. */ -export interface DataContainer { +export interface SearchIndexerDataContainer { /** * The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data * source) that will be indexed. @@ -1511,7 +1564,7 @@ export interface SoftDeleteColumnDeletionDetectionPolicy { /** * Represents a datasource definition, which can be used to configure an indexer. */ -export interface DataSource { +export interface SearchIndexerDataSource { /** * The name of the datasource. */ @@ -1524,7 +1577,7 @@ export interface DataSource { * The type of the datasource. Possible values include: 'AzureSql', 'CosmosDb', 'AzureBlob', * 'AzureTable', 'MySql' */ - type: DataSourceType; + type: SearchIndexerDataSourceType; /** * Credentials for the datasource. */ @@ -1532,7 +1585,7 @@ export interface DataSource { /** * The data container for the datasource. */ - container: DataContainer; + container: SearchIndexerDataContainer; /** * The data change detection policy for the datasource. */ @@ -1542,7 +1595,7 @@ export interface DataSource { */ dataDeletionDetectionPolicy?: DataDeletionDetectionPolicyUnion; /** - * The ETag of the DataSource. + * The ETag of the data source. */ etag?: string; } @@ -1556,7 +1609,7 @@ export interface ListDataSourcesResult { * The datasources in the Search service. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly dataSources: DataSource[]; + readonly dataSources: SearchIndexerDataSource[]; } /** @@ -1635,7 +1688,7 @@ export interface FieldMapping { /** * Represents an indexer. */ -export interface Indexer { +export interface SearchIndexer { /** * The name of the indexer. */ @@ -1678,7 +1731,7 @@ export interface Indexer { */ isDisabled?: boolean; /** - * The ETag of the Indexer. + * The ETag of the indexer. */ etag?: string; } @@ -1692,13 +1745,13 @@ export interface ListIndexersResult { * The indexers in the Search service. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly indexers: Indexer[]; + readonly indexers: SearchIndexer[]; } /** * Represents an item- or document-level indexing error. */ -export interface ItemError { +export interface SearchIndexerError { /** * The key of the item for which indexing failed. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1739,7 +1792,7 @@ export interface ItemError { /** * Represents an item-level warning. */ -export interface ItemWarning { +export interface SearchIndexerWarning { /** * The key of the item which generated a warning. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1775,8 +1828,8 @@ export interface ItemWarning { */ export interface IndexerExecutionResult { /** - * The outcome of this indexer execution. Possible values include: 'transientFailure', 'success', - * 'inProgress', 'reset' + * The outcome of this indexer execution. Possible values include: 'TransientFailure', 'Success', + * 'InProgress', 'Reset' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status: IndexerExecutionStatus; @@ -1799,12 +1852,12 @@ export interface IndexerExecutionResult { * The item-level indexing errors. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly errors: ItemError[]; + readonly errors: SearchIndexerError[]; /** * The item-level indexing warnings. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly warnings: ItemWarning[]; + readonly warnings: SearchIndexerWarning[]; /** * The number of items that were processed during this indexer execution. This includes both * successfully processed items and items where indexing was attempted but failed. @@ -1829,9 +1882,9 @@ export interface IndexerExecutionResult { } /** - * An interface representing IndexerLimits. + * An interface representing SearchIndexerLimits. */ -export interface IndexerLimits { +export interface SearchIndexerLimits { /** * The maximum duration that the indexer is permitted to run for one execution. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1853,9 +1906,9 @@ export interface IndexerLimits { /** * Represents the current status and execution history of an indexer. */ -export interface IndexerExecutionInfo { +export interface SearchIndexerStatus { /** - * Overall indexer status. Possible values include: 'unknown', 'error', 'running' + * Overall indexer status. Possible values include: 'Unknown', 'Error', 'Running' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status: IndexerStatus; @@ -1873,27 +1926,27 @@ export interface IndexerExecutionInfo { * The execution limits for the indexer. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly limits: IndexerLimits; + readonly limits: SearchIndexerLimits; } /** * Represents a field in an index definition, which describes the name, data type, and search * behavior of a field. */ -export interface Field { +export interface SearchField { /** * The name of the field, which must be unique within the fields collection of the index or * parent field. */ name: string; /** - * The data type of the field. Possible values include: 'Edm.String', 'Edm.Int32', 'Edm.Int64', - * 'Edm.Double', 'Edm.Boolean', 'Edm.DateTimeOffset', 'Edm.GeographyPoint', 'Edm.ComplexType', - * 'Collection(Edm.String)', 'Collection(Edm.Int32)', 'Collection(Edm.Int64)', - * 'Collection(Edm.Double)', 'Collection(Edm.Boolean)', 'Collection(Edm.DateTimeOffset)', - * 'Collection(Edm.GeographyPoint)', 'Collection(Edm.ComplexType)' + * The data type of the field. Possible values include: 'String', 'Int32', 'Int64', 'Double', + * 'Boolean', 'DateTimeOffset', 'GeographyPoint', 'Complex', 'Collection(Edm.String)', + * 'Collection(Edm.Int32)', 'Collection(Edm.Int64)', 'Collection(Edm.Double)', + * 'Collection(Edm.Boolean)', 'Collection(Edm.DateTimeOffset)', 'Collection(Edm.GeographyPoint)', + * 'Collection(Edm.ComplexType)' */ - type: DataType; + type: SearchFieldDataType; /** * A value indicating whether the field uniquely identifies documents in the index. Exactly one * top-level field in each index must be chosen as the key field and it must be of type @@ -1958,27 +2011,72 @@ export interface Field { * The name of the analyzer to use for the field. This option can be used only with searchable * fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the * analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - * KnownAnalyzerNames is an enum containing known values. - */ - analyzer?: string; + * Possible values include: 'ArMicrosoft', 'ArLucene', 'HyLucene', 'BnMicrosoft', 'EuLucene', + * 'BgMicrosoft', 'BgLucene', 'CaMicrosoft', 'CaLucene', 'ZhHansMicrosoft', 'ZhHansLucene', + * 'ZhHantMicrosoft', 'ZhHantLucene', 'HrMicrosoft', 'CsMicrosoft', 'CsLucene', 'DaMicrosoft', + * 'DaLucene', 'NlMicrosoft', 'NlLucene', 'EnMicrosoft', 'EnLucene', 'EtMicrosoft', + * 'FiMicrosoft', 'FiLucene', 'FrMicrosoft', 'FrLucene', 'GlLucene', 'DeMicrosoft', 'DeLucene', + * 'ElMicrosoft', 'ElLucene', 'GuMicrosoft', 'HeMicrosoft', 'HiMicrosoft', 'HiLucene', + * 'HuMicrosoft', 'HuLucene', 'IsMicrosoft', 'IdMicrosoft', 'IdLucene', 'GaLucene', + * 'ItMicrosoft', 'ItLucene', 'JaMicrosoft', 'JaLucene', 'KnMicrosoft', 'KoMicrosoft', + * 'KoLucene', 'LvMicrosoft', 'LvLucene', 'LtMicrosoft', 'MlMicrosoft', 'MsMicrosoft', + * 'MrMicrosoft', 'NbMicrosoft', 'NoLucene', 'FaLucene', 'PlMicrosoft', 'PlLucene', + * 'PtBrMicrosoft', 'PtBrLucene', 'PtPtMicrosoft', 'PtPtLucene', 'PaMicrosoft', 'RoMicrosoft', + * 'RoLucene', 'RuMicrosoft', 'RuLucene', 'SrCyrillicMicrosoft', 'SrLatinMicrosoft', + * 'SkMicrosoft', 'SlMicrosoft', 'EsMicrosoft', 'EsLucene', 'SvMicrosoft', 'SvLucene', + * 'TaMicrosoft', 'TeMicrosoft', 'ThMicrosoft', 'ThLucene', 'TrMicrosoft', 'TrLucene', + * 'UkMicrosoft', 'UrMicrosoft', 'ViMicrosoft', 'StandardLucene', 'StandardAsciiFoldingLucene', + * 'Keyword', 'Pattern', 'Simple', 'Stop', 'Whitespace' + */ + analyzer?: LexicalAnalyzerName; /** * The name of the analyzer used at search time for the field. This option can be used only with * searchable fields. It must be set together with indexAnalyzer and it cannot be set together * with the analyzer option. This property cannot be set to the name of a language analyzer; use * the analyzer property instead if you need a language analyzer. This analyzer can be updated on - * an existing field. Must be null for complex fields. KnownAnalyzerNames is an enum containing - * known values. - */ - searchAnalyzer?: string; + * an existing field. Must be null for complex fields. Possible values include: 'ArMicrosoft', + * 'ArLucene', 'HyLucene', 'BnMicrosoft', 'EuLucene', 'BgMicrosoft', 'BgLucene', 'CaMicrosoft', + * 'CaLucene', 'ZhHansMicrosoft', 'ZhHansLucene', 'ZhHantMicrosoft', 'ZhHantLucene', + * 'HrMicrosoft', 'CsMicrosoft', 'CsLucene', 'DaMicrosoft', 'DaLucene', 'NlMicrosoft', + * 'NlLucene', 'EnMicrosoft', 'EnLucene', 'EtMicrosoft', 'FiMicrosoft', 'FiLucene', + * 'FrMicrosoft', 'FrLucene', 'GlLucene', 'DeMicrosoft', 'DeLucene', 'ElMicrosoft', 'ElLucene', + * 'GuMicrosoft', 'HeMicrosoft', 'HiMicrosoft', 'HiLucene', 'HuMicrosoft', 'HuLucene', + * 'IsMicrosoft', 'IdMicrosoft', 'IdLucene', 'GaLucene', 'ItMicrosoft', 'ItLucene', + * 'JaMicrosoft', 'JaLucene', 'KnMicrosoft', 'KoMicrosoft', 'KoLucene', 'LvMicrosoft', + * 'LvLucene', 'LtMicrosoft', 'MlMicrosoft', 'MsMicrosoft', 'MrMicrosoft', 'NbMicrosoft', + * 'NoLucene', 'FaLucene', 'PlMicrosoft', 'PlLucene', 'PtBrMicrosoft', 'PtBrLucene', + * 'PtPtMicrosoft', 'PtPtLucene', 'PaMicrosoft', 'RoMicrosoft', 'RoLucene', 'RuMicrosoft', + * 'RuLucene', 'SrCyrillicMicrosoft', 'SrLatinMicrosoft', 'SkMicrosoft', 'SlMicrosoft', + * 'EsMicrosoft', 'EsLucene', 'SvMicrosoft', 'SvLucene', 'TaMicrosoft', 'TeMicrosoft', + * 'ThMicrosoft', 'ThLucene', 'TrMicrosoft', 'TrLucene', 'UkMicrosoft', 'UrMicrosoft', + * 'ViMicrosoft', 'StandardLucene', 'StandardAsciiFoldingLucene', 'Keyword', 'Pattern', 'Simple', + * 'Stop', 'Whitespace' + */ + searchAnalyzer?: LexicalAnalyzerName; /** * The name of the analyzer used at indexing time for the field. This option can be used only * with searchable fields. It must be set together with searchAnalyzer and it cannot be set * together with the analyzer option. This property cannot be set to the name of a language * analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer - * is chosen, it cannot be changed for the field. Must be null for complex fields. - * KnownAnalyzerNames is an enum containing known values. - */ - indexAnalyzer?: string; + * is chosen, it cannot be changed for the field. Must be null for complex fields. Possible + * values include: 'ArMicrosoft', 'ArLucene', 'HyLucene', 'BnMicrosoft', 'EuLucene', + * 'BgMicrosoft', 'BgLucene', 'CaMicrosoft', 'CaLucene', 'ZhHansMicrosoft', 'ZhHansLucene', + * 'ZhHantMicrosoft', 'ZhHantLucene', 'HrMicrosoft', 'CsMicrosoft', 'CsLucene', 'DaMicrosoft', + * 'DaLucene', 'NlMicrosoft', 'NlLucene', 'EnMicrosoft', 'EnLucene', 'EtMicrosoft', + * 'FiMicrosoft', 'FiLucene', 'FrMicrosoft', 'FrLucene', 'GlLucene', 'DeMicrosoft', 'DeLucene', + * 'ElMicrosoft', 'ElLucene', 'GuMicrosoft', 'HeMicrosoft', 'HiMicrosoft', 'HiLucene', + * 'HuMicrosoft', 'HuLucene', 'IsMicrosoft', 'IdMicrosoft', 'IdLucene', 'GaLucene', + * 'ItMicrosoft', 'ItLucene', 'JaMicrosoft', 'JaLucene', 'KnMicrosoft', 'KoMicrosoft', + * 'KoLucene', 'LvMicrosoft', 'LvLucene', 'LtMicrosoft', 'MlMicrosoft', 'MsMicrosoft', + * 'MrMicrosoft', 'NbMicrosoft', 'NoLucene', 'FaLucene', 'PlMicrosoft', 'PlLucene', + * 'PtBrMicrosoft', 'PtBrLucene', 'PtPtMicrosoft', 'PtPtLucene', 'PaMicrosoft', 'RoMicrosoft', + * 'RoLucene', 'RuMicrosoft', 'RuLucene', 'SrCyrillicMicrosoft', 'SrLatinMicrosoft', + * 'SkMicrosoft', 'SlMicrosoft', 'EsMicrosoft', 'EsLucene', 'SvMicrosoft', 'SvLucene', + * 'TaMicrosoft', 'TeMicrosoft', 'ThMicrosoft', 'ThLucene', 'TrMicrosoft', 'TrLucene', + * 'UkMicrosoft', 'UrMicrosoft', 'ViMicrosoft', 'StandardLucene', 'StandardAsciiFoldingLucene', + * 'Keyword', 'Pattern', 'Simple', 'Stop', 'Whitespace' + */ + indexAnalyzer?: LexicalAnalyzerName; /** * A list of the names of synonym maps to associate with this field. This option can be used only * with searchable fields. Currently only one synonym map per field is supported. Assigning a @@ -1991,7 +2089,7 @@ export interface Field { * A list of sub-fields if this is a field of type Edm.ComplexType or * Collection(Edm.ComplexType). Must be null or empty for simple fields. */ - fields?: Field[]; + fields?: SearchField[]; } /** @@ -2028,7 +2126,7 @@ export interface ScoringFunction { boost: number; /** * A value indicating how boosting will be interpolated across document scores; defaults to - * "Linear". Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * "Linear". Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' */ interpolation?: ScoringFunctionInterpolation; } @@ -2065,7 +2163,7 @@ export interface DistanceScoringFunction { boost: number; /** * A value indicating how boosting will be interpolated across document scores; defaults to - * "Linear". Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * "Linear". Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' */ interpolation?: ScoringFunctionInterpolation; /** @@ -2102,7 +2200,7 @@ export interface FreshnessScoringFunction { boost: number; /** * A value indicating how boosting will be interpolated across document scores; defaults to - * "Linear". Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * "Linear". Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' */ interpolation?: ScoringFunctionInterpolation; /** @@ -2148,7 +2246,7 @@ export interface MagnitudeScoringFunction { boost: number; /** * A value indicating how boosting will be interpolated across document scores; defaults to - * "Linear". Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * "Linear". Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' */ interpolation?: ScoringFunctionInterpolation; /** @@ -2187,7 +2285,7 @@ export interface TagScoringFunction { boost: number; /** * A value indicating how boosting will be interpolated across document scores; defaults to - * "Linear". Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * "Linear". Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' */ interpolation?: ScoringFunctionInterpolation; /** @@ -2214,8 +2312,8 @@ export interface ScoringProfile { functions?: ScoringFunctionUnion[]; /** * A value indicating how the results of individual scoring functions should be combined. - * Defaults to "Sum". Ignored if there are no scoring functions. Possible values include: 'sum', - * 'average', 'minimum', 'maximum', 'firstMatching' + * Defaults to "Sum". Ignored if there are no scoring functions. Possible values include: 'Sum', + * 'Average', 'Minimum', 'Maximum', 'FirstMatching' */ functionAggregation?: ScoringFunctionAggregation; } @@ -2272,21 +2370,21 @@ export interface AzureActiveDirectoryApplicationCredentials { * used to encrypt or decrypt data-at-rest in Azure Cognitive Search, such as indexes and synonym * maps. */ -export interface EncryptionKey { +export interface SearchResourceEncryptionKey { /** * The name of your Azure Key Vault key to be used to encrypt your data at rest. */ - keyVaultKeyName: string; + keyName: string; /** * The version of your Azure Key Vault key to be used to encrypt your data at rest. */ - keyVaultKeyVersion: string; + keyVersion: string; /** * The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be * used to encrypt your data at rest. An example URI might be * https://my-keyvault-name.vault.azure.net. */ - keyVaultUri: string; + vaultUri: string; /** * Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not * required if using managed identity instead. @@ -2298,7 +2396,7 @@ export interface EncryptionKey { * Represents a search index definition, which describes the fields and search behavior of an * index. */ -export interface Index { +export interface SearchIndex { /** * The name of the index. */ @@ -2306,7 +2404,7 @@ export interface Index { /** * The fields of the index. */ - fields: Field[]; + fields: SearchField[]; /** * The scoring profiles for the index. */ @@ -2328,11 +2426,11 @@ export interface Index { /** * The analyzers for the index. */ - analyzers?: AnalyzerUnion[]; + analyzers?: LexicalAnalyzerUnion[]; /** * The tokenizers for the index. */ - tokenizers?: TokenizerUnion[]; + tokenizers?: LexicalTokenizerUnion[]; /** * The token filters for the index. */ @@ -2351,7 +2449,13 @@ export interface Index { * keys is not available for free search services, and is only available for paid services * created on or after January 1, 2019. */ - encryptionKey?: EncryptionKey; + encryptionKey?: SearchResourceEncryptionKey; + /** + * The type of similarity algorithm to be used when scoring and ranking the documents matching a + * search query. The similarity algorithm can only be defined at index creation time and cannot + * be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. + */ + similarity?: SimilarityUnion; /** * The ETag of the index. */ @@ -2384,7 +2488,7 @@ export interface ListIndexesResult { * The indexes in the Search service. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly indexes: Index[]; + readonly indexes: SearchIndex[]; } /** @@ -2424,18 +2528,18 @@ export interface OutputFieldMappingEntry { } /** - * Contains the possible cases for Skill. + * Contains the possible cases for SearchIndexerSkill. */ -export type SkillUnion = Skill | ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | TextTranslationSkill | WebApiSkill; +export type SearchIndexerSkillUnion = SearchIndexerSkill | ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | TextTranslationSkill | WebApiSkill; /** * Base type for skills. */ -export interface Skill { +export interface SearchIndexerSkill { /** * Polymorphic Discriminator */ - odatatype: "Skill"; + odatatype: "SearchIndexerSkill"; /** * The name of the skill which uniquely identifies it within the skillset. A skill with no name * defined will be given a default name of its 1-based index in the skills array, prefixed with @@ -2485,7 +2589,7 @@ export interface CognitiveServicesAccount { /** * A list of skills. */ -export interface Skillset { +export interface SearchIndexerSkillset { /** * The name of the skillset. */ @@ -2493,11 +2597,11 @@ export interface Skillset { /** * The description of the skillset. */ - description: string; + description?: string; /** * A list of skills in the skillset. */ - skills: SkillUnion[]; + skills: SearchIndexerSkillUnion[]; /** * Details about cognitive services to be used when running skills. */ @@ -2654,11 +2758,6 @@ export interface OcrSkill { * an input by another skill. */ outputs: OutputFieldMappingEntry[]; - /** - * A value indicating which algorithm to use for extracting text. Default is printed. Possible - * values include: 'printed', 'handwritten' - */ - textExtractionAlgorithm?: TextExtractionAlgorithm; /** * A value indicating which language code to use. Default is en. Possible values include: * 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it', 'ja', 'ko', @@ -2977,7 +3076,7 @@ export interface SplitSkill { */ defaultLanguageCode?: SplitSkillLanguage; /** - * A value indicating which split mode to perform. Possible values include: 'pages', 'sentences' + * A value indicating which split mode to perform. Possible values include: 'Pages', 'Sentences' */ textSplitMode?: TextSplitMode; /** @@ -3110,7 +3209,7 @@ export interface WebApiSkill { } /** - * Response from a list Skillset request. If successful, it includes the full definitions of all + * Response from a list skillset request. If successful, it includes the full definitions of all * skillsets. */ export interface ListSkillsetsResult { @@ -3118,7 +3217,7 @@ export interface ListSkillsetsResult { * The skillsets defined in the Search service. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly skillsets: Skillset[]; + readonly skillsets: SearchIndexerSkillset[]; } /** @@ -3144,7 +3243,7 @@ export interface SynonymMap { * keys is not available for free search services, and is only available for paid services * created on or after January 1, 2019. */ - encryptionKey?: EncryptionKey; + encryptionKey?: SearchResourceEncryptionKey; /** * The ETag of the synonym map. */ @@ -3271,9 +3370,9 @@ export interface SearchError { } /** - * Additional parameters for a set of operations. + * Optional Parameters. */ -export interface AccessCondition { +export interface DataSourcesCreateOrUpdateOptionalParams extends coreHttp.RequestOptionsBase { /** * Defines the If-Match condition. The operation will be performed only if the ETag on the server * matches this value. @@ -3289,21 +3388,17 @@ export interface AccessCondition { /** * Optional Parameters. */ -export interface DataSourcesCreateOrUpdateOptionalParams extends coreHttp.RequestOptionsBase { +export interface DataSourcesDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. */ - accessCondition?: AccessCondition; -} - -/** - * Optional Parameters. - */ -export interface DataSourcesDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { + ifMatch?: string; /** - * Additional parameters for the operation + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3323,9 +3418,15 @@ export interface DataSourcesListOptionalParams extends coreHttp.RequestOptionsBa */ export interface IndexersCreateOrUpdateOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. */ - accessCondition?: AccessCondition; + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. + */ + ifNoneMatch?: string; } /** @@ -3333,9 +3434,15 @@ export interface IndexersCreateOrUpdateOptionalParams extends coreHttp.RequestOp */ export interface IndexersDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3354,9 +3461,15 @@ export interface IndexersListOptionalParams extends coreHttp.RequestOptionsBase */ export interface SkillsetsCreateOrUpdateOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3364,9 +3477,15 @@ export interface SkillsetsCreateOrUpdateOptionalParams extends coreHttp.RequestO */ export interface SkillsetsDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3386,9 +3505,15 @@ export interface SkillsetsListOptionalParams extends coreHttp.RequestOptionsBase */ export interface SynonymMapsCreateOrUpdateOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3396,9 +3521,15 @@ export interface SynonymMapsCreateOrUpdateOptionalParams extends coreHttp.Reques */ export interface SynonymMapsDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3437,9 +3568,15 @@ export interface IndexesCreateOrUpdateOptionalParams extends coreHttp.RequestOpt */ allowIndexDowntime?: boolean; /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. + */ + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. */ - accessCondition?: AccessCondition; + ifNoneMatch?: string; } /** @@ -3447,13 +3584,19 @@ export interface IndexesCreateOrUpdateOptionalParams extends coreHttp.RequestOpt */ export interface IndexesDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * Additional parameters for the operation + * Defines the If-Match condition. The operation will be performed only if the ETag on the server + * matches this value. */ - accessCondition?: AccessCondition; + ifMatch?: string; + /** + * Defines the If-None-Match condition. The operation will be performed only if the ETag on the + * server does not match this value. + */ + ifNoneMatch?: string; } /** - * Defines values for AnalyzerName. + * Defines values for LexicalAnalyzerName. * Possible values include: 'ArMicrosoft', 'ArLucene', 'HyLucene', 'BnMicrosoft', 'EuLucene', * 'BgMicrosoft', 'BgLucene', 'CaMicrosoft', 'CaLucene', 'ZhHansMicrosoft', 'ZhHansLucene', * 'ZhHantMicrosoft', 'ZhHantLucene', 'HrMicrosoft', 'CsMicrosoft', 'CsLucene', 'DaMicrosoft', @@ -3472,17 +3615,17 @@ export interface IndexesDeleteMethodOptionalParams extends coreHttp.RequestOptio * @readonly * @enum {string} */ -export type AnalyzerName = 'ar.microsoft' | 'ar.lucene' | 'hy.lucene' | 'bn.microsoft' | 'eu.lucene' | 'bg.microsoft' | 'bg.lucene' | 'ca.microsoft' | 'ca.lucene' | 'zh-Hans.microsoft' | 'zh-Hans.lucene' | 'zh-Hant.microsoft' | 'zh-Hant.lucene' | 'hr.microsoft' | 'cs.microsoft' | 'cs.lucene' | 'da.microsoft' | 'da.lucene' | 'nl.microsoft' | 'nl.lucene' | 'en.microsoft' | 'en.lucene' | 'et.microsoft' | 'fi.microsoft' | 'fi.lucene' | 'fr.microsoft' | 'fr.lucene' | 'gl.lucene' | 'de.microsoft' | 'de.lucene' | 'el.microsoft' | 'el.lucene' | 'gu.microsoft' | 'he.microsoft' | 'hi.microsoft' | 'hi.lucene' | 'hu.microsoft' | 'hu.lucene' | 'is.microsoft' | 'id.microsoft' | 'id.lucene' | 'ga.lucene' | 'it.microsoft' | 'it.lucene' | 'ja.microsoft' | 'ja.lucene' | 'kn.microsoft' | 'ko.microsoft' | 'ko.lucene' | 'lv.microsoft' | 'lv.lucene' | 'lt.microsoft' | 'ml.microsoft' | 'ms.microsoft' | 'mr.microsoft' | 'nb.microsoft' | 'no.lucene' | 'fa.lucene' | 'pl.microsoft' | 'pl.lucene' | 'pt-BR.microsoft' | 'pt-BR.lucene' | 'pt-PT.microsoft' | 'pt-PT.lucene' | 'pa.microsoft' | 'ro.microsoft' | 'ro.lucene' | 'ru.microsoft' | 'ru.lucene' | 'sr-cyrillic.microsoft' | 'sr-latin.microsoft' | 'sk.microsoft' | 'sl.microsoft' | 'es.microsoft' | 'es.lucene' | 'sv.microsoft' | 'sv.lucene' | 'ta.microsoft' | 'te.microsoft' | 'th.microsoft' | 'th.lucene' | 'tr.microsoft' | 'tr.lucene' | 'uk.microsoft' | 'ur.microsoft' | 'vi.microsoft' | 'standard.lucene' | 'standardasciifolding.lucene' | 'keyword' | 'pattern' | 'simple' | 'stop' | 'whitespace'; +export type LexicalAnalyzerName = 'ar.microsoft' | 'ar.lucene' | 'hy.lucene' | 'bn.microsoft' | 'eu.lucene' | 'bg.microsoft' | 'bg.lucene' | 'ca.microsoft' | 'ca.lucene' | 'zh-Hans.microsoft' | 'zh-Hans.lucene' | 'zh-Hant.microsoft' | 'zh-Hant.lucene' | 'hr.microsoft' | 'cs.microsoft' | 'cs.lucene' | 'da.microsoft' | 'da.lucene' | 'nl.microsoft' | 'nl.lucene' | 'en.microsoft' | 'en.lucene' | 'et.microsoft' | 'fi.microsoft' | 'fi.lucene' | 'fr.microsoft' | 'fr.lucene' | 'gl.lucene' | 'de.microsoft' | 'de.lucene' | 'el.microsoft' | 'el.lucene' | 'gu.microsoft' | 'he.microsoft' | 'hi.microsoft' | 'hi.lucene' | 'hu.microsoft' | 'hu.lucene' | 'is.microsoft' | 'id.microsoft' | 'id.lucene' | 'ga.lucene' | 'it.microsoft' | 'it.lucene' | 'ja.microsoft' | 'ja.lucene' | 'kn.microsoft' | 'ko.microsoft' | 'ko.lucene' | 'lv.microsoft' | 'lv.lucene' | 'lt.microsoft' | 'ml.microsoft' | 'ms.microsoft' | 'mr.microsoft' | 'nb.microsoft' | 'no.lucene' | 'fa.lucene' | 'pl.microsoft' | 'pl.lucene' | 'pt-BR.microsoft' | 'pt-BR.lucene' | 'pt-PT.microsoft' | 'pt-PT.lucene' | 'pa.microsoft' | 'ro.microsoft' | 'ro.lucene' | 'ru.microsoft' | 'ru.lucene' | 'sr-cyrillic.microsoft' | 'sr-latin.microsoft' | 'sk.microsoft' | 'sl.microsoft' | 'es.microsoft' | 'es.lucene' | 'sv.microsoft' | 'sv.lucene' | 'ta.microsoft' | 'te.microsoft' | 'th.microsoft' | 'th.lucene' | 'tr.microsoft' | 'tr.lucene' | 'uk.microsoft' | 'ur.microsoft' | 'vi.microsoft' | 'standard.lucene' | 'standardasciifolding.lucene' | 'keyword' | 'pattern' | 'simple' | 'stop' | 'whitespace'; /** - * Defines values for TokenizerName. + * Defines values for LexicalTokenizerName. * Possible values include: 'Classic', 'EdgeNGram', 'Keyword', 'Letter', 'Lowercase', * 'MicrosoftLanguageTokenizer', 'MicrosoftLanguageStemmingTokenizer', 'NGram', 'PathHierarchy', * 'Pattern', 'Standard', 'UaxUrlEmail', 'Whitespace' * @readonly * @enum {string} */ -export type TokenizerName = 'classic' | 'edgeNGram' | 'keyword_v2' | 'letter' | 'lowercase' | 'microsoft_language_tokenizer' | 'microsoft_language_stemming_tokenizer' | 'nGram' | 'path_hierarchy_v2' | 'pattern' | 'standard_v2' | 'uax_url_email' | 'whitespace'; +export type LexicalTokenizerName = 'classic' | 'edgeNGram' | 'keyword_v2' | 'letter' | 'lowercase' | 'microsoft_language_tokenizer' | 'microsoft_language_stemming_tokenizer' | 'nGram' | 'path_hierarchy_v2' | 'pattern' | 'standard_v2' | 'uax_url_email' | 'whitespace'; /** * Defines values for TokenFilterName. @@ -3508,28 +3651,28 @@ export type CharFilterName = 'html_strip'; /** * Defines values for RegexFlags. - * Possible values include: 'CANON_EQ', 'CASE_INSENSITIVE', 'COMMENTS', 'DOTALL', 'LITERAL', - * 'MULTILINE', 'UNICODE_CASE', 'UNIX_LINES' + * Possible values include: 'CanonEq', 'CaseInsensitive', 'Comments', 'DotAll', 'Literal', + * 'Multiline', 'UnicodeCase', 'UnixLines' * @readonly * @enum {string} */ export type RegexFlags = 'CANON_EQ' | 'CASE_INSENSITIVE' | 'COMMENTS' | 'DOTALL' | 'LITERAL' | 'MULTILINE' | 'UNICODE_CASE' | 'UNIX_LINES'; /** - * Defines values for DataType. - * Possible values include: 'Edm.String', 'Edm.Int32', 'Edm.Int64', 'Edm.Double', 'Edm.Boolean', - * 'Edm.DateTimeOffset', 'Edm.GeographyPoint', 'Edm.ComplexType', 'Collection(Edm.String)', - * 'Collection(Edm.Int32)', 'Collection(Edm.Int64)', 'Collection(Edm.Double)', - * 'Collection(Edm.Boolean)', 'Collection(Edm.DateTimeOffset)', 'Collection(Edm.GeographyPoint)', + * Defines values for SearchFieldDataType. + * Possible values include: 'String', 'Int32', 'Int64', 'Double', 'Boolean', 'DateTimeOffset', + * 'GeographyPoint', 'Complex', 'Collection(Edm.String)', 'Collection(Edm.Int32)', + * 'Collection(Edm.Int64)', 'Collection(Edm.Double)', 'Collection(Edm.Boolean)', + * 'Collection(Edm.DateTimeOffset)', 'Collection(Edm.GeographyPoint)', * 'Collection(Edm.ComplexType)' * @readonly * @enum {string} */ -export type DataType = 'Edm.String' | 'Edm.Int32' | 'Edm.Int64' | 'Edm.Double' | 'Edm.Boolean' | 'Edm.DateTimeOffset' | 'Edm.GeographyPoint' | 'Edm.ComplexType' | 'Collection(Edm.String)' | 'Collection(Edm.Int32)' | 'Collection(Edm.Int64)' | 'Collection(Edm.Double)' | 'Collection(Edm.Boolean)' | 'Collection(Edm.DateTimeOffset)' | 'Collection(Edm.GeographyPoint)' | 'Collection(Edm.ComplexType)'; +export type SearchFieldDataType = 'Edm.String' | 'Edm.Int32' | 'Edm.Int64' | 'Edm.Double' | 'Edm.Boolean' | 'Edm.DateTimeOffset' | 'Edm.GeographyPoint' | 'Edm.ComplexType' | 'Collection(Edm.String)' | 'Collection(Edm.Int32)' | 'Collection(Edm.Int64)' | 'Collection(Edm.Double)' | 'Collection(Edm.Boolean)' | 'Collection(Edm.DateTimeOffset)' | 'Collection(Edm.GeographyPoint)' | 'Collection(Edm.ComplexType)'; /** * Defines values for TokenCharacterKind. - * Possible values include: 'letter', 'digit', 'whitespace', 'punctuation', 'symbol' + * Possible values include: 'Letter', 'Digit', 'Whitespace', 'Punctuation', 'Symbol' * @readonly * @enum {string} */ @@ -3537,12 +3680,12 @@ export type TokenCharacterKind = 'letter' | 'digit' | 'whitespace' | 'punctuatio /** * Defines values for MicrosoftTokenizerLanguage. - * Possible values include: 'bangla', 'bulgarian', 'catalan', 'chineseSimplified', - * 'chineseTraditional', 'croatian', 'czech', 'danish', 'dutch', 'english', 'french', 'german', - * 'greek', 'gujarati', 'hindi', 'icelandic', 'indonesian', 'italian', 'japanese', 'kannada', - * 'korean', 'malay', 'malayalam', 'marathi', 'norwegianBokmaal', 'polish', 'portuguese', - * 'portugueseBrazilian', 'punjabi', 'romanian', 'russian', 'serbianCyrillic', 'serbianLatin', - * 'slovenian', 'spanish', 'swedish', 'tamil', 'telugu', 'thai', 'ukrainian', 'urdu', 'vietnamese' + * Possible values include: 'Bangla', 'Bulgarian', 'Catalan', 'ChineseSimplified', + * 'ChineseTraditional', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'French', 'German', + * 'Greek', 'Gujarati', 'Hindi', 'Icelandic', 'Indonesian', 'Italian', 'Japanese', 'Kannada', + * 'Korean', 'Malay', 'Malayalam', 'Marathi', 'NorwegianBokmaal', 'Polish', 'Portuguese', + * 'PortugueseBrazilian', 'Punjabi', 'Romanian', 'Russian', 'SerbianCyrillic', 'SerbianLatin', + * 'Slovenian', 'Spanish', 'Swedish', 'Tamil', 'Telugu', 'Thai', 'Ukrainian', 'Urdu', 'Vietnamese' * @readonly * @enum {string} */ @@ -3550,12 +3693,12 @@ export type MicrosoftTokenizerLanguage = 'bangla' | 'bulgarian' | 'catalan' | 'c /** * Defines values for MicrosoftStemmingTokenizerLanguage. - * Possible values include: 'arabic', 'bangla', 'bulgarian', 'catalan', 'croatian', 'czech', - * 'danish', 'dutch', 'english', 'estonian', 'finnish', 'french', 'german', 'greek', 'gujarati', - * 'hebrew', 'hindi', 'hungarian', 'icelandic', 'indonesian', 'italian', 'kannada', 'latvian', - * 'lithuanian', 'malay', 'malayalam', 'marathi', 'norwegianBokmaal', 'polish', 'portuguese', - * 'portugueseBrazilian', 'punjabi', 'romanian', 'russian', 'serbianCyrillic', 'serbianLatin', - * 'slovak', 'slovenian', 'spanish', 'swedish', 'tamil', 'telugu', 'turkish', 'ukrainian', 'urdu' + * Possible values include: 'Arabic', 'Bangla', 'Bulgarian', 'Catalan', 'Croatian', 'Czech', + * 'Danish', 'Dutch', 'English', 'Estonian', 'Finnish', 'French', 'German', 'Greek', 'Gujarati', + * 'Hebrew', 'Hindi', 'Hungarian', 'Icelandic', 'Indonesian', 'Italian', 'Kannada', 'Latvian', + * 'Lithuanian', 'Malay', 'Malayalam', 'Marathi', 'NorwegianBokmaal', 'Polish', 'Portuguese', + * 'PortugueseBrazilian', 'Punjabi', 'Romanian', 'Russian', 'SerbianCyrillic', 'SerbianLatin', + * 'Slovak', 'Slovenian', 'Spanish', 'Swedish', 'Tamil', 'Telugu', 'Turkish', 'Ukrainian', 'Urdu' * @readonly * @enum {string} */ @@ -3563,7 +3706,7 @@ export type MicrosoftStemmingTokenizerLanguage = 'arabic' | 'bangla' | 'bulgaria /** * Defines values for CjkBigramTokenFilterScripts. - * Possible values include: 'han', 'hiragana', 'katakana', 'hangul' + * Possible values include: 'Han', 'Hiragana', 'Katakana', 'Hangul' * @readonly * @enum {string} */ @@ -3571,7 +3714,7 @@ export type CjkBigramTokenFilterScripts = 'han' | 'hiragana' | 'katakana' | 'han /** * Defines values for EdgeNGramTokenFilterSide. - * Possible values include: 'front', 'back' + * Possible values include: 'Front', 'Back' * @readonly * @enum {string} */ @@ -3579,9 +3722,9 @@ export type EdgeNGramTokenFilterSide = 'front' | 'back'; /** * Defines values for PhoneticEncoder. - * Possible values include: 'metaphone', 'doubleMetaphone', 'soundex', 'refinedSoundex', - * 'caverphone1', 'caverphone2', 'cologne', 'nysiis', 'koelnerPhonetik', 'haasePhonetik', - * 'beiderMorse' + * Possible values include: 'Metaphone', 'DoubleMetaphone', 'Soundex', 'RefinedSoundex', + * 'Caverphone1', 'Caverphone2', 'Cologne', 'Nysiis', 'KoelnerPhonetik', 'HaasePhonetik', + * 'BeiderMorse' * @readonly * @enum {string} */ @@ -3589,9 +3732,9 @@ export type PhoneticEncoder = 'metaphone' | 'doubleMetaphone' | 'soundex' | 'ref /** * Defines values for SnowballTokenFilterLanguage. - * Possible values include: 'armenian', 'basque', 'catalan', 'danish', 'dutch', 'english', - * 'finnish', 'french', 'german', 'german2', 'hungarian', 'italian', 'kp', 'lovins', 'norwegian', - * 'porter', 'portuguese', 'romanian', 'russian', 'spanish', 'swedish', 'turkish' + * Possible values include: 'Armenian', 'Basque', 'Catalan', 'Danish', 'Dutch', 'English', + * 'Finnish', 'French', 'German', 'German2', 'Hungarian', 'Italian', 'Kp', 'Lovins', 'Norwegian', + * 'Porter', 'Portuguese', 'Romanian', 'Russian', 'Spanish', 'Swedish', 'Turkish' * @readonly * @enum {string} */ @@ -3599,15 +3742,15 @@ export type SnowballTokenFilterLanguage = 'armenian' | 'basque' | 'catalan' | 'd /** * Defines values for StemmerTokenFilterLanguage. - * Possible values include: 'arabic', 'armenian', 'basque', 'brazilian', 'bulgarian', 'catalan', - * 'czech', 'danish', 'dutch', 'dutchKp', 'english', 'lightEnglish', 'minimalEnglish', - * 'possessiveEnglish', 'porter2', 'lovins', 'finnish', 'lightFinnish', 'french', 'lightFrench', - * 'minimalFrench', 'galician', 'minimalGalician', 'german', 'german2', 'lightGerman', - * 'minimalGerman', 'greek', 'hindi', 'hungarian', 'lightHungarian', 'indonesian', 'irish', - * 'italian', 'lightItalian', 'sorani', 'latvian', 'norwegian', 'lightNorwegian', - * 'minimalNorwegian', 'lightNynorsk', 'minimalNynorsk', 'portuguese', 'lightPortuguese', - * 'minimalPortuguese', 'portugueseRslp', 'romanian', 'russian', 'lightRussian', 'spanish', - * 'lightSpanish', 'swedish', 'lightSwedish', 'turkish' + * Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', 'Bulgarian', 'Catalan', + * 'Czech', 'Danish', 'Dutch', 'DutchKp', 'English', 'LightEnglish', 'MinimalEnglish', + * 'PossessiveEnglish', 'Porter2', 'Lovins', 'Finnish', 'LightFinnish', 'French', 'LightFrench', + * 'MinimalFrench', 'Galician', 'MinimalGalician', 'German', 'German2', 'LightGerman', + * 'MinimalGerman', 'Greek', 'Hindi', 'Hungarian', 'LightHungarian', 'Indonesian', 'Irish', + * 'Italian', 'LightItalian', 'Sorani', 'Latvian', 'Norwegian', 'LightNorwegian', + * 'MinimalNorwegian', 'LightNynorsk', 'MinimalNynorsk', 'Portuguese', 'LightPortuguese', + * 'MinimalPortuguese', 'PortugueseRslp', 'Romanian', 'Russian', 'LightRussian', 'Spanish', + * 'LightSpanish', 'Swedish', 'LightSwedish', 'Turkish' * @readonly * @enum {string} */ @@ -3615,26 +3758,26 @@ export type StemmerTokenFilterLanguage = 'arabic' | 'armenian' | 'basque' | 'bra /** * Defines values for StopwordsList. - * Possible values include: 'arabic', 'armenian', 'basque', 'brazilian', 'bulgarian', 'catalan', - * 'czech', 'danish', 'dutch', 'english', 'finnish', 'french', 'galician', 'german', 'greek', - * 'hindi', 'hungarian', 'indonesian', 'irish', 'italian', 'latvian', 'norwegian', 'persian', - * 'portuguese', 'romanian', 'russian', 'sorani', 'spanish', 'swedish', 'thai', 'turkish' + * Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', 'Bulgarian', 'Catalan', + * 'Czech', 'Danish', 'Dutch', 'English', 'Finnish', 'French', 'Galician', 'German', 'Greek', + * 'Hindi', 'Hungarian', 'Indonesian', 'Irish', 'Italian', 'Latvian', 'Norwegian', 'Persian', + * 'Portuguese', 'Romanian', 'Russian', 'Sorani', 'Spanish', 'Swedish', 'Thai', 'Turkish' * @readonly * @enum {string} */ export type StopwordsList = 'arabic' | 'armenian' | 'basque' | 'brazilian' | 'bulgarian' | 'catalan' | 'czech' | 'danish' | 'dutch' | 'english' | 'finnish' | 'french' | 'galician' | 'german' | 'greek' | 'hindi' | 'hungarian' | 'indonesian' | 'irish' | 'italian' | 'latvian' | 'norwegian' | 'persian' | 'portuguese' | 'romanian' | 'russian' | 'sorani' | 'spanish' | 'swedish' | 'thai' | 'turkish'; /** - * Defines values for DataSourceType. + * Defines values for SearchIndexerDataSourceType. * Possible values include: 'AzureSql', 'CosmosDb', 'AzureBlob', 'AzureTable', 'MySql' * @readonly * @enum {string} */ -export type DataSourceType = 'azuresql' | 'cosmosdb' | 'azureblob' | 'azuretable' | 'mysql'; +export type SearchIndexerDataSourceType = 'azuresql' | 'cosmosdb' | 'azureblob' | 'azuretable' | 'mysql'; /** * Defines values for IndexerExecutionStatus. - * Possible values include: 'transientFailure', 'success', 'inProgress', 'reset' + * Possible values include: 'TransientFailure', 'Success', 'InProgress', 'Reset' * @readonly * @enum {string} */ @@ -3642,7 +3785,7 @@ export type IndexerExecutionStatus = 'transientFailure' | 'success' | 'inProgres /** * Defines values for IndexerStatus. - * Possible values include: 'unknown', 'error', 'running' + * Possible values include: 'Unknown', 'Error', 'Running' * @readonly * @enum {string} */ @@ -3650,7 +3793,7 @@ export type IndexerStatus = 'unknown' | 'error' | 'running'; /** * Defines values for ScoringFunctionInterpolation. - * Possible values include: 'linear', 'constant', 'quadratic', 'logarithmic' + * Possible values include: 'Linear', 'Constant', 'Quadratic', 'Logarithmic' * @readonly * @enum {string} */ @@ -3658,7 +3801,7 @@ export type ScoringFunctionInterpolation = 'linear' | 'constant' | 'quadratic' | /** * Defines values for ScoringFunctionAggregation. - * Possible values include: 'sum', 'average', 'minimum', 'maximum', 'firstMatching' + * Possible values include: 'Sum', 'Average', 'Minimum', 'Maximum', 'FirstMatching' * @readonly * @enum {string} */ @@ -3673,14 +3816,6 @@ export type ScoringFunctionAggregation = 'sum' | 'average' | 'minimum' | 'maximu */ export type KeyPhraseExtractionSkillLanguage = 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'it' | 'ja' | 'ko' | 'no' | 'pl' | 'pt-PT' | 'pt-BR' | 'ru' | 'es' | 'sv'; -/** - * Defines values for TextExtractionAlgorithm. - * Possible values include: 'printed', 'handwritten' - * @readonly - * @enum {string} - */ -export type TextExtractionAlgorithm = 'printed' | 'handwritten'; - /** * Defines values for OcrSkillLanguage. * Possible values include: 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', @@ -3701,8 +3836,8 @@ export type ImageAnalysisSkillLanguage = 'en' | 'es' | 'ja' | 'pt' | 'zh'; /** * Defines values for VisualFeature. - * Possible values include: 'adult', 'brands', 'categories', 'description', 'faces', 'objects', - * 'tags' + * Possible values include: 'Adult', 'Brands', 'Categories', 'Description', 'Faces', 'Objects', + * 'Tags' * @readonly * @enum {string} */ @@ -3710,7 +3845,7 @@ export type VisualFeature = 'adult' | 'brands' | 'categories' | 'description' | /** * Defines values for ImageDetail. - * Possible values include: 'celebrities', 'landmarks' + * Possible values include: 'Celebrities', 'Landmarks' * @readonly * @enum {string} */ @@ -3718,8 +3853,8 @@ export type ImageDetail = 'celebrities' | 'landmarks'; /** * Defines values for EntityCategory. - * Possible values include: 'location', 'organization', 'person', 'quantity', 'datetime', 'url', - * 'email' + * Possible values include: 'Location', 'Organization', 'Person', 'Quantity', 'Datetime', 'Url', + * 'Email' * @readonly * @enum {string} */ @@ -3753,7 +3888,7 @@ export type SplitSkillLanguage = 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'it' /** * Defines values for TextSplitMode. - * Possible values include: 'pages', 'sentences' + * Possible values include: 'Pages', 'Sentences' * @readonly * @enum {string} */ @@ -3774,7 +3909,7 @@ export type TextTranslationSkillLanguage = 'af' | 'ar' | 'bn' | 'bs' | 'bg' | 'y /** * Contains response data for the createOrUpdate operation. */ -export type DataSourcesCreateOrUpdateResponse = DataSource & { +export type DataSourcesCreateOrUpdateResponse = SearchIndexerDataSource & { /** * The underlying HTTP response. */ @@ -3787,14 +3922,14 @@ export type DataSourcesCreateOrUpdateResponse = DataSource & { /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: SearchIndexerDataSource; }; }; /** * Contains response data for the get operation. */ -export type DataSourcesGetResponse = DataSource & { +export type DataSourcesGetResponse = SearchIndexerDataSource & { /** * The underlying HTTP response. */ @@ -3807,7 +3942,7 @@ export type DataSourcesGetResponse = DataSource & { /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: SearchIndexerDataSource; }; }; @@ -3834,7 +3969,7 @@ export type DataSourcesListResponse = ListDataSourcesResult & { /** * Contains response data for the create operation. */ -export type DataSourcesCreateResponse = DataSource & { +export type DataSourcesCreateResponse = SearchIndexerDataSource & { /** * The underlying HTTP response. */ @@ -3847,14 +3982,14 @@ export type DataSourcesCreateResponse = DataSource & { /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: SearchIndexerDataSource; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type IndexersCreateOrUpdateResponse = Indexer & { +export type IndexersCreateOrUpdateResponse = SearchIndexer & { /** * The underlying HTTP response. */ @@ -3867,14 +4002,14 @@ export type IndexersCreateOrUpdateResponse = Indexer & { /** * The response body as parsed JSON or XML */ - parsedBody: Indexer; + parsedBody: SearchIndexer; }; }; /** * Contains response data for the get operation. */ -export type IndexersGetResponse = Indexer & { +export type IndexersGetResponse = SearchIndexer & { /** * The underlying HTTP response. */ @@ -3887,7 +4022,7 @@ export type IndexersGetResponse = Indexer & { /** * The response body as parsed JSON or XML */ - parsedBody: Indexer; + parsedBody: SearchIndexer; }; }; @@ -3914,7 +4049,7 @@ export type IndexersListResponse = ListIndexersResult & { /** * Contains response data for the create operation. */ -export type IndexersCreateResponse = Indexer & { +export type IndexersCreateResponse = SearchIndexer & { /** * The underlying HTTP response. */ @@ -3927,14 +4062,14 @@ export type IndexersCreateResponse = Indexer & { /** * The response body as parsed JSON or XML */ - parsedBody: Indexer; + parsedBody: SearchIndexer; }; }; /** * Contains response data for the getStatus operation. */ -export type IndexersGetStatusResponse = IndexerExecutionInfo & { +export type IndexersGetStatusResponse = SearchIndexerStatus & { /** * The underlying HTTP response. */ @@ -3947,14 +4082,14 @@ export type IndexersGetStatusResponse = IndexerExecutionInfo & { /** * The response body as parsed JSON or XML */ - parsedBody: IndexerExecutionInfo; + parsedBody: SearchIndexerStatus; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type SkillsetsCreateOrUpdateResponse = Skillset & { +export type SkillsetsCreateOrUpdateResponse = SearchIndexerSkillset & { /** * The underlying HTTP response. */ @@ -3967,14 +4102,14 @@ export type SkillsetsCreateOrUpdateResponse = Skillset & { /** * The response body as parsed JSON or XML */ - parsedBody: Skillset; + parsedBody: SearchIndexerSkillset; }; }; /** * Contains response data for the get operation. */ -export type SkillsetsGetResponse = Skillset & { +export type SkillsetsGetResponse = SearchIndexerSkillset & { /** * The underlying HTTP response. */ @@ -3987,7 +4122,7 @@ export type SkillsetsGetResponse = Skillset & { /** * The response body as parsed JSON or XML */ - parsedBody: Skillset; + parsedBody: SearchIndexerSkillset; }; }; @@ -4014,7 +4149,7 @@ export type SkillsetsListResponse = ListSkillsetsResult & { /** * Contains response data for the create operation. */ -export type SkillsetsCreateResponse = Skillset & { +export type SkillsetsCreateResponse = SearchIndexerSkillset & { /** * The underlying HTTP response. */ @@ -4027,7 +4162,7 @@ export type SkillsetsCreateResponse = Skillset & { /** * The response body as parsed JSON or XML */ - parsedBody: Skillset; + parsedBody: SearchIndexerSkillset; }; }; @@ -4114,7 +4249,7 @@ export type SynonymMapsCreateResponse = SynonymMap & { /** * Contains response data for the create operation. */ -export type IndexesCreateResponse = Index & { +export type IndexesCreateResponse = SearchIndex & { /** * The underlying HTTP response. */ @@ -4127,7 +4262,7 @@ export type IndexesCreateResponse = Index & { /** * The response body as parsed JSON or XML */ - parsedBody: Index; + parsedBody: SearchIndex; }; }; @@ -4154,7 +4289,7 @@ export type IndexesListResponse = ListIndexesResult & { /** * Contains response data for the createOrUpdate operation. */ -export type IndexesCreateOrUpdateResponse = Index & { +export type IndexesCreateOrUpdateResponse = SearchIndex & { /** * The underlying HTTP response. */ @@ -4167,14 +4302,14 @@ export type IndexesCreateOrUpdateResponse = Index & { /** * The response body as parsed JSON or XML */ - parsedBody: Index; + parsedBody: SearchIndex; }; }; /** * Contains response data for the get operation. */ -export type IndexesGetResponse = Index & { +export type IndexesGetResponse = SearchIndex & { /** * The underlying HTTP response. */ @@ -4187,7 +4322,7 @@ export type IndexesGetResponse = Index & { /** * The response body as parsed JSON or XML */ - parsedBody: Index; + parsedBody: SearchIndex; }; }; diff --git a/sdk/search/search-documents/src/generated/service/models/indexersMappers.ts b/sdk/search/search-documents/src/generated/service/models/indexersMappers.ts index 560a64cee02c..5fc33cf38753 100644 --- a/sdk/search/search-documents/src/generated/service/models/indexersMappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/indexersMappers.ts @@ -10,14 +10,14 @@ export { discriminators, FieldMapping, FieldMappingFunction, - Indexer, - IndexerExecutionInfo, IndexerExecutionResult, - IndexerLimits, IndexingParameters, IndexingSchedule, - ItemError, - ItemWarning, ListIndexersResult, - SearchError + SearchError, + SearchIndexer, + SearchIndexerError, + SearchIndexerLimits, + SearchIndexerStatus, + SearchIndexerWarning } from "../models/mappers"; diff --git a/sdk/search/search-documents/src/generated/service/models/indexesMappers.ts b/sdk/search/search-documents/src/generated/service/models/indexesMappers.ts index a7684bd2ea67..ed24f85f3f9f 100644 --- a/sdk/search/search-documents/src/generated/service/models/indexesMappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/indexesMappers.ts @@ -8,13 +8,15 @@ export { discriminators, - Analyzer, + AnalyzedTokenInfo, AnalyzeRequest, AnalyzeResult, AsciiFoldingTokenFilter, AzureActiveDirectoryApplicationCredentials, + BM25Similarity, CharFilter, CjkBigramTokenFilter, + ClassicSimilarity, ClassicTokenizer, CommonGramTokenFilter, CorsOptions, @@ -26,19 +28,21 @@ export { EdgeNGramTokenFilterV2, EdgeNGramTokenizer, ElisionTokenFilter, - EncryptionKey, - Field, FreshnessScoringFunction, FreshnessScoringParameters, GetIndexStatisticsResult, - Index, KeepTokenFilter, KeywordMarkerTokenFilter, KeywordTokenizer, KeywordTokenizerV2, LengthTokenFilter, + LexicalAnalyzer, + LexicalTokenizer, LimitTokenFilter, ListIndexesResult, + LuceneStandardAnalyzer, + LuceneStandardTokenizer, + LuceneStandardTokenizerV2, MagnitudeScoringFunction, MagnitudeScoringParameters, MappingCharFilter, @@ -57,11 +61,12 @@ export { ScoringFunction, ScoringProfile, SearchError, + SearchField, + SearchIndex, + SearchResourceEncryptionKey, ShingleTokenFilter, + Similarity, SnowballTokenFilter, - StandardAnalyzer, - StandardTokenizer, - StandardTokenizerV2, StemmerOverrideTokenFilter, StemmerTokenFilter, StopAnalyzer, @@ -72,8 +77,6 @@ export { TagScoringParameters, TextWeights, TokenFilter, - TokenInfo, - Tokenizer, TruncateTokenFilter, UaxUrlEmailTokenizer, UniqueTokenFilter, diff --git a/sdk/search/search-documents/src/generated/service/models/mappers.ts b/sdk/search/search-documents/src/generated/service/models/mappers.ts index 13f941c63932..b9e7f3a987f4 100644 --- a/sdk/search/search-documents/src/generated/service/models/mappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/mappers.ts @@ -60,11 +60,11 @@ export const AnalyzeRequest: coreHttp.CompositeMapper = { } }; -export const TokenInfo: coreHttp.CompositeMapper = { - serializedName: "TokenInfo", +export const AnalyzedTokenInfo: coreHttp.CompositeMapper = { + serializedName: "AnalyzedTokenInfo", type: { name: "Composite", - className: "TokenInfo", + className: "AnalyzedTokenInfo", modelProperties: { token: { required: true, @@ -119,7 +119,7 @@ export const AnalyzeResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "TokenInfo" + className: "AnalyzedTokenInfo" } } } @@ -128,16 +128,16 @@ export const AnalyzeResult: coreHttp.CompositeMapper = { } }; -export const Analyzer: coreHttp.CompositeMapper = { - serializedName: "Analyzer", +export const LexicalAnalyzer: coreHttp.CompositeMapper = { + serializedName: "LexicalAnalyzer", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "@odata.type", clientName: "odatatype" }, - uberParent: "Analyzer", - className: "Analyzer", + uberParent: "LexicalAnalyzer", + className: "LexicalAnalyzer", modelProperties: { name: { required: true, @@ -161,11 +161,11 @@ export const CustomAnalyzer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.CustomAnalyzer", type: { name: "Composite", - polymorphicDiscriminator: Analyzer.type.polymorphicDiscriminator, - uberParent: "Analyzer", + polymorphicDiscriminator: LexicalAnalyzer.type.polymorphicDiscriminator, + uberParent: "LexicalAnalyzer", className: "CustomAnalyzer", modelProperties: { - ...Analyzer.type.modelProperties, + ...LexicalAnalyzer.type.modelProperties, tokenizer: { required: true, serializedName: "tokenizer", @@ -203,11 +203,11 @@ export const PatternAnalyzer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.PatternAnalyzer", type: { name: "Composite", - polymorphicDiscriminator: Analyzer.type.polymorphicDiscriminator, - uberParent: "Analyzer", + polymorphicDiscriminator: LexicalAnalyzer.type.polymorphicDiscriminator, + uberParent: "LexicalAnalyzer", className: "PatternAnalyzer", modelProperties: { - ...Analyzer.type.modelProperties, + ...LexicalAnalyzer.type.modelProperties, lowerCaseTerms: { serializedName: "lowercase", defaultValue: true, @@ -243,15 +243,15 @@ export const PatternAnalyzer: coreHttp.CompositeMapper = { } }; -export const StandardAnalyzer: coreHttp.CompositeMapper = { +export const LuceneStandardAnalyzer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.StandardAnalyzer", type: { name: "Composite", - polymorphicDiscriminator: Analyzer.type.polymorphicDiscriminator, - uberParent: "Analyzer", - className: "StandardAnalyzer", + polymorphicDiscriminator: LexicalAnalyzer.type.polymorphicDiscriminator, + uberParent: "LexicalAnalyzer", + className: "LuceneStandardAnalyzer", modelProperties: { - ...Analyzer.type.modelProperties, + ...LexicalAnalyzer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -281,11 +281,11 @@ export const StopAnalyzer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.StopAnalyzer", type: { name: "Composite", - polymorphicDiscriminator: Analyzer.type.polymorphicDiscriminator, - uberParent: "Analyzer", + polymorphicDiscriminator: LexicalAnalyzer.type.polymorphicDiscriminator, + uberParent: "LexicalAnalyzer", className: "StopAnalyzer", modelProperties: { - ...Analyzer.type.modelProperties, + ...LexicalAnalyzer.type.modelProperties, stopwords: { serializedName: "stopwords", type: { @@ -301,16 +301,16 @@ export const StopAnalyzer: coreHttp.CompositeMapper = { } }; -export const Tokenizer: coreHttp.CompositeMapper = { - serializedName: "Tokenizer", +export const LexicalTokenizer: coreHttp.CompositeMapper = { + serializedName: "LexicalTokenizer", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "@odata.type", clientName: "odatatype" }, - uberParent: "Tokenizer", - className: "Tokenizer", + uberParent: "LexicalTokenizer", + className: "LexicalTokenizer", modelProperties: { name: { required: true, @@ -334,11 +334,11 @@ export const ClassicTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.ClassicTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "ClassicTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -357,11 +357,11 @@ export const EdgeNGramTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.EdgeNGramTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "EdgeNGramTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, minGram: { serializedName: "minGram", defaultValue: 1, @@ -408,11 +408,11 @@ export const KeywordTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.KeywordTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "KeywordTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, bufferSize: { serializedName: "bufferSize", defaultValue: 256, @@ -428,11 +428,11 @@ export const KeywordTokenizerV2: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.KeywordTokenizerV2", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "KeywordTokenizerV2", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 256, @@ -451,11 +451,11 @@ export const MicrosoftLanguageTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.MicrosoftLanguageTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "MicrosoftLanguageTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -531,11 +531,11 @@ export const MicrosoftLanguageStemmingTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "MicrosoftLanguageStemmingTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -614,11 +614,11 @@ export const NGramTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.NGramTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "NGramTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, minGram: { serializedName: "minGram", defaultValue: 1, @@ -665,11 +665,11 @@ export const PathHierarchyTokenizerV2: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.PathHierarchyTokenizerV2", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "PathHierarchyTokenizerV2", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, delimiter: { serializedName: "delimiter", defaultValue: '/', @@ -716,11 +716,11 @@ export const PatternTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.PatternTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "PatternTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, pattern: { serializedName: "pattern", defaultValue: '\W+', @@ -745,15 +745,15 @@ export const PatternTokenizer: coreHttp.CompositeMapper = { } }; -export const StandardTokenizer: coreHttp.CompositeMapper = { +export const LuceneStandardTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.StandardTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", - className: "StandardTokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", + className: "LuceneStandardTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -765,15 +765,15 @@ export const StandardTokenizer: coreHttp.CompositeMapper = { } }; -export const StandardTokenizerV2: coreHttp.CompositeMapper = { +export const LuceneStandardTokenizerV2: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.StandardTokenizerV2", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", - className: "StandardTokenizerV2", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", + className: "LuceneStandardTokenizerV2", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -792,11 +792,11 @@ export const UaxUrlEmailTokenizer: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.UaxUrlEmailTokenizer", type: { name: "Composite", - polymorphicDiscriminator: Tokenizer.type.polymorphicDiscriminator, - uberParent: "Tokenizer", + polymorphicDiscriminator: LexicalTokenizer.type.polymorphicDiscriminator, + uberParent: "LexicalTokenizer", className: "UaxUrlEmailTokenizer", modelProperties: { - ...Tokenizer.type.modelProperties, + ...LexicalTokenizer.type.modelProperties, maxTokenLength: { serializedName: "maxTokenLength", defaultValue: 255, @@ -1175,7 +1175,7 @@ export const LengthTokenFilter: coreHttp.CompositeMapper = { className: "LengthTokenFilter", modelProperties: { ...TokenFilter.type.modelProperties, - min: { + minLength: { serializedName: "min", defaultValue: 0, constraints: { @@ -1185,7 +1185,7 @@ export const LengthTokenFilter: coreHttp.CompositeMapper = { name: "Number" } }, - max: { + maxLength: { serializedName: "max", defaultValue: 300, constraints: { @@ -1917,6 +1917,66 @@ export const PatternReplaceCharFilter: coreHttp.CompositeMapper = { } }; +export const Similarity: coreHttp.CompositeMapper = { + serializedName: "Similarity", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Similarity", + className: "Similarity", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ClassicSimilarity: coreHttp.CompositeMapper = { + serializedName: "#Microsoft.Azure.Search.ClassicSimilarity", + type: { + name: "Composite", + polymorphicDiscriminator: Similarity.type.polymorphicDiscriminator, + uberParent: "Similarity", + className: "ClassicSimilarity", + modelProperties: { + ...Similarity.type.modelProperties + } + } +}; + +export const BM25Similarity: coreHttp.CompositeMapper = { + serializedName: "#Microsoft.Azure.Search.BM25Similarity", + type: { + name: "Composite", + polymorphicDiscriminator: Similarity.type.polymorphicDiscriminator, + uberParent: "Similarity", + className: "BM25Similarity", + modelProperties: { + ...Similarity.type.modelProperties, + k1: { + serializedName: "k1", + type: { + name: "Number" + } + }, + b: { + serializedName: "b", + type: { + name: "Number" + } + } + } + } +}; + export const DataSourceCredentials: coreHttp.CompositeMapper = { serializedName: "DataSourceCredentials", type: { @@ -1933,11 +1993,11 @@ export const DataSourceCredentials: coreHttp.CompositeMapper = { } }; -export const DataContainer: coreHttp.CompositeMapper = { - serializedName: "DataContainer", +export const SearchIndexerDataContainer: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerDataContainer", type: { name: "Composite", - className: "DataContainer", + className: "SearchIndexerDataContainer", modelProperties: { name: { required: true, @@ -2058,11 +2118,11 @@ export const SoftDeleteColumnDeletionDetectionPolicy: coreHttp.CompositeMapper = } }; -export const DataSource: coreHttp.CompositeMapper = { - serializedName: "DataSource", +export const SearchIndexerDataSource: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerDataSource", type: { name: "Composite", - className: "DataSource", + className: "SearchIndexerDataSource", modelProperties: { name: { required: true, @@ -2097,7 +2157,7 @@ export const DataSource: coreHttp.CompositeMapper = { serializedName: "container", type: { name: "Composite", - className: "DataContainer" + className: "SearchIndexerDataContainer" } }, dataChangeDetectionPolicy: { @@ -2139,7 +2199,7 @@ export const ListDataSourcesResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "DataSource" + className: "SearchIndexerDataSource" } } } @@ -2270,11 +2330,11 @@ export const FieldMapping: coreHttp.CompositeMapper = { } }; -export const Indexer: coreHttp.CompositeMapper = { - serializedName: "Indexer", +export const SearchIndexer: coreHttp.CompositeMapper = { + serializedName: "SearchIndexer", type: { name: "Composite", - className: "Indexer", + className: "SearchIndexer", modelProperties: { name: { required: true, @@ -2379,7 +2439,7 @@ export const ListIndexersResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Indexer" + className: "SearchIndexer" } } } @@ -2388,11 +2448,11 @@ export const ListIndexersResult: coreHttp.CompositeMapper = { } }; -export const ItemError: coreHttp.CompositeMapper = { - serializedName: "ItemError", +export const SearchIndexerError: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerError", type: { name: "Composite", - className: "ItemError", + className: "SearchIndexerError", modelProperties: { key: { readOnly: true, @@ -2443,11 +2503,11 @@ export const ItemError: coreHttp.CompositeMapper = { } }; -export const ItemWarning: coreHttp.CompositeMapper = { - serializedName: "ItemWarning", +export const SearchIndexerWarning: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerWarning", type: { name: "Composite", - className: "ItemWarning", + className: "SearchIndexerWarning", modelProperties: { key: { readOnly: true, @@ -2540,7 +2600,7 @@ export const IndexerExecutionResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "ItemError" + className: "SearchIndexerError" } } } @@ -2554,7 +2614,7 @@ export const IndexerExecutionResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "ItemWarning" + className: "SearchIndexerWarning" } } } @@ -2595,11 +2655,11 @@ export const IndexerExecutionResult: coreHttp.CompositeMapper = { } }; -export const IndexerLimits: coreHttp.CompositeMapper = { - serializedName: "IndexerLimits", +export const SearchIndexerLimits: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerLimits", type: { name: "Composite", - className: "IndexerLimits", + className: "SearchIndexerLimits", modelProperties: { maxRunTime: { readOnly: true, @@ -2626,11 +2686,11 @@ export const IndexerLimits: coreHttp.CompositeMapper = { } }; -export const IndexerExecutionInfo: coreHttp.CompositeMapper = { - serializedName: "IndexerExecutionInfo", +export const SearchIndexerStatus: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerStatus", type: { name: "Composite", - className: "IndexerExecutionInfo", + className: "SearchIndexerStatus", modelProperties: { status: { required: true, @@ -2674,18 +2734,18 @@ export const IndexerExecutionInfo: coreHttp.CompositeMapper = { serializedName: "limits", type: { name: "Composite", - className: "IndexerLimits" + className: "SearchIndexerLimits" } } } } }; -export const Field: coreHttp.CompositeMapper = { - serializedName: "Field", +export const SearchField: coreHttp.CompositeMapper = { + serializedName: "SearchField", type: { name: "Composite", - className: "Field", + className: "SearchField", modelProperties: { name: { required: true, @@ -2773,7 +2833,7 @@ export const Field: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Field" + className: "SearchField" } } } @@ -3162,27 +3222,27 @@ export const AzureActiveDirectoryApplicationCredentials: coreHttp.CompositeMappe } }; -export const EncryptionKey: coreHttp.CompositeMapper = { - serializedName: "EncryptionKey", +export const SearchResourceEncryptionKey: coreHttp.CompositeMapper = { + serializedName: "SearchResourceEncryptionKey", type: { name: "Composite", - className: "EncryptionKey", + className: "SearchResourceEncryptionKey", modelProperties: { - keyVaultKeyName: { + keyName: { required: true, serializedName: "keyVaultKeyName", type: { name: "String" } }, - keyVaultKeyVersion: { + keyVersion: { required: true, serializedName: "keyVaultKeyVersion", type: { name: "String" } }, - keyVaultUri: { + vaultUri: { required: true, serializedName: "keyVaultUri", type: { @@ -3200,11 +3260,11 @@ export const EncryptionKey: coreHttp.CompositeMapper = { } }; -export const Index: coreHttp.CompositeMapper = { - serializedName: "Index", +export const SearchIndex: coreHttp.CompositeMapper = { + serializedName: "SearchIndex", type: { name: "Composite", - className: "Index", + className: "SearchIndex", modelProperties: { name: { required: true, @@ -3221,7 +3281,7 @@ export const Index: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Field" + className: "SearchField" } } } @@ -3270,7 +3330,7 @@ export const Index: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Analyzer" + className: "LexicalAnalyzer" } } } @@ -3282,7 +3342,7 @@ export const Index: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Tokenizer" + className: "LexicalTokenizer" } } } @@ -3315,7 +3375,14 @@ export const Index: coreHttp.CompositeMapper = { serializedName: "encryptionKey", type: { name: "Composite", - className: "EncryptionKey" + className: "SearchResourceEncryptionKey" + } + }, + similarity: { + serializedName: "similarity", + type: { + name: "Composite", + className: "Similarity" } }, etag: { @@ -3371,7 +3438,7 @@ export const ListIndexesResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Index" + className: "SearchIndex" } } } @@ -3444,16 +3511,16 @@ export const OutputFieldMappingEntry: coreHttp.CompositeMapper = { } }; -export const Skill: coreHttp.CompositeMapper = { - serializedName: "Skill", +export const SearchIndexerSkill: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerSkill", type: { name: "Composite", polymorphicDiscriminator: { serializedName: "@odata.type", clientName: "odatatype" }, - uberParent: "Skill", - className: "Skill", + uberParent: "SearchIndexerSkill", + className: "SearchIndexerSkill", modelProperties: { name: { serializedName: "name", @@ -3538,11 +3605,11 @@ export const CognitiveServicesAccount: coreHttp.CompositeMapper = { } }; -export const Skillset: coreHttp.CompositeMapper = { - serializedName: "Skillset", +export const SearchIndexerSkillset: coreHttp.CompositeMapper = { + serializedName: "SearchIndexerSkillset", type: { name: "Composite", - className: "Skillset", + className: "SearchIndexerSkillset", modelProperties: { name: { required: true, @@ -3552,7 +3619,6 @@ export const Skillset: coreHttp.CompositeMapper = { } }, description: { - required: true, serializedName: "description", type: { name: "String" @@ -3566,7 +3632,7 @@ export const Skillset: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Skill" + className: "SearchIndexerSkill" } } } @@ -3625,11 +3691,11 @@ export const ConditionalSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Util.ConditionalSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "ConditionalSkill", modelProperties: { - ...Skill.type.modelProperties + ...SearchIndexerSkill.type.modelProperties } } }; @@ -3638,11 +3704,11 @@ export const KeyPhraseExtractionSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.KeyPhraseExtractionSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "KeyPhraseExtractionSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, defaultLanguageCode: { serializedName: "defaultLanguageCode", type: { @@ -3664,21 +3730,11 @@ export const OcrSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Vision.OcrSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "OcrSkill", modelProperties: { - ...Skill.type.modelProperties, - textExtractionAlgorithm: { - serializedName: "textExtractionAlgorithm", - type: { - name: "Enum", - allowedValues: [ - "printed", - "handwritten" - ] - } - }, + ...SearchIndexerSkill.type.modelProperties, defaultLanguageCode: { serializedName: "defaultLanguageCode", type: { @@ -3700,11 +3756,11 @@ export const ImageAnalysisSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Vision.ImageAnalysisSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "ImageAnalysisSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, defaultLanguageCode: { serializedName: "defaultLanguageCode", type: { @@ -3717,16 +3773,7 @@ export const ImageAnalysisSkill: coreHttp.CompositeMapper = { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "adult", - "brands", - "categories", - "description", - "faces", - "objects", - "tags" - ] + name: "String" } } } @@ -3737,11 +3784,7 @@ export const ImageAnalysisSkill: coreHttp.CompositeMapper = { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "celebrities", - "landmarks" - ] + name: "String" } } } @@ -3754,11 +3797,11 @@ export const LanguageDetectionSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.LanguageDetectionSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "LanguageDetectionSkill", modelProperties: { - ...Skill.type.modelProperties + ...SearchIndexerSkill.type.modelProperties } } }; @@ -3767,11 +3810,11 @@ export const ShaperSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Util.ShaperSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "ShaperSkill", modelProperties: { - ...Skill.type.modelProperties + ...SearchIndexerSkill.type.modelProperties } } }; @@ -3780,11 +3823,11 @@ export const MergeSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.MergeSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "MergeSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, insertPreTag: { serializedName: "insertPreTag", defaultValue: '', @@ -3807,27 +3850,18 @@ export const EntityRecognitionSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.EntityRecognitionSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "EntityRecognitionSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, categories: { serializedName: "categories", type: { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "location", - "organization", - "person", - "quantity", - "datetime", - "url", - "email" - ] + name: "String" } } } @@ -3860,11 +3894,11 @@ export const SentimentSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.SentimentSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "SentimentSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, defaultLanguageCode: { serializedName: "defaultLanguageCode", type: { @@ -3879,11 +3913,11 @@ export const SplitSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.SplitSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "SplitSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, defaultLanguageCode: { serializedName: "defaultLanguageCode", type: { @@ -3893,11 +3927,7 @@ export const SplitSkill: coreHttp.CompositeMapper = { textSplitMode: { serializedName: "textSplitMode", type: { - name: "Enum", - allowedValues: [ - "pages", - "sentences" - ] + name: "String" } }, maxPageLength: { @@ -3915,11 +3945,11 @@ export const TextTranslationSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.TranslationSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "TextTranslationSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, defaultToLanguageCode: { required: true, serializedName: "defaultToLanguageCode", @@ -3947,11 +3977,11 @@ export const WebApiSkill: coreHttp.CompositeMapper = { serializedName: "#Microsoft.Skills.Custom.WebApiSkill", type: { name: "Composite", - polymorphicDiscriminator: Skill.type.polymorphicDiscriminator, - uberParent: "Skill", + polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, + uberParent: "SearchIndexerSkill", className: "WebApiSkill", modelProperties: { - ...Skill.type.modelProperties, + ...SearchIndexerSkill.type.modelProperties, uri: { required: true, serializedName: "uri", @@ -4015,7 +4045,7 @@ export const ListSkillsetsResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Skillset" + className: "SearchIndexerSkillset" } } } @@ -4057,7 +4087,7 @@ export const SynonymMap: coreHttp.CompositeMapper = { serializedName: "encryptionKey", type: { name: "Composite", - className: "EncryptionKey" + className: "SearchResourceEncryptionKey" } }, etag: { @@ -4287,44 +4317,25 @@ export const SearchError: coreHttp.CompositeMapper = { } }; -export const AccessCondition: coreHttp.CompositeMapper = { - type: { - name: "Composite", - className: "AccessCondition", - modelProperties: { - ifMatch: { - type: { - name: "String" - } - }, - ifNoneMatch: { - type: { - name: "String" - } - } - } - } -}; - export const discriminators = { - 'Analyzer' : Analyzer, - 'Analyzer.#Microsoft.Azure.Search.CustomAnalyzer' : CustomAnalyzer, - 'Analyzer.#Microsoft.Azure.Search.PatternAnalyzer' : PatternAnalyzer, - 'Analyzer.#Microsoft.Azure.Search.StandardAnalyzer' : StandardAnalyzer, - 'Analyzer.#Microsoft.Azure.Search.StopAnalyzer' : StopAnalyzer, - 'Tokenizer' : Tokenizer, - 'Tokenizer.#Microsoft.Azure.Search.ClassicTokenizer' : ClassicTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.EdgeNGramTokenizer' : EdgeNGramTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.KeywordTokenizer' : KeywordTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.KeywordTokenizerV2' : KeywordTokenizerV2, - 'Tokenizer.#Microsoft.Azure.Search.MicrosoftLanguageTokenizer' : MicrosoftLanguageTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer' : MicrosoftLanguageStemmingTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.NGramTokenizer' : NGramTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.PathHierarchyTokenizerV2' : PathHierarchyTokenizerV2, - 'Tokenizer.#Microsoft.Azure.Search.PatternTokenizer' : PatternTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.StandardTokenizer' : StandardTokenizer, - 'Tokenizer.#Microsoft.Azure.Search.StandardTokenizerV2' : StandardTokenizerV2, - 'Tokenizer.#Microsoft.Azure.Search.UaxUrlEmailTokenizer' : UaxUrlEmailTokenizer, + 'LexicalAnalyzer' : LexicalAnalyzer, + 'LexicalAnalyzer.#Microsoft.Azure.Search.CustomAnalyzer' : CustomAnalyzer, + 'LexicalAnalyzer.#Microsoft.Azure.Search.PatternAnalyzer' : PatternAnalyzer, + 'LexicalAnalyzer.#Microsoft.Azure.Search.StandardAnalyzer' : LuceneStandardAnalyzer, + 'LexicalAnalyzer.#Microsoft.Azure.Search.StopAnalyzer' : StopAnalyzer, + 'LexicalTokenizer' : LexicalTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.ClassicTokenizer' : ClassicTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.EdgeNGramTokenizer' : EdgeNGramTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.KeywordTokenizer' : KeywordTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.KeywordTokenizerV2' : KeywordTokenizerV2, + 'LexicalTokenizer.#Microsoft.Azure.Search.MicrosoftLanguageTokenizer' : MicrosoftLanguageTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer' : MicrosoftLanguageStemmingTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.NGramTokenizer' : NGramTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.PathHierarchyTokenizerV2' : PathHierarchyTokenizerV2, + 'LexicalTokenizer.#Microsoft.Azure.Search.PatternTokenizer' : PatternTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.StandardTokenizer' : LuceneStandardTokenizer, + 'LexicalTokenizer.#Microsoft.Azure.Search.StandardTokenizerV2' : LuceneStandardTokenizerV2, + 'LexicalTokenizer.#Microsoft.Azure.Search.UaxUrlEmailTokenizer' : UaxUrlEmailTokenizer, 'TokenFilter' : TokenFilter, 'TokenFilter.#Microsoft.Azure.Search.AsciiFoldingTokenFilter' : AsciiFoldingTokenFilter, 'TokenFilter.#Microsoft.Azure.Search.CjkBigramTokenFilter' : CjkBigramTokenFilter, @@ -4354,6 +4365,9 @@ export const discriminators = { 'CharFilter' : CharFilter, 'CharFilter.#Microsoft.Azure.Search.MappingCharFilter' : MappingCharFilter, 'CharFilter.#Microsoft.Azure.Search.PatternReplaceCharFilter' : PatternReplaceCharFilter, + 'Similarity' : Similarity, + 'Similarity.#Microsoft.Azure.Search.ClassicSimilarity' : ClassicSimilarity, + 'Similarity.#Microsoft.Azure.Search.BM25Similarity' : BM25Similarity, 'DataChangeDetectionPolicy' : DataChangeDetectionPolicy, 'DataChangeDetectionPolicy.#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy' : HighWaterMarkChangeDetectionPolicy, 'DataChangeDetectionPolicy.#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy' : SqlIntegratedChangeTrackingPolicy, @@ -4364,21 +4378,21 @@ export const discriminators = { 'ScoringFunction.freshness' : FreshnessScoringFunction, 'ScoringFunction.magnitude' : MagnitudeScoringFunction, 'ScoringFunction.tag' : TagScoringFunction, - 'Skill' : Skill, + 'SearchIndexerSkill' : SearchIndexerSkill, 'CognitiveServicesAccount' : CognitiveServicesAccount, 'CognitiveServicesAccount.#Microsoft.Azure.Search.DefaultCognitiveServices' : DefaultCognitiveServicesAccount, 'CognitiveServicesAccount.#Microsoft.Azure.Search.CognitiveServicesByKey' : CognitiveServicesAccountKey, - 'Skill.#Microsoft.Skills.Util.ConditionalSkill' : ConditionalSkill, - 'Skill.#Microsoft.Skills.Text.KeyPhraseExtractionSkill' : KeyPhraseExtractionSkill, - 'Skill.#Microsoft.Skills.Vision.OcrSkill' : OcrSkill, - 'Skill.#Microsoft.Skills.Vision.ImageAnalysisSkill' : ImageAnalysisSkill, - 'Skill.#Microsoft.Skills.Text.LanguageDetectionSkill' : LanguageDetectionSkill, - 'Skill.#Microsoft.Skills.Util.ShaperSkill' : ShaperSkill, - 'Skill.#Microsoft.Skills.Text.MergeSkill' : MergeSkill, - 'Skill.#Microsoft.Skills.Text.EntityRecognitionSkill' : EntityRecognitionSkill, - 'Skill.#Microsoft.Skills.Text.SentimentSkill' : SentimentSkill, - 'Skill.#Microsoft.Skills.Text.SplitSkill' : SplitSkill, - 'Skill.#Microsoft.Skills.Text.TranslationSkill' : TextTranslationSkill, - 'Skill.#Microsoft.Skills.Custom.WebApiSkill' : WebApiSkill + 'SearchIndexerSkill.#Microsoft.Skills.Util.ConditionalSkill' : ConditionalSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.KeyPhraseExtractionSkill' : KeyPhraseExtractionSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Vision.OcrSkill' : OcrSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Vision.ImageAnalysisSkill' : ImageAnalysisSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.LanguageDetectionSkill' : LanguageDetectionSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Util.ShaperSkill' : ShaperSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.MergeSkill' : MergeSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.EntityRecognitionSkill' : EntityRecognitionSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.SentimentSkill' : SentimentSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.SplitSkill' : SplitSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Text.TranslationSkill' : TextTranslationSkill, + 'SearchIndexerSkill.#Microsoft.Skills.Custom.WebApiSkill' : WebApiSkill }; diff --git a/sdk/search/search-documents/src/generated/service/models/parameters.ts b/sdk/search/search-documents/src/generated/service/models/parameters.ts index a4e7c860495a..7235dd302ccb 100644 --- a/sdk/search/search-documents/src/generated/service/models/parameters.ts +++ b/sdk/search/search-documents/src/generated/service/models/parameters.ts @@ -57,7 +57,6 @@ export const endpoint: coreHttp.OperationURLParameter = { export const ifMatch: coreHttp.OperationParameter = { parameterPath: [ "options", - "accessCondition", "ifMatch" ], mapper: { @@ -70,7 +69,6 @@ export const ifMatch: coreHttp.OperationParameter = { export const ifNoneMatch: coreHttp.OperationParameter = { parameterPath: [ "options", - "accessCondition", "ifNoneMatch" ], mapper: { diff --git a/sdk/search/search-documents/src/generated/service/models/skillsetsMappers.ts b/sdk/search/search-documents/src/generated/service/models/skillsetsMappers.ts index 1c7d01c15dff..c4be159ec087 100644 --- a/sdk/search/search-documents/src/generated/service/models/skillsetsMappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/skillsetsMappers.ts @@ -22,10 +22,10 @@ export { OcrSkill, OutputFieldMappingEntry, SearchError, + SearchIndexerSkill, + SearchIndexerSkillset, SentimentSkill, ShaperSkill, - Skill, - Skillset, SplitSkill, TextTranslationSkill, WebApiSkill diff --git a/sdk/search/search-documents/src/generated/service/models/synonymMapsMappers.ts b/sdk/search/search-documents/src/generated/service/models/synonymMapsMappers.ts index 6dcfcc9b06df..64f96b8202a4 100644 --- a/sdk/search/search-documents/src/generated/service/models/synonymMapsMappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/synonymMapsMappers.ts @@ -9,8 +9,8 @@ export { discriminators, AzureActiveDirectoryApplicationCredentials, - EncryptionKey, ListSynonymMapsResult, SearchError, + SearchResourceEncryptionKey, SynonymMap } from "../models/mappers"; diff --git a/sdk/search/search-documents/src/generated/service/operations/dataSources.ts b/sdk/search/search-documents/src/generated/service/operations/dataSources.ts index ac4df000a365..d48caa9ad894 100644 --- a/sdk/search/search-documents/src/generated/service/operations/dataSources.ts +++ b/sdk/search/search-documents/src/generated/service/operations/dataSources.ts @@ -33,21 +33,21 @@ export class DataSources { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(dataSourceName: string, dataSource: Models.DataSource, options?: Models.DataSourcesCreateOrUpdateOptionalParams): Promise; + createOrUpdate(dataSourceName: string, dataSource: Models.SearchIndexerDataSource, options?: Models.DataSourcesCreateOrUpdateOptionalParams): Promise; /** * @param dataSourceName The name of the datasource to create or update. * @param dataSource The definition of the datasource to create or update. * @param callback The callback */ - createOrUpdate(dataSourceName: string, dataSource: Models.DataSource, callback: coreHttp.ServiceCallback): void; + createOrUpdate(dataSourceName: string, dataSource: Models.SearchIndexerDataSource, callback: coreHttp.ServiceCallback): void; /** * @param dataSourceName The name of the datasource to create or update. * @param dataSource The definition of the datasource to create or update. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(dataSourceName: string, dataSource: Models.DataSource, options: Models.DataSourcesCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - createOrUpdate(dataSourceName: string, dataSource: Models.DataSource, options?: Models.DataSourcesCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + createOrUpdate(dataSourceName: string, dataSource: Models.SearchIndexerDataSource, options: Models.DataSourcesCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + createOrUpdate(dataSourceName: string, dataSource: Models.SearchIndexerDataSource, options?: Models.DataSourcesCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { dataSourceName, @@ -97,14 +97,14 @@ export class DataSources { * @param dataSourceName The name of the datasource to retrieve. * @param callback The callback */ - get(dataSourceName: string, callback: coreHttp.ServiceCallback): void; + get(dataSourceName: string, callback: coreHttp.ServiceCallback): void; /** * @param dataSourceName The name of the datasource to retrieve. * @param options The optional parameters * @param callback The callback */ - get(dataSourceName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - get(dataSourceName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + get(dataSourceName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + get(dataSourceName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { dataSourceName, @@ -144,19 +144,19 @@ export class DataSources { * @param [options] The optional parameters * @returns Promise */ - create(dataSource: Models.DataSource, options?: coreHttp.RequestOptionsBase): Promise; + create(dataSource: Models.SearchIndexerDataSource, options?: coreHttp.RequestOptionsBase): Promise; /** * @param dataSource The definition of the datasource to create. * @param callback The callback */ - create(dataSource: Models.DataSource, callback: coreHttp.ServiceCallback): void; + create(dataSource: Models.SearchIndexerDataSource, callback: coreHttp.ServiceCallback): void; /** * @param dataSource The definition of the datasource to create. * @param options The optional parameters * @param callback The callback */ - create(dataSource: Models.DataSource, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - create(dataSource: Models.DataSource, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + create(dataSource: Models.SearchIndexerDataSource, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + create(dataSource: Models.SearchIndexerDataSource, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { dataSource, @@ -180,23 +180,23 @@ const createOrUpdateOperationSpec: coreHttp.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.prefer, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.prefer ], requestBody: { parameterPath: "dataSource", mapper: { - ...Mappers.DataSource, + ...Mappers.SearchIndexerDataSource, required: true } }, responses: { 200: { - bodyMapper: Mappers.DataSource + bodyMapper: Mappers.SearchIndexerDataSource }, 201: { - bodyMapper: Mappers.DataSource + bodyMapper: Mappers.SearchIndexerDataSource }, default: { bodyMapper: Mappers.SearchError @@ -241,7 +241,7 @@ const getOperationSpec: coreHttp.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.DataSource + bodyMapper: Mappers.SearchIndexerDataSource }, default: { bodyMapper: Mappers.SearchError @@ -283,13 +283,13 @@ const createOperationSpec: coreHttp.OperationSpec = { requestBody: { parameterPath: "dataSource", mapper: { - ...Mappers.DataSource, + ...Mappers.SearchIndexerDataSource, required: true } }, responses: { 201: { - bodyMapper: Mappers.DataSource + bodyMapper: Mappers.SearchIndexerDataSource }, default: { bodyMapper: Mappers.SearchError diff --git a/sdk/search/search-documents/src/generated/service/operations/indexers.ts b/sdk/search/search-documents/src/generated/service/operations/indexers.ts index ebdc22beb9ee..a200bf8759d4 100644 --- a/sdk/search/search-documents/src/generated/service/operations/indexers.ts +++ b/sdk/search/search-documents/src/generated/service/operations/indexers.ts @@ -89,21 +89,21 @@ export class Indexers { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(indexerName: string, indexer: Models.Indexer, options?: Models.IndexersCreateOrUpdateOptionalParams): Promise; + createOrUpdate(indexerName: string, indexer: Models.SearchIndexer, options?: Models.IndexersCreateOrUpdateOptionalParams): Promise; /** * @param indexerName The name of the indexer to create or update. * @param indexer The definition of the indexer to create or update. * @param callback The callback */ - createOrUpdate(indexerName: string, indexer: Models.Indexer, callback: coreHttp.ServiceCallback): void; + createOrUpdate(indexerName: string, indexer: Models.SearchIndexer, callback: coreHttp.ServiceCallback): void; /** * @param indexerName The name of the indexer to create or update. * @param indexer The definition of the indexer to create or update. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(indexerName: string, indexer: Models.Indexer, options: Models.IndexersCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - createOrUpdate(indexerName: string, indexer: Models.Indexer, options?: Models.IndexersCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + createOrUpdate(indexerName: string, indexer: Models.SearchIndexer, options: Models.IndexersCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + createOrUpdate(indexerName: string, indexer: Models.SearchIndexer, options?: Models.IndexersCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexerName, @@ -153,14 +153,14 @@ export class Indexers { * @param indexerName The name of the indexer to retrieve. * @param callback The callback */ - get(indexerName: string, callback: coreHttp.ServiceCallback): void; + get(indexerName: string, callback: coreHttp.ServiceCallback): void; /** * @param indexerName The name of the indexer to retrieve. * @param options The optional parameters * @param callback The callback */ - get(indexerName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - get(indexerName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + get(indexerName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + get(indexerName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexerName, @@ -200,19 +200,19 @@ export class Indexers { * @param [options] The optional parameters * @returns Promise */ - create(indexer: Models.Indexer, options?: coreHttp.RequestOptionsBase): Promise; + create(indexer: Models.SearchIndexer, options?: coreHttp.RequestOptionsBase): Promise; /** * @param indexer The definition of the indexer to create. * @param callback The callback */ - create(indexer: Models.Indexer, callback: coreHttp.ServiceCallback): void; + create(indexer: Models.SearchIndexer, callback: coreHttp.ServiceCallback): void; /** * @param indexer The definition of the indexer to create. * @param options The optional parameters * @param callback The callback */ - create(indexer: Models.Indexer, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - create(indexer: Models.Indexer, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + create(indexer: Models.SearchIndexer, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + create(indexer: Models.SearchIndexer, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexer, @@ -233,14 +233,14 @@ export class Indexers { * @param indexerName The name of the indexer for which to retrieve status. * @param callback The callback */ - getStatus(indexerName: string, callback: coreHttp.ServiceCallback): void; + getStatus(indexerName: string, callback: coreHttp.ServiceCallback): void; /** * @param indexerName The name of the indexer for which to retrieve status. * @param options The optional parameters * @param callback The callback */ - getStatus(indexerName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - getStatus(indexerName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + getStatus(indexerName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + getStatus(indexerName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexerName, @@ -302,23 +302,23 @@ const createOrUpdateOperationSpec: coreHttp.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.prefer, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.prefer ], requestBody: { parameterPath: "indexer", mapper: { - ...Mappers.Indexer, + ...Mappers.SearchIndexer, required: true } }, responses: { 200: { - bodyMapper: Mappers.Indexer + bodyMapper: Mappers.SearchIndexer }, 201: { - bodyMapper: Mappers.Indexer + bodyMapper: Mappers.SearchIndexer }, default: { bodyMapper: Mappers.SearchError @@ -363,7 +363,7 @@ const getOperationSpec: coreHttp.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.Indexer + bodyMapper: Mappers.SearchIndexer }, default: { bodyMapper: Mappers.SearchError @@ -405,13 +405,13 @@ const createOperationSpec: coreHttp.OperationSpec = { requestBody: { parameterPath: "indexer", mapper: { - ...Mappers.Indexer, + ...Mappers.SearchIndexer, required: true } }, responses: { 201: { - bodyMapper: Mappers.Indexer + bodyMapper: Mappers.SearchIndexer }, default: { bodyMapper: Mappers.SearchError @@ -432,7 +432,7 @@ const getStatusOperationSpec: coreHttp.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.IndexerExecutionInfo + bodyMapper: Mappers.SearchIndexerStatus }, default: { bodyMapper: Mappers.SearchError diff --git a/sdk/search/search-documents/src/generated/service/operations/indexes.ts b/sdk/search/search-documents/src/generated/service/operations/indexes.ts index 53b380232165..333d5cc92984 100644 --- a/sdk/search/search-documents/src/generated/service/operations/indexes.ts +++ b/sdk/search/search-documents/src/generated/service/operations/indexes.ts @@ -32,19 +32,19 @@ export class Indexes { * @param [options] The optional parameters * @returns Promise */ - create(index: Models.Index, options?: coreHttp.RequestOptionsBase): Promise; + create(index: Models.SearchIndex, options?: coreHttp.RequestOptionsBase): Promise; /** * @param index The definition of the index to create. * @param callback The callback */ - create(index: Models.Index, callback: coreHttp.ServiceCallback): void; + create(index: Models.SearchIndex, callback: coreHttp.ServiceCallback): void; /** * @param index The definition of the index to create. * @param options The optional parameters * @param callback The callback */ - create(index: Models.Index, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - create(index: Models.Index, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + create(index: Models.SearchIndex, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + create(index: Models.SearchIndex, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { index, @@ -85,21 +85,21 @@ export class Indexes { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(indexName: string, index: Models.Index, options?: Models.IndexesCreateOrUpdateOptionalParams): Promise; + createOrUpdate(indexName: string, index: Models.SearchIndex, options?: Models.IndexesCreateOrUpdateOptionalParams): Promise; /** * @param indexName The definition of the index to create or update. * @param index The definition of the index to create or update. * @param callback The callback */ - createOrUpdate(indexName: string, index: Models.Index, callback: coreHttp.ServiceCallback): void; + createOrUpdate(indexName: string, index: Models.SearchIndex, callback: coreHttp.ServiceCallback): void; /** * @param indexName The definition of the index to create or update. * @param index The definition of the index to create or update. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(indexName: string, index: Models.Index, options: Models.IndexesCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - createOrUpdate(indexName: string, index: Models.Index, options?: Models.IndexesCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + createOrUpdate(indexName: string, index: Models.SearchIndex, options: Models.IndexesCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + createOrUpdate(indexName: string, index: Models.SearchIndex, options?: Models.IndexesCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexName, @@ -111,7 +111,9 @@ export class Indexes { } /** - * Deletes a search index and all the documents it contains. + * Deletes a search index and all the documents it contains. This operation is permanent, with no + * recovery option. Make sure you have a master copy of your index definition, data ingestion code, + * and a backup of the primary data source in case you need to re-build the index. * @param indexName The name of the index to delete. * @param [options] The optional parameters * @returns Promise @@ -149,14 +151,14 @@ export class Indexes { * @param indexName The name of the index to retrieve. * @param callback The callback */ - get(indexName: string, callback: coreHttp.ServiceCallback): void; + get(indexName: string, callback: coreHttp.ServiceCallback): void; /** * @param indexName The name of the index to retrieve. * @param options The optional parameters * @param callback The callback */ - get(indexName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - get(indexName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + get(indexName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + get(indexName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { indexName, @@ -241,13 +243,13 @@ const createOperationSpec: coreHttp.OperationSpec = { requestBody: { parameterPath: "index", mapper: { - ...Mappers.Index, + ...Mappers.SearchIndex, required: true } }, responses: { 201: { - bodyMapper: Mappers.Index + bodyMapper: Mappers.SearchIndex }, default: { bodyMapper: Mappers.SearchError @@ -289,23 +291,23 @@ const createOrUpdateOperationSpec: coreHttp.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.prefer, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.prefer ], requestBody: { parameterPath: "index", mapper: { - ...Mappers.Index, + ...Mappers.SearchIndex, required: true } }, responses: { 200: { - bodyMapper: Mappers.Index + bodyMapper: Mappers.SearchIndex }, 201: { - bodyMapper: Mappers.Index + bodyMapper: Mappers.SearchIndex }, default: { bodyMapper: Mappers.SearchError @@ -350,7 +352,7 @@ const getOperationSpec: coreHttp.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.Index + bodyMapper: Mappers.SearchIndex }, default: { bodyMapper: Mappers.SearchError diff --git a/sdk/search/search-documents/src/generated/service/operations/skillsets.ts b/sdk/search/search-documents/src/generated/service/operations/skillsets.ts index eb8ceee45f65..1137f497c89f 100644 --- a/sdk/search/search-documents/src/generated/service/operations/skillsets.ts +++ b/sdk/search/search-documents/src/generated/service/operations/skillsets.ts @@ -34,14 +34,14 @@ export class Skillsets { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(skillsetName: string, skillset: Models.Skillset, options?: Models.SkillsetsCreateOrUpdateOptionalParams): Promise; + createOrUpdate(skillsetName: string, skillset: Models.SearchIndexerSkillset, options?: Models.SkillsetsCreateOrUpdateOptionalParams): Promise; /** * @param skillsetName The name of the skillset to create or update. * @param skillset The skillset containing one or more skills to create or update in a search * service. * @param callback The callback */ - createOrUpdate(skillsetName: string, skillset: Models.Skillset, callback: coreHttp.ServiceCallback): void; + createOrUpdate(skillsetName: string, skillset: Models.SearchIndexerSkillset, callback: coreHttp.ServiceCallback): void; /** * @param skillsetName The name of the skillset to create or update. * @param skillset The skillset containing one or more skills to create or update in a search @@ -49,8 +49,8 @@ export class Skillsets { * @param options The optional parameters * @param callback The callback */ - createOrUpdate(skillsetName: string, skillset: Models.Skillset, options: Models.SkillsetsCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - createOrUpdate(skillsetName: string, skillset: Models.Skillset, options?: Models.SkillsetsCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + createOrUpdate(skillsetName: string, skillset: Models.SearchIndexerSkillset, options: Models.SkillsetsCreateOrUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + createOrUpdate(skillsetName: string, skillset: Models.SearchIndexerSkillset, options?: Models.SkillsetsCreateOrUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { skillsetName, @@ -100,14 +100,14 @@ export class Skillsets { * @param skillsetName The name of the skillset to retrieve. * @param callback The callback */ - get(skillsetName: string, callback: coreHttp.ServiceCallback): void; + get(skillsetName: string, callback: coreHttp.ServiceCallback): void; /** * @param skillsetName The name of the skillset to retrieve. * @param options The optional parameters * @param callback The callback */ - get(skillsetName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - get(skillsetName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + get(skillsetName: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + get(skillsetName: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { skillsetName, @@ -147,19 +147,19 @@ export class Skillsets { * @param [options] The optional parameters * @returns Promise */ - create(skillset: Models.Skillset, options?: coreHttp.RequestOptionsBase): Promise; + create(skillset: Models.SearchIndexerSkillset, options?: coreHttp.RequestOptionsBase): Promise; /** * @param skillset The skillset containing one or more skills to create in a search service. * @param callback The callback */ - create(skillset: Models.Skillset, callback: coreHttp.ServiceCallback): void; + create(skillset: Models.SearchIndexerSkillset, callback: coreHttp.ServiceCallback): void; /** * @param skillset The skillset containing one or more skills to create in a search service. * @param options The optional parameters * @param callback The callback */ - create(skillset: Models.Skillset, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; - create(skillset: Models.Skillset, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + create(skillset: Models.SearchIndexerSkillset, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + create(skillset: Models.SearchIndexerSkillset, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { skillset, @@ -183,23 +183,23 @@ const createOrUpdateOperationSpec: coreHttp.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.prefer, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.prefer ], requestBody: { parameterPath: "skillset", mapper: { - ...Mappers.Skillset, + ...Mappers.SearchIndexerSkillset, required: true } }, responses: { 200: { - bodyMapper: Mappers.Skillset + bodyMapper: Mappers.SearchIndexerSkillset }, 201: { - bodyMapper: Mappers.Skillset + bodyMapper: Mappers.SearchIndexerSkillset }, default: { bodyMapper: Mappers.SearchError @@ -244,7 +244,7 @@ const getOperationSpec: coreHttp.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.Skillset + bodyMapper: Mappers.SearchIndexerSkillset }, default: { bodyMapper: Mappers.SearchError @@ -286,13 +286,13 @@ const createOperationSpec: coreHttp.OperationSpec = { requestBody: { parameterPath: "skillset", mapper: { - ...Mappers.Skillset, + ...Mappers.SearchIndexerSkillset, required: true } }, responses: { 201: { - bodyMapper: Mappers.Skillset + bodyMapper: Mappers.SearchIndexerSkillset }, default: { bodyMapper: Mappers.SearchError diff --git a/sdk/search/search-documents/src/generated/service/operations/synonymMaps.ts b/sdk/search/search-documents/src/generated/service/operations/synonymMaps.ts index 5b040442aa75..31e6f33f84a5 100644 --- a/sdk/search/search-documents/src/generated/service/operations/synonymMaps.ts +++ b/sdk/search/search-documents/src/generated/service/operations/synonymMaps.ts @@ -180,9 +180,9 @@ const createOrUpdateOperationSpec: coreHttp.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.prefer, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.prefer ], requestBody: { parameterPath: "synonymMap", diff --git a/sdk/search/search-documents/src/generated/service/searchServiceClientContext.ts b/sdk/search/search-documents/src/generated/service/searchServiceClientContext.ts index 6604e2096504..b355ae0410cd 100644 --- a/sdk/search/search-documents/src/generated/service/searchServiceClientContext.ts +++ b/sdk/search/search-documents/src/generated/service/searchServiceClientContext.ts @@ -11,7 +11,7 @@ import * as coreHttp from "@azure/core-http"; const packageName = "@azure/search-documents"; -const packageVersion = "1.0.0-preview.4"; +const packageVersion = "1.0.0-preview.5"; export class SearchServiceClientContext extends coreHttp.ServiceClient { apiVersion: string; diff --git a/sdk/search/search-documents/src/index.ts b/sdk/search/search-documents/src/index.ts index f943bf3a032b..de5e3c383c4b 100644 --- a/sdk/search/search-documents/src/index.ts +++ b/sdk/search/search-documents/src/index.ts @@ -10,12 +10,13 @@ export { GetDocumentOptions, IndexDocumentsAction, ListSearchResultsPageSettings, - IndexDocuments, + IndexDocumentsOptions, SearchDocumentsResultBase, SearchDocumentsResult, SearchDocumentsPageResult, SearchIterator, SearchOptions, + SearchRequestOptions, SearchRequest, SearchResult, SuggestDocumentsResult, @@ -29,10 +30,10 @@ export { export { SearchIndexClient, SearchIndexClientOptions } from "./searchIndexClient"; export { SearchIndexerClient, SearchIndexerClientOptions } from "./searchIndexerClient"; export { - Index, - Analyzer, + SearchIndex, + LexicalAnalyzer, TokenFilter, - Tokenizer, + LexicalTokenizer, CharFilter, ListIndexesOptions, CreateIndexOptions, @@ -46,10 +47,9 @@ export { GetSkillSetOptions, GetSynonymMapsOptions, ListSkillsetsOptions, - Skillset, + SearchIndexerSkillset, ListSynonymMapsOptions, DeleteIndexOptions, - ETagOperationOptions, AnalyzeTextOptions, GetIndexOptions, GetIndexStatisticsOptions, @@ -59,15 +59,16 @@ export { KnownTokenizerNames, ScoringFunction, ScoringProfile, + CustomAnalyzer, PatternAnalyzer, PatternTokenizer, - Field, + SearchField, SimpleField, ComplexField, - SimpleDataType, + SearchFieldDataType, ComplexDataType, CognitiveServicesAccount, - Skill, + SearchIndexerSkill, SynonymMap, ListIndexersOptions, CreateIndexerOptions, @@ -77,15 +78,26 @@ export { GetIndexerStatusOptions, ResetIndexerOptions, RunIndexerOptions, - CreateDataSourceOptions, - CreateorUpdateDataSourceOptions, - DeleteDataSourceOptions, - GetDataSourceOptions, - ListDataSourcesOptions, - DataSource, + CreateDataSourceConnectionOptions, + CreateorUpdateDataSourceConnectionOptions, + DeleteDataSourceConnectionOptions, + GetDataSourceConnectionOptions, + ListDataSourceConnectionsOptions, + SearchIndexerDataSourceConnection, DataChangeDetectionPolicy, DataDeletionDetectionPolicy, - GetServiceStatisticsOptions + GetServiceStatisticsOptions, + IndexIterator, + IndexNameIterator, + SimilarityAlgorithm, + NGramTokenFilter, + LuceneStandardTokenizer, + EdgeNGramTokenFilter, + KeywordTokenizer, + AnalyzeRequest, + SearchResourceEncryptionKey, + SearchIndexStatistics, + SearchServiceStatistics } from "./serviceModels"; export { default as GeographyPoint } from "./geographyPoint"; export { odata } from "./odata"; @@ -99,19 +111,16 @@ export { IndexDocumentsResult, IndexingResult, QueryType, - SearchMode, - SearchRequest as RawSearchRequest + SearchMode } from "./generated/data/models"; export { - CustomAnalyzer, RegexFlags, - StandardAnalyzer, + LuceneStandardAnalyzer, StopAnalyzer, MappingCharFilter, PatternReplaceCharFilter, CorsOptions, AzureActiveDirectoryApplicationCredentials, - EncryptionKey, ScoringFunctionAggregation, ScoringFunctionInterpolation, DistanceScoringParameters, @@ -129,15 +138,11 @@ export { CommonGramTokenFilter, DictionaryDecompounderTokenFilter, EdgeNGramTokenFilterSide, - EdgeNGramTokenFilter, - EdgeNGramTokenFilterV2, ElisionTokenFilter, KeepTokenFilter, KeywordMarkerTokenFilter, LengthTokenFilter, LimitTokenFilter, - NGramTokenFilter, - NGramTokenFilterV2, PatternCaptureTokenFilter, PatternReplaceTokenFilter, PhoneticEncoder, @@ -157,23 +162,16 @@ export { ClassicTokenizer, TokenCharacterKind, EdgeNGramTokenizer, - KeywordTokenizer, - KeywordTokenizerV2, MicrosoftTokenizerLanguage, MicrosoftLanguageTokenizer, MicrosoftStemmingTokenizerLanguage, MicrosoftLanguageStemmingTokenizer, NGramTokenizer, - PathHierarchyTokenizerV2, - StandardTokenizer, - StandardTokenizerV2, + PathHierarchyTokenizerV2 as PathHierarchyTokenizer, UaxUrlEmailTokenizer, - Suggester, + Suggester as SearchSuggester, AnalyzeResult, - AnalyzeRequest, - GetIndexStatisticsResult, - TokenInfo, - AccessCondition, + AnalyzedTokenInfo, ConditionalSkill, KeyPhraseExtractionSkill, OcrSkill, @@ -201,28 +199,28 @@ export { VisualFeature, KeyPhraseExtractionSkillLanguage, OcrSkillLanguage, - TextExtractionAlgorithm, - Indexer, + SearchIndexer, FieldMapping, IndexingParameters, IndexingSchedule, FieldMappingFunction, - IndexerExecutionInfo, + SearchIndexerStatus, IndexerExecutionResult, - IndexerLimits, + SearchIndexerLimits, IndexerStatus, - ItemError, + SearchIndexerError, IndexerExecutionStatus, - ItemWarning, - DataContainer, - DataSourceCredentials, - DataSourceType, + SearchIndexerWarning, + SearchIndexerDataContainer, + SearchIndexerDataSourceType, SoftDeleteColumnDeletionDetectionPolicy, SqlIntegratedChangeTrackingPolicy, HighWaterMarkChangeDetectionPolicy, - ServiceStatistics, ServiceCounters, ServiceLimits, - ResourceCounter + ResourceCounter, + LexicalAnalyzerName, + ClassicSimilarity, + BM25Similarity } from "./generated/service/models"; export { AzureKeyCredential } from "@azure/core-auth"; diff --git a/sdk/search/search-documents/src/indexDocumentsBatch.ts b/sdk/search/search-documents/src/indexDocumentsBatch.ts index 01063e19ac01..5f9037bd6d7a 100644 --- a/sdk/search/search-documents/src/indexDocumentsBatch.ts +++ b/sdk/search/search-documents/src/indexDocumentsBatch.ts @@ -65,18 +65,41 @@ export class IndexDocumentsBatch { } /** - * Delete a set of documents by their primary key. + * Delete a set of documents. * @param keyName The name of their primary key in the index. * @param keyValues The primary key values of documents to delete. */ - public delete(keyName: keyof T, keyValues: string[]): void { - const batch = keyValues.map>((keyValue) => { - return { - __actionType: "delete", - [keyName]: keyValue - } as IndexDocumentsAction; - }); + public delete(keyName: keyof T, keyValues: string[]): void; - this.actions.push(...batch); + /** + * Delete a set of documents. + * @param documents Documents to be deleted. + */ + public delete(documents: T[]): void; + + public delete(keyNameOrDocuments: keyof T | T[], keyValues?: string[]): void { + if (keyValues) { + const keyName = keyNameOrDocuments as keyof T; + + const batch = keyValues.map>((keyValue) => { + return { + __actionType: "delete", + [keyName]: keyValue + } as IndexDocumentsAction; + }); + + this.actions.push(...batch); + } else { + const documents = keyNameOrDocuments as T[]; + + const batch = documents.map>((document) => { + return { + __actionType: "delete", + ...document + } as IndexDocumentsAction; + }); + + this.actions.push(...batch); + } } } diff --git a/sdk/search/search-documents/src/indexModels.ts b/sdk/search/search-documents/src/indexModels.ts index 5e67951b5574..233997627adb 100644 --- a/sdk/search/search-documents/src/indexModels.ts +++ b/sdk/search/search-documents/src/indexModels.ts @@ -23,7 +23,7 @@ export type AutocompleteOptions = OperationOptions & AutocompleteRequest /** * Options for committing a full search request. */ -export type SearchOptions = OperationOptions & SearchRequest; +export type SearchOptions = OperationOptions & SearchRequestOptions; /** * Options for retrieving suggestions based on the searchText. */ @@ -43,7 +43,7 @@ export interface GetDocumentOptions extends OperationOptions { /** * Options for the modify index batch operation. */ -export interface IndexDocuments extends OperationOptions { +export interface IndexDocumentsOptions extends OperationOptions { /** * If true, will cause this operation to throw if any document operation * in the batch did not succeed. @@ -54,22 +54,22 @@ export interface IndexDocuments extends OperationOptions { /** * Options for the upload documents operation. */ -export type UploadDocumentsOptions = IndexDocuments; +export type UploadDocumentsOptions = IndexDocumentsOptions; /** * Options for the merge documents operation. */ -export type MergeDocumentsOptions = IndexDocuments; +export type MergeDocumentsOptions = IndexDocumentsOptions; /** * Options for the merge or upload documents operation. */ -export type MergeOrUploadDocumentsOptions = IndexDocuments; +export type MergeOrUploadDocumentsOptions = IndexDocumentsOptions; /** * Options for the delete documents operation. */ -export type DeleteDocumentsOptions = IndexDocuments; +export type DeleteDocumentsOptions = IndexDocumentsOptions; /** * Arguments for retrieving the next page of search results. @@ -116,13 +116,13 @@ export type ContinuableSearchResult = Omit< /** * Parameters for filtering, sorting, faceting, paging, and other search query behaviors. */ -export interface SearchRequest { +export interface SearchRequest { /** * A value that specifies whether to fetch the total count of results. Default is false. Setting * this value to true may have a performance impact. Note that the count returned is an * approximation. */ - includeTotalResultCount?: boolean; + includeTotalCount?: boolean; /** * The list of facet expressions to apply to the search query. Each facet expression contains a * field name, optionally followed by a comma-separated list of name:value pairs. @@ -154,17 +154,17 @@ export interface SearchRequest { */ minimumCoverage?: number; /** - * The list of OData $orderby expressions by which to sort the results. Each + * The comma-separated list of OData $orderby expressions by which to sort the results. Each * expression can be either a field name or a call to either the geo.distance() or the * search.score() functions. Each expression can be followed by asc to indicate ascending, or * desc to indicate descending. The default is ascending order. Ties will be broken by the match * scores of documents. If no $orderby is specified, the default sort order is descending by * document match score. There can be at most 32 $orderby clauses. */ - orderBy?: string[]; + orderBy?: string; /** * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if - * your query uses the Lucene query syntax. Possible values include: 'simple', 'full' + * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full' */ queryType?: QueryType; /** @@ -183,6 +183,103 @@ export interface SearchRequest { * A full-text search query expression; Use "*" or omit this parameter to match all documents. */ searchText?: string; + /** + * The comma-separated list of field names to which to scope the full-text search. When using + * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each + * fielded search expression take precedence over any field names listed in this parameter. + */ + searchFields?: string; + /** + * A value that specifies whether any or all of the search terms must be matched in order to + * count the document as a match. Possible values include: 'Any', 'All' + */ + searchMode?: SearchMode; + /** + * The comma-separated list of fields to retrieve. If unspecified, all fields marked as + * retrievable in the schema are included. + */ + select?: string; + /** + * The number of search results to skip. This value cannot be greater than 100,000. If you need + * to scan documents in sequence, but cannot use skip due to this limitation, consider using + * orderby on a totally-ordered key and filter with a range query instead. + */ + skip?: number; + /** + * The number of search results to retrieve. This can be used in conjunction with $skip to + * implement client-side paging of search results. If results are truncated due to server-side + * paging, the response will include a continuation token that can be used to issue another + * Search request for the next page of results. + */ + top?: number; +} + +/** + * Parameters for filtering, sorting, faceting, paging, and other search query behaviors. + */ +export interface SearchRequestOptions { + /** + * A value that specifies whether to fetch the total count of results. Default is false. Setting + * this value to true may have a performance impact. Note that the count returned is an + * approximation. + */ + includeTotalCount?: boolean; + /** + * The list of facet expressions to apply to the search query. Each facet expression contains a + * field name, optionally followed by a comma-separated list of name:value pairs. + */ + facets?: string[]; + /** + * The OData $filter expression to apply to the search query. + */ + filter?: string; + /** + * The comma-separated list of field names to use for hit highlights. Only searchable fields can + * be used for hit highlighting. + */ + highlightFields?: string; + /** + * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is + * </em>. + */ + highlightPostTag?: string; + /** + * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default + * is <em>. + */ + highlightPreTag?: string; + /** + * A number between 0 and 100 indicating the percentage of the index that must be covered by a + * search query in order for the query to be reported as a success. This parameter can be useful + * for ensuring search availability even for services with only one replica. The default is 100. + */ + minimumCoverage?: number; + /** + * The list of OData $orderby expressions by which to sort the results. Each + * expression can be either a field name or a call to either the geo.distance() or the + * search.score() functions. Each expression can be followed by asc to indicate ascending, or + * desc to indicate descending. The default is ascending order. Ties will be broken by the match + * scores of documents. If no $orderby is specified, the default sort order is descending by + * document match score. There can be at most 32 $orderby clauses. + */ + orderBy?: string[]; + /** + * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if + * your query uses the Lucene query syntax. Possible values include: 'simple', 'full' + */ + queryType?: QueryType; + /** + * The list of parameter values to be used in scoring functions (for example, + * referencePointParameter) using the format name-values. For example, if the scoring profile + * defines a function with a parameter called 'mylocation' the parameter string would be + * "mylocation--122.2,44.8" (without the quotes). + */ + scoringParameters?: string[]; + /** + * The name of a scoring profile to evaluate match scores for matching documents in order to sort + * the results. + */ + scoringProfile?: string; /** * The comma-separated list of field names to which to scope the full-text search. When using * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each @@ -326,11 +423,6 @@ export interface SuggestRequest { * document match score. There can be at most 32 $orderby clauses. */ orderBy?: string[]; - /** - * The search text to use to suggest documents. Must be at least 1 character, and no more than - * 100 characters. - */ - searchText: string; /** * The comma-separated list of field names to search for the specified search text. Target fields * must be included in the specified suggester. @@ -341,11 +433,6 @@ export interface SuggestRequest { * included in the results. */ select?: Fields[]; - /** - * The name of the suggester as specified in the suggesters collection that's part of the index - * definition. - */ - suggesterName: string; /** * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is * 5. @@ -385,10 +472,6 @@ export interface SuggestDocumentsResult { * Parameters for fuzzy matching, and other autocomplete query behaviors. */ export interface AutocompleteRequest { - /** - * The search text on which to base autocomplete results. - */ - searchText: string; /** * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles * and 'oneTermWithContext' to use the current context while producing auto-completed terms. @@ -430,11 +513,6 @@ export interface AutocompleteRequest { * Target fields must be included in the specified suggester. */ searchFields?: Fields[]; - /** - * The name of the suggester as specified in the suggesters collection that's part of the index - * definition. - */ - suggesterName: string; /** * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The * default is 5. diff --git a/sdk/search/search-documents/src/searchClient.ts b/sdk/search/search-documents/src/searchClient.ts index a0341d7a8da2..974b80e0a9ab 100644 --- a/sdk/search/search-documents/src/searchClient.ts +++ b/sdk/search/search-documents/src/searchClient.ts @@ -19,7 +19,6 @@ import { logger } from "./logger"; import { AutocompleteResult, AutocompleteRequest, - SearchRequest, SuggestRequest, IndexDocumentsResult } from "./generated/data/models"; @@ -37,13 +36,14 @@ import { SuggestOptions, SuggestDocumentsResult, GetDocumentOptions, - IndexDocuments, + IndexDocumentsOptions, UploadDocumentsOptions, MergeDocumentsOptions, DeleteDocumentsOptions, SearchDocumentsPageResult, MergeOrUploadDocumentsOptions, - ContinuableSearchResult + ContinuableSearchResult, + SearchRequest } from "./indexModels"; import { odataMetadataPolicy } from "./odataMetadataPolicy"; import { IndexDocumentsBatch } from "./indexDocumentsBatch"; @@ -171,8 +171,8 @@ export class SearchClient { * Retrieves the number of documents in the index. * @param options Options to the count operation. */ - public async countDocuments(options: CountDocumentsOptions = {}): Promise { - const { span, updatedOptions } = createSpan("SearchClient-countDocuments", options); + public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise { + const { span, updatedOptions } = createSpan("SearchClient-getDocumentsCount", options); try { const result = await this.client.documents.count( operationOptionsToRequestOptionsBase(updatedOptions) @@ -192,14 +192,20 @@ export class SearchClient { /** * Based on a partial searchText from the user, return a list * of potential completion strings based on a specified suggester. + * @param searchText The search text on which to base autocomplete results. + * @param suggesterName The name of the suggester as specified in the suggesters collection that's part of the index definition. * @param options Options to the autocomplete operation. */ public async autocomplete( + searchText: string, + suggesterName: string, options: AutocompleteOptions ): Promise { const { operationOptions, restOptions } = this.extractOperationOptions({ ...options }); const { searchFields, ...nonFieldOptions } = restOptions; const fullOptions: AutocompleteRequest = { + searchText: searchText, + suggesterName: suggesterName, searchFields: this.convertSearchFields(searchFields), ...nonFieldOptions }; @@ -232,6 +238,7 @@ export class SearchClient { } private async searchDocuments( + searchText?: string, options: SearchOptions = {}, nextPageParameters: SearchRequest = {} ): Promise>> { @@ -249,7 +256,11 @@ export class SearchClient { try { const result = await this.client.documents.searchPost( - fullOptions, + { + ...fullOptions, + includeTotalResultCount: fullOptions.includeTotalCount, + searchText: searchText + }, operationOptionsToRequestOptionsBase(updatedOptions) ); @@ -275,11 +286,13 @@ export class SearchClient { } private async *listSearchResultsPage( + searchText?: string, options: SearchOptions = {}, settings: ListSearchResultsPageSettings = {} ): AsyncIterableIterator>> { const decodedContinuation = this.decodeContinuationToken(settings.continuationToken); let result = await this.searchDocuments( + searchText, options, decodedContinuation?.nextPageParameters ); @@ -290,18 +303,23 @@ export class SearchClient { // doesn't support this yet. while (result.continuationToken) { const decodedContinuation = this.decodeContinuationToken(settings.continuationToken); - result = await this.searchDocuments(options, decodedContinuation?.nextPageParameters); + result = await this.searchDocuments( + searchText, + options, + decodedContinuation?.nextPageParameters + ); yield result; } } private async *listSearchResultsAll( firstPage: SearchDocumentsPageResult>, + searchText?: string, options: SearchOptions = {} ): AsyncIterableIterator>> { yield* firstPage.results; if (firstPage.continuationToken) { - for await (const page of this.listSearchResultsPage(options, { + for await (const page of this.listSearchResultsPage(searchText, options, { continuationToken: firstPage.continuationToken })) { yield* page.results; @@ -311,9 +329,10 @@ export class SearchClient { private listSearchResults( firstPage: SearchDocumentsPageResult>, + searchText?: string, options: SearchOptions = {} ): SearchIterator> { - const iter = this.listSearchResultsAll(firstPage, options); + const iter = this.listSearchResultsAll(firstPage, searchText, options); return { next() { @@ -323,7 +342,7 @@ export class SearchClient { return this; }, byPage: (settings: ListSearchResultsPageSettings = {}) => { - return this.listSearchResultsPage(options, settings); + return this.listSearchResultsPage(searchText, options, settings); } }; } @@ -331,22 +350,24 @@ export class SearchClient { /** * Performs a search on the current index given * the specified arguments. + * @param searchText Text to search * @param options Options for the search operation. */ public async search( + searchText?: string, options: SearchOptions = {} ): Promise>> { const { span, updatedOptions } = createSpan("SearchClient-search", options); try { - const pageResult = await this.searchDocuments(updatedOptions); + const pageResult = await this.searchDocuments(searchText, options); const { count, coverage, facets } = pageResult; return { count, coverage, facets, - results: this.listSearchResults(pageResult, updatedOptions) + results: this.listSearchResults(pageResult, searchText, updatedOptions) }; } catch (e) { span.setStatus({ @@ -362,14 +383,20 @@ export class SearchClient { /** * Returns a short list of suggestions based on the searchText * and specified suggester. + * @param searchText The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters. + * @param suggesterName The name of the suggester as specified in the suggesters collection that's part of the index definition. * @param options Options for the suggest operation */ public async suggest( + searchText: string, + suggesterName: string, options: SuggestOptions ): Promise>> { const { operationOptions, restOptions } = this.extractOperationOptions({ ...options }); const { select, searchFields, orderBy, ...nonFieldOptions } = restOptions; const fullOptions: SuggestRequest = { + searchText: searchText, + suggesterName: suggesterName, searchFields: this.convertSearchFields(searchFields), select: this.convertSelect(select), orderBy: this.convertOrderBy(orderBy), @@ -443,7 +470,7 @@ export class SearchClient { public async indexDocuments( // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters batch: IndexDocumentsBatch, - options: IndexDocuments = {} + options: IndexDocumentsOptions = {} ): Promise { const { span, updatedOptions } = createSpan("SearchClient-indexDocuments", options); try { @@ -550,7 +577,17 @@ export class SearchClient { } /** - * Delete a set of documents by their primary key. + * Delete a set of documents. + * @param documents Documents to be deleted. + * @param options Additional options. + */ + public async deleteDocuments( + documents: T[], + options?: DeleteDocumentsOptions + ): Promise; + + /** + * Delete a set of documents. * @param keyName The name of their primary key in the index. * @param keyValues The primary key values of documents to delete. * @param options Additional options. @@ -558,12 +595,22 @@ export class SearchClient { public async deleteDocuments( keyName: keyof T, keyValues: string[], + options?: DeleteDocumentsOptions + ): Promise; + + public async deleteDocuments( + keyNameOrDocuments: keyof T | T[], + keyValuesOrOptions?: string[] | DeleteDocumentsOptions, options: DeleteDocumentsOptions = {} ): Promise { const { span, updatedOptions } = createSpan("SearchClient-deleteDocuments", options); const batch = new IndexDocumentsBatch(); - batch.delete(keyName, keyValues); + if (typeof keyNameOrDocuments === "string") { + batch.delete(keyNameOrDocuments, keyValuesOrOptions as string[]); + } else { + batch.delete(keyNameOrDocuments as T[]); + } try { return await this.indexDocuments(batch, updatedOptions); diff --git a/sdk/search/search-documents/src/searchIndexClient.ts b/sdk/search/search-documents/src/searchIndexClient.ts index f8b039741932..cc7a8799c627 100644 --- a/sdk/search/search-documents/src/searchIndexClient.ts +++ b/sdk/search/search-documents/src/searchIndexClient.ts @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +/// + import { KeyCredential } from "@azure/core-auth"; import { createPipelineFromOptions, @@ -11,11 +13,7 @@ import { } from "@azure/core-http"; import { CanonicalCode } from "@opentelemetry/api"; import { SDK_VERSION } from "./constants"; -import { - AnalyzeResult, - GetIndexStatisticsResult, - ServiceStatistics -} from "./generated/service/models"; +import { AnalyzeResult } from "./generated/service/models"; import { SearchServiceClient as GeneratedClient } from "./generated/service/searchServiceClient"; import { logger } from "./logger"; import { createSearchApiKeyCredentialPolicy } from "./searchApiKeyCredentialPolicy"; @@ -30,15 +28,20 @@ import { GetIndexOptions, GetIndexStatisticsOptions, GetSynonymMapsOptions, - Index, + SearchIndex, ListIndexesOptions, ListSynonymMapsOptions, SynonymMap, - GetServiceStatisticsOptions + GetServiceStatisticsOptions, + IndexIterator, + IndexNameIterator, + SearchIndexStatistics, + SearchServiceStatistics } from "./serviceModels"; import * as utils from "./serviceUtils"; import { createSpan } from "./tracing"; import { odataMetadataPolicy } from "./odataMetadataPolicy"; +import { SearchClient, SearchClientOptions } from "./searchClient"; /** * Client options used to configure Cognitive Search API requests. @@ -68,6 +71,16 @@ export class SearchIndexClient { */ private readonly client: GeneratedClient; + /** + * Used to authenticate requests to the service. + */ + private readonly credential: KeyCredential; + + /** + * Used to configure the Search Index client. + */ + private readonly options: SearchIndexClientOptions; + /** * Creates an instance of SearchIndexClient. * @@ -82,10 +95,12 @@ export class SearchIndexClient { * ``` * @param {string} endpoint The endpoint of the search service * @param {KeyCredential} credential Used to authenticate requests to the service. - * @param {SearchIndexClientOptions} [options] Used to configure the Search client. + * @param {SearchIndexClientOptions} [options] Used to configure the Search Index client. */ constructor(endpoint: string, credential: KeyCredential, options: SearchIndexClientOptions = {}) { this.endpoint = endpoint; + this.credential = credential; + this.options = options; const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`; if (!options.userAgentOptions) { @@ -137,17 +152,16 @@ export class SearchIndexClient { this.client = new GeneratedClient(dummyCredential, this.apiVersion, this.endpoint, pipeline); } - /** - * Retrieves a list of existing indexes in the service. - * @param options Options to the list index operation. - */ - public async listIndexes(options: ListIndexesOptions = {}): Promise> { - const { span, updatedOptions } = createSpan("SearchIndexClient-listIndexes", options); + private async *listIndexesPage( + options: ListIndexesOptions = {} + ): AsyncIterableIterator { + const { span, updatedOptions } = createSpan("SearchIndexClient-listIndexesPage", options); try { const result = await this.client.indexes.list( operationOptionsToRequestOptionsBase(updatedOptions) ); - return result.indexes.map(utils.generatedIndexToPublicIndex); + const mapped = result.indexes.map(utils.generatedIndexToPublicIndex); + yield mapped; } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -159,18 +173,45 @@ export class SearchIndexClient { } } + private async *listIndexesAll( + options: ListIndexesOptions = {} + ): AsyncIterableIterator { + for await (const page of this.listIndexesPage(options)) { + yield* page; + } + } + /** - * Retrieves a list of names of existing indexes in the service. + * Retrieves a list of existing indexes in the service. * @param options Options to the list index operation. */ - public async listIndexesNames(options: ListIndexesOptions = {}): Promise> { - const { span, updatedOptions } = createSpan("SearchIndexClient-listIndexesNames", options); + public listIndexes(options: ListIndexesOptions = {}): IndexIterator { + const iter = this.listIndexesAll(options); + + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listIndexesPage(options); + } + }; + } + + private async *listIndexesNamesPage( + options: ListIndexesOptions = {} + ): AsyncIterableIterator { + const { span, updatedOptions } = createSpan("SearchIndexClient-listIndexesNamesPage", options); try { const result = await this.client.indexes.list({ ...operationOptionsToRequestOptionsBase(updatedOptions), select: "name" }); - return result.indexes.map((idx) => idx.name); + const mapped = result.indexes.map((idx) => idx.name); + yield mapped; } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -182,6 +223,34 @@ export class SearchIndexClient { } } + private async *listIndexesNamesAll( + options: ListIndexesOptions = {} + ): AsyncIterableIterator { + for await (const page of this.listIndexesNamesPage(options)) { + yield* page; + } + } + + /** + * Retrieves a list of names of existing indexes in the service. + * @param options Options to the list index operation. + */ + public listIndexesNames(options: ListIndexesOptions = {}): IndexNameIterator { + const iter = this.listIndexesNamesAll(options); + + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listIndexesNamesPage(options); + } + }; + } + /** * Retrieves a list of existing SynonymMaps in the service. * @param options Options to the list SynonymMaps operation. @@ -232,7 +301,7 @@ export class SearchIndexClient { * @param indexName The name of the index. * @param options Additional optional arguments. */ - public async getIndex(indexName: string, options: GetIndexOptions = {}): Promise { + public async getIndex(indexName: string, options: GetIndexOptions = {}): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-getIndex", options); try { const result = await this.client.indexes.get( @@ -253,7 +322,7 @@ export class SearchIndexClient { /** * Retrieves information about a SynonymMap. - * @param indexName The name of the Skillset. + * @param synonymMapName The name of the SynonymMap. * @param options Additional optional arguments. */ public async getSynonymMap( @@ -283,7 +352,10 @@ export class SearchIndexClient { * @param index The information describing the index to be created. * @param options Additional optional arguments. */ - public async createIndex(index: Index, options: CreateIndexOptions = {}): Promise { + public async createIndex( + index: SearchIndex, + options: CreateIndexOptions = {} + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-createIndex", options); try { const result = await this.client.indexes.create( @@ -335,15 +407,20 @@ export class SearchIndexClient { * @param options Additional optional arguments. */ public async createOrUpdateIndex( - index: Index, + index: SearchIndex, options: CreateOrUpdateIndexOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-createOrUpdateIndex", options); try { + const etag = options.onlyIfUnchanged ? index.etag : undefined; + const result = await this.client.indexes.createOrUpdate( index.name, utils.publicIndexToGeneratedIndex(index), - operationOptionsToRequestOptionsBase(updatedOptions) + { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + } ); return utils.generatedIndexToPublicIndex(result); } catch (e) { @@ -371,10 +448,15 @@ export class SearchIndexClient { options ); try { + const etag = options.onlyIfUnchanged ? synonymMap.etag : undefined; + const result = await this.client.synonymMaps.createOrUpdate( synonymMap.name, utils.publicSynonymMapToGeneratedSynonymMap(synonymMap), - operationOptionsToRequestOptionsBase(updatedOptions) + { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + } ); return utils.generatedSynonymMapToPublicSynonymMap(result); } catch (e) { @@ -393,15 +475,20 @@ export class SearchIndexClient { * @param indexName Index/Name of the index to delete. * @param options Additional optional arguments. */ - public async deleteIndex(index: string | Index, options: DeleteIndexOptions = {}): Promise { + public async deleteIndex( + index: string | SearchIndex, + options: DeleteIndexOptions = {} + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-deleteIndex", options); try { const indexName: string = typeof index === "string" ? index : index.name; + const etag = + typeof index === "string" ? undefined : options.onlyIfUnchanged ? index.etag : undefined; - await this.client.indexes.deleteMethod( - indexName, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + await this.client.indexes.deleteMethod(indexName, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -425,11 +512,17 @@ export class SearchIndexClient { const { span, updatedOptions } = createSpan("SearchIndexClient-deleteSynonymMap", options); try { const synonymMapName: string = typeof synonymMap === "string" ? synonymMap : synonymMap.name; + const etag = + typeof synonymMap === "string" + ? undefined + : options.onlyIfUnchanged + ? synonymMap.etag + : undefined; - await this.client.synonymMaps.deleteMethod( - synonymMapName, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + await this.client.synonymMaps.deleteMethod(synonymMapName, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -450,7 +543,7 @@ export class SearchIndexClient { public async getIndexStatistics( indexName: string, options: GetIndexStatisticsOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-getIndexStatistics", options); try { const result = await this.client.indexes.getStatistics( @@ -472,6 +565,7 @@ export class SearchIndexClient { /** * Calls an analyzer or tokenizer manually on provided text. * @param indexName The name of the index that contains the field to analyze + * @param text The text to break into tokens. * @param options Additional arguments */ public async analyzeText(indexName: string, options: AnalyzeTextOptions): Promise { @@ -481,7 +575,11 @@ export class SearchIndexClient { try { const result = await this.client.indexes.analyze( indexName, - restOptions, + { + ...restOptions, + analyzer: restOptions.analyzerName, + tokenizer: restOptions.tokenizerName + }, operationOptionsToRequestOptionsBase(updatedOptions) ); return result; @@ -502,7 +600,7 @@ export class SearchIndexClient { */ public async getServiceStatistics( options: GetServiceStatisticsOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-getServiceStatistics", options); try { const result = await this.client.getServiceStatistics( @@ -519,4 +617,13 @@ export class SearchIndexClient { span.end(); } } + + /** + * Retrieves the SearchClient corresponding to this SearchIndexClient + * @param indexName Name of the index + * @param options SearchClient Options + */ + public getSearchClient(indexName: string, options?: SearchClientOptions): SearchClient { + return new SearchClient(this.endpoint, indexName, this.credential, options || this.options); + } } diff --git a/sdk/search/search-documents/src/searchIndexerClient.ts b/sdk/search/search-documents/src/searchIndexerClient.ts index 02749bb74ab4..e4dcd87632e9 100644 --- a/sdk/search/search-documents/src/searchIndexerClient.ts +++ b/sdk/search/search-documents/src/searchIndexerClient.ts @@ -11,7 +11,7 @@ import { } from "@azure/core-http"; import { CanonicalCode } from "@opentelemetry/api"; import { SDK_VERSION } from "./constants"; -import { Indexer, IndexerExecutionInfo } from "./generated/service/models"; +import { SearchIndexer, SearchIndexerStatus } from "./generated/service/models"; import { SearchServiceClient as GeneratedClient } from "./generated/service/searchServiceClient"; import { logger } from "./logger"; import { createSearchApiKeyCredentialPolicy } from "./searchApiKeyCredentialPolicy"; @@ -21,7 +21,7 @@ import { DeleteSkillsetOptions, GetSkillSetOptions, ListSkillsetsOptions, - Skillset, + SearchIndexerSkillset, ListIndexersOptions, CreateIndexerOptions, GetIndexerOptions, @@ -30,12 +30,12 @@ import { GetIndexerStatusOptions, ResetIndexerOptions, RunIndexerOptions, - ListDataSourcesOptions, - DataSource, - CreateDataSourceOptions, - DeleteDataSourceOptions, - GetDataSourceOptions, - CreateorUpdateDataSourceOptions + ListDataSourceConnectionsOptions, + SearchIndexerDataSourceConnection, + CreateDataSourceConnectionOptions, + DeleteDataSourceConnectionOptions, + GetDataSourceConnectionOptions, + CreateorUpdateDataSourceConnectionOptions } from "./serviceModels"; import * as utils from "./serviceUtils"; import { createSpan } from "./tracing"; @@ -146,7 +146,7 @@ export class SearchIndexerClient { * Retrieves a list of existing indexers in the service. * @param options Options to the list indexers operation. */ - public async listIndexers(options: ListIndexersOptions = {}): Promise> { + public async listIndexers(options: ListIndexersOptions = {}): Promise> { const { span, updatedOptions } = createSpan("SearchIndexerClient-listIndexers", options); try { const result = await this.client.indexers.list( @@ -191,8 +191,13 @@ export class SearchIndexerClient { * Retrieves a list of existing data sources in the service. * @param options Options to the list indexers operation. */ - public async listDataSources(options: ListDataSourcesOptions = {}): Promise> { - const { span, updatedOptions } = createSpan("SearchIndexerClient-listDataSources", options); + public async listDataSourceConnections( + options: ListDataSourceConnectionsOptions = {} + ): Promise> { + const { span, updatedOptions } = createSpan( + "SearchIndexerClient-listDataSourceConnections", + options + ); try { const result = await this.client.dataSources.list( operationOptionsToRequestOptionsBase(updatedOptions) @@ -213,9 +218,11 @@ export class SearchIndexerClient { * Retrieves a list of names of existing data sources in the service. * @param options Options to the list indexers operation. */ - public async listDataSourcesNames(options: ListDataSourcesOptions = {}): Promise> { + public async listDataSourceConnectionsNames( + options: ListDataSourceConnectionsOptions = {} + ): Promise> { const { span, updatedOptions } = createSpan( - "SearchIndexerClient-listDataSourcesNames", + "SearchIndexerClient-listDataSourceConnectionsNames", options ); try { @@ -239,7 +246,9 @@ export class SearchIndexerClient { * Retrieves a list of existing Skillsets in the service. * @param options Options to the list Skillsets operation. */ - public async listSkillsets(options: ListSkillsetsOptions = {}): Promise> { + public async listSkillsets( + options: ListSkillsetsOptions = {} + ): Promise> { const { span, updatedOptions } = createSpan("SearchIndexerClient-listSkillsets", options); try { const result = await this.client.skillsets.list( @@ -285,7 +294,10 @@ export class SearchIndexerClient { * @param indexerName The name of the Indexer. * @param options Additional optional arguments. */ - public async getIndexer(indexerName: string, options: GetIndexerOptions = {}): Promise { + public async getIndexer( + indexerName: string, + options: GetIndexerOptions = {} + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-getIndexer", options); try { const result = await this.client.indexers.get( @@ -309,14 +321,17 @@ export class SearchIndexerClient { * @param dataSourceName The name of the DataSource * @param options Additional optional arguments */ - public async getDataSource( - dataSourceName: string, - options: GetDataSourceOptions = {} - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexerClient-getDataSource", options); + public async getDataSourceConnection( + dataSourceConnectionName: string, + options: GetDataSourceConnectionOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "SearchIndexerClient-getDataSourceConnection", + options + ); try { const result = await this.client.dataSources.get( - dataSourceName, + dataSourceConnectionName, operationOptionsToRequestOptionsBase(updatedOptions) ); return utils.generatedDataSourceToPublicDataSource(result); @@ -339,7 +354,7 @@ export class SearchIndexerClient { public async getSkillset( skillsetName: string, options: GetSkillSetOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-getSkillset", options); try { const result = await this.client.skillsets.get( @@ -364,9 +379,9 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async createIndexer( - indexer: Indexer, + indexer: SearchIndexer, options: CreateIndexerOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-createIndexer", options); try { const result = await this.client.indexers.create( @@ -387,17 +402,25 @@ export class SearchIndexerClient { /** * Creates a new dataSource in a search service. - * @param dataSource The dataSource definition to create in a search service. + * @param dataSourceConnection The dataSource definition to create in a search service. * @param options Additional optional arguments. */ - public async createDataSource( - dataSource: DataSource, - options: CreateDataSourceOptions = {} - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexerClient-createDataSource", options); + public async createDataSourceConnection( + dataSourceConnection: SearchIndexerDataSourceConnection, + options: CreateDataSourceConnectionOptions = {} + ): Promise { + const { span, updatedOptions } = createSpan( + "SearchIndexerClient-createDataSourceConnection", + options + ); try { const result = await this.client.dataSources.create( - dataSource, + { + ...dataSourceConnection, + credentials: { + connectionString: dataSourceConnection.connectionString + } + }, operationOptionsToRequestOptionsBase(updatedOptions) ); return utils.generatedDataSourceToPublicDataSource(result); @@ -418,9 +441,9 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async createSkillset( - skillset: Skillset, + skillset: SearchIndexerSkillset, options: CreateSkillsetOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-createSkillset", options); try { const result = await this.client.skillsets.create( @@ -445,19 +468,20 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async createOrUpdateIndexer( - indexer: Indexer, + indexer: SearchIndexer, options: CreateorUpdateIndexerOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan( "SearchIndexerClient-createOrUpdateIndexer", options ); try { - const result = await this.client.indexers.createOrUpdate( - indexer.name, - indexer, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + const etag = options.onlyIfUnchanged ? indexer.etag : undefined; + + const result = await this.client.indexers.createOrUpdate(indexer.name, indexer, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); return result; } catch (e) { span.setStatus({ @@ -472,22 +496,32 @@ export class SearchIndexerClient { /** * Creates a new datasource or modifies an existing one. - * @param dataSource The information describing the datasource to be created/updated. + * @param dataSourceConnection The information describing the datasource to be created/updated. * @param options Additional optional arguments. */ - public async createOrUpdateDataSource( - dataSource: DataSource, - options: CreateorUpdateDataSourceOptions = {} - ): Promise { + public async createOrUpdateDataSourceConnection( + dataSourceConnection: SearchIndexerDataSourceConnection, + options: CreateorUpdateDataSourceConnectionOptions = {} + ): Promise { const { span, updatedOptions } = createSpan( - "SearchIndexerClient-createOrUpdateDataSource", + "SearchIndexerClient-createOrUpdateDataSourceConnection", options ); try { + const etag = options.onlyIfUnchanged ? dataSourceConnection.etag : undefined; + const result = await this.client.dataSources.createOrUpdate( - dataSource.name, - dataSource, - operationOptionsToRequestOptionsBase(updatedOptions) + dataSourceConnection.name, + { + ...dataSourceConnection, + credentials: { + connectionString: dataSourceConnection.connectionString + } + }, + { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + } ); return utils.generatedDataSourceToPublicDataSource(result); } catch (e) { @@ -507,19 +541,25 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async createOrUpdateSkillset( - skillset: Skillset, + skillset: SearchIndexerSkillset, options: CreateOrUpdateSkillsetOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan( "SearchIndexerClient-createOrUpdateSkillset", options ); try { + const etag = options.onlyIfUnchanged ? skillset.etag : undefined; + const result = await this.client.skillsets.createOrUpdate( skillset.name, utils.publicSkillsetToGeneratedSkillset(skillset), - operationOptionsToRequestOptionsBase(updatedOptions) + { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + } ); + return utils.generatedSkillsetToPublicSkillset(result); } catch (e) { span.setStatus({ @@ -538,17 +578,23 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async deleteIndexer( - indexer: string | Indexer, + indexer: string | SearchIndexer, options: DeleteIndexerOptions = {} ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-deleteIndexer", options); try { const indexerName: string = typeof indexer === "string" ? indexer : indexer.name; - - await this.client.indexers.deleteMethod( - indexerName, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + const etag = + typeof indexer === "string" + ? undefined + : options.onlyIfUnchanged + ? indexer.etag + : undefined; + + await this.client.indexers.deleteMethod(indexerName, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -565,18 +611,28 @@ export class SearchIndexerClient { * @param dataSource Datasource/Name of the datasource to delete. * @param options Additional optional arguments. */ - public async deleteDataSource( - dataSource: string | DataSource, - options: DeleteDataSourceOptions = {} + public async deleteDataSourceConnection( + dataSourceConnection: string | SearchIndexerDataSourceConnection, + options: DeleteDataSourceConnectionOptions = {} ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexerClient-deleteDataSource", options); + const { span, updatedOptions } = createSpan( + "SearchIndexerClient-deleteDataSourceConnection", + options + ); try { - const dataSourceName: string = typeof dataSource === "string" ? dataSource : dataSource.name; - - await this.client.dataSources.deleteMethod( - dataSourceName, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + const dataSourceConnectionName: string = + typeof dataSourceConnection === "string" ? dataSourceConnection : dataSourceConnection.name; + const etag = + typeof dataSourceConnection === "string" + ? undefined + : options.onlyIfUnchanged + ? dataSourceConnection.etag + : undefined; + + await this.client.dataSources.deleteMethod(dataSourceConnectionName, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -594,17 +650,23 @@ export class SearchIndexerClient { * @param options Additional optional arguments. */ public async deleteSkillset( - skillset: string | Skillset, + skillset: string | SearchIndexerSkillset, options: DeleteSkillsetOptions = {} ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-deleteSkillset", options); try { const skillsetName: string = typeof skillset === "string" ? skillset : skillset.name; - - await this.client.skillsets.deleteMethod( - skillsetName, - operationOptionsToRequestOptionsBase(updatedOptions) - ); + const etag = + typeof skillset === "string" + ? undefined + : options.onlyIfUnchanged + ? skillset.etag + : undefined; + + await this.client.skillsets.deleteMethod(skillsetName, { + ...operationOptionsToRequestOptionsBase(updatedOptions), + ifMatch: etag + }); } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -624,7 +686,7 @@ export class SearchIndexerClient { public async getIndexerStatus( indexerName: string, options: GetIndexerStatusOptions = {} - ): Promise { + ): Promise { const { span, updatedOptions } = createSpan("SearchIndexerClient-getIndexerStatus", options); try { const result = await this.client.indexers.getStatus( diff --git a/sdk/search/search-documents/src/serviceModels.ts b/sdk/search/search-documents/src/serviceModels.ts index e285a61a4745..45da5470f570 100644 --- a/sdk/search/search-documents/src/serviceModels.ts +++ b/sdk/search/search-documents/src/serviceModels.ts @@ -3,38 +3,26 @@ import { OperationOptions } from "@azure/core-http"; import { - AccessCondition, - AnalyzeRequest, - CustomAnalyzer, - StandardAnalyzer, + LuceneStandardAnalyzer, StopAnalyzer, CorsOptions, - EncryptionKey, - Suggester, + Suggester as SearchSuggester, ClassicTokenizer, EdgeNGramTokenizer, - KeywordTokenizer, - KeywordTokenizerV2, MicrosoftLanguageTokenizer, MicrosoftLanguageStemmingTokenizer, NGramTokenizer, - PathHierarchyTokenizerV2, - StandardTokenizer, - StandardTokenizerV2, + PathHierarchyTokenizerV2 as PathHierarchyTokenizer, UaxUrlEmailTokenizer, AsciiFoldingTokenFilter, CjkBigramTokenFilter, CommonGramTokenFilter, DictionaryDecompounderTokenFilter, - EdgeNGramTokenFilter, - EdgeNGramTokenFilterV2, LengthTokenFilter, ElisionTokenFilter, KeepTokenFilter, KeywordMarkerTokenFilter, LimitTokenFilter, - NGramTokenFilterV2, - NGramTokenFilter, PatternCaptureTokenFilter, PatternReplaceTokenFilter, PhoneticTokenFilter, @@ -73,10 +61,16 @@ import { HighWaterMarkChangeDetectionPolicy, SqlIntegratedChangeTrackingPolicy, SoftDeleteColumnDeletionDetectionPolicy, - DataSourceType, - DataSourceCredentials, - DataContainer + SearchIndexerDataSourceType, + SearchIndexerDataContainer, + LexicalAnalyzerName, + ClassicSimilarity, + BM25Similarity, + EdgeNGramTokenFilterSide, + ServiceCounters, + ServiceLimits } from "./generated/service/models"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; /** * Options for a list skillsets operation. @@ -101,7 +95,7 @@ export type ListIndexersOptions = OperationOptions; /** * Options for a list data sources operation. */ -export type ListDataSourcesOptions = OperationOptions; +export type ListDataSourceConnectionsOptions = OperationOptions; /** * Options for get index operation. @@ -126,13 +120,45 @@ export type GetIndexerOptions = OperationOptions; /** * Options for get datasource operation. */ -export type GetDataSourceOptions = OperationOptions; +export type GetDataSourceConnectionOptions = OperationOptions; /** * Options for get index statistics operation. */ export type GetIndexStatisticsOptions = OperationOptions; +/** + * Statistics for a given index. Statistics are collected periodically and are not guaranteed to + * always be up-to-date. + */ +export interface SearchIndexStatistics { + /** + * The number of documents in the index. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly documentCount: number; + /** + * The amount of storage in bytes consumed by the index. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly storageSize: number; +} + +/** + * Response from a get service statistics request. If successful, it includes service level + * counters and limits. + */ +export interface SearchServiceStatistics { + /** + * Service level resource counters. + */ + counters: ServiceCounters; + /** + * Service level general limits. + */ + limits: ServiceLimits; +} + /** * Options for get service statistics operation. */ @@ -176,22 +202,12 @@ export type CreateIndexerOptions = OperationOptions; /** * Options for create datasource operation. */ -export type CreateDataSourceOptions = OperationOptions; - -/** - * Options for all operations with etag parameters. - */ -export interface ETagOperationOptions { - /** - * ETag parameters - */ - accessCondition?: AccessCondition; -} +export type CreateDataSourceConnectionOptions = OperationOptions; /** * Options for create/update index operation. */ -export interface CreateOrUpdateIndexOptions extends OperationOptions, ETagOperationOptions { +export interface CreateOrUpdateIndexOptions extends OperationOptions { /** * Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by * taking the index offline for at least a few seconds. This temporarily causes indexing and @@ -199,52 +215,135 @@ export interface CreateOrUpdateIndexOptions extends OperationOptions, ETagOperat * several minutes after the index is updated, or longer for very large indexes. */ allowIndexDowntime?: boolean; + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; } /** * Options for create/update skillset operation. */ -export type CreateOrUpdateSkillsetOptions = OperationOptions & ETagOperationOptions; +export interface CreateOrUpdateSkillsetOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for create/update synonymmap operation. */ -export type CreateOrUpdateSynonymMapOptions = OperationOptions & ETagOperationOptions; +export interface CreateOrUpdateSynonymMapOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for create/update indexer operation. */ -export type CreateorUpdateIndexerOptions = OperationOptions & ETagOperationOptions; +export interface CreateorUpdateIndexerOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for create/update datasource operation. */ -export type CreateorUpdateDataSourceOptions = OperationOptions & ETagOperationOptions; +export interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for delete index operation. */ -export type DeleteIndexOptions = OperationOptions & ETagOperationOptions; +export interface DeleteIndexOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for delete skillset operaion. */ -export type DeleteSkillsetOptions = OperationOptions & ETagOperationOptions; +export interface DeleteSkillsetOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for delete synonymmap operation. */ -export type DeleteSynonymMapOptions = OperationOptions & ETagOperationOptions; +export interface DeleteSynonymMapOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for delete indexer operation. */ -export type DeleteIndexerOptions = OperationOptions & ETagOperationOptions; +export interface DeleteIndexerOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} /** * Options for delete datasource operation. */ -export type DeleteDataSourceOptions = OperationOptions & ETagOperationOptions; +export interface DeleteDataSourceConnectionOptions extends OperationOptions { + /** + * If set to true, Resource will be deleted only if the etag matches. + */ + onlyIfUnchanged?: boolean; +} + +/** + * Specifies some text and analysis components used to break that text into tokens. + */ +export interface AnalyzeRequest { + /** + * The text to break into tokens. + */ + text: string; + /** + * The name of the analyzer to use to break the given text. If this parameter is not specified, + * you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually + * exclusive. KnownAnalyzerNames is an enum containing known values. + * NOTE: Either analyzerName or tokenizerName is required in an AnalyzeRequest. + */ + analyzerName?: string; + /** + * The name of the tokenizer to use to break the given text. If this parameter is not specified, + * you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually + * exclusive. KnownTokenizerNames is an enum containing known values. + * NOTE: Either analyzerName or tokenizerName is required in an AnalyzeRequest. + */ + tokenizerName?: string; + /** + * An optional list of token filters to use when breaking the given text. This parameter can only + * be set when using the tokenizer parameter. + */ + tokenFilters?: string[]; + /** + * An optional list of character filters to use when breaking the given text. This parameter can + * only be set when using the tokenizer parameter. + */ + charFilters?: string[]; +} /** * Options for analyze text operation. @@ -292,15 +391,54 @@ export interface PatternAnalyzer { stopwords?: string[]; } +/** + * Allows you to take control over the process of converting text into indexable/searchable tokens. + * It's a user-defined configuration consisting of a single predefined tokenizer and one or more + * filters. The tokenizer is responsible for breaking text into tokens, and the filters for + * modifying tokens emitted by the tokenizer. + */ +export interface CustomAnalyzer { + /** + * Polymorphic Discriminator + */ + odatatype: "#Microsoft.Azure.Search.CustomAnalyzer"; + /** + * The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, + * can only start and end with alphanumeric characters, and is limited to 128 characters. + */ + name: string; + /** + * The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as + * breaking a sentence into words. KnownTokenizerNames is an enum containing known values. + */ + tokenizerName: string; + /** + * A list of token filters used to filter out or modify the tokens generated by a tokenizer. For + * example, you can specify a lowercase filter that converts all characters to lowercase. The + * filters are run in the order in which they are listed. + */ + tokenFilters?: string[]; + /** + * A list of character filters used to prepare input text before it is processed by the + * tokenizer. For instance, they can replace certain characters or symbols. The filters are run + * in the order in which they are listed. + */ + charFilters?: string[]; +} + /** * Contains the possible cases for Analyzer. */ -export type Analyzer = CustomAnalyzer | PatternAnalyzer | StandardAnalyzer | StopAnalyzer; +export type LexicalAnalyzer = + | CustomAnalyzer + | PatternAnalyzer + | LuceneStandardAnalyzer + | StopAnalyzer; /** * Contains the possible cases for Skill. */ -export type Skill = +export type SearchIndexerSkill = | ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill @@ -352,24 +490,133 @@ export interface PatternTokenizer { */ group?: number; } +/** + * Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using + * Apache Lucene. + */ +export interface LuceneStandardTokenizer { + /** + * Polymorphic Discriminator + */ + odatatype: + | "#Microsoft.Azure.Search.StandardTokenizerV2" + | "#Microsoft.Azure.Search.StandardTokenizer"; + /** + * The name of the tokenizer. It must only contain letters, digits, spaces, dashes or + * underscores, can only start and end with alphanumeric characters, and is limited to 128 + * characters. + */ + name: string; + /** + * The maximum token length. Default is 255. Tokens longer than the maximum length are split. The + * maximum token length that can be used is 300 characters. Default value: 255. + */ + maxTokenLength?: number; +} + +/** + * Generates n-grams of the given size(s) starting from the front or the back of an input token. + * This token filter is implemented using Apache Lucene. + */ +export interface EdgeNGramTokenFilter { + /** + * Polymorphic Discriminator + */ + odatatype: + | "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2" + | "#Microsoft.Azure.Search.EdgeNGramTokenFilter"; + /** + * The name of the token filter. It must only contain letters, digits, spaces, dashes or + * underscores, can only start and end with alphanumeric characters, and is limited to 128 + * characters. + */ + name: string; + /** + * The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of + * maxGram. Default value: 1. + */ + minGram?: number; + /** + * The maximum n-gram length. Default is 2. Maximum is 300. Default value: 2. + */ + maxGram?: number; + /** + * Specifies which side of the input the n-gram should be generated from. Default is "front". + * Possible values include: 'Front', 'Back' + */ + side?: EdgeNGramTokenFilterSide; +} + +/** + * Emits the entire input as a single token. This tokenizer is implemented using Apache Lucene. + */ +export interface KeywordTokenizer { + /** + * Polymorphic Discriminator + */ + odatatype: + | "#Microsoft.Azure.Search.KeywordTokenizerV2" + | "#Microsoft.Azure.Search.KeywordTokenizer"; + /** + * The name of the tokenizer. It must only contain letters, digits, spaces, dashes or + * underscores, can only start and end with alphanumeric characters, and is limited to 128 + * characters. + */ + name: string; + /** + * The maximum token length. Default is 256. Tokens longer than the maximum length are split. The + * maximum token length that can be used is 300 characters. Default value: 256. + */ + maxTokenLength?: number; +} /** * Contains the possible cases for Tokenizer. */ -export type Tokenizer = +export type LexicalTokenizer = | ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer - | KeywordTokenizerV2 | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer - | PathHierarchyTokenizerV2 + | PathHierarchyTokenizer | PatternTokenizer - | StandardTokenizer - | StandardTokenizerV2 + | LuceneStandardTokenizer | UaxUrlEmailTokenizer; +/** + * Contains the possible cases for Similarity. + */ +export type SimilarityAlgorithm = ClassicSimilarity | BM25Similarity; + +/** + * Generates n-grams of the given size(s). This token filter is implemented using Apache Lucene. + */ +export interface NGramTokenFilter { + /** + * Polymorphic Discriminator + */ + odatatype: + | "#Microsoft.Azure.Search.NGramTokenFilterV2" + | "#Microsoft.Azure.Search.NGramTokenFilter"; + /** + * The name of the token filter. It must only contain letters, digits, spaces, dashes or + * underscores, can only start and end with alphanumeric characters, and is limited to 128 + * characters. + */ + name: string; + /** + * The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of + * maxGram. Default value: 1. + */ + minGram?: number; + /** + * The maximum n-gram length. Default is 2. Maximum is 300. Default value: 2. + */ + maxGram?: number; +} + /** * Contains the possible cases for TokenFilter. */ @@ -379,14 +626,12 @@ export type TokenFilter = | CommonGramTokenFilter | DictionaryDecompounderTokenFilter | EdgeNGramTokenFilter - | EdgeNGramTokenFilterV2 | ElisionTokenFilter | KeepTokenFilter | KeywordMarkerTokenFilter | LengthTokenFilter | LimitTokenFilter | NGramTokenFilter - | NGramTokenFilterV2 | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PhoneticTokenFilter @@ -415,7 +660,7 @@ export type ScoringFunction = | TagScoringFunction; /** - * Defines values for SimpleDataType. + * Defines values for SearchFieldDataType. * Possible values include: 'Edm.String', 'Edm.Int32', 'Edm.Int64', 'Edm.Double', 'Edm.Boolean', * 'Edm.DateTimeOffset', 'Edm.GeographyPoint', 'Collection(Edm.String)', * 'Collection(Edm.Int32)', 'Collection(Edm.Int64)', 'Collection(Edm.Double)', @@ -423,7 +668,7 @@ export type ScoringFunction = * @readonly * @enum {string} */ -export type SimpleDataType = +export type SearchFieldDataType = | "Edm.String" | "Edm.Int32" | "Edm.Int64" @@ -451,7 +696,7 @@ export type ComplexDataType = "Edm.ComplexType" | "Collection(Edm.ComplexType)"; * Represents a field in an index definition, which describes the name, data type, and search * behavior of a field. */ -export type Field = SimpleField | ComplexField; +export type SearchField = SimpleField | ComplexField; /** * Represents a field in an index definition, which describes the name, data type, and search @@ -470,7 +715,7 @@ export interface SimpleField { * 'Collection(Edm.Double)', 'Collection(Edm.Boolean)', 'Collection(Edm.DateTimeOffset)', * 'Collection(Edm.GeographyPoint)' */ - type: SimpleDataType; + type: SearchFieldDataType; /** * A value indicating whether the field uniquely identifies documents in the index. Exactly one * top-level field in each index must be chosen as the key field and it must be of type @@ -531,21 +776,21 @@ export interface SimpleField { * Once the analyzer is chosen, it cannot be changed for the field. * KnownAnalyzerNames is an enum containing known values. */ - analyzer?: string; + analyzerName?: LexicalAnalyzerName; /** * The name of the analyzer used at search time for the field. This option can be used only with * searchable fields. It must be set together with indexAnalyzer and it cannot be set together * with the analyzer option. This analyzer can be updated on an existing field. * KnownAnalyzerNames is an enum containing known values. */ - searchAnalyzer?: string; + searchAnalyzerName?: LexicalAnalyzerName; /** * The name of the analyzer used at indexing time for the field. This option can be used only * with searchable fields. It must be set together with searchAnalyzer and it cannot be set * together with the analyzer option. Once the analyzer is chosen, it cannot be changed for the * field. KnownAnalyzerNames is an enum containing known values. */ - indexAnalyzer?: string; + indexAnalyzerName?: LexicalAnalyzerName; /** * A list of the names of synonym maps to associate with this field. This option can be used only * with searchable fields. Currently only one synonym map per field is supported. Assigning a @@ -553,10 +798,10 @@ export interface SimpleField { * query-time using the rules in the synonym map. This attribute can be changed on existing * fields. */ - synonymMaps?: string[]; + synonymMapNames?: string[]; } -export function isComplexField(field: Field): field is ComplexField { +export function isComplexField(field: SearchField): field is ComplexField { return field.type === "Edm.ComplexType" || field.type === "Collection(Edm.ComplexType)"; } @@ -578,7 +823,7 @@ export interface ComplexField { /** * A list of sub-fields. */ - fields: Field[]; + fields: SearchField[]; } /** @@ -603,18 +848,32 @@ export interface SynonymMap { * keys is not available for free search services, and is only available for paid services * created on or after January 1, 2019. */ - encryptionKey?: EncryptionKey; + encryptionKey?: SearchResourceEncryptionKey; /** * The ETag of the synonym map. */ etag?: string; } +/** + * An iterator for listing the indexes that exist in the Search service. Will make requests + * as needed during iteration. Use .byPage() to make one request to the server + * per iteration. + */ +export type IndexIterator = PagedAsyncIterableIterator; + +/** + * An iterator for listing the indexes that exist in the Search service. Will make requests + * as needed during iteration. Use .byPage() to make one request to the server + * per iteration. + */ +export type IndexNameIterator = PagedAsyncIterableIterator; + /** * Represents a search index definition, which describes the fields and search behavior of an * index. */ -export interface Index { +export interface SearchIndex { /** * The name of the index. */ @@ -622,7 +881,7 @@ export interface Index { /** * The fields of the index. */ - fields: Field[]; + fields: SearchField[]; /** * The scoring profiles for the index. */ @@ -640,15 +899,15 @@ export interface Index { /** * The suggesters for the index. */ - suggesters?: Suggester[]; + suggesters?: SearchSuggester[]; /** * The analyzers for the index. */ - analyzers?: Analyzer[]; + analyzers?: LexicalAnalyzer[]; /** * The tokenizers for the index. */ - tokenizers?: Tokenizer[]; + tokenizers?: LexicalTokenizer[]; /** * The token filters for the index. */ @@ -667,17 +926,55 @@ export interface Index { * keys is not available for free search services, and is only available for paid services * created on or after January 1, 2019. */ - encryptionKey?: EncryptionKey; + encryptionKey?: SearchResourceEncryptionKey; + /** + * The type of similarity algorithm to be used when scoring and ranking the documents matching a + * search query. The similarity algorithm can only be defined at index creation time and cannot + * be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. + */ + similarity?: SimilarityAlgorithm; /** * The ETag of the index. */ etag?: string; } +/** + * A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be + * used to encrypt or decrypt data-at-rest in Azure Cognitive Search, such as indexes and synonym + * maps. + */ +export interface SearchResourceEncryptionKey { + /** + * The name of your Azure Key Vault key to be used to encrypt your data at rest. + */ + keyName: string; + /** + * The version of your Azure Key Vault key to be used to encrypt your data at rest. + */ + keyVersion: string; + /** + * The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be + * used to encrypt your data at rest. An example URI might be + * https://my-keyvault-name.vault.azure.net. + */ + vaultUrl: string; + /** + * An AAD Application ID that was granted the required access permissions to the Azure Key Vault + * that is to be used when encrypting your data at rest. The Application ID should not be + * confused with the Object ID for your AAD Application. + */ + applicationId?: string; + /** + * The authentication key of the specified AAD application. + */ + applicationSecret?: string; +} + /** * A list of skills. */ -export interface Skillset { +export interface SearchIndexerSkillset { /** * The name of the skillset. */ @@ -685,11 +982,11 @@ export interface Skillset { /** * The description of the skillset. */ - description: string; + description?: string; /** * A list of skills in the skillset. */ - skills: Skill[]; + skills: SearchIndexerSkill[]; /** * Details about cognitive services to be used when running skills. */ @@ -1388,7 +1685,7 @@ export type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolic /** * Represents a datasource definition, which can be used to configure an indexer. */ -export interface DataSource { +export interface SearchIndexerDataSourceConnection { /** * The name of the datasource. */ @@ -1401,15 +1698,15 @@ export interface DataSource { * The type of the datasource. Possible values include: 'AzureSql', 'CosmosDb', 'AzureBlob', * 'AzureTable', 'MySql' */ - type: DataSourceType; + type: SearchIndexerDataSourceType; /** - * Credentials for the datasource. + * The connection string for the datasource. */ - credentials: DataSourceCredentials; + connectionString?: string; /** * The data container for the datasource. */ - container: DataContainer; + container: SearchIndexerDataContainer; /** * The data change detection policy for the datasource. */ diff --git a/sdk/search/search-documents/src/serviceUtils.ts b/sdk/search/search-documents/src/serviceUtils.ts index 9abfe1c571e5..d5f59db5fbbc 100644 --- a/sdk/search/search-documents/src/serviceUtils.ts +++ b/sdk/search/search-documents/src/serviceUtils.ts @@ -3,52 +3,60 @@ import { OperationOptions } from "@azure/core-http"; import { - AnalyzerUnion, + LexicalAnalyzerUnion, CognitiveServicesAccountKey, CognitiveServicesAccountUnion, DefaultCognitiveServicesAccount, - Field as GeneratedField, - Index as GeneratedIndex, + SearchField as GeneratedSearchField, + SearchIndex as GeneratedSearchIndex, RegexFlags, - Skillset as GeneratedSkillset, - SkillUnion, - TokenizerUnion, + SearchIndexerSkillset as GeneratedSearchIndexerSkillset, + SearchIndexerSkillUnion, + LexicalTokenizerUnion, SynonymMap as GeneratedSynonymMap, - DataSource as GeneratedDataSource, + SearchIndexerDataSource as GeneratedSearchIndexerDataSourceConnection, DataChangeDetectionPolicyUnion, HighWaterMarkChangeDetectionPolicy, SqlIntegratedChangeTrackingPolicy, DataDeletionDetectionPolicyUnion, - SoftDeleteColumnDeletionDetectionPolicy + SoftDeleteColumnDeletionDetectionPolicy, + LexicalAnalyzerName, + SimilarityUnion, + BM25Similarity, + ClassicSimilarity, + TokenFilterUnion, + SearchResourceEncryptionKey as GeneratedSearchResourceEncryptionKey } from "./generated/service/models"; import { - Analyzer, + LexicalAnalyzer, CharFilter, CognitiveServicesAccount, ComplexField, - Field, - Index, + SearchField, + SearchIndex, isComplexField, ScoringProfile, SimpleField, - Skill, - Skillset, + SearchIndexerSkill, + SearchIndexerSkillset, TokenFilter, - Tokenizer, + LexicalTokenizer, SynonymMap, - DataSource, + SearchIndexerDataSourceConnection, DataChangeDetectionPolicy, - DataDeletionDetectionPolicy + DataDeletionDetectionPolicy, + SimilarityAlgorithm, + SearchResourceEncryptionKey } from "./serviceModels"; -export function convertSkillsToPublic(skills: SkillUnion[]): Skill[] { +export function convertSkillsToPublic(skills: SearchIndexerSkillUnion[]): SearchIndexerSkill[] { if (!skills) { return skills; } - const result: Skill[] = []; + const result: SearchIndexerSkill[] = []; for (const skill of skills) { - if (skill.odatatype !== "Skill") { + if (skill.odatatype !== "SearchIndexerSkill") { result.push(skill); } } @@ -79,15 +87,31 @@ export function convertCognitiveServicesAccountToPublic( } } -export function convertAnalyzersToGenerated(analyzers?: Analyzer[]): AnalyzerUnion[] | undefined { +export function convertTokenFiltersToGenerated( + tokenFilters?: TokenFilter[] +): TokenFilterUnion[] | undefined { + if (!tokenFilters) { + return tokenFilters; + } + + const result: TokenFilterUnion[] = []; + for (const filter of tokenFilters) { + result.push(filter); + } + + return result; +} + +export function convertAnalyzersToGenerated( + analyzers?: LexicalAnalyzer[] +): LexicalAnalyzerUnion[] | undefined { if (!analyzers) { return analyzers; } - const result: AnalyzerUnion[] = []; + const result: LexicalAnalyzerUnion[] = []; for (const analyzer of analyzers) { switch (analyzer.odatatype) { - case "#Microsoft.Azure.Search.CustomAnalyzer": case "#Microsoft.Azure.Search.StandardAnalyzer": case "#Microsoft.Azure.Search.StopAnalyzer": result.push(analyzer); @@ -97,20 +121,28 @@ export function convertAnalyzersToGenerated(analyzers?: Analyzer[]): AnalyzerUni ...analyzer, flags: analyzer.flags ? analyzer.flags.join("|") : undefined }); + break; + case "#Microsoft.Azure.Search.CustomAnalyzer": + result.push({ + ...analyzer, + tokenizer: analyzer.tokenizerName + }); + break; } } return result; } -export function convertAnalyzersToPublic(analyzers?: AnalyzerUnion[]): Analyzer[] | undefined { +export function convertAnalyzersToPublic( + analyzers?: LexicalAnalyzerUnion[] +): LexicalAnalyzer[] | undefined { if (!analyzers) { return analyzers; } - const result: Analyzer[] = []; + const result: LexicalAnalyzer[] = []; for (const analyzer of analyzers) { switch (analyzer.odatatype) { - case "#Microsoft.Azure.Search.CustomAnalyzer": case "#Microsoft.Azure.Search.StandardAnalyzer": case "#Microsoft.Azure.Search.StopAnalyzer": result.push(analyzer); @@ -120,34 +152,51 @@ export function convertAnalyzersToPublic(analyzers?: AnalyzerUnion[]): Analyzer[ ...analyzer, flags: analyzer.flags ? (analyzer.flags.split("|") as RegexFlags[]) : undefined }); + break; + case "#Microsoft.Azure.Search.CustomAnalyzer": + result.push({ + ...analyzer, + tokenizerName: analyzer.tokenizer + }); + break; } } return result; } -export function convertFieldsToPublic(fields: GeneratedField[]): Field[] { +export function convertFieldsToPublic(fields: GeneratedSearchField[]): SearchField[] { if (!fields) { return fields; } - return fields.map((field) => { - let result: Field; + return fields.map((field) => { + let result: SearchField; if (field.type === "Collection(Edm.ComplexType)" || field.type === "Edm.ComplexType") { result = field as ComplexField; } else { + const anayzerName: LexicalAnalyzerName | undefined = field.analyzer; + const searchAnalyzerName: LexicalAnalyzerName | undefined = field.searchAnalyzer; + const indexAnalyzerName: LexicalAnalyzerName | undefined = field.indexAnalyzer; + const synonymMapNames: string[] | undefined = field.synonymMaps; + const { retrievable, ...restField } = field; const hidden = typeof retrievable === "boolean" ? !retrievable : retrievable; + result = { ...restField, - hidden + hidden, + anayzerName, + searchAnalyzerName, + indexAnalyzerName, + synonymMapNames } as SimpleField; } return result; }); } -export function convertFieldsToGenerated(fields: Field[]): GeneratedField[] { - return fields.map((field) => { +export function convertFieldsToGenerated(fields: SearchField[]): GeneratedSearchField[] { + return fields.map((field) => { if (isComplexField(field)) { return field; } else { @@ -160,20 +209,24 @@ export function convertFieldsToGenerated(fields: Field[]): GeneratedField[] { searchable: field.searchable ?? false, filterable: field.filterable ?? false, facetable: field.facetable ?? false, - sortable: field.sortable ?? false + sortable: field.sortable ?? false, + analyzer: field.analyzerName, + searchAnalyzer: field.searchAnalyzerName, + indexAnalyzer: field.indexAnalyzerName, + synonymMaps: field.synonymMapNames }; } }); } export function convertTokenizersToGenerated( - tokenizers?: Tokenizer[] -): TokenizerUnion[] | undefined { + tokenizers?: LexicalTokenizer[] +): LexicalTokenizerUnion[] | undefined { if (!tokenizers) { return tokenizers; } - const result: TokenizerUnion[] = []; + const result: LexicalTokenizerUnion[] = []; for (const tokenizer of tokenizers) { if (tokenizer.odatatype === "#Microsoft.Azure.Search.PatternTokenizer") { result.push({ @@ -187,25 +240,51 @@ export function convertTokenizersToGenerated( return result; } -export function convertTokenizersToPublic(tokenizers?: TokenizerUnion[]): Tokenizer[] | undefined { +export function convertTokenizersToPublic( + tokenizers?: LexicalTokenizerUnion[] +): LexicalTokenizer[] | undefined { if (!tokenizers) { return tokenizers; } - const result: Tokenizer[] = []; + const result: LexicalTokenizer[] = []; for (const tokenizer of tokenizers) { if (tokenizer.odatatype === "#Microsoft.Azure.Search.PatternTokenizer") { result.push({ ...tokenizer, flags: tokenizer.flags ? (tokenizer.flags.split("|") as RegexFlags[]) : undefined }); - } else if (tokenizer.odatatype !== "Tokenizer") { + } else if (tokenizer.odatatype !== "LexicalTokenizer") { result.push(tokenizer); } } return result; } +export function convertSimilarityToGenerated( + similarity?: SimilarityAlgorithm +): SimilarityUnion | undefined { + if (!similarity) { + return similarity; + } + + return similarity as SimilarityUnion; +} + +export function convertSimilarityToPublic( + similarity?: SimilarityUnion +): SimilarityAlgorithm | undefined { + if (!similarity) { + return similarity; + } + + if (similarity.odatatype == "#Microsoft.Azure.Search.ClassicSimilarity") { + return similarity as ClassicSimilarity; + } else { + return similarity as BM25Similarity; + } +} + export function extractOperationOptions( obj: T ): { @@ -224,41 +303,89 @@ export function extractOperationOptions( }; } -export function generatedIndexToPublicIndex(generatedIndex: GeneratedIndex): Index { +export function convertEncryptionKeyToPublic( + encryptionKey?: GeneratedSearchResourceEncryptionKey +): SearchResourceEncryptionKey | undefined { + if (!encryptionKey) { + return encryptionKey; + } + + const result: SearchResourceEncryptionKey = { + keyName: encryptionKey.keyName, + keyVersion: encryptionKey.keyVersion, + vaultUrl: encryptionKey.vaultUri + }; + + if (encryptionKey.accessCredentials) { + result.applicationId = encryptionKey.accessCredentials.applicationId; + result.applicationSecret = encryptionKey.accessCredentials.applicationSecret; + } + + return result; +} + +export function convertEncryptionKeyToGenerated( + encryptionKey?: SearchResourceEncryptionKey +): GeneratedSearchResourceEncryptionKey | undefined { + if (!encryptionKey) { + return encryptionKey; + } + + const result: GeneratedSearchResourceEncryptionKey = { + keyName: encryptionKey.keyName, + keyVersion: encryptionKey.keyVersion, + vaultUri: encryptionKey.vaultUrl + }; + + if (encryptionKey.applicationId) { + result.accessCredentials = { + applicationId: encryptionKey.applicationId, + applicationSecret: encryptionKey.applicationSecret + }; + } + + return result; +} + +export function generatedIndexToPublicIndex(generatedIndex: GeneratedSearchIndex): SearchIndex { return { name: generatedIndex.name, defaultScoringProfile: generatedIndex.defaultScoringProfile, corsOptions: generatedIndex.corsOptions, suggesters: generatedIndex.suggesters, - encryptionKey: generatedIndex.encryptionKey, + encryptionKey: convertEncryptionKeyToPublic(generatedIndex.encryptionKey), etag: generatedIndex.etag, analyzers: convertAnalyzersToPublic(generatedIndex.analyzers), tokenizers: convertTokenizersToPublic(generatedIndex.tokenizers), tokenFilters: generatedIndex.tokenFilters as TokenFilter[], charFilters: generatedIndex.charFilters as CharFilter[], scoringProfiles: generatedIndex.scoringProfiles as ScoringProfile[], - fields: convertFieldsToPublic(generatedIndex.fields) + fields: convertFieldsToPublic(generatedIndex.fields), + similarity: convertSimilarityToPublic(generatedIndex.similarity) }; } -export function publicIndexToGeneratedIndex(index: Index): GeneratedIndex { +export function publicIndexToGeneratedIndex(index: SearchIndex): GeneratedSearchIndex { return { name: index.name, defaultScoringProfile: index.defaultScoringProfile, corsOptions: index.corsOptions, suggesters: index.suggesters, - encryptionKey: index.encryptionKey, + encryptionKey: convertEncryptionKeyToGenerated(index.encryptionKey), etag: index.etag, - tokenFilters: index.tokenFilters, + tokenFilters: convertTokenFiltersToGenerated(index.tokenFilters), charFilters: index.charFilters, scoringProfiles: index.scoringProfiles, analyzers: convertAnalyzersToGenerated(index.analyzers), tokenizers: convertTokenizersToGenerated(index.tokenizers), - fields: convertFieldsToGenerated(index.fields) + fields: convertFieldsToGenerated(index.fields), + similarity: convertSimilarityToGenerated(index.similarity) }; } -export function generatedSkillsetToPublicSkillset(generatedSkillset: GeneratedSkillset): Skillset { +export function generatedSkillsetToPublicSkillset( + generatedSkillset: GeneratedSearchIndexerSkillset +): SearchIndexerSkillset { return { name: generatedSkillset.name, description: generatedSkillset.description, @@ -270,7 +397,9 @@ export function generatedSkillsetToPublicSkillset(generatedSkillset: GeneratedSk }; } -export function publicSkillsetToGeneratedSkillset(skillset: Skillset): GeneratedSkillset { +export function publicSkillsetToGeneratedSkillset( + skillset: SearchIndexerSkillset +): GeneratedSearchIndexerSkillset { return { name: skillset.name, description: skillset.description, @@ -285,7 +414,7 @@ export function publicSkillsetToGeneratedSkillset(skillset: Skillset): Generated export function generatedSynonymMapToPublicSynonymMap(synonymMap: GeneratedSynonymMap): SynonymMap { const result: SynonymMap = { name: synonymMap.name, - encryptionKey: synonymMap.encryptionKey, + encryptionKey: convertEncryptionKeyToPublic(synonymMap.encryptionKey), etag: synonymMap.etag, synonyms: [] }; @@ -298,20 +427,26 @@ export function generatedSynonymMapToPublicSynonymMap(synonymMap: GeneratedSynon } export function publicSynonymMapToGeneratedSynonymMap(synonymMap: SynonymMap): GeneratedSynonymMap { - return { + const result: GeneratedSynonymMap = { name: synonymMap.name, - encryptionKey: synonymMap.encryptionKey, + encryptionKey: convertEncryptionKeyToGenerated(synonymMap.encryptionKey), etag: synonymMap.etag, synonyms: synonymMap.synonyms.join("\n") }; + + result.encryptionKey = convertEncryptionKeyToGenerated(synonymMap.encryptionKey); + + return result; } -export function generatedDataSourceToPublicDataSource(dataSource: GeneratedDataSource): DataSource { +export function generatedDataSourceToPublicDataSource( + dataSource: GeneratedSearchIndexerDataSourceConnection +): SearchIndexerDataSourceConnection { return { name: dataSource.name, description: dataSource.name, type: dataSource.type, - credentials: dataSource.credentials, + connectionString: dataSource.credentials.connectionString, container: dataSource.container, etag: dataSource.etag, dataChangeDetectionPolicy: convertDataChangeDetectionPolicyToPublic( diff --git a/sdk/search/search-documents/swagger/Service.md b/sdk/search/search-documents/swagger/Service.md index 5ffbdc4029eb..9e099bc7787c 100644 --- a/sdk/search/search-documents/swagger/Service.md +++ b/sdk/search/search-documents/swagger/Service.md @@ -72,8 +72,44 @@ directive: ```yaml directive: - from: swagger-document - where: $.definitions.DataType - transform: > + where: $.definitions.SearchFieldDataType + transform: > + if ($["x-ms-enum"].values.length === 8) { + const newValues = $["x-ms-enum"].values.slice(0); + newValues.push({ + "value": "Collection(Edm.String)", + "name": "Collection(Edm.String)" + }); + newValues.push({ + "value": "Collection(Edm.Int32)", + "name": "Collection(Edm.Int32)" + }); + newValues.push({ + "value": "Collection(Edm.Int64)", + "name": "Collection(Edm.Int64)" + }); + newValues.push({ + "value": "Collection(Edm.Double)", + "name": "Collection(Edm.Double)" + }); + newValues.push({ + "value": "Collection(Edm.Boolean)", + "name": "Collection(Edm.Boolean)" + }); + newValues.push({ + "value": "Collection(Edm.DateTimeOffset)", + "name": "Collection(Edm.DateTimeOffset)" + }); + newValues.push({ + "value": "Collection(Edm.GeographyPoint)", + "name": "Collection(Edm.GeographyPoint)" + }); + newValues.push({ + "value": "Collection(Edm.ComplexType)", + "name": "Collection(Edm.ComplexType)" + }); + $["x-ms-enum"].values = newValues; + } if ($.enum.length === 8) { const newValues = $.enum.slice(0); for (let value of $.enum) { @@ -82,7 +118,6 @@ directive: $.enum = newValues; } ``` - ### Make AnalyzerName a string ```yaml diff --git a/sdk/search/search-documents/test/node/searchIndexClient.spec.ts b/sdk/search/search-documents/test/node/searchIndexClient.spec.ts index f427b5db7089..bd912f448546 100644 --- a/sdk/search/search-documents/test/node/searchIndexClient.spec.ts +++ b/sdk/search/search-documents/test/node/searchIndexClient.spec.ts @@ -43,7 +43,7 @@ describe("SearchClient", function() { describe("#count", function() { it("returns the correct document count", async function() { - const documentCount = await searchClient.countDocuments(); + const documentCount = await searchClient.getDocumentsCount(); assert.equal(documentCount, 10); }); }); diff --git a/sdk/search/search-documents/test/utils/setupIndex.ts b/sdk/search/search-documents/test/utils/setupIndex.ts index 6c5ba4a42306..49cecc94af5a 100644 --- a/sdk/search/search-documents/test/utils/setupIndex.ts +++ b/sdk/search/search-documents/test/utils/setupIndex.ts @@ -5,7 +5,7 @@ import { SearchClient, SearchIndexClient, GeographyPoint, - Index, + SearchIndex, KnownAnalyzerNames } from "../../src/index"; import { Hotel } from "./interfaces"; @@ -13,7 +13,7 @@ import { delay } from "@azure/core-http"; // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters export async function createIndex(client: SearchIndexClient, name: string): Promise { - const hotelIndex: Index = { + const hotelIndex: SearchIndex = { name, fields: [ { @@ -34,13 +34,13 @@ export async function createIndex(client: SearchIndexClient, name: string): Prom type: "Edm.String", name: "description", searchable: true, - analyzer: KnownAnalyzerNames.EnLucene + analyzerName: KnownAnalyzerNames.EnLucene }, { type: "Edm.String", name: "descriptionFr", searchable: true, - analyzer: KnownAnalyzerNames.FrLucene + analyzerName: KnownAnalyzerNames.FrLucene }, { type: "Edm.String", @@ -142,13 +142,13 @@ export async function createIndex(client: SearchIndexClient, name: string): Prom type: "Edm.String", name: "description", searchable: true, - analyzer: KnownAnalyzerNames.EnLucene + analyzerName: KnownAnalyzerNames.EnLucene }, { type: "Edm.String", name: "descriptionFr", searchable: true, - analyzer: KnownAnalyzerNames.FrLucene + analyzerName: KnownAnalyzerNames.FrLucene }, { type: "Edm.String", @@ -409,9 +409,9 @@ export async function populateIndex(client: SearchClient): Promise await client.uploadDocuments(testDocuments); - let count = await client.countDocuments(); + let count = await client.getDocumentsCount(); while (count !== testDocuments.length) { await delay(2000); - count = await client.countDocuments(); + count = await client.getDocumentsCount(); } } diff --git a/sdk/search/search-documents/tests.yml b/sdk/search/search-documents/tests.yml index e574c814ac6d..6e33a79cc33a 100644 --- a/sdk/search/search-documents/tests.yml +++ b/sdk/search/search-documents/tests.yml @@ -1,15 +1,7 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/search-documents" - ResourceServiceDirectory: search + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/search-documents" + ResourceServiceDirectory: search diff --git a/sdk/security/arm-security/LICENSE.txt b/sdk/security/arm-security/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/security/arm-security/LICENSE.txt +++ b/sdk/security/arm-security/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/security/arm-security/README.md b/sdk/security/arm-security/README.md index f862f2b2e6ba..869cda4b96a1 100644 --- a/sdk/security/arm-security/README.md +++ b/sdk/security/arm-security/README.md @@ -9,23 +9,24 @@ This package contains an isomorphic SDK for SecurityCenter. ### How to Install -``` +```bash npm install @azure/arm-security ``` ### How to use -#### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. +#### nodejs - Authentication, client creation and list complianceResults as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```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"; @@ -34,7 +35,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new SecurityCenter(creds, subscriptionId); - client.pricings.list().then((result) => { + const scope = "testscope"; + client.complianceResults.list(scope).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +45,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list pricings as an example written in JavaScript. +#### browser - Authentication, client creation and list complianceResults as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +79,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmSecurity.SecurityCenter(res.creds, subscriptionId); - client.pricings.list().then((result) => { + const scope = "testscope"; + client.complianceResults.list(scope).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -95,5 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fsecurity%2Farm-security%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/security/arm-security/README.png) diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index ce21db023d82..a34f4122d6f7 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-security", "author": "Microsoft Corporation", "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/securityCenter.js", "types": "./esm/securityCenter.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/security/arm-security", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/security/arm-security", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/security/arm-security/rollup.config.js b/sdk/security/arm-security/rollup.config.js index 651c85e10ed3..2c4179d62509 100644 --- a/sdk/security/arm-security/rollup.config.js +++ b/sdk/security/arm-security/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/securityCenter.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/securityCenter.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-security.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts b/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts new file mode 100644 index 000000000000..667ae58aa953 --- /dev/null +++ b/sdk/security/arm-security/src/models/adaptiveApplicationControlsMappers.ts @@ -0,0 +1,20 @@ +/* + * 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 { + discriminators, + AppWhitelistingGroup, + AppWhitelistingGroups, + AppWhitelistingIssueSummary, + CloudError, + PathRecommendation, + ProtectionMode, + PublisherInfo, + UserRecommendation, + VmRecommendation +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts b/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts new file mode 100644 index 000000000000..e744310578ca --- /dev/null +++ b/sdk/security/arm-security/src/models/adaptiveNetworkHardeningsMappers.ts @@ -0,0 +1,103 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdaptiveNetworkHardeningEnforceRequest, + AdaptiveNetworkHardeningsList, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts index a5728932eabf..4e805a8af48e 100644 --- a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts +++ b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts @@ -1,34 +1,101 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, AdvancedThreatProtectionSetting, - Resource, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/alertsMappers.ts b/sdk/security/arm-security/src/models/alertsMappers.ts index db7d75be9704..54ae8a36b48f 100644 --- a/sdk/security/arm-security/src/models/alertsMappers.ts +++ b/sdk/security/arm-security/src/models/alertsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - AlertList, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, Alert, - Resource, - BaseResource, - AlertEntity, AlertConfidenceReason, - CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, + AlertEntity, + AlertList, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts b/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts new file mode 100644 index 000000000000..1d11d709b04e --- /dev/null +++ b/sdk/security/arm-security/src/models/alertsSuppressionRulesMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AlertsSuppressionRulesList, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts b/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts index d8a8951a7057..3c08bb7fe3fa 100644 --- a/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts +++ b/sdk/security/arm-security/src/models/allowedConnectionsMappers.ts @@ -1,19 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, AllowedConnectionsList, AllowedConnectionsResource, + CloudError, ConnectableResource, - ConnectedResource, - CloudError + ConnectedResource } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/assessmentsMappers.ts b/sdk/security/arm-security/src/models/assessmentsMappers.ts new file mode 100644 index 000000000000..588f3fb6ff9a --- /dev/null +++ b/sdk/security/arm-security/src/models/assessmentsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentList, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts b/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts new file mode 100644 index 000000000000..206b63ca6c92 --- /dev/null +++ b/sdk/security/arm-security/src/models/assessmentsMetadataMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataList, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts index 8c012f3647a2..10d241ae6e7d 100644 --- a/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - AutoProvisioningSettingList, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, AutoProvisioningSetting, - Resource, + AutoProvisioningSettingList, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/automationsMappers.ts b/sdk/security/arm-security/src/models/automationsMappers.ts new file mode 100644 index 000000000000..c0c7f12b3797 --- /dev/null +++ b/sdk/security/arm-security/src/models/automationsMappers.ts @@ -0,0 +1,24 @@ +/* + * 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 { + discriminators, + Automation, + AutomationAction, + AutomationActionEventHub, + AutomationActionLogicApp, + AutomationActionWorkspace, + AutomationList, + AutomationRuleSet, + AutomationScope, + AutomationSource, + AutomationTriggeringRule, + AutomationValidationStatus, + CloudError, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/complianceResultsMappers.ts b/sdk/security/arm-security/src/models/complianceResultsMappers.ts new file mode 100644 index 000000000000..9baf6d868a5f --- /dev/null +++ b/sdk/security/arm-security/src/models/complianceResultsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceResultList, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/compliancesMappers.ts b/sdk/security/arm-security/src/models/compliancesMappers.ts index a38fc6ae8046..7706b9dbf8c8 100644 --- a/sdk/security/arm-security/src/models/compliancesMappers.ts +++ b/sdk/security/arm-security/src/models/compliancesMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - ComplianceList, - Compliance, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, - ComplianceSegment, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, - AdvancedThreatProtectionSetting, + Compliance, + ComplianceList, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts b/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts new file mode 100644 index 000000000000..8050255cd456 --- /dev/null +++ b/sdk/security/arm-security/src/models/deviceSecurityGroupsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DeviceSecurityGroupList, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts b/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts index fbd7462a6323..7b504741880d 100644 --- a/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts +++ b/sdk/security/arm-security/src/models/discoveredSecuritySolutionsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - DiscoveredSecuritySolutionList, + CloudError, DiscoveredSecuritySolution, - CloudError + DiscoveredSecuritySolutionList } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts b/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts index 16f85ea6d5ae..55f2be16966d 100644 --- a/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts +++ b/sdk/security/arm-security/src/models/externalSecuritySolutionsMappers.ts @@ -1,25 +1,22 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - ExternalSecuritySolutionList, - ExternalSecuritySolution, - CloudError, + AadExternalSecuritySolution, + AadSolutionProperties, + AtaExternalSecuritySolution, + AtaSolutionProperties, CefExternalSecuritySolution, CefSolutionProperties, - ExternalSecuritySolutionProperties, + CloudError, ConnectedWorkspace, - AtaSolutionProperties, - AtaExternalSecuritySolution, - AadExternalSecuritySolution, - AadSolutionProperties + ExternalSecuritySolution, + ExternalSecuritySolutionList, + ExternalSecuritySolutionProperties } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index dc38e6a5aba6..d24f392f288c 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/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. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,2091 +11,6518 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing Resource. * Describes an Azure resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing Kind. - * Describes an Azure resource with kind - * + * a compliance result */ -export interface Kind { +export interface ComplianceResult extends Resource { /** - * @member {string} [kind] Kind of the resource + * The status of the resource regarding a single assessment. Possible values include: 'Healthy', + * 'NotApplicable', 'OffByPolicy', 'NotHealthy' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind?: string; + readonly resourceStatus?: ResourceStatus; } /** - * @interface - * An interface representing SecurityContact. - * Contact details for security issues - * - * @extends Resource + * The ASC location of the subscription is in the "name" field */ -export interface SecurityContact extends Resource { +export interface AscLocation extends Resource { + properties?: any; +} + +/** + * Describes an Azure tracked resource. + */ +export interface TrackedResource { /** - * @member {string} email The email of this security contact + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - email: string; + readonly id?: string; /** - * @member {string} [phone] The phone number of this security contact + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - phone?: string; + readonly name?: string; /** - * @member {AlertNotifications} alertNotifications Whether to send security - * alerts notifications to the security contact. Possible values include: - * 'On', 'Off' + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - alertNotifications: AlertNotifications; + readonly type?: string; /** - * @member {AlertsToAdmins} alertsToAdmins Whether to send security alerts - * notifications to subscription admins. Possible values include: 'On', 'Off' + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - alertsToAdmins: AlertsToAdmins; + readonly location?: string; + /** + * Kind of the resource + */ + kind?: string; + /** + * Entity tag is used for comparing two or more entities from the same requested resource. + */ + etag?: string; + /** + * A list of key value pairs that describe the resource. + */ + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Pricing. - * Pricing tier will be applied for the scope based on the resource ID - * - * @extends Resource + * Describes an Azure resource with location */ -export interface Pricing extends Resource { +export interface Location { /** - * @member {PricingTier} pricingTier Pricing tier type. Possible values - * include: 'Free', 'Standard' + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - pricingTier: PricingTier; + readonly location?: string; } /** - * @interface - * An interface representing WorkspaceSetting. - * Configures where to store the OMS agent data for workspaces under a scope - * - * @extends Resource + * Describes an Azure resource with kind */ -export interface WorkspaceSetting extends Resource { - /** - * @member {string} workspaceId The full Azure ID of the workspace to save - * the data in - */ - workspaceId: string; +export interface Kind { /** - * @member {string} scope All the VMs in this scope will send their security - * data to the mentioned workspace unless overridden by a setting with more - * specific scope + * Kind of the resource */ - scope: string; + kind?: string; } /** - * @interface - * An interface representing AutoProvisioningSetting. - * Auto provisioning setting - * - * @extends Resource + * Entity tag is used for comparing two or more entities from the same requested resource. */ -export interface AutoProvisioningSetting extends Resource { +export interface ETag { /** - * @member {AutoProvision} autoProvision Describes what kind of security - * agent provisioning action to take. Possible values include: 'On', 'Off' + * Entity tag is used for comparing two or more entities from the same requested resource. */ - autoProvision: AutoProvision; + etag?: string; } /** - * @interface - * An interface representing ComplianceSegment. - * A segment of a compliance assessment. - * + * A list of key value pairs that describe the resource. */ -export interface ComplianceSegment { - /** - * @member {string} [segmentType] The segment type, e.g. compliant, - * non-compliance, insufficient coverage, N/A, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly segmentType?: string; +export interface Tags { /** - * @member {number} [percentage] The size (%) of the segment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A list of key value pairs that describe the resource. */ - readonly percentage?: number; + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Compliance. - * Compliance of a scope - * - * @extends Resource + * Azure Security Center is provided in two pricing tiers: free and standard, with the standard + * tier available with a trial period. The standard tier offers advanced security capabilities, + * while the free tier offers basic security features. */ -export interface Compliance extends Resource { - /** - * @member {Date} [assessmentTimestampUtcDate] The timestamp when the - * Compliance calculation was conducted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly assessmentTimestampUtcDate?: Date; +export interface Pricing extends Resource { /** - * @member {number} [resourceCount] The resource count of the given - * subscription for which the Compliance calculation was conducted (needed - * for Management Group Compliance calculation). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The pricing tier value. Azure Security Center is provided in two pricing tiers: free and + * standard, with the standard tier available with a trial period. The standard tier offers + * advanced security capabilities, while the free tier offers basic security features. Possible + * values include: 'Free', 'Standard' */ - readonly resourceCount?: number; + pricingTier: PricingTier; /** - * @member {ComplianceSegment[]} [assessmentResult] An array of segment, - * which is the actually the compliance assessment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. + * P3Y6M4DT12H30M5S). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly assessmentResult?: ComplianceSegment[]; + readonly freeTrialRemainingTime?: string; } /** - * @interface - * An interface representing AdvancedThreatProtectionSetting. - * The Advanced Threat Protection resource. - * - * @extends Resource + * List of pricing configurations response. */ -export interface AdvancedThreatProtectionSetting extends Resource { +export interface PricingList { /** - * @member {boolean} [isEnabled] Indicates whether Advanced Threat Protection - * is enabled. + * List of pricing configurations */ - isEnabled?: boolean; + value: Pricing[]; } /** - * Contains the possible cases for Setting. - */ -export type SettingUnion = Setting | DataExportSetting; - -/** - * @interface - * An interface representing Setting. - * Represents a security setting in Azure Security Center. - * + * Changing set of properties depending on the entity type. */ -export interface Setting { +export interface AlertEntity { /** - * @member {string} kind Polymorphic Discriminator + * Type of entity + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind: "Setting"; + readonly type?: string; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - readonly id?: string; + [property: string]: any; +} + +/** + * Factors that increase our confidence that the alert is a true positive + */ +export interface AlertConfidenceReason { /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Type of confidence factor + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly type?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * description of the confidence reason + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly reason?: string; } /** - * @interface - * An interface representing DataExportSetting. - * Represents a data export setting - * + * Security alert */ -export interface DataExportSetting { +export interface Alert extends Resource { /** - * @member {string} kind Polymorphic Discriminator + * State of the alert (Active, Dismissed etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind: "DataExportSetting"; + readonly state?: string; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time the incident was reported to Microsoft.Security in UTC + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly reportedTimeUtc?: Date; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the vendor that discovered the incident + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly vendorName?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly alertName?: string; /** - * @member {boolean} enabled Is the data export setting is enabled + * Display name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled: boolean; -} - -/** - * @interface - * An interface representing SettingKind1. - * The kind of the security setting - * - */ -export interface SettingKind1 { + readonly alertDisplayName?: string; /** - * @member {SettingKind} [kind] the kind of the settings string. Possible - * values include: 'DataExportSetting' + * The time the incident was detected by the vendor + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind?: SettingKind; -} - -/** - * @interface - * An interface representing SensitivityLabel. - * The sensitivity label. - * - */ -export interface SensitivityLabel { + readonly detectedTimeUtc?: Date; /** - * @member {string} [displayName] The name of the sensitivity label. + * Description of the incident and what it means + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - displayName?: string; + readonly description?: string; /** - * @member {number} [order] The order of the sensitivity label. + * Recommended steps to reradiate the incident + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - order?: number; + readonly remediationSteps?: string; /** - * @member {boolean} [enabled] Indicates whether the label is enabled or not. + * The action that was taken as a response to the alert (Active, Blocked etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled?: boolean; -} - -/** - * @interface - * An interface representing InformationProtectionKeyword. - * The information type keyword. - * - */ -export interface InformationProtectionKeyword { + readonly actionTaken?: string; /** - * @member {string} [pattern] The keyword pattern. + * Estimated severity of this alert. Possible values include: 'Informational', 'Low', 'Medium', + * 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - pattern?: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {boolean} [custom] Indicates whether the keyword is custom or not. + * The entity that the incident happened on + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - custom?: boolean; + readonly compromisedEntity?: string; /** - * @member {boolean} [canBeNumeric] Indicates whether the keyword can be - * applied on numeric types or not. + * Azure resource ID of the associated resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - canBeNumeric?: boolean; + readonly associatedResource?: string; + extendedProperties?: { [propertyName: string]: any }; /** - * @member {boolean} [excluded] Indicates whether the keyword is excluded or - * not. + * The type of the alerted resource (Azure, Non-Azure) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - excluded?: boolean; -} - -/** - * @interface - * An interface representing InformationType. - * The information type. - * - */ -export interface InformationType { + readonly systemSource?: string; /** - * @member {string} [displayName] The name of the information type. + * Whether this alert can be investigated with Azure Security Center + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - displayName?: string; + readonly canBeInvestigated?: boolean; /** - * @member {number} [order] The order of the information type. + * Whether this alert is for incident type or not (otherwise - single alert) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - order?: number; + readonly isIncident?: boolean; /** - * @member {string} [recommendedLabelId] The recommended label id to be - * associated with this information type. + * objects that are related to this alerts */ - recommendedLabelId?: string; + entities?: AlertEntity[]; /** - * @member {boolean} [enabled] Indicates whether the information type is - * enabled or not. + * level of confidence we have on the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled?: boolean; + readonly confidenceScore?: number; /** - * @member {boolean} [custom] Indicates whether the information type is - * custom or not. + * reasons the alert got the confidenceScore value */ - custom?: boolean; + confidenceReasons?: AlertConfidenceReason[]; /** - * @member {InformationProtectionKeyword[]} [keywords] The information type - * keywords. + * Azure subscription ID of the resource that had the security alert or the subscription ID of + * the workspace that this resource reports to + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - keywords?: InformationProtectionKeyword[]; -} - -/** - * @interface - * An interface representing InformationProtectionPolicy. - * Information protection policy. - * - * @extends Resource - */ -export interface InformationProtectionPolicy extends Resource { + readonly subscriptionId?: string; /** - * @member {Date} [lastModifiedUtc] Describes the last UTC time the policy - * was modified. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Instance ID of the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastModifiedUtc?: Date; + readonly instanceId?: string; /** - * @member {{ [propertyName: string]: SensitivityLabel }} [labels] Dictionary - * of sensitivity labels. + * Azure resource ID of the workspace that the alert was reported to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - labels?: { [propertyName: string]: SensitivityLabel }; + readonly workspaceArmId?: string; /** - * @member {{ [propertyName: string]: InformationType }} [informationTypes] - * The sensitivity information types. + * Alerts with the same CorrelationKey will be grouped together in Ibiza. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - informationTypes?: { [propertyName: string]: InformationType }; + readonly correlationKey?: string; } /** - * @interface - * An interface representing Location. - * Describes an Azure resource with location - * + * Contains the possible cases for SettingResource. */ -export interface Location { - /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly location?: string; -} +export type SettingResourceUnion = SettingResource | SettingUnion; /** - * @interface - * An interface representing OperationDisplay. - * Security operation display - * + * The kind of the security setting */ -export interface OperationDisplay { +export interface SettingResource { /** - * @member {string} [provider] The resource provider for the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly provider?: string; + kind: "SettingResource"; /** - * @member {string} [resource] The display name of the resource the operation - * applies to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resource?: string; + readonly id?: string; /** - * @member {string} [operation] The display name of the security operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; + readonly name?: string; /** - * @member {string} [description] The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly type?: string; } /** - * @interface - * An interface representing Operation. - * Possible operation in the REST API of Microsoft.Security - * + * Contains the possible cases for Setting. */ -export interface Operation { - /** - * @member {string} [name] Name of the operation - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; +export type SettingUnion = Setting | DataExportSettings; + +/** + * Represents a security setting in Azure Security Center. + */ +export interface Setting { /** - * @member {string} [origin] Where the operation is originated - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly origin?: string; + kind: "Setting"; /** - * @member {OperationDisplay} [display] + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; -} - -/** - * @interface - * An interface representing SecurityTaskParameters. - * Changing set of properties, depending on the task type that is derived from - * the name field - * - */ -export interface SecurityTaskParameters { + readonly id?: string; /** - * @member {string} [name] Name of the task type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - [property: string]: any; + readonly type?: string; } /** - * @interface - * An interface representing SecurityTask. - * Security task that we recommend to do in order to strengthen security - * - * @extends Resource + * Represents a data export setting */ -export interface SecurityTask extends Resource { +export interface DataExportSettings { /** - * @member {string} [state] State of the task (Active, Resolved etc.) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly state?: string; + kind: "DataExportSettings"; /** - * @member {Date} [creationTimeUtc] The time this task was discovered in UTC - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creationTimeUtc?: Date; + readonly id?: string; /** - * @member {SecurityTaskParameters} [securityTaskParameters] + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - securityTaskParameters?: SecurityTaskParameters; + readonly name?: string; /** - * @member {Date} [lastStateChangeTimeUtc] The time this task's details were - * last changed in UTC - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastStateChangeTimeUtc?: Date; + readonly type?: string; /** - * @member {string} [subState] Additional data on the state of the task - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Is the data export setting is enabled */ - readonly subState?: string; + enabled: boolean; } /** - * @interface - * An interface representing AscLocation. - * The ASC location of the subscription is in the "name" field - * - * @extends Resource + * The Advanced Threat Protection resource. */ -export interface AscLocation extends Resource { +export interface AdvancedThreatProtectionSetting extends Resource { /** - * @member {any} [properties] + * Indicates whether Advanced Threat Protection is enabled. */ - properties?: any; + isEnabled?: boolean; } /** - * @interface - * An interface representing AlertEntity. - * Changing set of properties depending on the entity type. - * + * Contains the possible cases for CustomAlertRule. */ -export interface AlertEntity { +export type CustomAlertRuleUnion = CustomAlertRule | ThresholdCustomAlertRuleUnion | ListCustomAlertRuleUnion; + +/** + * A custom alert rule. + */ +export interface CustomAlertRule { /** - * @member {string} [type] Type of entity - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly type?: string; + ruleType: "CustomAlertRule"; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - [property: string]: any; -} - -/** - * @interface - * An interface representing AlertConfidenceReason. - * Factors that increase our confidence that the alert is a true positive - * - */ -export interface AlertConfidenceReason { + readonly displayName?: string; /** - * @member {string} [type] Type of confidence factor - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly description?: string; /** - * @member {string} [reason] description of the confidence reason - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly reason?: string; + isEnabled: boolean; } /** - * @interface - * An interface representing Alert. - * Security alert - * - * @extends Resource + * Contains the possible cases for ThresholdCustomAlertRule. */ -export interface Alert extends Resource { +export type ThresholdCustomAlertRuleUnion = ThresholdCustomAlertRule | TimeWindowCustomAlertRuleUnion; + +/** + * A custom alert rule that checks if a value (depends on the custom alert type) is within the + * given range. + */ +export interface ThresholdCustomAlertRule { /** - * @member {string} [state] State of the alert (Active, Dismissed etc.) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly state?: string; + ruleType: "ThresholdCustomAlertRule"; /** - * @member {Date} [reportedTimeUtc] The time the incident was reported to - * Microsoft.Security in UTC - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reportedTimeUtc?: Date; + readonly displayName?: string; /** - * @member {string} [vendorName] Name of the vendor that discovered the - * incident - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly vendorName?: string; + readonly description?: string; /** - * @member {string} [alertName] Name of the alert type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly alertName?: string; + isEnabled: boolean; /** - * @member {string} [alertDisplayName] Display name of the alert type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly alertDisplayName?: string; + minThreshold: number; /** - * @member {Date} [detectedTimeUtc] The time the incident was detected by the - * vendor - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The maximum threshold. */ - readonly detectedTimeUtc?: Date; + maxThreshold: number; +} + +/** + * Contains the possible cases for TimeWindowCustomAlertRule. + */ +export type TimeWindowCustomAlertRuleUnion = TimeWindowCustomAlertRule | ActiveConnectionsNotInAllowedRange | AmqpC2DMessagesNotInAllowedRange | MqttC2DMessagesNotInAllowedRange | HttpC2DMessagesNotInAllowedRange | AmqpC2DRejectedMessagesNotInAllowedRange | MqttC2DRejectedMessagesNotInAllowedRange | HttpC2DRejectedMessagesNotInAllowedRange | AmqpD2CMessagesNotInAllowedRange | MqttD2CMessagesNotInAllowedRange | HttpD2CMessagesNotInAllowedRange | DirectMethodInvokesNotInAllowedRange | FailedLocalLoginsNotInAllowedRange | FileUploadsNotInAllowedRange | QueuePurgesNotInAllowedRange | TwinUpdatesNotInAllowedRange | UnauthorizedOperationsNotInAllowedRange; + +/** + * A custom alert rule that checks if the number of activities (depends on the custom alert type) + * in a time window is within the given range. + */ +export interface TimeWindowCustomAlertRule { + /** + * Polymorphic Discriminator + */ + ruleType: "TimeWindowCustomAlertRule"; + /** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; /** - * @member {string} [description] Description of the incident and what it - * means - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; /** - * @member {string} [remediationSteps] Recommended steps to reradiate the - * incident - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly remediationSteps?: string; + isEnabled: boolean; /** - * @member {string} [actionTaken] The action that was taken as a response to - * the alert (Active, Blocked etc.) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly actionTaken?: string; + minThreshold: number; /** - * @member {string} [reportedSeverity] Estimated severity of this alert - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The maximum threshold. */ - readonly reportedSeverity?: string; + maxThreshold: number; /** - * @member {string} [compromisedEntity] The entity that the incident happened - * on - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time window size in iso8601 format. */ - readonly compromisedEntity?: string; + timeWindowSize: string; +} + +/** + * Contains the possible cases for ListCustomAlertRule. + */ +export type ListCustomAlertRuleUnion = ListCustomAlertRule | AllowlistCustomAlertRuleUnion | DenylistCustomAlertRule; + +/** + * A List custom alert rule. + */ +export interface ListCustomAlertRule { /** - * @member {string} [associatedResource] Azure resource ID of the associated - * resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly associatedResource?: string; + ruleType: "ListCustomAlertRule"; /** - * @member {{ [propertyName: string]: any }} [extendedProperties] + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - extendedProperties?: { [propertyName: string]: any }; + readonly displayName?: string; /** - * @member {string} [systemSource] The type of the alerted resource (Azure, - * Non-Azure) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly systemSource?: string; + readonly description?: string; /** - * @member {boolean} [canBeInvestigated] Whether this alert can be - * investigated with Azure Security Center - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly canBeInvestigated?: boolean; + isEnabled: boolean; /** - * @member {AlertEntity[]} [entities] objects that are related to this alerts + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - entities?: AlertEntity[]; + readonly valueType?: ValueType; +} + +/** + * Contains the possible cases for AllowlistCustomAlertRule. + */ +export type AllowlistCustomAlertRuleUnion = AllowlistCustomAlertRule | ConnectionToIpNotAllowed | LocalUserNotAllowed | ProcessNotAllowed; + +/** + * A custom alert rule that checks if a value (depends on the custom alert type) is allowed. + */ +export interface AllowlistCustomAlertRule { /** - * @member {number} [confidenceScore] level of confidence we have on the - * alert - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly confidenceScore?: number; + ruleType: "AllowlistCustomAlertRule"; /** - * @member {AlertConfidenceReason[]} [confidenceReasons] reasons the alert - * got the confidenceScore value + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - confidenceReasons?: AlertConfidenceReason[]; + readonly displayName?: string; /** - * @member {string} [subscriptionId] Azure subscription ID of the resource - * that had the security alert or the subscription ID of the workspace that - * this resource reports to - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionId?: string; + readonly description?: string; /** - * @member {string} [instanceId] Instance ID of the alert. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly instanceId?: string; + isEnabled: boolean; /** - * @member {string} [workspaceArmId] Azure resource ID of the workspace that - * the alert was reported to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly workspaceArmId?: string; + readonly valueType?: ValueType; + /** + * The values to allow. The format of the values depends on the rule type. + */ + allowlistValues: string[]; } /** - * @interface - * An interface representing DiscoveredSecuritySolution. + * A custom alert rule that checks if a value (depends on the custom alert type) is denied. */ -export interface DiscoveredSecuritySolution { - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; +export interface DenylistCustomAlertRule { /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly type?: string; + ruleType: "DenylistCustomAlertRule"; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly displayName?: string; /** - * @member {SecurityFamily} securityFamily The security family of the - * discovered solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', - * 'Va' + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - securityFamily: SecurityFamily; + readonly description?: string; /** - * @member {string} offer The security solutions' image offer + * Status of the custom alert. */ - offer: string; + isEnabled: boolean; /** - * @member {string} publisher The security solutions' image publisher + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - publisher: string; + readonly valueType?: ValueType; /** - * @member {string} sku The security solutions' image sku + * The values to deny. The format of the values depends on the rule type. */ - sku: string; + denylistValues: string[]; } /** - * @interface - * An interface representing TopologySingleResourceParent. + * The device security group resource */ -export interface TopologySingleResourceParent { +export interface DeviceSecurityGroup extends Resource { /** - * @member {string} [resourceId] Azure resource id which serves as parent - * resource in topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of custom alert threshold rules. */ - readonly resourceId?: string; -} - -/** - * @interface - * An interface representing TopologySingleResourceChild. - */ -export interface TopologySingleResourceChild { + thresholdRules?: ThresholdCustomAlertRuleUnion[]; /** - * @member {string} [resourceId] Azure resource id which serves as child - * resource in topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of custom alert time-window rules. */ - readonly resourceId?: string; -} - -/** - * @interface - * An interface representing TopologySingleResource. - */ -export interface TopologySingleResource { + timeWindowRules?: TimeWindowCustomAlertRuleUnion[]; /** - * @member {string} [resourceId] Azure resource id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The allow-list custom alert rules. */ - readonly resourceId?: string; + allowlistRules?: AllowlistCustomAlertRuleUnion[]; /** - * @member {string} [severity] The security severity of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The deny-list custom alert rules. */ - readonly severity?: string; + denylistRules?: DenylistCustomAlertRule[]; +} + +/** + * Outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in + * CIDR notation. + */ +export interface ConnectionToIpNotAllowed { /** - * @member {boolean} [recommendationsExist] Indicates if the resource has - * security recommendations - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly recommendationsExist?: boolean; + ruleType: "ConnectionToIpNotAllowed"; /** - * @member {string} [networkZones] Indicates the resource connectivity level - * to the Internet (InternetFacing, Internal ,etc.) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly networkZones?: string; + readonly displayName?: string; /** - * @member {number} [topologyScore] Score of the resource based on its - * security severity - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly topologyScore?: number; + readonly description?: string; /** - * @member {string} [location] The location of this resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly location?: string; + isEnabled: boolean; /** - * @member {TopologySingleResourceParent[]} [parents] Azure resources - * connected to this resource which are in higher level in the topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly parents?: TopologySingleResourceParent[]; + readonly valueType?: ValueType; /** - * @member {TopologySingleResourceChild[]} [children] Azure resources - * connected to this resource which are in lower level in the topology view - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The values to allow. The format of the values depends on the rule type. */ - readonly children?: TopologySingleResourceChild[]; + allowlistValues: string[]; } /** - * @interface - * An interface representing TopologyResource. + * Login by a local user that isn't allowed. Allow list consists of login names to allow. */ -export interface TopologyResource { +export interface LocalUserNotAllowed { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly id?: string; + ruleType: "LocalUserNotAllowed"; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly displayName?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly description?: string; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly location?: string; + isEnabled: boolean; /** - * @member {Date} [calculatedDateTime] The UTC time on which the topology was - * calculated - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly calculatedDateTime?: Date; + readonly valueType?: ValueType; /** - * @member {TopologySingleResource[]} [topologyResources] Azure resources - * which are part of this topology resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The values to allow. The format of the values depends on the rule type. */ - readonly topologyResources?: TopologySingleResource[]; + allowlistValues: string[]; } /** - * @interface - * An interface representing JitNetworkAccessPortRule. + * Execution of a process that isn't allowed. Allow list consists of process names to allow. */ -export interface JitNetworkAccessPortRule { +export interface ProcessNotAllowed { /** - * @member {number} number + * Polymorphic Discriminator */ - number: number; - /** - * @member {Protocol} protocol Possible values include: 'TCP', 'UDP', 'All' - */ - protocol: Protocol; + ruleType: "ProcessNotAllowed"; /** - * @member {string} [allowedSourceAddressPrefix] Mutually exclusive with the - * "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - * for example "192.168.0.3" or "192.168.0.0/16". + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefix?: string; + readonly displayName?: string; /** - * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with - * the "allowedSourceAddressPrefix" parameter. + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefixes?: string[]; + readonly description?: string; /** - * @member {string} maxRequestAccessDuration Maximum duration requests can be - * made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day + * Status of the custom alert. */ - maxRequestAccessDuration: string; -} - -/** - * @interface - * An interface representing JitNetworkAccessPolicyVirtualMachine. - */ -export interface JitNetworkAccessPolicyVirtualMachine { + isEnabled: boolean; /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy + * The value type of the items in the list. Possible values include: 'IpCidr', 'String' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - id: string; + readonly valueType?: ValueType; /** - * @member {JitNetworkAccessPortRule[]} ports Port configurations for the - * virtual machine + * The values to allow. The format of the values depends on the rule type. */ - ports: JitNetworkAccessPortRule[]; + allowlistValues: string[]; } /** - * @interface - * An interface representing JitNetworkAccessRequestPort. + * Number of active connections is not in allowed range. */ -export interface JitNetworkAccessRequestPort { +export interface ActiveConnectionsNotInAllowedRange { /** - * @member {number} number + * Polymorphic Discriminator */ - number: number; + ruleType: "ActiveConnectionsNotInAllowedRange"; /** - * @member {string} [allowedSourceAddressPrefix] Mutually exclusive with the - * "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - * for example "192.168.0.3" or "192.168.0.0/16". + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefix?: string; + readonly displayName?: string; /** - * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with - * the "allowedSourceAddressPrefix" parameter. + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefixes?: string[]; + readonly description?: string; /** - * @member {Date} endTimeUtc The date & time at which the request ends in UTC + * Status of the custom alert. */ - endTimeUtc: Date; + isEnabled: boolean; /** - * @member {Status} status The status of the port. Possible values include: - * 'Revoked', 'Initiated' + * The minimum threshold. */ - status: Status; + minThreshold: number; /** - * @member {StatusReason} statusReason A description of why the `status` has - * its value. Possible values include: 'Expired', 'UserRequested', - * 'NewerRequestInitiated' + * The maximum threshold. */ - statusReason: StatusReason; + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing JitNetworkAccessRequestVirtualMachine. + * Number of cloud to device messages (AMQP protocol) is not in allowed range. */ -export interface JitNetworkAccessRequestVirtualMachine { +export interface AmqpC2DMessagesNotInAllowedRange { /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy + * Polymorphic Discriminator */ - id: string; + ruleType: "AmqpC2DMessagesNotInAllowedRange"; /** - * @member {JitNetworkAccessRequestPort[]} ports The ports that were opened - * for the virtual machine + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ports: JitNetworkAccessRequestPort[]; -} - -/** - * @interface - * An interface representing JitNetworkAccessRequest. - */ -export interface JitNetworkAccessRequest { + readonly displayName?: string; /** - * @member {JitNetworkAccessRequestVirtualMachine[]} virtualMachines + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - virtualMachines: JitNetworkAccessRequestVirtualMachine[]; + readonly description?: string; /** - * @member {Date} startTimeUtc The start time of the request in UTC + * Status of the custom alert. */ - startTimeUtc: Date; + isEnabled: boolean; /** - * @member {string} requestor The identity of the person who made the request + * The minimum threshold. */ - requestor: string; + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing JitNetworkAccessPolicy. + * Number of cloud to device messages (MQTT protocol) is not in allowed range. */ -export interface JitNetworkAccessPolicy { +export interface MqttC2DMessagesNotInAllowedRange { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; + ruleType: "MqttC2DMessagesNotInAllowedRange"; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly displayName?: string; /** - * @member {string} [kind] Kind of the resource + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind?: string; + readonly description?: string; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly location?: string; + isEnabled: boolean; /** - * @member {JitNetworkAccessPolicyVirtualMachine[]} virtualMachines - * Configurations for Microsoft.Compute/virtualMachines resource type. + * The minimum threshold. */ - virtualMachines: JitNetworkAccessPolicyVirtualMachine[]; + minThreshold: number; /** - * @member {JitNetworkAccessRequest[]} [requests] + * The maximum threshold. */ - requests?: JitNetworkAccessRequest[]; + maxThreshold: number; /** - * @member {string} [provisioningState] Gets the provisioning state of the - * Just-in-Time policy. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time window size in iso8601 format. */ - readonly provisioningState?: string; + timeWindowSize: string; } /** - * @interface - * An interface representing JitNetworkAccessPolicyInitiatePort. + * Number of cloud to device messages (HTTP protocol) is not in allowed range. */ -export interface JitNetworkAccessPolicyInitiatePort { +export interface HttpC2DMessagesNotInAllowedRange { /** - * @member {number} number + * Polymorphic Discriminator */ - number: number; + ruleType: "HttpC2DMessagesNotInAllowedRange"; /** - * @member {string} [allowedSourceAddressPrefix] Source of the allowed - * traffic. If omitted, the request will be for the source IP address of the - * initiate request. + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefix?: string; + readonly displayName?: string; /** - * @member {Date} endTimeUtc The time to close the request in UTC + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - endTimeUtc: Date; -} - -/** - * @interface - * An interface representing JitNetworkAccessPolicyInitiateVirtualMachine. - */ -export interface JitNetworkAccessPolicyInitiateVirtualMachine { + readonly description?: string; /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy + * Status of the custom alert. */ - id: string; + isEnabled: boolean; /** - * @member {JitNetworkAccessPolicyInitiatePort[]} ports The ports to open for - * the resource with the `id` + * The minimum threshold. */ - ports: JitNetworkAccessPolicyInitiatePort[]; -} - -/** - * @interface - * An interface representing JitNetworkAccessPolicyInitiateRequest. - */ -export interface JitNetworkAccessPolicyInitiateRequest { + minThreshold: number; /** - * @member {JitNetworkAccessPolicyInitiateVirtualMachine[]} virtualMachines A - * list of virtual machines & ports to open access for + * The maximum threshold. */ - virtualMachines: JitNetworkAccessPolicyInitiateVirtualMachine[]; + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * Contains the possible cases for ExternalSecuritySolution. - */ -export type ExternalSecuritySolutionUnion = ExternalSecuritySolution | CefExternalSecuritySolution | AtaExternalSecuritySolution | AadExternalSecuritySolution; - -/** - * @interface - * An interface representing ExternalSecuritySolution. - * Represents a security solution external to Azure Security Center which sends - * information to an OMS workspace and whos data is displayed by Azure Security - * Center. - * + * Number of rejected cloud to device messages (AMQP protocol) is not in allowed range. */ -export interface ExternalSecuritySolution { +export interface AmqpC2DRejectedMessagesNotInAllowedRange { /** - * @member {string} kind Polymorphic Discriminator + * Polymorphic Discriminator */ - kind: "ExternalSecuritySolution"; + ruleType: "AmqpC2DRejectedMessagesNotInAllowedRange"; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly displayName?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly description?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly type?: string; + isEnabled: boolean; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly location?: string; + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing ExternalSecuritySolutionProperties. - * The solution properties (correspond to the solution kind) - * + * Number of rejected cloud to device messages (MQTT protocol) is not in allowed range. */ -export interface ExternalSecuritySolutionProperties { +export interface MqttC2DRejectedMessagesNotInAllowedRange { /** - * @member {string} [deviceVendor] + * Polymorphic Discriminator */ - deviceVendor?: string; + ruleType: "MqttC2DRejectedMessagesNotInAllowedRange"; /** - * @member {string} [deviceType] + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - deviceType?: string; + readonly displayName?: string; /** - * @member {ConnectedWorkspace} [workspace] + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - workspace?: ConnectedWorkspace; + readonly description?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Status of the custom alert. */ - [property: string]: any; -} - -/** - * @interface - * An interface representing CefSolutionProperties. - * @summary The external security solution properties for CEF solutions - * - * @extends ExternalSecuritySolutionProperties - */ -export interface CefSolutionProperties extends ExternalSecuritySolutionProperties { + isEnabled: boolean; /** - * @member {string} [hostname] + * The minimum threshold. */ - hostname?: string; + minThreshold: number; /** - * @member {string} [agent] + * The maximum threshold. */ - agent?: string; + maxThreshold: number; /** - * @member {string} [lastEventReceived] + * The time window size in iso8601 format. */ - lastEventReceived?: string; + timeWindowSize: string; } /** - * @interface - * An interface representing CefExternalSecuritySolution. - * Represents a security solution which sends CEF logs to an OMS workspace - * + * Number of rejected cloud to device messages (HTTP protocol) is not in allowed range. */ -export interface CefExternalSecuritySolution { +export interface HttpC2DRejectedMessagesNotInAllowedRange { /** - * @member {string} kind Polymorphic Discriminator + * Polymorphic Discriminator */ - kind: "CEF"; + ruleType: "HttpC2DRejectedMessagesNotInAllowedRange"; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly displayName?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly description?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly type?: string; + isEnabled: boolean; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly location?: string; + minThreshold: number; /** - * @member {CefSolutionProperties} [properties] + * The maximum threshold. */ - properties?: CefSolutionProperties; -} - -/** - * @interface - * An interface representing AtaSolutionProperties. - * @summary The external security solution properties for ATA solutions - * - * @extends ExternalSecuritySolutionProperties - */ -export interface AtaSolutionProperties extends ExternalSecuritySolutionProperties { + maxThreshold: number; /** - * @member {string} [lastEventReceived] + * The time window size in iso8601 format. */ - lastEventReceived?: string; + timeWindowSize: string; } /** - * @interface - * An interface representing AtaExternalSecuritySolution. - * Represents an ATA security solution which sends logs to an OMS workspace - * + * Number of device to cloud messages (AMQP protocol) is not in allowed range. */ -export interface AtaExternalSecuritySolution { +export interface AmqpD2CMessagesNotInAllowedRange { /** - * @member {string} kind Polymorphic Discriminator + * Polymorphic Discriminator */ - kind: "ATA"; + ruleType: "AmqpD2CMessagesNotInAllowedRange"; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly displayName?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly description?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly type?: string; + isEnabled: boolean; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly location?: string; + minThreshold: number; /** - * @member {AtaSolutionProperties} [properties] + * The maximum threshold. */ - properties?: AtaSolutionProperties; -} - -/** - * @interface - * An interface representing ConnectedWorkspace. - * @summary Represents an OMS workspace to which the solution is connected - * - */ -export interface ConnectedWorkspace { + maxThreshold: number; /** - * @member {string} [id] Azure resource ID of the connected OMS workspace + * The time window size in iso8601 format. */ - id?: string; + timeWindowSize: string; } /** - * @interface - * An interface representing AadSolutionProperties. - * @summary The external security solution properties for AAD solutions - * + * Number of device to cloud messages (MQTT protocol) is not in allowed range. */ -export interface AadSolutionProperties { +export interface MqttD2CMessagesNotInAllowedRange { /** - * @member {string} [deviceVendor] + * Polymorphic Discriminator */ - deviceVendor?: string; + ruleType: "MqttD2CMessagesNotInAllowedRange"; /** - * @member {string} [deviceType] + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - deviceType?: string; + readonly displayName?: string; /** - * @member {ConnectedWorkspace} [workspace] + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - workspace?: ConnectedWorkspace; + readonly description?: string; /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * Status of the custom alert. */ - connectivityState?: AadConnectivityState; + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing AadExternalSecuritySolution. - * Represents an AAD identity protection solution which sends logs to an OMS - * workspace. - * + * Number of device to cloud messages (HTTP protocol) is not in allowed range. */ -export interface AadExternalSecuritySolution { +export interface HttpD2CMessagesNotInAllowedRange { /** - * @member {string} kind Polymorphic Discriminator + * Polymorphic Discriminator */ - kind: "AAD"; + ruleType: "HttpD2CMessagesNotInAllowedRange"; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly displayName?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly description?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly type?: string; + isEnabled: boolean; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly location?: string; + minThreshold: number; /** - * @member {AadSolutionProperties} [properties] + * The maximum threshold. */ - properties?: AadSolutionProperties; + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing ExternalSecuritySolutionKind1. - * Describes an Azure resource with kind - * + * Number of direct method invokes is not in allowed range. */ -export interface ExternalSecuritySolutionKind1 { +export interface DirectMethodInvokesNotInAllowedRange { /** - * @member {ExternalSecuritySolutionKind} [kind] The kind of the external - * solution. Possible values include: 'CEF', 'ATA', 'AAD' + * Polymorphic Discriminator */ - kind?: ExternalSecuritySolutionKind; + ruleType: "DirectMethodInvokesNotInAllowedRange"; + /** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing AadConnectivityState1. - * Describes an Azure resource with kind - * + * Number of failed local logins is not in allowed range. */ -export interface AadConnectivityState1 { +export interface FailedLocalLoginsNotInAllowedRange { /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * Polymorphic Discriminator */ - connectivityState?: AadConnectivityState; + ruleType: "FailedLocalLoginsNotInAllowedRange"; + /** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing ConnectedResource. - * Describes properties of a connected resource - * + * Number of file uploads is not in allowed range. */ -export interface ConnectedResource { +export interface FileUploadsNotInAllowedRange { /** - * @member {string} [connectedResourceId] The Azure resource id of the - * connected resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly connectedResourceId?: string; + ruleType: "FileUploadsNotInAllowedRange"; /** - * @member {string} [tcpPorts] The allowed tcp ports - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tcpPorts?: string; + readonly displayName?: string; /** - * @member {string} [udpPorts] The allowed udp ports - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly udpPorts?: string; + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing ConnectableResource. - * Describes the allowed inbound and outbound traffic of an Azure resource - * + * Number of device queue purges is not in allowed range. */ -export interface ConnectableResource { +export interface QueuePurgesNotInAllowedRange { /** - * @member {string} [id] The Azure resource id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly id?: string; + ruleType: "QueuePurgesNotInAllowedRange"; /** - * @member {ConnectedResource[]} [inboundConnectedResources] The list of - * Azure resources that the resource has inbound allowed connection from - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly inboundConnectedResources?: ConnectedResource[]; + readonly displayName?: string; /** - * @member {ConnectedResource[]} [outboundConnectedResources] The list of - * Azure resources that the resource has outbound allowed connection to - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly outboundConnectedResources?: ConnectedResource[]; + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing AllowedConnectionsResource. - * The resource whose properties describes the allowed traffic between Azure - * resources - * + * Number of twin updates is not in allowed range. */ -export interface AllowedConnectionsResource { +export interface TwinUpdatesNotInAllowedRange { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly id?: string; + ruleType: "TwinUpdatesNotInAllowedRange"; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly displayName?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly description?: string; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Status of the custom alert. */ - readonly location?: string; + isEnabled: boolean; /** - * @member {Date} [calculatedDateTime] The UTC time on which the allowed - * connections resource was calculated - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The minimum threshold. */ - readonly calculatedDateTime?: Date; + minThreshold: number; /** - * @member {ConnectableResource[]} [connectableResources] List of connectable - * resources - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The maximum threshold. */ - readonly connectableResources?: ConnectableResource[]; + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing TasksListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Number of unauthorized operations is not in allowed range. */ -export interface TasksListOptionalParams extends msRest.RequestOptionsBase { +export interface UnauthorizedOperationsNotInAllowedRange { /** - * @member {string} [filter] OData filter. Optional. + * Polymorphic Discriminator */ - filter?: string; + ruleType: "UnauthorizedOperationsNotInAllowedRange"; + /** + * The display name of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The description of the custom alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Status of the custom alert. + */ + isEnabled: boolean; + /** + * The minimum threshold. + */ + minThreshold: number; + /** + * The maximum threshold. + */ + maxThreshold: number; + /** + * The time window size in iso8601 format. + */ + timeWindowSize: string; } /** - * @interface - * An interface representing TasksListByHomeRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * A container holding only the Tags for a resource, allowing the user to update the tags. */ -export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { +export interface TagsResource { /** - * @member {string} [filter] OData filter. Optional. + * Resource tags */ - filter?: string; + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing TasksListByResourceGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Properties of the IoT Security solution's user defined resources. */ -export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface UserDefinedResourcesProperties { /** - * @member {string} [filter] OData filter. Optional. + * Azure Resource Graph query which represents the security solution's user defined resources. + * Required to start with "where type != "Microsoft.Devices/IotHubs"" */ - filter?: string; + query: string; + /** + * List of Azure subscription ids on which the user defined resources query should be executed. + */ + querySubscriptions: string[]; } /** - * @interface - * An interface representing AlertsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The type of IoT Security recommendation. */ -export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { +export interface RecommendationConfigurationProperties { /** - * @member {string} [filter] OData filter. Optional. + * The type of IoT Security recommendation. Possible values include: 'IoT_ACRAuthentication', + * 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', 'IoT_EdgeHubMemOptimize', + * 'IoT_EdgeLoggingOptions', 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + * 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + * 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + * 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', 'IoT_SharedCredentials', + * 'IoT_VulnerableTLSCipherSuite' */ - filter?: string; + recommendationType: RecommendationType; /** - * @member {string} [select] OData select. Optional. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + readonly name?: string; /** - * @member {string} [expand] OData expand. Optional. + * Recommendation status. When the recommendation status is disabled recommendations are not + * generated. Possible values include: 'Disabled', 'Enabled'. Default value: 'Enabled'. */ - expand?: string; + status: RecommendationConfigStatus; } /** - * @interface - * An interface representing AlertsListByResourceGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * IoT Security solution configuration and resource information. */ -export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface IoTSecuritySolutionModel { /** - * @member {string} [filter] OData filter. Optional. + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; /** - * @member {string} [select] OData select. Optional. + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + readonly name?: string; /** - * @member {string} [expand] OData expand. Optional. + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; -} - -/** - * @interface - * An interface representing AlertsListSubscriptionLevelAlertsByRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + readonly type?: string; /** - * @member {string} [filter] OData filter. Optional. + * Resource tags */ - filter?: string; + tags?: { [propertyName: string]: string }; /** - * @member {string} [select] OData select. Optional. + * The resource location. */ - select?: string; + location?: string; /** - * @member {string} [expand] OData expand. Optional. + * Workspace resource ID */ - expand?: string; + workspace: string; + /** + * Resource display name. + */ + displayName: string; + /** + * Status of the IoT Security solution. Possible values include: 'Enabled', 'Disabled'. Default + * value: 'Enabled'. + */ + status?: SecuritySolutionStatus; + /** + * List of additional options for exporting to workspace data. + */ + exportProperty?: ExportData[]; + /** + * Disabled data sources. Disabling these data sources compromises the system. + */ + disabledDataSources?: DataSource[]; + /** + * IoT Hub resource IDs + */ + iotHubs: string[]; + userDefinedResources?: UserDefinedResourcesProperties; + /** + * List of resources that were automatically discovered as relevant to the security solution. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly autoDiscoveredResources?: string[]; + recommendationsConfiguration?: RecommendationConfigurationProperties[]; + /** + * Unmasked IP address logging status. Possible values include: 'Disabled', 'Enabled'. Default + * value: 'Disabled'. + */ + unmaskedIpLoggingStatus?: UnmaskedIpLoggingStatus; } /** - * @interface - * An interface representing AlertsListResourceGroupLevelAlertsByRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * An interface representing UpdateIotSecuritySolutionData. */ -export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { +export interface UpdateIotSecuritySolutionData extends TagsResource { + userDefinedResources?: UserDefinedResourcesProperties; + recommendationsConfiguration?: RecommendationConfigurationProperties[]; +} + +/** + * IoT Security solution analytics severity metrics. + */ +export interface IoTSeverityMetrics { /** - * @member {string} [filter] OData filter. Optional. + * Count of high severity alerts/recommendations. */ - filter?: string; + high?: number; /** - * @member {string} [select] OData select. Optional. + * Count of medium severity alerts/recommendations. */ - select?: string; + medium?: number; /** - * @member {string} [expand] OData expand. Optional. + * Count of low severity alerts/recommendations. */ - expand?: string; + low?: number; } /** - * @interface - * An interface representing SecurityCenterOptions. - * @extends AzureServiceClientOptions + * An interface representing IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. */ -export interface SecurityCenterOptions extends AzureServiceClientOptions { +export interface IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem { /** - * @member {string} [baseUri] + * Aggregation of IoT Security solution device alert metrics by date. */ - baseUri?: string; + date?: Date; + /** + * Device alert count by severity. + */ + devicesMetrics?: IoTSeverityMetrics; } - /** - * @interface - * An interface representing the PricingList. - * List of pricing configurations response - * - * @extends Array + * Statistical information about the number of alerts per device during last set number of days. */ -export interface PricingList extends Array { +export interface IoTSecurityAlertedDevice { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Device identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly deviceId?: string; + /** + * Number of alerts raised for this device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertsCount?: number; } /** - * @interface - * An interface representing the SecurityContactList. - * List of security contacts response - * - * @extends Array + * Statistical information about the number of alerts per alert type during last set number of days */ -export interface SecurityContactList extends Array { +export interface IoTSecurityDeviceAlert { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Display name of the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly alertDisplayName?: string; + /** + * Assessed Alert severity. Possible values include: 'Informational', 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reportedSeverity?: ReportedSeverity; + /** + * Number of alerts raised for this alert type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertsCount?: number; } /** - * @interface - * An interface representing the WorkspaceSettingList. - * List of workspace settings response - * - * @extends Array + * Statistical information about the number of recommendations per device, per recommendation type. */ -export interface WorkspaceSettingList extends Array { +export interface IoTSecurityDeviceRecommendation { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Display name of the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly recommendationDisplayName?: string; + /** + * Assessed recommendation severity. Possible values include: 'Informational', 'Low', 'Medium', + * 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reportedSeverity?: ReportedSeverity; + /** + * Number of devices with this recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly devicesCount?: number; } /** - * @interface - * An interface representing the AutoProvisioningSettingList. - * List of all the auto provisioning settings response - * - * @extends Array + * Security analytics of your IoT Security solution */ -export interface AutoProvisioningSettingList extends Array { +export interface IoTSecuritySolutionAnalyticsModel extends Resource { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Security analytics of your IoT Security solution. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly metrics?: IoTSeverityMetrics; + /** + * Number of unhealthy devices within your IoT Security solution. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unhealthyDeviceCount?: number; + /** + * List of device metrics by the aggregation date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly devicesMetrics?: IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem[]; + /** + * List of the 3 devices with the most alerts. + */ + topAlertedDevices?: IoTSecurityAlertedDevice[]; + /** + * List of the 3 most prevalent device alerts. + */ + mostPrevalentDeviceAlerts?: IoTSecurityDeviceAlert[]; + /** + * List of the 3 most prevalent device recommendations. + */ + mostPrevalentDeviceRecommendations?: IoTSecurityDeviceRecommendation[]; } /** - * @interface - * An interface representing the ComplianceList. - * List of Compliance objects response - * - * @extends Array + * List of Security analytics of your IoT Security solution */ -export interface ComplianceList extends Array { +export interface IoTSecuritySolutionAnalyticsModelList { + /** + * List of Security analytics of your IoT Security solution + */ + value: IoTSecuritySolutionAnalyticsModel[]; /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * When there is too much alert data for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** - * @interface - * An interface representing the SettingsList. - * Subscription settings list. - * - * @extends Array + * An interface representing IoTSecurityAggregatedAlertPropertiesTopDevicesListItem. */ -export interface SettingsList extends Array { +export interface IoTSecurityAggregatedAlertPropertiesTopDevicesListItem { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly deviceId?: string; + /** + * Number of alerts raised for this device. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertsCount?: number; + /** + * Most recent time this alert was raised for this device, on this day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastOccurrence?: string; } /** - * @interface - * An interface representing the InformationProtectionPolicyList. - * Information protection policies response. - * - * @extends Array + * Security Solution Aggregated Alert information */ -export interface InformationProtectionPolicyList extends Array { +export interface IoTSecurityAggregatedAlert { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * Name of the alert type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertType?: string; + /** + * Display name of the alert type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly alertDisplayName?: string; + /** + * Date of detection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly aggregatedDateUtc?: Date; + /** + * Name of the organization that raised the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorName?: string; + /** + * Assessed alert severity. Possible values include: 'Informational', 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reportedSeverity?: ReportedSeverity; + /** + * Recommended steps for remediation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediationSteps?: string; + /** + * Description of the suspected vulnerability and meaning. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Number of alerts occurrences within the aggregated time window. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly count?: number; + /** + * Azure resource ID of the resource that received the alerts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectedResourceType?: string; + /** + * The type of the alerted resource (Azure, Non-Azure). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemSource?: string; + /** + * IoT Security solution alert response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionTaken?: string; + /** + * Log analytics query for getting the list of affected devices/alerts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly logAnalyticsQuery?: string; + /** + * 10 devices with the highest number of occurrences of this alert type, on this day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly topDevicesList?: IoTSecurityAggregatedAlertPropertiesTopDevicesListItem[]; } /** - * @interface - * An interface representing the OperationList. - * List of possible operations for Microsoft.Security resource provider - * - * @extends Array + * IoT Security solution recommendation information. */ -export interface OperationList extends Array { +export interface IoTSecurityAggregatedRecommendation { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * Name of the recommendation. + */ + recommendationName?: string; + /** + * Display name of the recommendation type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationDisplayName?: string; + /** + * Description of the suspected vulnerability and meaning. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Recommendation-type GUID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationTypeId?: string; + /** + * Name of the organization that made the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly detectedBy?: string; + /** + * Recommended steps for remediation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediationSteps?: string; + /** + * Assessed recommendation severity. Possible values include: 'Informational', 'Low', 'Medium', + * 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reportedSeverity?: ReportedSeverity; + /** + * Number of healthy devices within the IoT Security solution. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly healthyDevices?: number; + /** + * Number of unhealthy devices within the IoT Security solution. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unhealthyDeviceCount?: number; + /** + * Log analytics query for getting the list of affected devices/alerts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly logAnalyticsQuery?: string; } /** - * @interface - * An interface representing the AscLocationList. - * List of locations where ASC saves your data - * - * @extends Array + * Security operation display */ -export interface AscLocationList extends Array { +export interface OperationDisplay { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource provider for the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly provider?: string; + /** + * The display name of the resource the operation applies to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * The display name of the security operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } /** - * @interface - * An interface representing the SecurityTaskList. - * List of security task recommendations - * - * @extends Array + * Possible operation in the REST API of Microsoft.Security */ -export interface SecurityTaskList extends Array { +export interface Operation { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly name?: string; + /** + * Where the operation is originated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: string; + display?: OperationDisplay; } /** - * @interface - * An interface representing the AlertList. - * List of security alerts - * - * @extends Array + * Changing set of properties, depending on the task type that is derived from the name field */ -export interface AlertList extends Array { +export interface SecurityTaskParameters { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the task type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly name?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; } /** - * @interface - * An interface representing the DiscoveredSecuritySolutionList. - * @extends Array + * Security task that we recommend to do in order to strengthen security */ -export interface DiscoveredSecuritySolutionList extends Array { +export interface SecurityTask extends Resource { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * State of the task (Active, Resolved etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly state?: string; + /** + * The time this task was discovered in UTC + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTimeUtc?: Date; + securityTaskParameters?: SecurityTaskParameters; + /** + * The time this task's details were last changed in UTC + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastStateChangeTimeUtc?: Date; + /** + * Additional data on the state of the task + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subState?: string; } /** - * @interface - * An interface representing the JitNetworkAccessPoliciesList. - * @extends Array + * Auto provisioning setting */ -export interface JitNetworkAccessPoliciesList extends Array { +export interface AutoProvisioningSetting extends Resource { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Describes what kind of security agent provisioning action to take. Possible values include: + * 'On', 'Off' */ - readonly nextLink?: string; + autoProvision: AutoProvision; } /** - * @interface - * An interface representing the ExternalSecuritySolutionList. - * @extends Array + * A segment of a compliance assessment. */ -export interface ExternalSecuritySolutionList extends Array { +export interface ComplianceSegment { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly segmentType?: string; + /** + * The size (%) of the segment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentage?: number; } /** - * @interface - * An interface representing the TopologyList. - * @extends Array + * Compliance of a scope */ -export interface TopologyList extends Array { +export interface Compliance extends Resource { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The timestamp when the Compliance calculation was conducted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly assessmentTimestampUtcDate?: Date; + /** + * The resource count of the given subscription for which the Compliance calculation was + * conducted (needed for Management Group Compliance calculation). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceCount?: number; + /** + * An array of segment, which is the actually the compliance assessment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly assessmentResult?: ComplianceSegment[]; } /** - * @interface - * An interface representing the AllowedConnectionsList. - * List of all possible traffic between Azure resources - * - * @extends Array + * The sensitivity label. */ -export interface AllowedConnectionsList extends Array { +export interface SensitivityLabel { /** - * @member {string} [nextLink] The URI to fetch the next page. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the sensitivity label. */ - readonly nextLink?: string; + displayName?: string; + /** + * The description of the sensitivity label. + */ + description?: string; + /** + * The rank of the sensitivity label. Possible values include: 'None', 'Low', 'Medium', 'High', + * 'Critical' + */ + rank?: Rank; + /** + * The order of the sensitivity label. + */ + order?: number; + /** + * Indicates whether the label is enabled or not. + */ + enabled?: boolean; } /** - * Defines values for AlertNotifications. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * The information type keyword. */ -export type AlertNotifications = 'On' | 'Off'; +export interface InformationProtectionKeyword { + /** + * The keyword pattern. + */ + pattern?: string; + /** + * Indicates whether the keyword is custom or not. + */ + custom?: boolean; + /** + * Indicates whether the keyword can be applied on numeric types or not. + */ + canBeNumeric?: boolean; + /** + * Indicates whether the keyword is excluded or not. + */ + excluded?: boolean; +} /** - * Defines values for AlertsToAdmins. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * The information type. */ -export type AlertsToAdmins = 'On' | 'Off'; +export interface InformationType { + /** + * The name of the information type. + */ + displayName?: string; + /** + * The description of the information type. + */ + description?: string; + /** + * The order of the information type. + */ + order?: number; + /** + * The recommended label id to be associated with this information type. + */ + recommendedLabelId?: string; + /** + * Indicates whether the information type is enabled or not. + */ + enabled?: boolean; + /** + * Indicates whether the information type is custom or not. + */ + custom?: boolean; + /** + * The information type keywords. + */ + keywords?: InformationProtectionKeyword[]; +} /** - * Defines values for PricingTier. - * Possible values include: 'Free', 'Standard' - * @readonly - * @enum {string} + * Information protection policy. */ -export type PricingTier = 'Free' | 'Standard'; +export interface InformationProtectionPolicy extends Resource { + /** + * Describes the last UTC time the policy was modified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedUtc?: Date; + /** + * Describes the version of the policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * Dictionary of sensitivity labels. + */ + labels?: { [propertyName: string]: SensitivityLabel }; + /** + * The sensitivity information types. + */ + informationTypes?: { [propertyName: string]: InformationType }; +} /** - * Defines values for AutoProvision. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Contact details for security issues */ -export type AutoProvision = 'On' | 'Off'; +export interface SecurityContact extends Resource { + /** + * The email of this security contact + */ + email: string; + /** + * The phone number of this security contact + */ + phone?: string; + /** + * Whether to send security alerts notifications to the security contact. Possible values + * include: 'On', 'Off' + */ + alertNotifications: AlertNotifications; + /** + * Whether to send security alerts notifications to subscription admins. Possible values include: + * 'On', 'Off' + */ + alertsToAdmins: AlertsToAdmins; +} /** - * Defines values for SettingKind. - * Possible values include: 'DataExportSetting' - * @readonly - * @enum {string} + * Configures where to store the OMS agent data for workspaces under a scope */ -export type SettingKind = 'DataExportSetting'; +export interface WorkspaceSetting extends Resource { + /** + * The full Azure ID of the workspace to save the data in + */ + workspaceId: string; + /** + * All the VMs in this scope will send their security data to the mentioned workspace unless + * overridden by a setting with more specific scope + */ + scope: string; +} /** - * Defines values for SecurityFamily. - * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - * @readonly - * @enum {string} + * Regulatory compliance standard details and state */ -export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; +export interface RegulatoryComplianceStandard extends Resource { + /** + * Aggregative state based on the standard's supported controls states. Possible values include: + * 'Passed', 'Failed', 'Skipped', 'Unsupported' + */ + state?: State; + /** + * The number of supported regulatory compliance controls of the given standard with a passed + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly passedControls?: number; + /** + * The number of supported regulatory compliance controls of the given standard with a failed + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failedControls?: number; + /** + * The number of supported regulatory compliance controls of the given standard with a skipped + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skippedControls?: number; + /** + * The number of regulatory compliance controls of the given standard which are unsupported by + * automated assessments + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unsupportedControls?: number; +} /** - * Defines values for Protocol. - * Possible values include: 'TCP', 'UDP', 'All' - * @readonly - * @enum {string} + * Regulatory compliance control details and state */ -export type Protocol = 'TCP' | 'UDP' | '*'; +export interface RegulatoryComplianceControl extends Resource { + /** + * The description of the regulatory compliance control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Aggregative state based on the control's supported assessments states. Possible values + * include: 'Passed', 'Failed', 'Skipped', 'Unsupported' + */ + state?: State; + /** + * The number of supported regulatory compliance assessments of the given control with a passed + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly passedAssessments?: number; + /** + * The number of supported regulatory compliance assessments of the given control with a failed + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failedAssessments?: number; + /** + * The number of supported regulatory compliance assessments of the given control with a skipped + * state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skippedAssessments?: number; +} /** - * Defines values for Status. - * Possible values include: 'Revoked', 'Initiated' - * @readonly - * @enum {string} + * Regulatory compliance assessment details and state */ -export type Status = 'Revoked' | 'Initiated'; +export interface RegulatoryComplianceAssessment extends Resource { + /** + * The description of the regulatory compliance assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The expected type of assessment contained in the AssessmentDetailsLink + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly assessmentType?: string; + /** + * Link to more detailed assessment results data. The response type will be according to the + * assessmentType field + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly assessmentDetailsLink?: string; + /** + * Aggregative state based on the assessment's scanned resources states. Possible values include: + * 'Passed', 'Failed', 'Skipped', 'Unsupported' + */ + state?: State; + /** + * The given assessment's related resources count with passed state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly passedResources?: number; + /** + * The given assessment's related resources count with failed state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failedResources?: number; + /** + * The given assessment's related resources count with skipped state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skippedResources?: number; + /** + * The given assessment's related resources count with unsupported state. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unsupportedResources?: number; +} /** - * Defines values for StatusReason. - * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' - * @readonly - * @enum {string} + * Describes the server vulnerability assessment details on a resource */ -export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; +export interface ServerVulnerabilityAssessment extends Resource { + /** + * The provisioningState of the vulnerability assessment capability on the VM. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} /** - * Defines values for AadConnectivityState. - * Possible values include: 'Discovered', 'NotLicensed', 'Connected' - * @readonly - * @enum {string} + * List of server vulnerability assessments */ -export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; +export interface ServerVulnerabilityAssessmentsList { + value?: ServerVulnerabilityAssessment[]; +} /** - * Defines values for ExternalSecuritySolutionKind. - * Possible values include: 'CEF', 'ATA', 'AAD' - * @readonly - * @enum {string} + * Status of the sub-assessment */ -export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; +export interface SubAssessmentStatus { + /** + * Programmatic code for the status of the assessment. Possible values include: 'Healthy', + * 'Unhealthy', 'NotApplicable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: SubAssessmentStatusCode; + /** + * Programmatic code for the cause of the assessment status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cause?: string; + /** + * Human readable description of the assessment status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The sub-assessment severity level. Possible values include: 'Low', 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly severity?: Severity; +} /** - * Defines values for ConnectionType. - * Possible values include: 'Internal', 'External' - * @readonly - * @enum {string} + * Contains the possible cases for ResourceDetails. */ -export type ConnectionType = 'Internal' | 'External'; +export type ResourceDetailsUnion = ResourceDetails | OnPremiseResourceDetails | AzureResourceDetails; /** - * Defines values for SettingName. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} + * Details of the resource that was assessed */ -export type SettingName = 'MCAS' | 'WDATP'; +export interface ResourceDetails { + /** + * Polymorphic Discriminator + */ + source: "ResourceDetails"; +} /** - * Defines values for SettingName1. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} + * Contains the possible cases for AdditionalData. */ -export type SettingName1 = 'MCAS' | 'WDATP'; +export type AdditionalDataUnion = AdditionalData | SqlServerVulnerabilityProperties | ContainerRegistryVulnerabilityProperties | ServerVulnerabilityProperties; /** - * Defines values for InformationProtectionPolicyName. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Details of the sub-assessment */ -export type InformationProtectionPolicyName = 'effective' | 'custom'; +export interface AdditionalData { + /** + * Polymorphic Discriminator + */ + assessedResourceType: "AdditionalData"; +} /** - * Defines values for InformationProtectionPolicyName1. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Security sub-assessment on a resource */ -export type InformationProtectionPolicyName1 = 'effective' | 'custom'; +export interface SecuritySubAssessment extends Resource { + /** + * Vulnerability ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly securitySubAssessmentId?: string; + /** + * User friendly display name of the sub-assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + status?: SubAssessmentStatus; + /** + * Information on how to remediate this sub-assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remediation?: string; + /** + * Description of the impact of this sub-assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly impact?: string; + /** + * Category of the sub-assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly category?: string; + /** + * Human readable description of the assessment status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The date and time the sub-assessment was generated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeGenerated?: Date; + resourceDetails?: ResourceDetailsUnion; + additionalData?: AdditionalDataUnion; +} /** - * Defines values for TaskUpdateActionType. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} + * Details of the resource that was assessed */ -export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; +export interface SqlServerVulnerabilityProperties { + /** + * Polymorphic Discriminator + */ + assessedResourceType: "SqlServerVulnerability"; + /** + * The resource type the sub assessment refers to in its resource details + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The T-SQL query that runs on your SQL database to perform the particular check + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly query?: string; +} + +/** + * CVSS details + */ +export interface CVSS { + /** + * CVSS base + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly base?: number; +} + +/** + * CVE details + */ +export interface CVE { + /** + * CVE title + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly title?: string; + /** + * Link url + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly link?: string; +} + +/** + * Vendor reference + */ +export interface VendorReference { + /** + * Link title + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly title?: string; + /** + * Link url + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly link?: string; +} + +/** + * Additional context fields for container registry Vulnerability assessment + */ +export interface ContainerRegistryVulnerabilityProperties { + /** + * Polymorphic Discriminator + */ + assessedResourceType: "ContainerRegistryVulnerability"; + /** + * Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered, + * Vulnerability + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Dictionary from cvss version to cvss details object + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cvss?: { [propertyName: string]: CVSS }; + /** + * Indicates whether a patch is available or not + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly patchable?: boolean; + /** + * List of CVEs + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cve?: CVE[]; + /** + * Published time + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publishedTime?: Date; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorReferences?: VendorReference[]; + /** + * Name of the repository which the vulnerable image belongs to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly repositoryName?: string; + /** + * Digest of the vulnerable image + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly imageDigest?: string; +} + +/** + * Additional context fields for server vulnerability assessment + */ +export interface ServerVulnerabilityProperties { + /** + * Polymorphic Discriminator + */ + assessedResourceType: "ServerVulnerabilityAssessment"; + /** + * Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Dictionary from cvss version to cvss details object + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cvss?: { [propertyName: string]: CVSS }; + /** + * Indicates whether a patch is available or not + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly patchable?: boolean; + /** + * List of CVEs + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cve?: CVE[]; + /** + * Threat name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly threat?: string; + /** + * Published time + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publishedTime?: Date; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vendorReferences?: VendorReference[]; +} + +/** + * Details of the On Premise resource that was assessed + */ +export interface OnPremiseResourceDetails { + /** + * Polymorphic Discriminator + */ + source: "OnPremise"; + /** + * Azure resource Id of the workspace the machine is attached to + */ + workspaceId: string; + /** + * The unique Id of the machine + */ + vmuuid: string; + /** + * The oms agent Id installed on the machine + */ + sourceComputerId: string; + /** + * The name of the machine + */ + machineName: string; +} + +/** + * Details of the Azure resource that was assessed + */ +export interface AzureResourceDetails { + /** + * Polymorphic Discriminator + */ + source: "Azure"; + /** + * Azure resource Id of the assessed resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * A single automation scope. + */ +export interface AutomationScope { + /** + * The resources scope description. + */ + description?: string; + /** + * The resources scope path. Can be the subscription on which the automation is defined on or a + * resource group under that subscription (fully qualified Azure resource IDs). + */ + scopePath?: string; +} + +/** + * A rule which is evaluated upon event interception. The rule is configured by comparing a + * specific value from the event model to an expected value. This comparison is done by using one + * of the supported operators set. + */ +export interface AutomationTriggeringRule { + /** + * The JPath of the entity model property that should be checked. + */ + propertyJPath?: string; + /** + * The data type of the compared operands (string, integer, floating point number or a boolean + * [true/false]]. Possible values include: 'String', 'Integer', 'Number', 'Boolean' + */ + propertyType?: PropertyType; + /** + * The expected value. + */ + expectedValue?: string; + /** + * A valid comparer operator to use. A case-insensitive comparison will be applied for String + * PropertyType. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', + * 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + */ + operator?: Operator; +} + +/** + * A rule set which evaluates all its rules upon an event interception. Only when all the included + * rules in the rule set will be evaluated as 'true', will the event trigger the defined actions. + */ +export interface AutomationRuleSet { + rules?: AutomationTriggeringRule[]; +} + +/** + * The source event types which evaluate the security automation set of rules. For example - + * security alerts and security assessments. To learn more about the supported security events data + * models schemas - please visit https://aka.ms/ASCAutomationSchemas. + */ +export interface AutomationSource { + /** + * A valid event source type. Possible values include: 'Assessments', 'Alerts' + */ + eventSource?: EventSource; + /** + * A set of rules which evaluate upon event interception. A logical disjunction is applied + * between defined rule sets (logical 'or'). + */ + ruleSets?: AutomationRuleSet[]; +} + +/** + * Contains the possible cases for AutomationAction. + */ +export type AutomationActionUnion = AutomationAction | AutomationActionLogicApp | AutomationActionEventHub | AutomationActionWorkspace; + +/** + * The action that should be triggered. + */ +export interface AutomationAction { + /** + * Polymorphic Discriminator + */ + actionType: "AutomationAction"; +} + +/** + * The security automation resource. + */ +export interface Automation extends TrackedResource { + /** + * The security automation description. + */ + description?: string; + /** + * Indicates whether the security automation is enabled. + */ + isEnabled?: boolean; + /** + * A collection of scopes on which the security automations logic is applied. Supported scopes + * are the subscription itself or a resource group under that subscription. The automation will + * only apply on defined scopes. + */ + scopes?: AutomationScope[]; + /** + * A collection of the source event types which evaluate the security automation set of rules. + */ + sources?: AutomationSource[]; + /** + * A collection of the actions which are triggered if all the configured rules evaluations, + * within at least one rule set, are true. + */ + actions?: AutomationActionUnion[]; +} + +/** + * The logic app action that should be triggered. To learn more about Security Center's Workflow + * Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore + */ +export interface AutomationActionLogicApp { + /** + * Polymorphic Discriminator + */ + actionType: "LogicApp"; + /** + * The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given + * that you have permissions to trigger the Logic App + */ + logicAppResourceId?: string; + /** + * The Logic App trigger URI endpoint (it will not be included in any response). + */ + uri?: string; +} + +/** + * The target Event Hub to which event data will be exported. To learn more about Security Center + * continuous export capabilities, visit https://aka.ms/ASCExportLearnMore + */ +export interface AutomationActionEventHub { + /** + * Polymorphic Discriminator + */ + actionType: "EventHub"; + /** + * The target Event Hub Azure Resource ID. + */ + eventHubResourceId?: string; + /** + * The target Event Hub SAS policy name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sasPolicyName?: string; + /** + * The target Event Hub connection string (it will not be included in any response). + */ + connectionString?: string; +} + +/** + * The Log Analytics Workspace to which event data will be exported. Security alerts data will + * reside in the 'SecurityAlert' table and the assessments data will reside in the + * 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that + * in order to view the data in the workspace, the Security Center Log Analytics free/standard + * solution needs to be enabled on that workspace. To learn more about Security Center continuous + * export capabilities, visit https://aka.ms/ASCExportLearnMore + */ +export interface AutomationActionWorkspace { + /** + * Polymorphic Discriminator + */ + actionType: "Workspace"; + /** + * The fully qualified Log Analytics Workspace Azure Resource ID. + */ + workspaceResourceId?: string; +} + +/** + * The security automation model state property bag. + */ +export interface AutomationValidationStatus { + /** + * Indicates whether the model is valid or not. + */ + isValid?: boolean; + /** + * The validation message. + */ + message?: string; +} + +/** + * A more specific scope used to identify the alerts to suppress. + */ +export interface ScopeElement { + /** + * The alert entity type to suppress by. + */ + field?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * An interface representing SuppressionAlertsScope. + */ +export interface SuppressionAlertsScope { + /** + * All the conditions inside need to be true in order to suppress the alert + */ + allOf: ScopeElement[]; +} + +/** + * Describes the suppression rule + */ +export interface AlertsSuppressionRule extends Resource { + /** + * Type of the alert to automatically suppress. For all alert types, use '*' + */ + alertType: string; + /** + * The last time this rule was modified + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedUtc?: Date; + /** + * Expiration date of the rule, if value is not provided or provided as null this field will + * default to the maximum allowed expiration date. + */ + expirationDateUtc?: Date; + /** + * The reason for dismissing the alert + */ + reason: string; + /** + * Possible states of the rule. Possible values include: 'Enabled', 'Disabled', 'Expired' + */ + state: RuleState; + /** + * Any comment regarding the rule + */ + comment?: string; + /** + * The suppression conditions + */ + suppressionAlertsScope?: SuppressionAlertsScope; +} + +/** + * Describes the partner that created the assessment + */ +export interface SecurityAssessmentMetadataPartnerData { + /** + * Name of the company of the partner + */ + partnerName: string; + /** + * Name of the product of the partner that created the assessment + */ + productName?: string; + /** + * Secret to authenticate the partner and verify it created the assessment - write only + */ + secret: string; +} + +/** + * Describes properties of an assessment metadata. + */ +export interface SecurityAssessmentMetadataProperties { + /** + * User friendly display name of the assessment + */ + displayName: string; + /** + * Azure resource ID of the policy definition that turns this assessment calculation on + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyDefinitionId?: string; + /** + * Human readable description of the assessment + */ + description?: string; + /** + * Human readable description of what you should do to mitigate this security issue + */ + remediationDescription?: string; + category?: Category[]; + /** + * The severity level of the assessment. Possible values include: 'Low', 'Medium', 'High' + */ + severity: Severity; + /** + * The user impact of the assessment. Possible values include: 'Low', 'Moderate', 'High' + */ + userImpact?: UserImpact; + /** + * The implementation effort required to remediate this assessment. Possible values include: + * 'Low', 'Moderate', 'High' + */ + implementationEffort?: ImplementationEffort; + threats?: Threats[]; + /** + * True if this assessment is in preview release status + */ + preview?: boolean; + /** + * BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment + * based on custom Azure Policy definition. Possible values include: 'BuiltIn', 'CustomPolicy', + * 'CustomerManaged', 'VerifiedPartner' + */ + assessmentType: AssessmentType; + partnerData?: SecurityAssessmentMetadataPartnerData; +} + +/** + * Security assessment metadata + */ +export interface SecurityAssessmentMetadata extends Resource { + /** + * User friendly display name of the assessment + */ + displayName: string; + /** + * Azure resource ID of the policy definition that turns this assessment calculation on + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyDefinitionId?: string; + /** + * Human readable description of the assessment + */ + description?: string; + /** + * Human readable description of what you should do to mitigate this security issue + */ + remediationDescription?: string; + category?: Category[]; + /** + * The severity level of the assessment. Possible values include: 'Low', 'Medium', 'High' + */ + severity: Severity; + /** + * The user impact of the assessment. Possible values include: 'Low', 'Moderate', 'High' + */ + userImpact?: UserImpact; + /** + * The implementation effort required to remediate this assessment. Possible values include: + * 'Low', 'Moderate', 'High' + */ + implementationEffort?: ImplementationEffort; + threats?: Threats[]; + /** + * True if this assessment is in preview release status + */ + preview?: boolean; + /** + * BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment + * based on custom Azure Policy definition. Possible values include: 'BuiltIn', 'CustomPolicy', + * 'CustomerManaged', 'VerifiedPartner' + */ + assessmentType: AssessmentType; + partnerData?: SecurityAssessmentMetadataPartnerData; +} + +/** + * The result of the assessment + */ +export interface AssessmentStatus { + /** + * Programmatic code for the status of the assessment. Possible values include: 'Healthy', + * 'Unhealthy', 'NotApplicable' + */ + code: AssessmentStatusCode; + /** + * Programmatic code for the cause of the assessment status + */ + cause?: string; + /** + * Human readable description of the assessment status + */ + description?: string; +} + +/** + * Links relevant to the assessment + */ +export interface AssessmentLinks { + /** + * Link to assessment in Azure Portal + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azurePortalUri?: string; +} + +/** + * Data regarding 3rd party partner integration + */ +export interface SecurityAssessmentPartnerData { + /** + * Name of the company of the partner + */ + partnerName: string; + /** + * secret to authenticate the partner - write only + */ + secret: string; +} + +/** + * Security assessment on a resource + */ +export interface SecurityAssessment extends Resource { + resourceDetails: ResourceDetailsUnion; + /** + * User friendly display name of the assessment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + status: AssessmentStatus; + /** + * Additional data regarding the assessment + */ + additionalData?: { [propertyName: string]: string }; + links?: AssessmentLinks; + metadata?: SecurityAssessmentMetadataProperties; + partnersData?: SecurityAssessmentPartnerData; +} + +/** + * The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, + * Executable is used for Linux. + */ +export interface ProtectionMode { + /** + * Possible values include: 'Audit', 'Enforce', 'None' + */ + exe?: Exe; + /** + * Possible values include: 'Audit', 'Enforce', 'None' + */ + msi?: Msi; + /** + * Possible values include: 'Audit', 'Enforce', 'None' + */ + script?: Script; + /** + * Possible values include: 'Audit', 'Enforce', 'None' + */ + executable?: Executable; +} + +/** + * Represents a summary of the alerts of the VM/server group + */ +export interface AppWhitelistingIssueSummary { + /** + * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', + * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', + * 'ExecutableViolationsAudited', 'RulesViolatedManually' + */ + issue?: Issue; + /** + * The number of machines in the VM/server group that have this alert + */ + numberOfVms?: number; +} + +/** + * Represents a machine that is part of a VM/server group + */ +export interface VmRecommendation { + /** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + */ + configurationStatus?: ConfigurationStatus; + /** + * Possible values include: 'Recommended', 'Add', 'Remove' + */ + recommendationAction?: RecommendationAction; + resourceId?: string; + /** + * Possible values include: 'Supported', 'NotSupported', 'Unknown' + */ + enforcementSupport?: EnforcementSupport; +} + +/** + * Represents the publisher information of a process/rule + */ +export interface PublisherInfo { + /** + * The Subject field of the x.509 certificate used to sign the code, using the following fields - + * O = Organization, L = Locality, S = State or Province, and C = Country + */ + publisherName?: string; + /** + * The product name taken from the file's version resource + */ + productName?: string; + /** + * The "OriginalName" field taken from the file's version resource + */ + binaryName?: string; + /** + * The binary file version taken from the file's version resource + */ + version?: string; +} + +/** + * Represents a user that is recommended to be allowed for a certain rule + */ +export interface UserRecommendation { + /** + * Represents a user that is recommended to be allowed for a certain rule + */ + username?: string; + /** + * Possible values include: 'Recommended', 'Add', 'Remove' + */ + recommendationAction?: RecommendationAction1; +} + +/** + * Represents a path that is recommended to be allowed and its properties + */ +export interface PathRecommendation { + /** + * The full path to whitelist + */ + path?: string; + /** + * Possible values include: 'Recommended', 'Add', 'Remove' + */ + action?: Action; + /** + * Possible values include: 'File', 'FileHash', 'PublisherSignature', 'ProductSignature', + * 'BinarySignature', 'VersionAndAboveSignature' + */ + type?: Type; + publisherInfo?: PublisherInfo; + /** + * Whether the path is commonly run on the machine + */ + common?: boolean; + userSids?: string[]; + usernames?: UserRecommendation[]; + /** + * Possible values include: 'Exe', 'Dll', 'Msi', 'Script', 'Executable', 'Unknown' + */ + fileType?: FileType; + /** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + */ + configurationStatus?: ConfigurationStatus1; +} + +/** + * An interface representing AppWhitelistingGroup. + */ +export interface AppWhitelistingGroup { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Possible values include: 'Audit', 'Enforce', 'None' + */ + enforcementMode?: EnforcementMode; + protectionMode?: ProtectionMode; + /** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly configurationStatus?: ConfigurationStatus2; + /** + * Possible values include: 'Recommended', 'NotRecommended', 'NotAvailable', 'NoStatus' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationStatus?: RecommendationStatus; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly issues?: AppWhitelistingIssueSummary[]; + /** + * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', + * 'NonAzure_AuditD', 'None' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sourceSystem?: SourceSystem; + vmRecommendations?: VmRecommendation[]; + pathRecommendations?: PathRecommendation[]; +} + +/** + * Represents a list of VM/server groups and set of rules that are Recommended by Azure Security + * Center to be allowed + */ +export interface AppWhitelistingGroups { + value?: AppWhitelistingGroup[]; +} + +/** + * Describes remote addresses that is recommended to communicate with the Azure resource on some + * (Protocol, Port, Direction). All other remote addresses are recommended to be blocked + */ +export interface Rule { + /** + * The name of the rule + */ + name?: string; + /** + * The rule's direction. Possible values include: 'Inbound', 'Outbound' + */ + direction?: Direction; + /** + * The rule's destination port + */ + destinationPort?: number; + /** + * The rule's transport protocols + */ + protocols?: TransportProtocol[]; + /** + * The remote IP addresses that should be able to communicate with the Azure resource on the + * rule's destination port and protocol + */ + ipAddresses?: string[]; +} + +/** + * Describes the Network Security Groups effective on a network interface + */ +export interface EffectiveNetworkSecurityGroups { + /** + * The Azure resource ID of the network interface + */ + networkInterface?: string; + /** + * The Network Security Groups effective on the network interface + */ + networkSecurityGroups?: string[]; +} + +/** + * The resource whose properties describes the Adaptive Network Hardening settings for some Azure + * resource + */ +export interface AdaptiveNetworkHardening extends Resource { + /** + * The security rules which are recommended to be effective on the VM + */ + rules?: Rule[]; + /** + * The UTC time on which the rules were calculated + */ + rulesCalculationTime?: Date; + /** + * The Network Security Groups effective on the network interfaces of the protected resource + */ + effectiveNetworkSecurityGroups?: EffectiveNetworkSecurityGroups[]; +} + +/** + * An interface representing AdaptiveNetworkHardeningEnforceRequest. + */ +export interface AdaptiveNetworkHardeningEnforceRequest { + /** + * The rules to enforce + */ + rules: Rule[]; + /** + * The Azure resource IDs of the effective network security groups that will be updated with the + * created security rules from the Adaptive Network Hardening rules + */ + networkSecurityGroups: string[]; +} + +/** + * Describes properties of a connected resource + */ +export interface ConnectedResource { + /** + * The Azure resource id of the connected resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly connectedResourceId?: string; + /** + * The allowed tcp ports + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tcpPorts?: string; + /** + * The allowed udp ports + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly udpPorts?: string; +} + +/** + * Describes the allowed inbound and outbound traffic of an Azure resource + */ +export interface ConnectableResource { + /** + * The Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The list of Azure resources that the resource has inbound allowed connection from + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly inboundConnectedResources?: ConnectedResource[]; + /** + * The list of Azure resources that the resource has outbound allowed connection to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly outboundConnectedResources?: ConnectedResource[]; +} + +/** + * The resource whose properties describes the allowed traffic between Azure resources + */ +export interface AllowedConnectionsResource { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The UTC time on which the allowed connections resource was calculated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly calculatedDateTime?: Date; + /** + * List of connectable resources + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly connectableResources?: ConnectableResource[]; +} + +/** + * An interface representing TopologySingleResourceParent. + */ +export interface TopologySingleResourceParent { + /** + * Azure resource id which serves as parent resource in topology view + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceId?: string; +} + +/** + * An interface representing TopologySingleResourceChild. + */ +export interface TopologySingleResourceChild { + /** + * Azure resource id which serves as child resource in topology view + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceId?: string; +} + +/** + * An interface representing TopologySingleResource. + */ +export interface TopologySingleResource { + /** + * Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceId?: string; + /** + * The security severity of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly severity?: string; + /** + * Indicates if the resource has security recommendations + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendationsExist?: boolean; + /** + * Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly networkZones?: string; + /** + * Score of the resource based on its security severity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly topologyScore?: number; + /** + * The location of this resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Azure resources connected to this resource which are in higher level in the topology view + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly parents?: TopologySingleResourceParent[]; + /** + * Azure resources connected to this resource which are in lower level in the topology view + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly children?: TopologySingleResourceChild[]; +} + +/** + * An interface representing TopologyResource. + */ +export interface TopologyResource { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The UTC time on which the topology was calculated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly calculatedDateTime?: Date; + /** + * Azure resources which are part of this topology resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly topologyResources?: TopologySingleResource[]; +} + +/** + * An interface representing JitNetworkAccessPortRule. + */ +export interface JitNetworkAccessPortRule { + number: number; + /** + * Possible values include: 'TCP', 'UDP', 'All' + */ + protocol: Protocol; + /** + * Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address + * or CIDR, for example "192.168.0.3" or "192.168.0.0/16". + */ + allowedSourceAddressPrefix?: string; + /** + * Mutually exclusive with the "allowedSourceAddressPrefix" parameter. + */ + allowedSourceAddressPrefixes?: string[]; + /** + * Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, + * maximum 1 day + */ + maxRequestAccessDuration: string; +} + +/** + * An interface representing JitNetworkAccessPolicyVirtualMachine. + */ +export interface JitNetworkAccessPolicyVirtualMachine { + /** + * Resource ID of the virtual machine that is linked to this policy + */ + id: string; + /** + * Port configurations for the virtual machine + */ + ports: JitNetworkAccessPortRule[]; + /** + * Public IP address of the Azure Firewall that is linked to this policy, if applicable + */ + publicIpAddress?: string; +} + +/** + * An interface representing JitNetworkAccessRequestPort. + */ +export interface JitNetworkAccessRequestPort { + number: number; + /** + * Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address + * or CIDR, for example "192.168.0.3" or "192.168.0.0/16". + */ + allowedSourceAddressPrefix?: string; + /** + * Mutually exclusive with the "allowedSourceAddressPrefix" parameter. + */ + allowedSourceAddressPrefixes?: string[]; + /** + * The date & time at which the request ends in UTC + */ + endTimeUtc: Date; + /** + * The status of the port. Possible values include: 'Revoked', 'Initiated' + */ + status: Status; + /** + * A description of why the `status` has its value. Possible values include: 'Expired', + * 'UserRequested', 'NewerRequestInitiated' + */ + statusReason: StatusReason; + /** + * The port which is mapped to this port's `number` in the Azure Firewall, if applicable + */ + mappedPort?: number; +} + +/** + * An interface representing JitNetworkAccessRequestVirtualMachine. + */ +export interface JitNetworkAccessRequestVirtualMachine { + /** + * Resource ID of the virtual machine that is linked to this policy + */ + id: string; + /** + * The ports that were opened for the virtual machine + */ + ports: JitNetworkAccessRequestPort[]; +} + +/** + * An interface representing JitNetworkAccessRequest. + */ +export interface JitNetworkAccessRequest { + virtualMachines: JitNetworkAccessRequestVirtualMachine[]; + /** + * The start time of the request in UTC + */ + startTimeUtc: Date; + /** + * The identity of the person who made the request + */ + requestor: string; + /** + * The justification for making the initiate request + */ + justification?: string; +} + +/** + * An interface representing JitNetworkAccessPolicy. + */ +export interface JitNetworkAccessPolicy { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Kind of the resource + */ + kind?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Configurations for Microsoft.Compute/virtualMachines resource type. + */ + virtualMachines: JitNetworkAccessPolicyVirtualMachine[]; + requests?: JitNetworkAccessRequest[]; + /** + * Gets the provisioning state of the Just-in-Time policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * An interface representing JitNetworkAccessPolicyInitiatePort. + */ +export interface JitNetworkAccessPolicyInitiatePort { + number: number; + /** + * Source of the allowed traffic. If omitted, the request will be for the source IP address of + * the initiate request. + */ + allowedSourceAddressPrefix?: string; + /** + * The time to close the request in UTC + */ + endTimeUtc: Date; +} + +/** + * An interface representing JitNetworkAccessPolicyInitiateVirtualMachine. + */ +export interface JitNetworkAccessPolicyInitiateVirtualMachine { + /** + * Resource ID of the virtual machine that is linked to this policy + */ + id: string; + /** + * The ports to open for the resource with the `id` + */ + ports: JitNetworkAccessPolicyInitiatePort[]; +} + +/** + * An interface representing JitNetworkAccessPolicyInitiateRequest. + */ +export interface JitNetworkAccessPolicyInitiateRequest { + /** + * A list of virtual machines & ports to open access for + */ + virtualMachines: JitNetworkAccessPolicyInitiateVirtualMachine[]; + /** + * The justification for making the initiate request + */ + justification?: string; +} + +/** + * An interface representing DiscoveredSecuritySolution. + */ +export interface DiscoveredSecuritySolution { + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The security family of the discovered solution. Possible values include: 'Waf', 'Ngfw', + * 'SaasWaf', 'Va' + */ + securityFamily: SecurityFamily; + /** + * The security solutions' image offer + */ + offer: string; + /** + * The security solutions' image publisher + */ + publisher: string; + /** + * The security solutions' image sku + */ + sku: string; +} + +/** + * Contains the possible cases for ExternalSecuritySolution. + */ +export type ExternalSecuritySolutionUnion = ExternalSecuritySolution | CefExternalSecuritySolution | AtaExternalSecuritySolution | AadExternalSecuritySolution; + +/** + * Represents a security solution external to Azure Security Center which sends information to an + * OMS workspace and whose data is displayed by Azure Security Center. + */ +export interface ExternalSecuritySolution { + /** + * Polymorphic Discriminator + */ + kind: "ExternalSecuritySolution"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; +} + +/** + * The solution properties (correspond to the solution kind) + */ +export interface ExternalSecuritySolutionProperties { + deviceVendor?: string; + deviceType?: string; + workspace?: ConnectedWorkspace; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * An interface representing CefSolutionProperties. + * @summary The external security solution properties for CEF solutions + */ +export interface CefSolutionProperties extends ExternalSecuritySolutionProperties { + hostname?: string; + agent?: string; + lastEventReceived?: string; +} + +/** + * Represents a security solution which sends CEF logs to an OMS workspace + */ +export interface CefExternalSecuritySolution { + /** + * Polymorphic Discriminator + */ + kind: "CEF"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + properties?: CefSolutionProperties; +} + +/** + * An interface representing AtaSolutionProperties. + * @summary The external security solution properties for ATA solutions + */ +export interface AtaSolutionProperties extends ExternalSecuritySolutionProperties { + lastEventReceived?: string; +} + +/** + * Represents an ATA security solution which sends logs to an OMS workspace + */ +export interface AtaExternalSecuritySolution { + /** + * Polymorphic Discriminator + */ + kind: "ATA"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + properties?: AtaSolutionProperties; +} + +/** + * An interface representing ConnectedWorkspace. + * @summary Represents an OMS workspace to which the solution is connected + */ +export interface ConnectedWorkspace { + /** + * Azure resource ID of the connected OMS workspace + */ + id?: string; +} + +/** + * An interface representing AadSolutionProperties. + * @summary The external security solution properties for AAD solutions + */ +export interface AadSolutionProperties { + deviceVendor?: string; + deviceType?: string; + workspace?: ConnectedWorkspace; + /** + * The connectivity state of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' + */ + connectivityState?: AadConnectivityState; +} + +/** + * Represents an AAD identity protection solution which sends logs to an OMS workspace. + */ +export interface AadExternalSecuritySolution { + /** + * Polymorphic Discriminator + */ + kind: "AAD"; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + properties?: AadSolutionProperties; +} + +/** + * Describes an Azure resource with kind + */ +export interface ExternalSecuritySolutionKind1 { + /** + * The kind of the external solution. Possible values include: 'CEF', 'ATA', 'AAD' + */ + kind?: ExternalSecuritySolutionKind; +} + +/** + * Describes an Azure resource with kind + */ +export interface AadConnectivityState1 { + /** + * The connectivity state of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' + */ + connectivityState?: AadConnectivityState; +} + +/** + * Secure score item data model + */ +export interface SecureScoreItem extends Resource { + /** + * User friendly display name of the secure score item + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * Maximum score applicable + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly max?: number; + /** + * Actual score + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly current?: number; +} + +/** + * Calculation result data + */ +export interface SecureScoreControlScore { + /** + * Maximum control score (0..10) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly max?: number; + /** + * Actual score for the control = (achieved points / total points) * max score. if total points + * is zeroed, the return number is 0.00 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly current?: number; +} + +/** + * representing the source of the control + */ +export interface SecureScoreControlDefinitionSource { + /** + * BuiltIn if the control is built-in from Azure Security Center managed assessments, Custom + * (Future) if the assessment based on custom Azure Policy definition, CustomerManaged (future) + * for customers who build their own controls. Possible values include: 'BuiltIn', 'Custom' + */ + sourceType?: ControlType; +} + +/** + * Describes an Azure resource with kind + */ +export interface AzureResourceLink { + /** + * Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * Secure Score Control's Definition information + */ +export interface SecureScoreControlDefinitionItem extends Resource { + /** + * User friendly display name of the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * User friendly description of the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Maximum control score (0..10) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly maxScore?: number; + /** + * Source object from which the control was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly source?: SecureScoreControlDefinitionSource; + /** + * array of assessments metadata IDs that are included in this control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly assessmentDefinitions?: AzureResourceLink[]; +} + +/** + * Secure score control (calculated) object + */ +export interface SecureScoreControlDetails extends Resource { + /** + * User friendly display name of the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * Maximum score applicable + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly max?: number; + /** + * Actual score + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly current?: number; + /** + * Number of healthy resources in the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly healthyResourceCount?: number; + /** + * Number of unhealthy resources in the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unhealthyResourceCount?: number; + /** + * Number of not applicable resources in the control + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notApplicableResourceCount?: number; + definition?: SecureScoreControlDefinitionItem; +} + +/** + * Optional Parameters. + */ +export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; + /** + * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and + * get the alerts that would have been dismissed if the rule was enabled when the alert was + * created + */ + autoDismissRuleName?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; + /** + * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and + * get the alerts that would have been dismissed if the rule was enabled when the alert was + * created + */ + autoDismissRuleName?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; + /** + * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and + * get the alerts that would have been dismissed if the rule was enabled when the alert was + * created + */ + autoDismissRuleName?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; + /** + * The name of an existing auto dismiss rule. Use it to simulate the rule on existing alerts and + * get the alerts that would have been dismissed if the rule was enabled when the alert was + * created + */ + autoDismissRuleName?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface IotSecuritySolutionsAnalyticsRecommendationListOptionalParams extends msRest.RequestOptionsBase { + /** + * Number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface TasksListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceStandardsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RegulatoryComplianceAssessmentsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsSuppressionRulesListOptionalParams extends msRest.RequestOptionsBase { + /** + * Type of the alert to get rules for + */ + alertType?: string; +} + +/** + * Optional Parameters. + */ +export interface AssessmentsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'links', 'metadata' + */ + expand?: ExpandEnum; +} + +/** + * Optional Parameters. + */ +export interface AdaptiveApplicationControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Include the policy rules + */ + includePathRecommendations?: boolean; + /** + * Return output in a summarized form + */ + summary?: boolean; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListBySecureScoreOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * Optional Parameters. + */ +export interface SecureScoreControlsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData expand. Optional. Possible values include: 'definition' + */ + expand?: ExpandControlsEnum; +} + +/** + * An interface representing SecurityCenterOptions. + */ +export interface SecurityCenterOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * List of compliance results response + * @extends Array + */ +export interface ComplianceResultList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security alerts + * @extends Array + */ +export interface AlertList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Subscription settings list. + * @extends Array + */ +export interface SettingsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of device security groups + * @extends Array + */ +export interface DeviceSecurityGroupList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solutions. + * @extends Array + */ +export interface IoTSecuritySolutionsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solution aggregated alert data. + * @extends Array + */ +export interface IoTSecurityAggregatedAlertList extends Array { + /** + * When there is too much alert data for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of IoT Security solution aggregated recommendations. + * @extends Array + */ +export interface IoTSecurityAggregatedRecommendationList extends Array { + /** + * When there is too much alert data for one page, use this URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of locations where ASC saves your data + * @extends Array + */ +export interface AscLocationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of possible operations for Microsoft.Security resource provider + * @extends Array + */ +export interface OperationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security task recommendations + * @extends Array + */ +export interface SecurityTaskList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of all the auto provisioning settings response + * @extends Array + */ +export interface AutoProvisioningSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of Compliance objects response + * @extends Array + */ +export interface ComplianceList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Information protection policies response. + * @extends Array + */ +export interface InformationProtectionPolicyList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security contacts response + * @extends Array + */ +export interface SecurityContactList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of workspace settings response + * @extends Array + */ +export interface WorkspaceSettingList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance standards response + * @extends Array + */ +export interface RegulatoryComplianceStandardList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance controls response + * @extends Array + */ +export interface RegulatoryComplianceControlList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of regulatory compliance assessment response + * @extends Array + */ +export interface RegulatoryComplianceAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security sub-assessments + * @extends Array + */ +export interface SecuritySubAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security automations response. + * @extends Array + */ +export interface AutomationList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Suppression rules list for subscription. + * @extends Array + */ +export interface AlertsSuppressionRulesList extends Array { + /** + * URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of security assessment metadata + * @extends Array + */ +export interface SecurityAssessmentMetadataList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Page of a security assessments list + * @extends Array + */ +export interface SecurityAssessmentList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Response for ListAdaptiveNetworkHardenings API service call + * @extends Array + */ +export interface AdaptiveNetworkHardeningsList extends Array { + /** + * The URL to get the next set of results + */ + nextLink?: string; +} + +/** + * @interface + * List of all possible traffic between Azure resources + * @extends Array + */ +export interface AllowedConnectionsList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TopologyList. + * @extends Array + */ +export interface TopologyList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JitNetworkAccessPoliciesList. + * @extends Array + */ +export interface JitNetworkAccessPoliciesList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the DiscoveredSecuritySolutionList. + * @extends Array + */ +export interface DiscoveredSecuritySolutionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ExternalSecuritySolutionList. + * @extends Array + */ +export interface ExternalSecuritySolutionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Page of a secure scores list + * @extends Array + */ +export interface SecureScoresList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Page of a secure score controls list + * @extends Array + */ +export interface SecureScoreControlList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Page of a secure score controls definition list + * @extends Array + */ +export interface SecureScoreControlDefinitionList extends Array { + /** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ResourceStatus. + * Possible values include: 'Healthy', 'NotApplicable', 'OffByPolicy', 'NotHealthy' + * @readonly + * @enum {string} + */ +export type ResourceStatus = 'Healthy' | 'NotApplicable' | 'OffByPolicy' | 'NotHealthy'; + +/** + * Defines values for PricingTier. + * Possible values include: 'Free', 'Standard' + * @readonly + * @enum {string} + */ +export type PricingTier = 'Free' | 'Standard'; + +/** + * Defines values for ReportedSeverity. + * Possible values include: 'Informational', 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type ReportedSeverity = 'Informational' | 'Low' | 'Medium' | 'High'; + +/** + * Defines values for ValueType. + * Possible values include: 'IpCidr', 'String' + * @readonly + * @enum {string} + */ +export type ValueType = 'IpCidr' | 'String'; + +/** + * Defines values for SecuritySolutionStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SecuritySolutionStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for ExportData. + * Possible values include: 'RawEvents' + * @readonly + * @enum {string} + */ +export type ExportData = 'RawEvents'; + +/** + * Defines values for DataSource. + * Possible values include: 'TwinData' + * @readonly + * @enum {string} + */ +export type DataSource = 'TwinData'; + +/** + * Defines values for RecommendationType. + * Possible values include: 'IoT_ACRAuthentication', 'IoT_AgentSendsUnutilizedMessages', + * 'IoT_Baseline', 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + * 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', 'IoT_IPFilter_DenyAll', + * 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', 'IoT_PermissiveFirewallPolicy', + * 'IoT_PermissiveInputFirewallRules', 'IoT_PermissiveOutputFirewallRules', + * 'IoT_PrivilegedDockerOptions', 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + * @readonly + * @enum {string} + */ +export type RecommendationType = 'IoT_ACRAuthentication' | 'IoT_AgentSendsUnutilizedMessages' | 'IoT_Baseline' | 'IoT_EdgeHubMemOptimize' | 'IoT_EdgeLoggingOptions' | 'IoT_InconsistentModuleSettings' | 'IoT_InstallAgent' | 'IoT_IPFilter_DenyAll' | 'IoT_IPFilter_PermissiveRule' | 'IoT_OpenPorts' | 'IoT_PermissiveFirewallPolicy' | 'IoT_PermissiveInputFirewallRules' | 'IoT_PermissiveOutputFirewallRules' | 'IoT_PrivilegedDockerOptions' | 'IoT_SharedCredentials' | 'IoT_VulnerableTLSCipherSuite'; + +/** + * Defines values for RecommendationConfigStatus. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type RecommendationConfigStatus = 'Disabled' | 'Enabled'; + +/** + * Defines values for UnmaskedIpLoggingStatus. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type UnmaskedIpLoggingStatus = 'Disabled' | 'Enabled'; + +/** + * Defines values for AutoProvision. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AutoProvision = 'On' | 'Off'; + +/** + * Defines values for Rank. + * Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical' + * @readonly + * @enum {string} + */ +export type Rank = 'None' | 'Low' | 'Medium' | 'High' | 'Critical'; + +/** + * Defines values for AlertNotifications. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertNotifications = 'On' | 'Off'; + +/** + * Defines values for AlertsToAdmins. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AlertsToAdmins = 'On' | 'Off'; + +/** + * Defines values for State. + * Possible values include: 'Passed', 'Failed', 'Skipped', 'Unsupported' + * @readonly + * @enum {string} + */ +export type State = 'Passed' | 'Failed' | 'Skipped' | 'Unsupported'; + +/** + * Defines values for SubAssessmentStatusCode. + * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + * @readonly + * @enum {string} + */ +export type SubAssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; + +/** + * Defines values for Severity. + * Possible values include: 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type Severity = 'Low' | 'Medium' | 'High'; + +/** + * Defines values for EventSource. + * Possible values include: 'Assessments', 'Alerts' + * @readonly + * @enum {string} + */ +export type EventSource = 'Assessments' | 'Alerts'; + +/** + * Defines values for PropertyType. + * Possible values include: 'String', 'Integer', 'Number', 'Boolean' + * @readonly + * @enum {string} + */ +export type PropertyType = 'String' | 'Integer' | 'Number' | 'Boolean'; + +/** + * Defines values for Operator. + * Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', + * 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + * @readonly + * @enum {string} + */ +export type Operator = 'Equals' | 'GreaterThan' | 'GreaterThanOrEqualTo' | 'LesserThan' | 'LesserThanOrEqualTo' | 'NotEquals' | 'Contains' | 'StartsWith' | 'EndsWith'; + +/** + * Defines values for RuleState. + * Possible values include: 'Enabled', 'Disabled', 'Expired' + * @readonly + * @enum {string} + */ +export type RuleState = 'Enabled' | 'Disabled' | 'Expired'; + +/** + * Defines values for Category. + * Possible values include: 'Compute', 'Networking', 'Data', 'IdentityAndAccess', 'IoT' + * @readonly + * @enum {string} + */ +export type Category = 'Compute' | 'Networking' | 'Data' | 'IdentityAndAccess' | 'IoT'; + +/** + * Defines values for UserImpact. + * Possible values include: 'Low', 'Moderate', 'High' + * @readonly + * @enum {string} + */ +export type UserImpact = 'Low' | 'Moderate' | 'High'; + +/** + * Defines values for ImplementationEffort. + * Possible values include: 'Low', 'Moderate', 'High' + * @readonly + * @enum {string} + */ +export type ImplementationEffort = 'Low' | 'Moderate' | 'High'; + +/** + * Defines values for Threats. + * Possible values include: 'accountBreach', 'dataExfiltration', 'dataSpillage', + * 'maliciousInsider', 'elevationOfPrivilege', 'threatResistance', 'missingCoverage', + * 'denialOfService' + * @readonly + * @enum {string} + */ +export type Threats = 'accountBreach' | 'dataExfiltration' | 'dataSpillage' | 'maliciousInsider' | 'elevationOfPrivilege' | 'threatResistance' | 'missingCoverage' | 'denialOfService'; + +/** + * Defines values for AssessmentType. + * Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' + * @readonly + * @enum {string} + */ +export type AssessmentType = 'BuiltIn' | 'CustomPolicy' | 'CustomerManaged' | 'VerifiedPartner'; + +/** + * Defines values for AssessmentStatusCode. + * Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + * @readonly + * @enum {string} + */ +export type AssessmentStatusCode = 'Healthy' | 'Unhealthy' | 'NotApplicable'; + +/** + * Defines values for Direction. + * Possible values include: 'Inbound', 'Outbound' + * @readonly + * @enum {string} + */ +export type Direction = 'Inbound' | 'Outbound'; + +/** + * Defines values for TransportProtocol. + * Possible values include: 'TCP', 'UDP' + * @readonly + * @enum {string} + */ +export type TransportProtocol = 'TCP' | 'UDP'; + +/** + * Defines values for Protocol. + * Possible values include: 'TCP', 'UDP', 'All' + * @readonly + * @enum {string} + */ +export type Protocol = 'TCP' | 'UDP' | '*'; + +/** + * Defines values for Status. + * Possible values include: 'Revoked', 'Initiated' + * @readonly + * @enum {string} + */ +export type Status = 'Revoked' | 'Initiated'; + +/** + * Defines values for StatusReason. + * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' + * @readonly + * @enum {string} + */ +export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; + +/** + * Defines values for SecurityFamily. + * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + * @readonly + * @enum {string} + */ +export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; + +/** + * Defines values for AadConnectivityState. + * Possible values include: 'Discovered', 'NotLicensed', 'Connected' + * @readonly + * @enum {string} + */ +export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; + +/** + * Defines values for ExternalSecuritySolutionKind. + * Possible values include: 'CEF', 'ATA', 'AAD' + * @readonly + * @enum {string} + */ +export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; + +/** + * Defines values for ControlType. + * Possible values include: 'BuiltIn', 'Custom' + * @readonly + * @enum {string} + */ +export type ControlType = 'BuiltIn' | 'Custom'; + +/** + * Defines values for ExpandEnum. + * Possible values include: 'links', 'metadata' + * @readonly + * @enum {string} + */ +export type ExpandEnum = 'links' | 'metadata'; + +/** + * Defines values for ConnectionType. + * Possible values include: 'Internal', 'External' + * @readonly + * @enum {string} + */ +export type ConnectionType = 'Internal' | 'External'; + +/** + * Defines values for ExpandControlsEnum. + * Possible values include: 'definition' + * @readonly + * @enum {string} + */ +export type ExpandControlsEnum = 'definition'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Failed' | 'Canceled' | 'Provisioning' | 'Deprovisioning'; + +/** + * Defines values for Exe. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Exe = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Msi. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Msi = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Script. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Script = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Executable. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type Executable = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for Issue. + * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', + * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + * 'RulesViolatedManually' + * @readonly + * @enum {string} + */ +export type Issue = 'ViolationsAudited' | 'ViolationsBlocked' | 'MsiAndScriptViolationsAudited' | 'MsiAndScriptViolationsBlocked' | 'ExecutableViolationsAudited' | 'RulesViolatedManually'; + +/** + * Defines values for ConfigurationStatus. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for RecommendationAction. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type RecommendationAction = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for EnforcementSupport. + * Possible values include: 'Supported', 'NotSupported', 'Unknown' + * @readonly + * @enum {string} + */ +export type EnforcementSupport = 'Supported' | 'NotSupported' | 'Unknown'; + +/** + * Defines values for RecommendationAction1. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type RecommendationAction1 = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for Action. + * Possible values include: 'Recommended', 'Add', 'Remove' + * @readonly + * @enum {string} + */ +export type Action = 'Recommended' | 'Add' | 'Remove'; + +/** + * Defines values for Type. + * Possible values include: 'File', 'FileHash', 'PublisherSignature', 'ProductSignature', + * 'BinarySignature', 'VersionAndAboveSignature' + * @readonly + * @enum {string} + */ +export type Type = 'File' | 'FileHash' | 'PublisherSignature' | 'ProductSignature' | 'BinarySignature' | 'VersionAndAboveSignature'; + +/** + * Defines values for FileType. + * Possible values include: 'Exe', 'Dll', 'Msi', 'Script', 'Executable', 'Unknown' + * @readonly + * @enum {string} + */ +export type FileType = 'Exe' | 'Dll' | 'Msi' | 'Script' | 'Executable' | 'Unknown'; + +/** + * Defines values for ConfigurationStatus1. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus1 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for EnforcementMode. + * Possible values include: 'Audit', 'Enforce', 'None' + * @readonly + * @enum {string} + */ +export type EnforcementMode = 'Audit' | 'Enforce' | 'None'; + +/** + * Defines values for ConfigurationStatus2. + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + * @readonly + * @enum {string} + */ +export type ConfigurationStatus2 = 'Configured' | 'NotConfigured' | 'InProgress' | 'Failed' | 'NoStatus'; + +/** + * Defines values for RecommendationStatus. + * Possible values include: 'Recommended', 'NotRecommended', 'NotAvailable', 'NoStatus' + * @readonly + * @enum {string} + */ +export type RecommendationStatus = 'Recommended' | 'NotRecommended' | 'NotAvailable' | 'NoStatus'; + +/** + * Defines values for SourceSystem. + * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', + * 'NonAzure_AuditD', 'None' + * @readonly + * @enum {string} + */ +export type SourceSystem = 'Azure_AppLocker' | 'Azure_AuditD' | 'NonAzure_AppLocker' | 'NonAzure_AuditD' | 'None'; + +/** + * Defines values for SettingName. + * Possible values include: 'MCAS', 'WDATP' + * @readonly + * @enum {string} + */ +export type SettingName = 'MCAS' | 'WDATP'; + +/** + * Defines values for SettingName1. + * Possible values include: 'MCAS', 'WDATP' + * @readonly + * @enum {string} + */ +export type SettingName1 = 'MCAS' | 'WDATP'; + +/** + * Defines values for TaskUpdateActionType. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for TaskUpdateActionType1. + * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' + * @readonly + * @enum {string} + */ +export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + +/** + * Defines values for InformationProtectionPolicyName. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName = 'effective' | 'custom'; + +/** + * Defines values for InformationProtectionPolicyName1. + * Possible values include: 'effective', 'custom' + * @readonly + * @enum {string} + */ +export type InformationProtectionPolicyName1 = 'effective' | 'custom'; + +/** + * Contains response data for the list operation. + */ +export type ComplianceResultsListResponse = ComplianceResultList & { + /** + * 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: ComplianceResultList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ComplianceResultsGetResponse = ComplianceResult & { + /** + * 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: ComplianceResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ComplianceResultsListNextResponse = ComplianceResultList & { + /** + * 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: ComplianceResultList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PricingsListResponse = PricingList & { + /** + * 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: PricingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PricingsGetResponse = Pricing & { + /** + * 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: Pricing; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PricingsUpdateResponse = Pricing & { + /** + * 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: Pricing; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AlertsListResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type AlertsListByResourceGroupResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listSubscriptionLevelAlertsByRegion operation. + */ +export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listResourceGroupLevelAlertsByRegion operation. + */ +export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the getSubscriptionLevelAlert operation. + */ +export type AlertsGetSubscriptionLevelAlertResponse = Alert & { + /** + * 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: Alert; + }; +}; + +/** + * Contains response data for the getResourceGroupLevelAlerts operation. + */ +export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { + /** + * 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: Alert; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AlertsListNextResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type AlertsListByResourceGroupNextResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listSubscriptionLevelAlertsByRegionNext operation. + */ +export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listResourceGroupLevelAlertsByRegionNext operation. + */ +export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SettingsListResponse = SettingsList & { + /** + * 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: SettingsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SettingsGetResponse = SettingUnion & { + /** + * 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: SettingUnion; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SettingsUpdateResponse = SettingUnion & { + /** + * 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: SettingUnion; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SettingsListNextResponse = SettingsList & { + /** + * 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: SettingsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { + /** + * 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: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { + /** + * 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: AdvancedThreatProtectionSetting; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DeviceSecurityGroupsListResponse = DeviceSecurityGroupList & { + /** + * 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: DeviceSecurityGroupList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DeviceSecurityGroupsGetResponse = DeviceSecurityGroup & { + /** + * 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: DeviceSecurityGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DeviceSecurityGroupsCreateOrUpdateResponse = DeviceSecurityGroup & { + /** + * 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: DeviceSecurityGroup; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DeviceSecurityGroupsListNextResponse = DeviceSecurityGroupList & { + /** + * 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: DeviceSecurityGroupList; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type IotSecuritySolutionListBySubscriptionResponse = IoTSecuritySolutionsList & { + /** + * 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: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type IotSecuritySolutionListByResourceGroupResponse = IoTSecuritySolutionsList & { + /** + * 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: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionGetResponse = IoTSecuritySolutionModel & { + /** + * 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: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type IotSecuritySolutionCreateOrUpdateResponse = IoTSecuritySolutionModel & { + /** + * 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: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type IotSecuritySolutionUpdateResponse = IoTSecuritySolutionModel & { + /** + * 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: IoTSecuritySolutionModel; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type IotSecuritySolutionListBySubscriptionNextResponse = IoTSecuritySolutionsList & { + /** + * 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: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type IotSecuritySolutionListByResourceGroupNextResponse = IoTSecuritySolutionsList & { + /** + * 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: IoTSecuritySolutionsList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IotSecuritySolutionAnalyticsListResponse = IoTSecuritySolutionAnalyticsModelList & { + /** + * 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: IoTSecuritySolutionAnalyticsModelList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionAnalyticsGetResponse = IoTSecuritySolutionAnalyticsModel & { + /** + * 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: IoTSecuritySolutionAnalyticsModel; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IotSecuritySolutionsAnalyticsAggregatedAlertListResponse = IoTSecurityAggregatedAlertList & { + /** + * 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: IoTSecurityAggregatedAlertList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurityAggregatedAlert & { + /** + * 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: IoTSecurityAggregatedAlert; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type IotSecuritySolutionsAnalyticsAggregatedAlertListNextResponse = IoTSecurityAggregatedAlertList & { + /** + * 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: IoTSecurityAggregatedAlertList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type IotSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurityAggregatedRecommendation & { + /** + * 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: IoTSecurityAggregatedRecommendation; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IotSecuritySolutionsAnalyticsRecommendationListResponse = IoTSecurityAggregatedRecommendationList & { + /** + * 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: IoTSecurityAggregatedRecommendationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type IotSecuritySolutionsAnalyticsRecommendationListNextResponse = IoTSecurityAggregatedRecommendationList & { + /** + * 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: IoTSecurityAggregatedRecommendationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LocationsListResponse = AscLocationList & { + /** + * 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: AscLocationList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LocationsGetResponse = AscLocation & { + /** + * 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: AscLocation; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type LocationsListNextResponse = AscLocationList & { + /** + * 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: AscLocationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * 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: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * 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: OperationList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TasksListResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByHomeRegion operation. + */ +export type TasksListByHomeRegionResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the getSubscriptionLevelTask operation. + */ +export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { + /** + * 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: SecurityTask; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type TasksListByResourceGroupResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the getResourceGroupLevelTask operation. + */ +export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { + /** + * 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: SecurityTask; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TasksListNextResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByHomeRegionNext operation. + */ +export type TasksListByHomeRegionNextResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type TasksListByResourceGroupNextResponse = SecurityTaskList & { + /** + * 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: SecurityTaskList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { + /** + * 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: AutoProvisioningSettingList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { + /** + * 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: AutoProvisioningSetting; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { + /** + * 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: AutoProvisioningSetting; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { + /** + * 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: AutoProvisioningSettingList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type CompliancesListResponse = ComplianceList & { + /** + * 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: ComplianceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CompliancesGetResponse = Compliance & { + /** + * 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: Compliance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type CompliancesListNextResponse = ComplianceList & { + /** + * 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: ComplianceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { + /** + * 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: InformationProtectionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { + /** + * 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: InformationProtectionPolicy; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { + /** + * 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: InformationProtectionPolicyList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { + /** + * 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: InformationProtectionPolicyList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SecurityContactsListResponse = SecurityContactList & { + /** + * 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: SecurityContactList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SecurityContactsGetResponse = SecurityContact & { + /** + * 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: SecurityContact; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type SecurityContactsCreateResponse = SecurityContact & { + /** + * 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: SecurityContact; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SecurityContactsUpdateResponse = SecurityContact & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for TaskUpdateActionType1. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} - */ -export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContact; + }; +}; /** - * Defines values for AlertUpdateActionType. - * Possible values include: 'Dismiss', 'Reactivate' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type AlertUpdateActionType = 'Dismiss' | 'Reactivate'; +export type SecurityContactsListNextResponse = SecurityContactList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for AlertUpdateActionType1. - * Possible values include: 'Dismiss', 'Reactivate' - * @readonly - * @enum {string} - */ -export type AlertUpdateActionType1 = 'Dismiss' | 'Reactivate'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SecurityContactList; + }; +}; /** * Contains response data for the list operation. */ -export type PricingsListResponse = PricingList & { +export type WorkspaceSettingsListResponse = WorkspaceSettingList & { /** * The underlying HTTP response. */ @@ -2106,17 +6531,18 @@ export type PricingsListResponse = PricingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: PricingList; + parsedBody: WorkspaceSettingList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type PricingsListByResourceGroupResponse = PricingList & { +export type WorkspaceSettingsGetResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -2125,17 +6551,18 @@ export type PricingsListByResourceGroupResponse = PricingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: PricingList; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the getSubscriptionPricing operation. + * Contains response data for the create operation. */ -export type PricingsGetSubscriptionPricingResponse = Pricing & { +export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -2144,17 +6571,18 @@ export type PricingsGetSubscriptionPricingResponse = Pricing & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the updateSubscriptionPricing operation. + * Contains response data for the update operation. */ -export type PricingsUpdateSubscriptionPricingResponse = Pricing & { +export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -2163,17 +6591,18 @@ export type PricingsUpdateSubscriptionPricingResponse = Pricing & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the getResourceGroupPricing operation. + * Contains response data for the listNext operation. */ -export type PricingsGetResourceGroupPricingResponse = Pricing & { +export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { /** * The underlying HTTP response. */ @@ -2182,17 +6611,18 @@ export type PricingsGetResourceGroupPricingResponse = Pricing & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: WorkspaceSettingList; }; }; /** - * Contains response data for the createOrUpdateResourceGroupPricing operation. + * Contains response data for the list operation. */ -export type PricingsCreateOrUpdateResourceGroupPricingResponse = Pricing & { +export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -2201,17 +6631,18 @@ export type PricingsCreateOrUpdateResourceGroupPricingResponse = Pricing & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Pricing; + parsedBody: RegulatoryComplianceStandardList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type PricingsListNextResponse = PricingList & { +export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStandard & { /** * The underlying HTTP response. */ @@ -2220,17 +6651,18 @@ export type PricingsListNextResponse = PricingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: PricingList; + parsedBody: RegulatoryComplianceStandard; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listNext operation. */ -export type PricingsListByResourceGroupNextResponse = PricingList & { +export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -2239,17 +6671,18 @@ export type PricingsListByResourceGroupNextResponse = PricingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: PricingList; + parsedBody: RegulatoryComplianceStandardList; }; }; /** * Contains response data for the list operation. */ -export type SecurityContactsListResponse = SecurityContactList & { +export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -2258,17 +6691,18 @@ export type SecurityContactsListResponse = SecurityContactList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContactList; + parsedBody: RegulatoryComplianceControlList; }; }; /** * Contains response data for the get operation. */ -export type SecurityContactsGetResponse = SecurityContact & { +export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceControl & { /** * The underlying HTTP response. */ @@ -2277,17 +6711,18 @@ export type SecurityContactsGetResponse = SecurityContact & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: RegulatoryComplianceControl; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type SecurityContactsCreateResponse = SecurityContact & { +export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -2296,17 +6731,18 @@ export type SecurityContactsCreateResponse = SecurityContact & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: RegulatoryComplianceControlList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the list operation. */ -export type SecurityContactsUpdateResponse = SecurityContact & { +export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -2315,17 +6751,18 @@ export type SecurityContactsUpdateResponse = SecurityContact & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContact; + parsedBody: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type SecurityContactsListNextResponse = SecurityContactList & { +export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAssessment & { /** * The underlying HTTP response. */ @@ -2334,17 +6771,18 @@ export type SecurityContactsListNextResponse = SecurityContactList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityContactList; + parsedBody: RegulatoryComplianceAssessment; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type WorkspaceSettingsListResponse = WorkspaceSettingList & { +export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -2353,17 +6791,18 @@ export type WorkspaceSettingsListResponse = WorkspaceSettingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSettingList; + parsedBody: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByExtendedResource operation. */ -export type WorkspaceSettingsGetResponse = WorkspaceSetting & { +export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = ServerVulnerabilityAssessmentsList & { /** * The underlying HTTP response. */ @@ -2372,17 +6811,18 @@ export type WorkspaceSettingsGetResponse = WorkspaceSetting & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: ServerVulnerabilityAssessmentsList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the get operation. */ -export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { +export type ServerVulnerabilityAssessmentGetResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -2391,17 +6831,18 @@ export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: ServerVulnerabilityAssessment; }; }; /** - * Contains response data for the update operation. + * Contains response data for the createOrUpdate operation. */ -export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { +export type ServerVulnerabilityAssessmentCreateOrUpdateResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -2410,17 +6851,18 @@ export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSetting; + parsedBody: ServerVulnerabilityAssessment; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listAll operation. */ -export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { +export type SubAssessmentsListAllResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -2429,17 +6871,18 @@ export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceSettingList; + parsedBody: SecuritySubAssessmentList; }; }; /** * Contains response data for the list operation. */ -export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { +export type SubAssessmentsListResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -2448,17 +6891,18 @@ export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSettingList; + parsedBody: SecuritySubAssessmentList; }; }; /** * Contains response data for the get operation. */ -export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { +export type SubAssessmentsGetResponse = SecuritySubAssessment & { /** * The underlying HTTP response. */ @@ -2467,17 +6911,18 @@ export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSetting; + parsedBody: SecuritySubAssessment; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listAllNext operation. */ -export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { +export type SubAssessmentsListAllNextResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -2486,17 +6931,18 @@ export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSetting; + parsedBody: SecuritySubAssessmentList; }; }; /** * Contains response data for the listNext operation. */ -export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { +export type SubAssessmentsListNextResponse = SecuritySubAssessmentList & { /** * The underlying HTTP response. */ @@ -2505,17 +6951,18 @@ export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingLi * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AutoProvisioningSettingList; + parsedBody: SecuritySubAssessmentList; }; }; /** * Contains response data for the list operation. */ -export type CompliancesListResponse = ComplianceList & { +export type AutomationsListResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -2524,17 +6971,38 @@ export type CompliancesListResponse = ComplianceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceList; + parsedBody: AutomationList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type AutomationsListByResourceGroupResponse = AutomationList & { + /** + * 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: AutomationList; }; }; /** * Contains response data for the get operation. */ -export type CompliancesGetResponse = Compliance & { +export type AutomationsGetResponse = Automation & { /** * The underlying HTTP response. */ @@ -2543,17 +7011,18 @@ export type CompliancesGetResponse = Compliance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Compliance; + parsedBody: Automation; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type CompliancesListNextResponse = ComplianceList & { +export type AutomationsCreateOrUpdateResponse = Automation & { /** * The underlying HTTP response. */ @@ -2562,17 +7031,18 @@ export type CompliancesListNextResponse = ComplianceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceList; + parsedBody: Automation; }; }; /** - * Contains response data for the get operation. + * Contains response data for the validate operation. */ -export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { +export type AutomationsValidateResponse = AutomationValidationStatus & { /** * The underlying HTTP response. */ @@ -2581,17 +7051,18 @@ export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSettin * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AdvancedThreatProtectionSetting; + parsedBody: AutomationValidationStatus; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { +export type AutomationsListNextResponse = AutomationList & { /** * The underlying HTTP response. */ @@ -2600,17 +7071,38 @@ export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSet * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AdvancedThreatProtectionSetting; + parsedBody: AutomationList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type AutomationsListByResourceGroupNextResponse = AutomationList & { + /** + * 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: AutomationList; }; }; /** * Contains response data for the list operation. */ -export type SettingsListResponse = SettingsList & { +export type AlertsSuppressionRulesListResponse = AlertsSuppressionRulesList & { /** * The underlying HTTP response. */ @@ -2619,17 +7111,18 @@ export type SettingsListResponse = SettingsList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SettingsList; + parsedBody: AlertsSuppressionRulesList; }; }; /** * Contains response data for the get operation. */ -export type SettingsGetResponse = SettingUnion & { +export type AlertsSuppressionRulesGetResponse = AlertsSuppressionRule & { /** * The underlying HTTP response. */ @@ -2638,17 +7131,18 @@ export type SettingsGetResponse = SettingUnion & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: AlertsSuppressionRule; }; }; /** * Contains response data for the update operation. */ -export type SettingsUpdateResponse = SettingUnion & { +export type AlertsSuppressionRulesUpdateResponse = AlertsSuppressionRule & { /** * The underlying HTTP response. */ @@ -2657,17 +7151,18 @@ export type SettingsUpdateResponse = SettingUnion & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: AlertsSuppressionRule; }; }; /** * Contains response data for the listNext operation. */ -export type SettingsListNextResponse = SettingsList & { +export type AlertsSuppressionRulesListNextResponse = AlertsSuppressionRulesList & { /** * The underlying HTTP response. */ @@ -2676,17 +7171,18 @@ export type SettingsListNextResponse = SettingsList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SettingsList; + parsedBody: AlertsSuppressionRulesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { +export type AssessmentsMetadataListResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -2695,17 +7191,18 @@ export type InformationProtectionPoliciesGetResponse = InformationProtectionPoli * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicy; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { +export type AssessmentsMetadataGetResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -2714,17 +7211,18 @@ export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationPro * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicy; + parsedBody: SecurityAssessmentMetadata; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscription operation. */ -export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { +export type AssessmentsMetadataListBySubscriptionResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -2733,17 +7231,18 @@ export type InformationProtectionPoliciesListResponse = InformationProtectionPol * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicyList; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getInSubscription operation. */ -export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { +export type AssessmentsMetadataGetInSubscriptionResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -2752,17 +7251,18 @@ export type InformationProtectionPoliciesListNextResponse = InformationProtectio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InformationProtectionPolicyList; + parsedBody: SecurityAssessmentMetadata; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createInSubscription operation. */ -export type OperationsListResponse = OperationList & { +export type AssessmentsMetadataCreateInSubscriptionResponse = SecurityAssessmentMetadata & { /** * The underlying HTTP response. */ @@ -2771,17 +7271,18 @@ export type OperationsListResponse = OperationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: SecurityAssessmentMetadata; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationList & { +export type AssessmentsMetadataListNextResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -2790,17 +7291,18 @@ export type OperationsListNextResponse = OperationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationList; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type LocationsListResponse = AscLocationList & { +export type AssessmentsMetadataListBySubscriptionNextResponse = SecurityAssessmentMetadataList & { /** * The underlying HTTP response. */ @@ -2809,17 +7311,18 @@ export type LocationsListResponse = AscLocationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AscLocationList; + parsedBody: SecurityAssessmentMetadataList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type LocationsGetResponse = AscLocation & { +export type AssessmentsListResponse = SecurityAssessmentList & { /** * The underlying HTTP response. */ @@ -2828,17 +7331,18 @@ export type LocationsGetResponse = AscLocation & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AscLocation; + parsedBody: SecurityAssessmentList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type LocationsListNextResponse = AscLocationList & { +export type AssessmentsGetResponse = SecurityAssessment & { /** * The underlying HTTP response. */ @@ -2847,17 +7351,18 @@ export type LocationsListNextResponse = AscLocationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AscLocationList; + parsedBody: SecurityAssessment; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type TasksListResponse = SecurityTaskList & { +export type AssessmentsCreateOrUpdateResponse = SecurityAssessment & { /** * The underlying HTTP response. */ @@ -2866,17 +7371,18 @@ export type TasksListResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: SecurityAssessment; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the listNext operation. */ -export type TasksListByHomeRegionResponse = SecurityTaskList & { +export type AssessmentsListNextResponse = SecurityAssessmentList & { /** * The underlying HTTP response. */ @@ -2885,17 +7391,18 @@ export type TasksListByHomeRegionResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: SecurityAssessmentList; }; }; /** - * Contains response data for the getSubscriptionLevelTask operation. + * Contains response data for the list operation. */ -export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { +export type AdaptiveApplicationControlsListResponse = AppWhitelistingGroups & { /** * The underlying HTTP response. */ @@ -2904,17 +7411,18 @@ export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTask; + parsedBody: AppWhitelistingGroups; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type TasksListByResourceGroupResponse = SecurityTaskList & { +export type AdaptiveApplicationControlsGetResponse = AppWhitelistingGroup & { /** * The underlying HTTP response. */ @@ -2923,17 +7431,18 @@ export type TasksListByResourceGroupResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AppWhitelistingGroup; }; }; /** - * Contains response data for the getResourceGroupLevelTask operation. + * Contains response data for the put operation. */ -export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { +export type AdaptiveApplicationControlsPutResponse = AppWhitelistingGroup & { /** * The underlying HTTP response. */ @@ -2942,17 +7451,18 @@ export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTask; + parsedBody: AppWhitelistingGroup; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByExtendedResource operation. */ -export type TasksListNextResponse = SecurityTaskList & { +export type AdaptiveNetworkHardeningsListByExtendedResourceResponse = AdaptiveNetworkHardeningsList & { /** * The underlying HTTP response. */ @@ -2961,17 +7471,18 @@ export type TasksListNextResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AdaptiveNetworkHardeningsList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the get operation. */ -export type TasksListByHomeRegionNextResponse = SecurityTaskList & { +export type AdaptiveNetworkHardeningsGetResponse = AdaptiveNetworkHardening & { /** * The underlying HTTP response. */ @@ -2980,17 +7491,18 @@ export type TasksListByHomeRegionNextResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AdaptiveNetworkHardening; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listByExtendedResourceNext operation. */ -export type TasksListByResourceGroupNextResponse = SecurityTaskList & { +export type AdaptiveNetworkHardeningsListByExtendedResourceNextResponse = AdaptiveNetworkHardeningsList & { /** * The underlying HTTP response. */ @@ -2999,17 +7511,18 @@ export type TasksListByResourceGroupNextResponse = SecurityTaskList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SecurityTaskList; + parsedBody: AdaptiveNetworkHardeningsList; }; }; /** * Contains response data for the list operation. */ -export type AlertsListResponse = AlertList & { +export type AllowedConnectionsListResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -3018,17 +7531,18 @@ export type AlertsListResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByHomeRegion operation. */ -export type AlertsListByResourceGroupResponse = AlertList & { +export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -3037,17 +7551,18 @@ export type AlertsListByResourceGroupResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegion operation. + * Contains response data for the get operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { +export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { /** * The underlying HTTP response. */ @@ -3056,17 +7571,18 @@ export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: AllowedConnectionsResource; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegion operation. + * Contains response data for the listNext operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { +export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -3075,17 +7591,18 @@ export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the getSubscriptionLevelAlert operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type AlertsGetSubscriptionLevelAlertResponse = Alert & { +export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -3094,17 +7611,18 @@ export type AlertsGetSubscriptionLevelAlertResponse = Alert & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Alert; + parsedBody: AllowedConnectionsList; }; }; /** - * Contains response data for the getResourceGroupLevelAlerts operation. + * Contains response data for the list operation. */ -export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { +export type TopologyListResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3113,17 +7631,18 @@ export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Alert; + parsedBody: TopologyList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegion operation. */ -export type AlertsListNextResponse = AlertList & { +export type TopologyListByHomeRegionResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3132,17 +7651,18 @@ export type AlertsListNextResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: TopologyList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the get operation. */ -export type AlertsListByResourceGroupNextResponse = AlertList & { +export type TopologyGetResponse = TopologyResource & { /** * The underlying HTTP response. */ @@ -3151,17 +7671,18 @@ export type AlertsListByResourceGroupNextResponse = AlertList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: TopologyResource; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegionNext operation. + * Contains response data for the listNext operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & { +export type TopologyListNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3170,17 +7691,18 @@ export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: TopologyList; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegionNext operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & { +export type TopologyListByHomeRegionNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3189,17 +7711,18 @@ export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AlertList; + parsedBody: TopologyList; }; }; /** * Contains response data for the list operation. */ -export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { +export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3208,17 +7731,18 @@ export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolution * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the listByRegion operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { +export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3227,17 +7751,18 @@ export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroup operation. */ -export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { +export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3246,17 +7771,18 @@ export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolution; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroupAndRegion operation. */ -export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3265,17 +7791,18 @@ export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the get operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { +export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -3284,17 +7811,18 @@ export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = Discovered * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DiscoveredSecuritySolutionList; + parsedBody: JitNetworkAccessPolicy; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { +export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -3303,17 +7831,18 @@ export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: JitNetworkAccessPolicy; }; }; /** - * Contains response data for the listByRegion operation. + * Contains response data for the initiate operation. */ -export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { +export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { /** * The underlying HTTP response. */ @@ -3322,17 +7851,18 @@ export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPolic * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: JitNetworkAccessRequest; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listNext operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { +export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3341,6 +7871,7 @@ export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAcce * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3349,9 +7880,9 @@ export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAcce }; /** - * Contains response data for the listByResourceGroupAndRegion operation. + * Contains response data for the listByRegionNext operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { +export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3360,6 +7891,7 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3368,9 +7900,9 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNe }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { +export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3379,17 +7911,18 @@ export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPolicy; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByResourceGroupAndRegionNext operation. */ -export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -3398,17 +7931,18 @@ export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPol * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPolicy; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the initiate operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { +export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -3417,17 +7951,18 @@ export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessRequest; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegion operation. */ -export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { +export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -3436,17 +7971,18 @@ export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesL * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the listByRegionNext operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { +export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { /** * The underlying HTTP response. */ @@ -3455,17 +7991,18 @@ export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessP * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: DiscoveredSecuritySolution; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listNext operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { +export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -3474,17 +8011,18 @@ export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetwork * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the listByResourceGroupAndRegionNext operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { +export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -3493,10 +8031,11 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = J * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: DiscoveredSecuritySolutionList; }; }; @@ -3512,6 +8051,7 @@ export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3531,6 +8071,7 @@ export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecurity * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3550,6 +8091,7 @@ export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3569,6 +8111,7 @@ export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolution * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3588,6 +8131,7 @@ export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3598,7 +8142,7 @@ export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecu /** * Contains response data for the list operation. */ -export type TopologyListResponse = TopologyList & { +export type SecureScoresListResponse = SecureScoresList & { /** * The underlying HTTP response. */ @@ -3607,17 +8151,18 @@ export type TopologyListResponse = TopologyList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: SecureScoresList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the get operation. */ -export type TopologyListByHomeRegionResponse = TopologyList & { +export type SecureScoresGetResponse = SecureScoreItem & { /** * The underlying HTTP response. */ @@ -3626,17 +8171,18 @@ export type TopologyListByHomeRegionResponse = TopologyList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: SecureScoreItem; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type TopologyGetResponse = TopologyResource & { +export type SecureScoresListNextResponse = SecureScoresList & { /** * The underlying HTTP response. */ @@ -3645,17 +8191,18 @@ export type TopologyGetResponse = TopologyResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TopologyResource; + parsedBody: SecureScoresList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySecureScore operation. */ -export type TopologyListNextResponse = TopologyList & { +export type SecureScoreControlsListBySecureScoreResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -3664,17 +8211,18 @@ export type TopologyListNextResponse = TopologyList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the list operation. */ -export type TopologyListByHomeRegionNextResponse = TopologyList & { +export type SecureScoreControlsListResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -3683,17 +8231,18 @@ export type TopologyListByHomeRegionNextResponse = TopologyList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TopologyList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySecureScoreNext operation. */ -export type AllowedConnectionsListResponse = AllowedConnectionsList & { +export type SecureScoreControlsListBySecureScoreNextResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -3702,17 +8251,18 @@ export type AllowedConnectionsListResponse = AllowedConnectionsList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the listNext operation. */ -export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { +export type SecureScoreControlsListNextResponse = SecureScoreControlList & { /** * The underlying HTTP response. */ @@ -3721,17 +8271,18 @@ export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: SecureScoreControlList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { +export type SecureScoreControlDefinitionsListResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -3740,17 +8291,38 @@ export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsResource; + parsedBody: SecureScoreControlDefinitionList; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type SecureScoreControlDefinitionsListBySubscriptionResponse = SecureScoreControlDefinitionList & { + /** + * 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: SecureScoreControlDefinitionList; }; }; /** * Contains response data for the listNext operation. */ -export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { +export type SecureScoreControlDefinitionsListNextResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -3759,17 +8331,18 @@ export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: SecureScoreControlDefinitionList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { +export type SecureScoreControlDefinitionsListBySubscriptionNextResponse = SecureScoreControlDefinitionList & { /** * The underlying HTTP response. */ @@ -3778,9 +8351,10 @@ export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsL * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsList; + parsedBody: SecureScoreControlDefinitionList; }; }; diff --git a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts index 427b115cf9f7..817150abe35f 100644 --- a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts +++ b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - InformationProtectionPolicy, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, - SensitivityLabel, - InformationType, - InformationProtectionKeyword, CloudError, - InformationProtectionPolicyList, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationProtectionPolicyList, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts new file mode 100644 index 000000000000..fed19cfb3888 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionAnalyticsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelList, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts new file mode 100644 index 000000000000..82c7cc05a088 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + discriminators, + CloudError, + IoTSecuritySolutionModel, + IoTSecuritySolutionsList, + RecommendationConfigurationProperties, + TagsResource, + UpdateIotSecuritySolutionData, + UserDefinedResourcesProperties +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts new file mode 100644 index 000000000000..abdd83a924b0 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + discriminators, + CloudError, + IoTSecurityAggregatedAlert, + IoTSecurityAggregatedAlertList, + IoTSecurityAggregatedAlertPropertiesTopDevicesListItem +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts new file mode 100644 index 000000000000..d0e756980cf6 --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionsAnalyticsRecommendationMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + discriminators, + CloudError, + IoTSecurityAggregatedRecommendation, + IoTSecurityAggregatedRecommendationList +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts b/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts index c7f8d5b68006..81a91877bca5 100644 --- a/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts +++ b/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts @@ -1,25 +1,22 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, + CloudError, JitNetworkAccessPoliciesList, JitNetworkAccessPolicy, + JitNetworkAccessPolicyInitiatePort, + JitNetworkAccessPolicyInitiateRequest, + JitNetworkAccessPolicyInitiateVirtualMachine, JitNetworkAccessPolicyVirtualMachine, JitNetworkAccessPortRule, JitNetworkAccessRequest, - JitNetworkAccessRequestVirtualMachine, JitNetworkAccessRequestPort, - CloudError, - JitNetworkAccessPolicyInitiateRequest, - JitNetworkAccessPolicyInitiateVirtualMachine, - JitNetworkAccessPolicyInitiatePort + JitNetworkAccessRequestVirtualMachine } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/locationsMappers.ts b/sdk/security/arm-security/src/models/locationsMappers.ts index a9e459ba15e8..7b7a015fa4a4 100644 --- a/sdk/security/arm-security/src/models/locationsMappers.ts +++ b/sdk/security/arm-security/src/models/locationsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - AscLocationList, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, AscLocation, - Resource, + AscLocationList, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/mappers.ts b/sdk/security/arm-security/src/models/mappers.ts index b54822ca337d..3ef1960d14bf 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.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. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -45,14 +43,16 @@ export const Resource: msRest.CompositeMapper = { } }; -export const Kind: msRest.CompositeMapper = { - serializedName: "Kind", +export const ComplianceResult: msRest.CompositeMapper = { + serializedName: "ComplianceResult", type: { name: "Composite", - className: "Kind", + className: "ComplianceResult", modelProperties: { - kind: { - serializedName: "kind", + ...Resource.type.modelProperties, + resourceStatus: { + readOnly: true, + serializedName: "properties.resourceStatus", type: { name: "String" } @@ -61,97 +61,93 @@ export const Kind: msRest.CompositeMapper = { } }; -export const SecurityContact: msRest.CompositeMapper = { - serializedName: "SecurityContact", +export const AscLocation: msRest.CompositeMapper = { + serializedName: "AscLocation", type: { name: "Composite", - className: "SecurityContact", + className: "AscLocation", modelProperties: { ...Resource.type.modelProperties, - email: { - required: true, - serializedName: "properties.email", + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - phone: { - serializedName: "properties.phone", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - alertNotifications: { - required: true, - serializedName: "properties.alertNotifications", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } }, - alertsToAdmins: { - required: true, - serializedName: "properties.alertsToAdmins", + location: { + readOnly: true, + serializedName: "location", type: { name: "String" } - } - } - } -}; - -export const Pricing: msRest.CompositeMapper = { - serializedName: "Pricing", - type: { - name: "Composite", - className: "Pricing", - modelProperties: { - ...Resource.type.modelProperties, - pricingTier: { - required: true, - serializedName: "properties.pricingTier", + }, + kind: { + serializedName: "kind", type: { name: "String" } - } - } - } -}; - -export const WorkspaceSetting: msRest.CompositeMapper = { - serializedName: "WorkspaceSetting", - type: { - name: "Composite", - className: "WorkspaceSetting", - modelProperties: { - ...Resource.type.modelProperties, - workspaceId: { - required: true, - serializedName: "properties.workspaceId", + }, + etag: { + serializedName: "etag", type: { name: "String" } }, - scope: { - required: true, - serializedName: "properties.scope", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const AutoProvisioningSetting: msRest.CompositeMapper = { - serializedName: "AutoProvisioningSetting", +export const Location: msRest.CompositeMapper = { + serializedName: "Location", type: { name: "Composite", - className: "AutoProvisioningSetting", + className: "Location", modelProperties: { - ...Resource.type.modelProperties, - autoProvision: { - required: true, - serializedName: "properties.autoProvision", + location: { + readOnly: true, + serializedName: "location", type: { name: "String" } @@ -160,524 +156,4341 @@ export const AutoProvisioningSetting: msRest.CompositeMapper = { } }; -export const ComplianceSegment: msRest.CompositeMapper = { - serializedName: "ComplianceSegment", +export const Kind: msRest.CompositeMapper = { + serializedName: "Kind", type: { name: "Composite", - className: "ComplianceSegment", + className: "Kind", modelProperties: { - segmentType: { - readOnly: true, - serializedName: "segmentType", + kind: { + serializedName: "kind", type: { name: "String" } - }, - percentage: { - readOnly: true, - serializedName: "percentage", - type: { - name: "Number" - } } } } }; -export const Compliance: msRest.CompositeMapper = { - serializedName: "Compliance", +export const ETag: msRest.CompositeMapper = { + serializedName: "ETag", type: { name: "Composite", - className: "Compliance", + className: "ETag", modelProperties: { - ...Resource.type.modelProperties, - assessmentTimestampUtcDate: { - readOnly: true, - serializedName: "properties.assessmentTimestampUtcDate", - type: { - name: "DateTime" - } - }, - resourceCount: { - readOnly: true, - serializedName: "properties.resourceCount", - type: { - name: "Number" - } - }, - assessmentResult: { - readOnly: true, - serializedName: "properties.assessmentResult", + etag: { + serializedName: "etag", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ComplianceSegment" - } - } + name: "String" } } } } }; -export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { - serializedName: "AdvancedThreatProtectionSetting", +export const Tags: msRest.CompositeMapper = { + serializedName: "Tags", type: { name: "Composite", - className: "AdvancedThreatProtectionSetting", + className: "Tags", modelProperties: { - ...Resource.type.modelProperties, - isEnabled: { - serializedName: "properties.isEnabled", + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const Setting: msRest.CompositeMapper = { - serializedName: "Setting", +export const Pricing: msRest.CompositeMapper = { + serializedName: "Pricing", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Setting", - className: "Setting", + className: "Pricing", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + ...Resource.type.modelProperties, + pricingTier: { + required: true, + serializedName: "properties.pricingTier", type: { name: "String" } }, - type: { + freeTrialRemainingTime: { readOnly: true, - serializedName: "type", + serializedName: "properties.freeTrialRemainingTime", type: { - name: "String" - } - }, - kind: { - required: true, - serializedName: "kind", - type: { - name: "String" + name: "TimeSpan" } } } } }; -export const DataExportSetting: msRest.CompositeMapper = { - serializedName: "DataExportSetting", +export const PricingList: msRest.CompositeMapper = { + serializedName: "PricingList", type: { name: "Composite", - polymorphicDiscriminator: Setting.type.polymorphicDiscriminator, - uberParent: "Setting", - className: "DataExportSetting", + className: "PricingList", modelProperties: { - ...Setting.type.modelProperties, - enabled: { + value: { required: true, - serializedName: "properties.enabled", + serializedName: "value", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Pricing" + } + } } } } } }; -export const SettingKind1: msRest.CompositeMapper = { - serializedName: "SettingKind", +export const AlertEntity: msRest.CompositeMapper = { + serializedName: "AlertEntity", type: { name: "Composite", - className: "SettingKind1", + className: "AlertEntity", modelProperties: { - kind: { - serializedName: "kind", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } } + }, + additionalProperties: { + type: { + name: "Object" + } } } }; -export const SensitivityLabel: msRest.CompositeMapper = { - serializedName: "SensitivityLabel", +export const AlertConfidenceReason: msRest.CompositeMapper = { + serializedName: "AlertConfidenceReason", type: { name: "Composite", - className: "SensitivityLabel", + className: "AlertConfidenceReason", modelProperties: { - displayName: { - serializedName: "displayName", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } }, - order: { - serializedName: "order", - type: { - name: "Number" - } - }, - enabled: { - serializedName: "enabled", + reason: { + readOnly: true, + serializedName: "reason", type: { - name: "Boolean" + name: "String" } } } } }; -export const InformationProtectionKeyword: msRest.CompositeMapper = { - serializedName: "InformationProtectionKeyword", +export const Alert: msRest.CompositeMapper = { + serializedName: "Alert", type: { name: "Composite", - className: "InformationProtectionKeyword", + className: "Alert", modelProperties: { - pattern: { - serializedName: "pattern", + ...Resource.type.modelProperties, + state: { + readOnly: true, + serializedName: "properties.state", type: { name: "String" } }, - custom: { - serializedName: "custom", + reportedTimeUtc: { + readOnly: true, + serializedName: "properties.reportedTimeUtc", type: { - name: "Boolean" + name: "DateTime" } }, - canBeNumeric: { - serializedName: "canBeNumeric", + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", type: { - name: "Boolean" + name: "String" } }, - excluded: { - serializedName: "excluded", + alertName: { + readOnly: true, + serializedName: "properties.alertName", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const InformationType: msRest.CompositeMapper = { - serializedName: "InformationType", - type: { - name: "Composite", - className: "InformationType", - modelProperties: { - displayName: { - serializedName: "displayName", + }, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", type: { name: "String" } }, - order: { - serializedName: "order", + detectedTimeUtc: { + readOnly: true, + serializedName: "properties.detectedTimeUtc", type: { - name: "Number" + name: "DateTime" } }, - recommendedLabelId: { - serializedName: "recommendedLabelId", + description: { + readOnly: true, + serializedName: "properties.description", type: { - name: "Uuid" + name: "String" } }, - enabled: { - serializedName: "enabled", + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", type: { - name: "Boolean" + name: "String" } }, - custom: { - serializedName: "custom", + actionTaken: { + readOnly: true, + serializedName: "properties.actionTaken", type: { - name: "Boolean" + name: "String" } }, - keywords: { - serializedName: "keywords", + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InformationProtectionKeyword" - } - } + name: "String" } - } - } - } -}; - -export const InformationProtectionPolicy: msRest.CompositeMapper = { - serializedName: "InformationProtectionPolicy", - type: { - name: "Composite", - className: "InformationProtectionPolicy", - modelProperties: { - ...Resource.type.modelProperties, - lastModifiedUtc: { + }, + compromisedEntity: { readOnly: true, - serializedName: "properties.lastModifiedUtc", + serializedName: "properties.compromisedEntity", type: { - name: "DateTime" + name: "String" } }, - labels: { - serializedName: "properties.labels", + associatedResource: { + readOnly: true, + serializedName: "properties.associatedResource", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "SensitivityLabel" - } - } + name: "String" } }, - informationTypes: { - serializedName: "properties.informationTypes", + extendedProperties: { + serializedName: "properties.extendedProperties", type: { name: "Dictionary", value: { type: { - name: "Composite", - className: "InformationType" + name: "Object" } } } - } - } - } -}; - -export const Location: msRest.CompositeMapper = { - serializedName: "Location", - type: { - name: "Composite", - className: "Location", - modelProperties: { - location: { + }, + systemSource: { readOnly: true, - serializedName: "location", + serializedName: "properties.systemSource", type: { name: "String" } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { + }, + canBeInvestigated: { readOnly: true, - serializedName: "provider", + serializedName: "properties.canBeInvestigated", type: { - name: "String" + name: "Boolean" } }, - resource: { + isIncident: { readOnly: true, - serializedName: "resource", + serializedName: "properties.isIncident", type: { - name: "String" + name: "Boolean" } }, - operation: { + entities: { + serializedName: "properties.entities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertEntity", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + } + }, + confidenceScore: { readOnly: true, - serializedName: "operation", + serializedName: "properties.confidenceScore", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - description: { + confidenceReasons: { + serializedName: "properties.confidenceReasons", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertConfidenceReason" + } + } + } + }, + subscriptionId: { readOnly: true, - serializedName: "description", + serializedName: "properties.subscriptionId", type: { name: "String" } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { + }, + instanceId: { readOnly: true, - serializedName: "name", + serializedName: "properties.instanceId", type: { name: "String" } }, - origin: { + workspaceArmId: { readOnly: true, - serializedName: "origin", + serializedName: "properties.workspaceArmId", type: { name: "String" } }, - display: { - serializedName: "display", + correlationKey: { + readOnly: true, + serializedName: "properties.correlationKey", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const SecurityTaskParameters: msRest.CompositeMapper = { - serializedName: "SecurityTaskParameters", +export const SettingResource: msRest.CompositeMapper = { + serializedName: "SettingResource", type: { name: "Composite", - className: "SecurityTaskParameters", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "BaseResource", + className: "SettingResource", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + ...Resource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", type: { name: "String" } } - }, - additionalProperties: { - type: { - name: "Object" - } } } }; -export const SecurityTask: msRest.CompositeMapper = { - serializedName: "SecurityTask", +export const Setting: msRest.CompositeMapper = { + serializedName: "Setting", + type: { + name: "Composite", + className: "Setting", + modelProperties: { + ...SettingResource.type.modelProperties + } + } +}; + +export const DataExportSettings: msRest.CompositeMapper = { + serializedName: "DataExportSettings", + type: { + name: "Composite", + className: "DataExportSettings", + modelProperties: { + ...Setting.type.modelProperties, + enabled: { + required: true, + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { + serializedName: "AdvancedThreatProtectionSetting", + type: { + name: "Composite", + className: "AdvancedThreatProtectionSetting", + modelProperties: { + ...Resource.type.modelProperties, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CustomAlertRule: msRest.CompositeMapper = { + serializedName: "CustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "ruleType", + clientName: "ruleType" + }, + uberParent: "CustomAlertRule", + className: "CustomAlertRule", + modelProperties: { + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + ruleType: { + required: true, + serializedName: "ruleType", + type: { + name: "String" + } + } + } + } +}; + +export const ThresholdCustomAlertRule: msRest.CompositeMapper = { + serializedName: "ThresholdCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ThresholdCustomAlertRule", + modelProperties: { + ...CustomAlertRule.type.modelProperties, + minThreshold: { + required: true, + serializedName: "minThreshold", + type: { + name: "Number" + } + }, + maxThreshold: { + required: true, + serializedName: "maxThreshold", + type: { + name: "Number" + } + } + } + } +}; + +export const TimeWindowCustomAlertRule: msRest.CompositeMapper = { + serializedName: "TimeWindowCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "TimeWindowCustomAlertRule", + modelProperties: { + ...ThresholdCustomAlertRule.type.modelProperties, + timeWindowSize: { + required: true, + serializedName: "timeWindowSize", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const ListCustomAlertRule: msRest.CompositeMapper = { + serializedName: "ListCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ListCustomAlertRule", + modelProperties: { + ...CustomAlertRule.type.modelProperties, + valueType: { + readOnly: true, + serializedName: "valueType", + type: { + name: "String" + } + } + } + } +}; + +export const AllowlistCustomAlertRule: msRest.CompositeMapper = { + serializedName: "AllowlistCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "AllowlistCustomAlertRule", + modelProperties: { + ...ListCustomAlertRule.type.modelProperties, + allowlistValues: { + required: true, + serializedName: "allowlistValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DenylistCustomAlertRule: msRest.CompositeMapper = { + serializedName: "DenylistCustomAlertRule", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "DenylistCustomAlertRule", + modelProperties: { + ...ListCustomAlertRule.type.modelProperties, + denylistValues: { + required: true, + serializedName: "denylistValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeviceSecurityGroup: msRest.CompositeMapper = { + serializedName: "DeviceSecurityGroup", + type: { + name: "Composite", + className: "DeviceSecurityGroup", + modelProperties: { + ...Resource.type.modelProperties, + thresholdRules: { + serializedName: "properties.thresholdRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ThresholdCustomAlertRule" + } + } + } + }, + timeWindowRules: { + serializedName: "properties.timeWindowRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimeWindowCustomAlertRule" + } + } + } + }, + allowlistRules: { + serializedName: "properties.allowlistRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AllowlistCustomAlertRule" + } + } + } + }, + denylistRules: { + serializedName: "properties.denylistRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DenylistCustomAlertRule" + } + } + } + } + } + } +}; + +export const ConnectionToIpNotAllowed: msRest.CompositeMapper = { + serializedName: "ConnectionToIpNotAllowed", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ConnectionToIpNotAllowed", + modelProperties: { + ...AllowlistCustomAlertRule.type.modelProperties + } + } +}; + +export const LocalUserNotAllowed: msRest.CompositeMapper = { + serializedName: "LocalUserNotAllowed", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "LocalUserNotAllowed", + modelProperties: { + ...AllowlistCustomAlertRule.type.modelProperties + } + } +}; + +export const ProcessNotAllowed: msRest.CompositeMapper = { + serializedName: "ProcessNotAllowed", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ProcessNotAllowed", + modelProperties: { + ...AllowlistCustomAlertRule.type.modelProperties + } + } +}; + +export const ActiveConnectionsNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "ActiveConnectionsNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "ActiveConnectionsNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const AmqpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "AmqpC2DMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "AmqpC2DMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const MqttC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "MqttC2DMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "MqttC2DMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const HttpC2DMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "HttpC2DMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "HttpC2DMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const AmqpC2DRejectedMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "AmqpC2DRejectedMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "AmqpC2DRejectedMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const MqttC2DRejectedMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "MqttC2DRejectedMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "MqttC2DRejectedMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const HttpC2DRejectedMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "HttpC2DRejectedMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "HttpC2DRejectedMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const AmqpD2CMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "AmqpD2CMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "AmqpD2CMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const MqttD2CMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "MqttD2CMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "MqttD2CMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const HttpD2CMessagesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "HttpD2CMessagesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "HttpD2CMessagesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const DirectMethodInvokesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "DirectMethodInvokesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "DirectMethodInvokesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const FailedLocalLoginsNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "FailedLocalLoginsNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "FailedLocalLoginsNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const FileUploadsNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "FileUploadsNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "FileUploadsNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const QueuePurgesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "QueuePurgesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "QueuePurgesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const TwinUpdatesNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "TwinUpdatesNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "TwinUpdatesNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const UnauthorizedOperationsNotInAllowedRange: msRest.CompositeMapper = { + serializedName: "UnauthorizedOperationsNotInAllowedRange", + type: { + name: "Composite", + polymorphicDiscriminator: CustomAlertRule.type.polymorphicDiscriminator, + uberParent: "CustomAlertRule", + className: "UnauthorizedOperationsNotInAllowedRange", + modelProperties: { + ...TimeWindowCustomAlertRule.type.modelProperties + } + } +}; + +export const TagsResource: msRest.CompositeMapper = { + serializedName: "TagsResource", + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const UserDefinedResourcesProperties: msRest.CompositeMapper = { + serializedName: "UserDefinedResourcesProperties", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties", + modelProperties: { + query: { + required: true, + nullable: true, + serializedName: "query", + type: { + name: "String" + } + }, + querySubscriptions: { + required: true, + nullable: true, + serializedName: "querySubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RecommendationConfigurationProperties: msRest.CompositeMapper = { + serializedName: "RecommendationConfigurationProperties", + type: { + name: "Composite", + className: "RecommendationConfigurationProperties", + modelProperties: { + recommendationType: { + required: true, + serializedName: "recommendationType", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + required: true, + serializedName: "status", + defaultValue: 'Enabled', + type: { + name: "String" + } + } + } + } +}; + +export const IoTSecuritySolutionModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionModel", + type: { + name: "Composite", + className: "IoTSecuritySolutionModel", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + workspace: { + required: true, + serializedName: "properties.workspace", + type: { + name: "String" + } + }, + displayName: { + required: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + exportProperty: { + serializedName: "properties.export", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disabledDataSources: { + serializedName: "properties.disabledDataSources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + iotHubs: { + required: true, + serializedName: "properties.iotHubs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + userDefinedResources: { + serializedName: "properties.userDefinedResources", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties" + } + }, + autoDiscoveredResources: { + readOnly: true, + serializedName: "properties.autoDiscoveredResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + recommendationsConfiguration: { + serializedName: "properties.recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } + } + }, + unmaskedIpLoggingStatus: { + serializedName: "properties.unmaskedIpLoggingStatus", + defaultValue: 'Disabled', + type: { + name: "String" + } + } + } + } +}; + +export const UpdateIotSecuritySolutionData: msRest.CompositeMapper = { + serializedName: "UpdateIotSecuritySolutionData", + type: { + name: "Composite", + className: "UpdateIotSecuritySolutionData", + modelProperties: { + ...TagsResource.type.modelProperties, + userDefinedResources: { + serializedName: "properties.userDefinedResources", + type: { + name: "Composite", + className: "UserDefinedResourcesProperties" + } + }, + recommendationsConfiguration: { + serializedName: "properties.recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } + } + } + } + } +}; + +export const IoTSeverityMetrics: msRest.CompositeMapper = { + serializedName: "IoTSeverityMetrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics", + modelProperties: { + high: { + serializedName: "high", + type: { + name: "Number" + } + }, + medium: { + serializedName: "medium", + type: { + name: "Number" + } + }, + low: { + serializedName: "low", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModelProperties_devicesMetricsItem", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTime" + } + }, + devicesMetrics: { + serializedName: "devicesMetrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics" + } + } + } + } +}; + +export const IoTSecurityAlertedDevice: msRest.CompositeMapper = { + serializedName: "IoTSecurityAlertedDevice", + type: { + name: "Composite", + className: "IoTSecurityAlertedDevice", + modelProperties: { + deviceId: { + readOnly: true, + serializedName: "deviceId", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecurityDeviceAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceAlert", + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert", + modelProperties: { + alertDisplayName: { + readOnly: true, + serializedName: "alertDisplayName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "reportedSeverity", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecurityDeviceRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceRecommendation", + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendation", + modelProperties: { + recommendationDisplayName: { + readOnly: true, + serializedName: "recommendationDisplayName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "reportedSeverity", + type: { + name: "String" + } + }, + devicesCount: { + readOnly: true, + serializedName: "devicesCount", + type: { + name: "Number" + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModel", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModel", + modelProperties: { + ...Resource.type.modelProperties, + metrics: { + readOnly: true, + serializedName: "properties.metrics", + type: { + name: "Composite", + className: "IoTSeverityMetrics" + } + }, + unhealthyDeviceCount: { + readOnly: true, + serializedName: "properties.unhealthyDeviceCount", + type: { + name: "Number" + } + }, + devicesMetrics: { + readOnly: true, + serializedName: "properties.devicesMetrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem" + } + } + } + }, + topAlertedDevices: { + serializedName: "properties.topAlertedDevices", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAlertedDevice" + } + } + } + }, + mostPrevalentDeviceAlerts: { + serializedName: "properties.mostPrevalentDeviceAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert" + } + } + } + }, + mostPrevalentDeviceRecommendations: { + serializedName: "properties.mostPrevalentDeviceRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendation" + } + } + } + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModelList: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModelList", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModelList", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IoTSecurityAggregatedAlertPropertiesTopDevicesListItem: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlertProperties_topDevicesListItem", + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem", + modelProperties: { + deviceId: { + readOnly: true, + serializedName: "deviceId", + type: { + name: "String" + } + }, + alertsCount: { + readOnly: true, + serializedName: "alertsCount", + type: { + name: "Number" + } + }, + lastOccurrence: { + readOnly: true, + serializedName: "lastOccurrence", + type: { + name: "String" + } + } + } + } +}; + +export const IoTSecurityAggregatedAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlert", + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlert", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + alertType: { + readOnly: true, + serializedName: "properties.alertType", + type: { + name: "String" + } + }, + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", + type: { + name: "String" + } + }, + aggregatedDateUtc: { + readOnly: true, + serializedName: "properties.aggregatedDateUtc", + type: { + name: "Date" + } + }, + vendorName: { + readOnly: true, + serializedName: "properties.vendorName", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + count: { + readOnly: true, + serializedName: "properties.count", + type: { + name: "Number" + } + }, + effectedResourceType: { + readOnly: true, + serializedName: "properties.effectedResourceType", + type: { + name: "String" + } + }, + systemSource: { + readOnly: true, + serializedName: "properties.systemSource", + type: { + name: "String" + } + }, + actionTaken: { + readOnly: true, + serializedName: "properties.actionTaken", + type: { + name: "String" + } + }, + logAnalyticsQuery: { + readOnly: true, + serializedName: "properties.logAnalyticsQuery", + type: { + name: "String" + } + }, + topDevicesList: { + readOnly: true, + serializedName: "properties.topDevicesList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlertPropertiesTopDevicesListItem" + } + } + } + } + } + } +}; + +export const IoTSecurityAggregatedRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedRecommendation", + type: { + name: "Composite", + className: "IoTSecurityAggregatedRecommendation", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + recommendationName: { + serializedName: "properties.recommendationName", + type: { + name: "String" + } + }, + recommendationDisplayName: { + readOnly: true, + serializedName: "properties.recommendationDisplayName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + recommendationTypeId: { + readOnly: true, + serializedName: "properties.recommendationTypeId", + type: { + name: "String" + } + }, + detectedBy: { + readOnly: true, + serializedName: "properties.detectedBy", + type: { + name: "String" + } + }, + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", + type: { + name: "String" + } + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", + type: { + name: "String" + } + }, + healthyDevices: { + readOnly: true, + serializedName: "properties.healthyDevices", + type: { + name: "Number" + } + }, + unhealthyDeviceCount: { + readOnly: true, + serializedName: "properties.unhealthyDeviceCount", + type: { + name: "Number" + } + }, + logAnalyticsQuery: { + readOnly: true, + serializedName: "properties.logAnalyticsQuery", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const SecurityTaskParameters: msRest.CompositeMapper = { + serializedName: "SecurityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SecurityTask: msRest.CompositeMapper = { + serializedName: "SecurityTask", type: { name: "Composite", className: "SecurityTask", modelProperties: { ...Resource.type.modelProperties, - state: { + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + creationTimeUtc: { + readOnly: true, + serializedName: "properties.creationTimeUtc", + type: { + name: "DateTime" + } + }, + securityTaskParameters: { + serializedName: "properties.securityTaskParameters", + type: { + name: "Composite", + className: "SecurityTaskParameters", + additionalProperties: { + type: { + name: "Object" + } + } + } + }, + lastStateChangeTimeUtc: { + readOnly: true, + serializedName: "properties.lastStateChangeTimeUtc", + type: { + name: "DateTime" + } + }, + subState: { + readOnly: true, + serializedName: "properties.subState", + type: { + name: "String" + } + } + } + } +}; + +export const AutoProvisioningSetting: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSetting", + type: { + name: "Composite", + className: "AutoProvisioningSetting", + modelProperties: { + ...Resource.type.modelProperties, + autoProvision: { + required: true, + serializedName: "properties.autoProvision", + type: { + name: "String" + } + } + } + } +}; + +export const ComplianceSegment: msRest.CompositeMapper = { + serializedName: "ComplianceSegment", + type: { + name: "Composite", + className: "ComplianceSegment", + modelProperties: { + segmentType: { + readOnly: true, + serializedName: "segmentType", + type: { + name: "String" + } + }, + percentage: { + readOnly: true, + serializedName: "percentage", + type: { + name: "Number" + } + } + } + } +}; + +export const Compliance: msRest.CompositeMapper = { + serializedName: "Compliance", + type: { + name: "Composite", + className: "Compliance", + modelProperties: { + ...Resource.type.modelProperties, + assessmentTimestampUtcDate: { + readOnly: true, + serializedName: "properties.assessmentTimestampUtcDate", + type: { + name: "DateTime" + } + }, + resourceCount: { + readOnly: true, + serializedName: "properties.resourceCount", + type: { + name: "Number" + } + }, + assessmentResult: { + readOnly: true, + serializedName: "properties.assessmentResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComplianceSegment" + } + } + } + } + } + } +}; + +export const SensitivityLabel: msRest.CompositeMapper = { + serializedName: "SensitivityLabel", + type: { + name: "Composite", + className: "SensitivityLabel", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + rank: { + serializedName: "rank", + type: { + name: "Enum", + allowedValues: [ + "None", + "Low", + "Medium", + "High", + "Critical" + ] + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationProtectionKeyword: msRest.CompositeMapper = { + serializedName: "InformationProtectionKeyword", + type: { + name: "Composite", + className: "InformationProtectionKeyword", + modelProperties: { + pattern: { + serializedName: "pattern", + type: { + name: "String" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + canBeNumeric: { + serializedName: "canBeNumeric", + type: { + name: "Boolean" + } + }, + excluded: { + serializedName: "excluded", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InformationType: msRest.CompositeMapper = { + serializedName: "InformationType", + type: { + name: "Composite", + className: "InformationType", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "Number" + } + }, + recommendedLabelId: { + serializedName: "recommendedLabelId", + type: { + name: "Uuid" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Boolean" + } + }, + keywords: { + serializedName: "keywords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InformationProtectionKeyword" + } + } + } + } + } + } +}; + +export const InformationProtectionPolicy: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicy", + type: { + name: "Composite", + className: "InformationProtectionPolicy", + modelProperties: { + ...Resource.type.modelProperties, + lastModifiedUtc: { + readOnly: true, + serializedName: "properties.lastModifiedUtc", + type: { + name: "DateTime" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + labels: { + serializedName: "properties.labels", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "SensitivityLabel" + } + } + } + }, + informationTypes: { + serializedName: "properties.informationTypes", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "InformationType" + } + } + } + } + } + } +}; + +export const SecurityContact: msRest.CompositeMapper = { + serializedName: "SecurityContact", + type: { + name: "Composite", + className: "SecurityContact", + modelProperties: { + ...Resource.type.modelProperties, + email: { + required: true, + serializedName: "properties.email", + type: { + name: "String" + } + }, + phone: { + serializedName: "properties.phone", + type: { + name: "String" + } + }, + alertNotifications: { + required: true, + serializedName: "properties.alertNotifications", + type: { + name: "String" + } + }, + alertsToAdmins: { + required: true, + serializedName: "properties.alertsToAdmins", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceSetting: msRest.CompositeMapper = { + serializedName: "WorkspaceSetting", + type: { + name: "Composite", + className: "WorkspaceSetting", + modelProperties: { + ...Resource.type.modelProperties, + workspaceId: { + required: true, + serializedName: "properties.workspaceId", + type: { + name: "String" + } + }, + scope: { + required: true, + serializedName: "properties.scope", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceStandard: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandard", + type: { + name: "Composite", + className: "RegulatoryComplianceStandard", + modelProperties: { + ...Resource.type.modelProperties, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedControls: { + readOnly: true, + serializedName: "properties.passedControls", + type: { + name: "Number" + } + }, + failedControls: { + readOnly: true, + serializedName: "properties.failedControls", + type: { + name: "Number" + } + }, + skippedControls: { + readOnly: true, + serializedName: "properties.skippedControls", + type: { + name: "Number" + } + }, + unsupportedControls: { + readOnly: true, + serializedName: "properties.unsupportedControls", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceControl: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControl", + type: { + name: "Composite", + className: "RegulatoryComplianceControl", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedAssessments: { + readOnly: true, + serializedName: "properties.passedAssessments", + type: { + name: "Number" + } + }, + failedAssessments: { + readOnly: true, + serializedName: "properties.failedAssessments", + type: { + name: "Number" + } + }, + skippedAssessments: { + readOnly: true, + serializedName: "properties.skippedAssessments", + type: { + name: "Number" + } + } + } + } +}; + +export const RegulatoryComplianceAssessment: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessment", + type: { + name: "Composite", + className: "RegulatoryComplianceAssessment", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + assessmentType: { + readOnly: true, + serializedName: "properties.assessmentType", + type: { + name: "String" + } + }, + assessmentDetailsLink: { + readOnly: true, + serializedName: "properties.assessmentDetailsLink", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + passedResources: { + readOnly: true, + serializedName: "properties.passedResources", + type: { + name: "Number" + } + }, + failedResources: { + readOnly: true, + serializedName: "properties.failedResources", + type: { + name: "Number" + } + }, + skippedResources: { + readOnly: true, + serializedName: "properties.skippedResources", + type: { + name: "Number" + } + }, + unsupportedResources: { + readOnly: true, + serializedName: "properties.unsupportedResources", + type: { + name: "Number" + } + } + } + } +}; + +export const ServerVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityAssessmentsList: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessmentsList", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessmentsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment" + } + } + } + } + } + } +}; + +export const SubAssessmentStatus: msRest.CompositeMapper = { + serializedName: "SubAssessmentStatus", + type: { + name: "Composite", + className: "SubAssessmentStatus", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + cause: { + readOnly: true, + serializedName: "cause", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "severity", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceDetails: msRest.CompositeMapper = { + serializedName: "ResourceDetails", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "source", + clientName: "source" + }, + uberParent: "ResourceDetails", + className: "ResourceDetails", + modelProperties: { + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + } + } + } +}; + +export const AdditionalData: msRest.CompositeMapper = { + serializedName: "AdditionalData", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "assessedResourceType", + clientName: "assessedResourceType" + }, + uberParent: "AdditionalData", + className: "AdditionalData", + modelProperties: { + assessedResourceType: { + required: true, + serializedName: "assessedResourceType", + type: { + name: "String" + } + } + } + } +}; + +export const SecuritySubAssessment: msRest.CompositeMapper = { + serializedName: "SecuritySubAssessment", + type: { + name: "Composite", + className: "SecuritySubAssessment", + modelProperties: { + ...Resource.type.modelProperties, + securitySubAssessmentId: { + readOnly: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "SubAssessmentStatus" + } + }, + remediation: { + readOnly: true, + serializedName: "properties.remediation", + type: { + name: "String" + } + }, + impact: { + readOnly: true, + serializedName: "properties.impact", + type: { + name: "String" + } + }, + category: { + readOnly: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + timeGenerated: { + readOnly: true, + serializedName: "properties.timeGenerated", + type: { + name: "DateTime" + } + }, + resourceDetails: { + serializedName: "properties.resourceDetails", + type: { + name: "Composite", + className: "ResourceDetails" + } + }, + additionalData: { + serializedName: "properties.additionalData", + type: { + name: "Composite", + className: "AdditionalData" + } + } + } + } +}; + +export const SqlServerVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "SqlServerVulnerability", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "SqlServerVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + query: { + readOnly: true, + serializedName: "query", + type: { + name: "String" + } + } + } + } +}; + +export const CVSS: msRest.CompositeMapper = { + serializedName: "CVSS", + type: { + name: "Composite", + className: "CVSS", + modelProperties: { + base: { + readOnly: true, + serializedName: "base", + type: { + name: "Number" + } + } + } + } +}; + +export const CVE: msRest.CompositeMapper = { + serializedName: "CVE", + type: { + name: "Composite", + className: "CVE", + modelProperties: { + title: { + readOnly: true, + serializedName: "title", + type: { + name: "String" + } + }, + link: { + readOnly: true, + serializedName: "link", + type: { + name: "String" + } + } + } + } +}; + +export const VendorReference: msRest.CompositeMapper = { + serializedName: "VendorReference", + type: { + name: "Composite", + className: "VendorReference", + modelProperties: { + title: { + readOnly: true, + serializedName: "title", + type: { + name: "String" + } + }, + link: { + readOnly: true, + serializedName: "link", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "ContainerRegistryVulnerability", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "ContainerRegistryVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + cvss: { + readOnly: true, + serializedName: "cvss", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CVSS" + } + } + } + }, + patchable: { + readOnly: true, + serializedName: "patchable", + type: { + name: "Boolean" + } + }, + cve: { + readOnly: true, + serializedName: "cve", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CVE" + } + } + } + }, + publishedTime: { + readOnly: true, + serializedName: "publishedTime", + type: { + name: "DateTime" + } + }, + vendorReferences: { + readOnly: true, + serializedName: "vendorReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VendorReference" + } + } + } + }, + repositoryName: { + readOnly: true, + serializedName: "repositoryName", + type: { + name: "String" + } + }, + imageDigest: { + readOnly: true, + serializedName: "imageDigest", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityProperties: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", + type: { + name: "Composite", + polymorphicDiscriminator: AdditionalData.type.polymorphicDiscriminator, + uberParent: "AdditionalData", + className: "ServerVulnerabilityProperties", + modelProperties: { + ...AdditionalData.type.modelProperties, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + cvss: { + readOnly: true, + serializedName: "cvss", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CVSS" + } + } + } + }, + patchable: { + readOnly: true, + serializedName: "patchable", + type: { + name: "Boolean" + } + }, + cve: { + readOnly: true, + serializedName: "cve", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CVE" + } + } + } + }, + threat: { + readOnly: true, + serializedName: "threat", + type: { + name: "String" + } + }, + publishedTime: { + readOnly: true, + serializedName: "publishedTime", + type: { + name: "DateTime" + } + }, + vendorReferences: { + readOnly: true, + serializedName: "vendorReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VendorReference" + } + } + } + } + } + } +}; + +export const OnPremiseResourceDetails: msRest.CompositeMapper = { + serializedName: "OnPremise", + type: { + name: "Composite", + polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, + uberParent: "ResourceDetails", + className: "OnPremiseResourceDetails", + modelProperties: { + ...ResourceDetails.type.modelProperties, + workspaceId: { + required: true, + serializedName: "workspaceId", + type: { + name: "String" + } + }, + vmuuid: { + required: true, + serializedName: "vmuuid", + type: { + name: "String" + } + }, + sourceComputerId: { + required: true, + serializedName: "sourceComputerId", + type: { + name: "String" + } + }, + machineName: { + required: true, + serializedName: "machineName", + type: { + name: "String" + } + } + } + } +}; + +export const AzureResourceDetails: msRest.CompositeMapper = { + serializedName: "Azure", + type: { + name: "Composite", + polymorphicDiscriminator: ResourceDetails.type.polymorphicDiscriminator, + uberParent: "ResourceDetails", + className: "AzureResourceDetails", + modelProperties: { + ...ResourceDetails.type.modelProperties, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationScope: msRest.CompositeMapper = { + serializedName: "AutomationScope", + type: { + name: "Composite", + className: "AutomationScope", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + scopePath: { + serializedName: "scopePath", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationTriggeringRule: msRest.CompositeMapper = { + serializedName: "AutomationTriggeringRule", + type: { + name: "Composite", + className: "AutomationTriggeringRule", + modelProperties: { + propertyJPath: { + serializedName: "propertyJPath", + type: { + name: "String" + } + }, + propertyType: { + serializedName: "propertyType", + type: { + name: "String" + } + }, + expectedValue: { + serializedName: "expectedValue", + type: { + name: "String" + } + }, + operator: { + serializedName: "operator", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationRuleSet: msRest.CompositeMapper = { + serializedName: "AutomationRuleSet", + type: { + name: "Composite", + className: "AutomationRuleSet", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationTriggeringRule" + } + } + } + } + } + } +}; + +export const AutomationSource: msRest.CompositeMapper = { + serializedName: "AutomationSource", + type: { + name: "Composite", + className: "AutomationSource", + modelProperties: { + eventSource: { + serializedName: "eventSource", + type: { + name: "String" + } + }, + ruleSets: { + serializedName: "ruleSets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationRuleSet" + } + } + } + } + } + } +}; + +export const AutomationAction: msRest.CompositeMapper = { + serializedName: "AutomationAction", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "actionType", + clientName: "actionType" + }, + uberParent: "AutomationAction", + className: "AutomationAction", + modelProperties: { + actionType: { + required: true, + serializedName: "actionType", + type: { + name: "String" + } + } + } + } +}; + +export const Automation: msRest.CompositeMapper = { + serializedName: "Automation", + type: { + name: "Composite", + className: "Automation", + modelProperties: { + ...TrackedResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + scopes: { + serializedName: "properties.scopes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationScope" + } + } + } + }, + sources: { + serializedName: "properties.sources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationSource" + } + } + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationAction" + } + } + } + } + } + } +}; + +export const AutomationActionLogicApp: msRest.CompositeMapper = { + serializedName: "LogicApp", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionLogicApp", + modelProperties: { + ...AutomationAction.type.modelProperties, + logicAppResourceId: { + serializedName: "logicAppResourceId", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationActionEventHub: msRest.CompositeMapper = { + serializedName: "EventHub", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionEventHub", + modelProperties: { + ...AutomationAction.type.modelProperties, + eventHubResourceId: { + serializedName: "eventHubResourceId", + type: { + name: "String" + } + }, + sasPolicyName: { + readOnly: true, + serializedName: "sasPolicyName", + type: { + name: "String" + } + }, + connectionString: { + serializedName: "connectionString", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationActionWorkspace: msRest.CompositeMapper = { + serializedName: "Workspace", + type: { + name: "Composite", + polymorphicDiscriminator: AutomationAction.type.polymorphicDiscriminator, + uberParent: "AutomationAction", + className: "AutomationActionWorkspace", + modelProperties: { + ...AutomationAction.type.modelProperties, + workspaceResourceId: { + serializedName: "workspaceResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const AutomationValidationStatus: msRest.CompositeMapper = { + serializedName: "AutomationValidationStatus", + type: { + name: "Composite", + className: "AutomationValidationStatus", + modelProperties: { + isValid: { + serializedName: "isValid", + type: { + name: "Boolean" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeElement: msRest.CompositeMapper = { + serializedName: "ScopeElement", + type: { + name: "Composite", + className: "ScopeElement", + modelProperties: { + field: { + serializedName: "field", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SuppressionAlertsScope: msRest.CompositeMapper = { + serializedName: "SuppressionAlertsScope", + type: { + name: "Composite", + className: "SuppressionAlertsScope", + modelProperties: { + allOf: { + required: true, + serializedName: "allOf", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScopeElement", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + } + } + } + } +}; + +export const AlertsSuppressionRule: msRest.CompositeMapper = { + serializedName: "AlertsSuppressionRule", + type: { + name: "Composite", + className: "AlertsSuppressionRule", + modelProperties: { + ...Resource.type.modelProperties, + alertType: { + required: true, + serializedName: "properties.alertType", + type: { + name: "String" + } + }, + lastModifiedUtc: { + readOnly: true, + serializedName: "properties.lastModifiedUtc", + type: { + name: "DateTime" + } + }, + expirationDateUtc: { + serializedName: "properties.expirationDateUtc", + type: { + name: "DateTime" + } + }, + reason: { + required: true, + serializedName: "properties.reason", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled", + "Expired" + ] + } + }, + comment: { + serializedName: "properties.comment", + type: { + name: "String" + } + }, + suppressionAlertsScope: { + serializedName: "properties.suppressionAlertsScope", + type: { + name: "Composite", + className: "SuppressionAlertsScope" + } + } + } + } +}; + +export const SecurityAssessmentMetadataPartnerData: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadataPartnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData", + modelProperties: { + partnerName: { + required: true, + serializedName: "partnerName", + type: { + name: "String" + } + }, + productName: { + serializedName: "productName", + type: { + name: "String" + } + }, + secret: { + required: true, + serializedName: "secret", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityAssessmentMetadataProperties: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadataProperties", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataProperties", + modelProperties: { + displayName: { + required: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + policyDefinitionId: { + readOnly: true, + serializedName: "policyDefinitionId", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + remediationDescription: { + serializedName: "remediationDescription", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + severity: { + required: true, + serializedName: "severity", + type: { + name: "String" + } + }, + userImpact: { + serializedName: "userImpact", + type: { + name: "String" + } + }, + implementationEffort: { + serializedName: "implementationEffort", + type: { + name: "String" + } + }, + threats: { + serializedName: "threats", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + preview: { + serializedName: "preview", + type: { + name: "Boolean" + } + }, + assessmentType: { + required: true, + serializedName: "assessmentType", + type: { + name: "String" + } + }, + partnerData: { + serializedName: "partnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData" + } + } + } + } +}; + +export const SecurityAssessmentMetadata: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadata", + type: { + name: "Composite", + className: "SecurityAssessmentMetadata", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + required: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + policyDefinitionId: { + readOnly: true, + serializedName: "properties.policyDefinitionId", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + remediationDescription: { + serializedName: "properties.remediationDescription", + type: { + name: "String" + } + }, + category: { + serializedName: "properties.category", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + severity: { + required: true, + serializedName: "properties.severity", + type: { + name: "String" + } + }, + userImpact: { + serializedName: "properties.userImpact", + type: { + name: "String" + } + }, + implementationEffort: { + serializedName: "properties.implementationEffort", + type: { + name: "String" + } + }, + threats: { + serializedName: "properties.threats", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + preview: { + serializedName: "properties.preview", + type: { + name: "Boolean" + } + }, + assessmentType: { + required: true, + serializedName: "properties.assessmentType", + type: { + name: "String" + } + }, + partnerData: { + serializedName: "properties.partnerData", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataPartnerData" + } + } + } + } +}; + +export const AssessmentStatus: msRest.CompositeMapper = { + serializedName: "AssessmentStatus", + type: { + name: "Composite", + className: "AssessmentStatus", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + cause: { + serializedName: "cause", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const AssessmentLinks: msRest.CompositeMapper = { + serializedName: "AssessmentLinks", + type: { + name: "Composite", + className: "AssessmentLinks", + modelProperties: { + azurePortalUri: { + readOnly: true, + serializedName: "azurePortalUri", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityAssessmentPartnerData: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentPartnerData", + type: { + name: "Composite", + className: "SecurityAssessmentPartnerData", + modelProperties: { + partnerName: { + required: true, + serializedName: "partnerName", + type: { + name: "String" + } + }, + secret: { + required: true, + serializedName: "secret", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityAssessment: msRest.CompositeMapper = { + serializedName: "SecurityAssessment", + type: { + name: "Composite", + className: "SecurityAssessment", + modelProperties: { + ...Resource.type.modelProperties, + resourceDetails: { + required: true, + serializedName: "properties.resourceDetails", + type: { + name: "Composite", + className: "ResourceDetails" + } + }, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + required: true, + serializedName: "properties.status", + type: { + name: "Composite", + className: "AssessmentStatus" + } + }, + additionalData: { + serializedName: "properties.additionalData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + links: { + serializedName: "properties.links", + type: { + name: "Composite", + className: "AssessmentLinks" + } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "SecurityAssessmentMetadataProperties" + } + }, + partnersData: { + serializedName: "properties.partnersData", + type: { + name: "Composite", + className: "SecurityAssessmentPartnerData" + } + } + } + } +}; + +export const ProtectionMode: msRest.CompositeMapper = { + serializedName: "ProtectionMode", + type: { + name: "Composite", + className: "ProtectionMode", + modelProperties: { + exe: { + serializedName: "exe", + type: { + name: "String" + } + }, + msi: { + serializedName: "msi", + type: { + name: "String" + } + }, + script: { + serializedName: "script", + type: { + name: "String" + } + }, + executable: { + serializedName: "executable", + type: { + name: "String" + } + } + } + } +}; + +export const AppWhitelistingIssueSummary: msRest.CompositeMapper = { + serializedName: "AppWhitelistingIssueSummary", + type: { + name: "Composite", + className: "AppWhitelistingIssueSummary", + modelProperties: { + issue: { + serializedName: "issue", + type: { + name: "String" + } + }, + numberOfVms: { + serializedName: "numberOfVms", + type: { + name: "Number" + } + } + } + } +}; + +export const VmRecommendation: msRest.CompositeMapper = { + serializedName: "VmRecommendation", + type: { + name: "Composite", + className: "VmRecommendation", + modelProperties: { + configurationStatus: { + serializedName: "configurationStatus", + type: { + name: "String" + } + }, + recommendationAction: { + serializedName: "recommendationAction", + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + enforcementSupport: { + serializedName: "enforcementSupport", + type: { + name: "String" + } + } + } + } +}; + +export const PublisherInfo: msRest.CompositeMapper = { + serializedName: "PublisherInfo", + type: { + name: "Composite", + className: "PublisherInfo", + modelProperties: { + publisherName: { + serializedName: "publisherName", + type: { + name: "String" + } + }, + productName: { + serializedName: "productName", + type: { + name: "String" + } + }, + binaryName: { + serializedName: "binaryName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const UserRecommendation: msRest.CompositeMapper = { + serializedName: "UserRecommendation", + type: { + name: "Composite", + className: "UserRecommendation", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + recommendationAction: { + serializedName: "recommendationAction", + type: { + name: "String" + } + } + } + } +}; + +export const PathRecommendation: msRest.CompositeMapper = { + serializedName: "PathRecommendation", + type: { + name: "Composite", + className: "PathRecommendation", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + publisherInfo: { + serializedName: "publisherInfo", + type: { + name: "Composite", + className: "PublisherInfo" + } + }, + common: { + serializedName: "common", + type: { + name: "Boolean" + } + }, + userSids: { + serializedName: "userSids", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + usernames: { + serializedName: "usernames", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserRecommendation" + } + } + } + }, + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + }, + configurationStatus: { + serializedName: "configurationStatus", + type: { + name: "String" + } + } + } + } +}; + +export const AppWhitelistingGroup: msRest.CompositeMapper = { + serializedName: "AppWhitelistingGroup", + type: { + name: "Composite", + className: "AppWhitelistingGroup", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + enforcementMode: { + serializedName: "properties.enforcementMode", + type: { + name: "String" + } + }, + protectionMode: { + serializedName: "properties.protectionMode", + type: { + name: "Composite", + className: "ProtectionMode" + } + }, + configurationStatus: { + readOnly: true, + serializedName: "properties.configurationStatus", + type: { + name: "String" + } + }, + recommendationStatus: { + readOnly: true, + serializedName: "properties.recommendationStatus", + type: { + name: "String" + } + }, + issues: { + readOnly: true, + serializedName: "properties.issues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppWhitelistingIssueSummary" + } + } + } + }, + sourceSystem: { + readOnly: true, + serializedName: "properties.sourceSystem", + type: { + name: "String" + } + }, + vmRecommendations: { + serializedName: "properties.vmRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmRecommendation" + } + } + } + }, + pathRecommendations: { + serializedName: "properties.pathRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PathRecommendation" + } + } + } + } + } + } +}; + +export const AppWhitelistingGroups: msRest.CompositeMapper = { + serializedName: "AppWhitelistingGroups", + type: { + name: "Composite", + className: "AppWhitelistingGroups", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppWhitelistingGroup" + } + } + } + } + } + } +}; + +export const Rule: msRest.CompositeMapper = { + serializedName: "Rule", + type: { + name: "Composite", + className: "Rule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + direction: { + serializedName: "direction", + type: { + name: "String" + } + }, + destinationPort: { + serializedName: "destinationPort", + type: { + name: "Number" + } + }, + protocols: { + serializedName: "protocols", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipAddresses: { + serializedName: "ipAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const EffectiveNetworkSecurityGroups: msRest.CompositeMapper = { + serializedName: "EffectiveNetworkSecurityGroups", + type: { + name: "Composite", + className: "EffectiveNetworkSecurityGroups", + modelProperties: { + networkInterface: { + serializedName: "networkInterface", + type: { + name: "String" + } + }, + networkSecurityGroups: { + serializedName: "networkSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AdaptiveNetworkHardening: msRest.CompositeMapper = { + serializedName: "AdaptiveNetworkHardening", + type: { + name: "Composite", + className: "AdaptiveNetworkHardening", + modelProperties: { + ...Resource.type.modelProperties, + rules: { + serializedName: "properties.rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Rule" + } + } + } + }, + rulesCalculationTime: { + serializedName: "properties.rulesCalculationTime", + type: { + name: "DateTime" + } + }, + effectiveNetworkSecurityGroups: { + serializedName: "properties.effectiveNetworkSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EffectiveNetworkSecurityGroups" + } + } + } + } + } + } +}; + +export const AdaptiveNetworkHardeningEnforceRequest: msRest.CompositeMapper = { + serializedName: "AdaptiveNetworkHardeningEnforceRequest", + type: { + name: "Composite", + className: "AdaptiveNetworkHardeningEnforceRequest", + modelProperties: { + rules: { + required: true, + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Rule" + } + } + } + }, + networkSecurityGroups: { + required: true, + serializedName: "networkSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ConnectedResource: msRest.CompositeMapper = { + serializedName: "ConnectedResource", + type: { + name: "Composite", + className: "ConnectedResource", + modelProperties: { + connectedResourceId: { readOnly: true, - serializedName: "properties.state", + serializedName: "connectedResourceId", type: { name: "String" } }, - creationTimeUtc: { + tcpPorts: { readOnly: true, - serializedName: "properties.creationTimeUtc", + serializedName: "tcpPorts", + type: { + name: "String" + } + }, + udpPorts: { + readOnly: true, + serializedName: "udpPorts", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectableResource: msRest.CompositeMapper = { + serializedName: "ConnectableResource", + type: { + name: "Composite", + className: "ConnectableResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + inboundConnectedResources: { + readOnly: true, + serializedName: "inboundConnectedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedResource" + } + } + } + }, + outboundConnectedResources: { + readOnly: true, + serializedName: "outboundConnectedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedResource" + } + } + } + } + } + } +}; + +export const AllowedConnectionsResource: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsResource", + type: { + name: "Composite", + className: "AllowedConnectionsResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", type: { name: "DateTime" } }, - securityTaskParameters: { - serializedName: "properties.securityTaskParameters", + connectableResources: { + readOnly: true, + serializedName: "properties.connectableResources", type: { - name: "Composite", - className: "SecurityTaskParameters", - additionalProperties: { + name: "Sequence", + element: { type: { - name: "Object" + name: "Composite", + className: "ConnectableResource" } } } + } + } + } +}; + +export const TopologySingleResourceParent: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceParent", + type: { + name: "Composite", + className: "TopologySingleResourceParent", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const TopologySingleResourceChild: msRest.CompositeMapper = { + serializedName: "TopologySingleResourceChild", + type: { + name: "Composite", + className: "TopologySingleResourceChild", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const TopologySingleResource: msRest.CompositeMapper = { + serializedName: "TopologySingleResource", + type: { + name: "Composite", + className: "TopologySingleResource", + modelProperties: { + resourceId: { + readOnly: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "severity", + type: { + name: "String" + } + }, + recommendationsExist: { + readOnly: true, + serializedName: "recommendationsExist", + type: { + name: "Boolean" + } + }, + networkZones: { + readOnly: true, + serializedName: "networkZones", + type: { + name: "String" + } + }, + topologyScore: { + readOnly: true, + serializedName: "topologyScore", + type: { + name: "Number" + } }, - lastStateChangeTimeUtc: { + location: { readOnly: true, - serializedName: "properties.lastStateChangeTimeUtc", + serializedName: "location", type: { - name: "DateTime" + name: "String" } }, - subState: { + parents: { readOnly: true, - serializedName: "properties.subState", + serializedName: "parents", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceParent" + } + } } - } - } - } -}; - -export const AscLocation: msRest.CompositeMapper = { - serializedName: "AscLocation", - type: { - name: "Composite", - className: "AscLocation", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", + }, + children: { + readOnly: true, + serializedName: "children", type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResourceChild" + } + } } } } } }; -export const AlertEntity: msRest.CompositeMapper = { - serializedName: "AlertEntity", +export const TopologyResource: msRest.CompositeMapper = { + serializedName: "TopologyResource", type: { name: "Composite", - className: "AlertEntity", + className: "TopologyResource", modelProperties: { - type: { + id: { readOnly: true, - serializedName: "type", + serializedName: "id", type: { name: "String" } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const AlertConfidenceReason: msRest.CompositeMapper = { - serializedName: "AlertConfidenceReason", - type: { - name: "Composite", - className: "AlertConfidenceReason", - modelProperties: { + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, type: { readOnly: true, serializedName: "type", @@ -685,190 +4498,247 @@ export const AlertConfidenceReason: msRest.CompositeMapper = { name: "String" } }, - reason: { + location: { readOnly: true, - serializedName: "reason", + serializedName: "location", type: { name: "String" } + }, + calculatedDateTime: { + readOnly: true, + serializedName: "properties.calculatedDateTime", + type: { + name: "DateTime" + } + }, + topologyResources: { + readOnly: true, + serializedName: "properties.topologyResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResource" + } + } + } } } } }; -export const Alert: msRest.CompositeMapper = { - serializedName: "Alert", +export const JitNetworkAccessPortRule: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPortRule", type: { name: "Composite", - className: "Alert", + className: "JitNetworkAccessPortRule", modelProperties: { - ...Resource.type.modelProperties, - state: { - readOnly: true, - serializedName: "properties.state", + number: { + required: true, + serializedName: "number", type: { - name: "String" + name: "Number" } }, - reportedTimeUtc: { - readOnly: true, - serializedName: "properties.reportedTimeUtc", + protocol: { + required: true, + serializedName: "protocol", type: { - name: "DateTime" + name: "String" } }, - vendorName: { - readOnly: true, - serializedName: "properties.vendorName", + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { name: "String" } }, - alertName: { - readOnly: true, - serializedName: "properties.alertName", + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - alertDisplayName: { - readOnly: true, - serializedName: "properties.alertDisplayName", + maxRequestAccessDuration: { + required: true, + serializedName: "maxRequestAccessDuration", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", type: { name: "String" } }, - detectedTimeUtc: { - readOnly: true, - serializedName: "properties.detectedTimeUtc", + ports: { + required: true, + serializedName: "ports", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPortRule" + } + } } }, - description: { - readOnly: true, - serializedName: "properties.description", + publicIpAddress: { + serializedName: "publicIpAddress", type: { name: "String" } + } + } + } +}; + +export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestPort", + type: { + name: "Composite", + className: "JitNetworkAccessRequestPort", + modelProperties: { + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } }, - remediationSteps: { - readOnly: true, - serializedName: "properties.remediationSteps", + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { name: "String" } }, - actionTaken: { - readOnly: true, - serializedName: "properties.actionTaken", + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - reportedSeverity: { - readOnly: true, - serializedName: "properties.reportedSeverity", + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", type: { - name: "String" + name: "DateTime" } }, - compromisedEntity: { - readOnly: true, - serializedName: "properties.compromisedEntity", + status: { + required: true, + serializedName: "status", type: { name: "String" } }, - associatedResource: { - readOnly: true, - serializedName: "properties.associatedResource", + statusReason: { + required: true, + serializedName: "statusReason", type: { name: "String" } }, - extendedProperties: { - serializedName: "properties.extendedProperties", + mappedPort: { + serializedName: "mappedPort", type: { - name: "Dictionary", - value: { - type: { - name: "Object" - } - } + name: "Number" } - }, - systemSource: { - readOnly: true, - serializedName: "properties.systemSource", + } + } + } +}; + +export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessRequestVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", type: { name: "String" } }, - canBeInvestigated: { - readOnly: true, - serializedName: "properties.canBeInvestigated", - type: { - name: "Boolean" - } - }, - entities: { - serializedName: "properties.entities", + ports: { + required: true, + serializedName: "ports", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AlertEntity", - additionalProperties: { - type: { - name: "Object" - } - } + className: "JitNetworkAccessRequestPort" } } } - }, - confidenceScore: { - readOnly: true, - serializedName: "properties.confidenceScore", - constraints: { - InclusiveMaximum: 1, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - confidenceReasons: { - serializedName: "properties.confidenceReasons", + } + } + } +}; + +export const JitNetworkAccessRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequest", + type: { + name: "Composite", + className: "JitNetworkAccessRequest", + modelProperties: { + virtualMachines: { + required: true, + serializedName: "virtualMachines", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AlertConfidenceReason" + className: "JitNetworkAccessRequestVirtualMachine" } } } }, - subscriptionId: { - readOnly: true, - serializedName: "properties.subscriptionId", + startTimeUtc: { + required: true, + serializedName: "startTimeUtc", type: { - name: "String" + name: "DateTime" } }, - instanceId: { - readOnly: true, - serializedName: "properties.instanceId", + requestor: { + required: true, + serializedName: "requestor", type: { name: "String" } }, - workspaceArmId: { - readOnly: true, - serializedName: "properties.workspaceArmId", + justification: { + serializedName: "justification", type: { name: "String" } @@ -877,11 +4747,11 @@ export const Alert: msRest.CompositeMapper = { } }; -export const DiscoveredSecuritySolution: msRest.CompositeMapper = { - serializedName: "DiscoveredSecuritySolution", +export const JitNetworkAccessPolicy: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicy", type: { name: "Composite", - className: "DiscoveredSecuritySolution", + className: "JitNetworkAccessPolicy", modelProperties: { id: { readOnly: true, @@ -904,6 +4774,12 @@ export const DiscoveredSecuritySolution: msRest.CompositeMapper = { name: "String" } }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, location: { readOnly: true, serializedName: "location", @@ -911,64 +4787,123 @@ export const DiscoveredSecuritySolution: msRest.CompositeMapper = { name: "String" } }, - securityFamily: { + virtualMachines: { required: true, - serializedName: "properties.securityFamily", + serializedName: "properties.virtualMachines", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyVirtualMachine" + } + } } }, - offer: { - required: true, - serializedName: "properties.offer", + requests: { + serializedName: "properties.requests", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequest" + } + } } }, - publisher: { + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiatePort: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiatePort", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort", + modelProperties: { + number: { required: true, - serializedName: "properties.publisher", + serializedName: "number", + type: { + name: "Number" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", type: { name: "String" } }, - sku: { + endTimeUtc: { required: true, - serializedName: "properties.sku", + serializedName: "endTimeUtc", type: { - name: "String" + name: "DateTime" } } } } }; -export const TopologySingleResourceParent: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceParent", +export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", type: { name: "Composite", - className: "TopologySingleResourceParent", + className: "JitNetworkAccessPolicyInitiateVirtualMachine", modelProperties: { - resourceId: { - readOnly: true, - serializedName: "resourceId", + id: { + required: true, + serializedName: "id", type: { name: "String" } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort" + } + } + } } } } }; -export const TopologySingleResourceChild: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceChild", +export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateRequest", type: { name: "Composite", - className: "TopologySingleResourceChild", + className: "JitNetworkAccessPolicyInitiateRequest", modelProperties: { - resourceId: { - readOnly: true, - serializedName: "resourceId", + virtualMachines: { + required: true, + serializedName: "virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine" + } + } + } + }, + justification: { + serializedName: "justification", type: { name: "String" } @@ -977,89 +4912,82 @@ export const TopologySingleResourceChild: msRest.CompositeMapper = { } }; -export const TopologySingleResource: msRest.CompositeMapper = { - serializedName: "TopologySingleResource", +export const DiscoveredSecuritySolution: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolution", type: { name: "Composite", - className: "TopologySingleResource", + className: "DiscoveredSecuritySolution", modelProperties: { - resourceId: { + id: { readOnly: true, - serializedName: "resourceId", + serializedName: "id", type: { name: "String" } }, - severity: { + name: { readOnly: true, - serializedName: "severity", + serializedName: "name", type: { name: "String" } }, - recommendationsExist: { + type: { readOnly: true, - serializedName: "recommendationsExist", + serializedName: "type", type: { - name: "Boolean" + name: "String" } }, - networkZones: { + location: { readOnly: true, - serializedName: "networkZones", + serializedName: "location", type: { name: "String" } }, - topologyScore: { - readOnly: true, - serializedName: "topologyScore", + securityFamily: { + required: true, + serializedName: "properties.securityFamily", type: { - name: "Number" + name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + offer: { + required: true, + serializedName: "properties.offer", type: { name: "String" } }, - parents: { - readOnly: true, - serializedName: "parents", + publisher: { + required: true, + serializedName: "properties.publisher", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResourceParent" - } - } + name: "String" } }, - children: { - readOnly: true, - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResourceChild" - } - } + sku: { + required: true, + serializedName: "properties.sku", + type: { + name: "String" } } } } }; -export const TopologyResource: msRest.CompositeMapper = { - serializedName: "TopologyResource", +export const ExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolution", type: { name: "Composite", - className: "TopologyResource", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ExternalSecuritySolution", + className: "ExternalSecuritySolution", modelProperties: { id: { readOnly: true, @@ -1089,155 +5017,236 @@ export const TopologyResource: msRest.CompositeMapper = { name: "String" } }, - calculatedDateTime: { - readOnly: true, - serializedName: "properties.calculatedDateTime", + kind: { + required: true, + serializedName: "kind", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionProperties", + type: { + name: "Composite", + className: "ExternalSecuritySolutionProperties", + modelProperties: { + deviceVendor: { + serializedName: "deviceVendor", + type: { + name: "String" } }, - topologyResources: { - readOnly: true, - serializedName: "properties.topologyResources", + deviceType: { + serializedName: "deviceType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResource" - } - } + name: "String" + } + }, + workspace: { + serializedName: "workspace", + type: { + name: "Composite", + className: "ConnectedWorkspace" } } + }, + additionalProperties: { + type: { + name: "Object" + } } } }; -export const JitNetworkAccessPortRule: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPortRule", +export const CefSolutionProperties: msRest.CompositeMapper = { + serializedName: "CefSolutionProperties", type: { name: "Composite", - className: "JitNetworkAccessPortRule", + className: "CefSolutionProperties", modelProperties: { - number: { - required: true, - serializedName: "number", + ...ExternalSecuritySolutionProperties.type.modelProperties, + hostname: { + serializedName: "hostname", type: { - name: "Number" + name: "String" } }, - protocol: { - required: true, - serializedName: "protocol", + agent: { + serializedName: "agent", type: { name: "String" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + lastEventReceived: { + serializedName: "lastEventReceived", type: { name: "String" } - }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", + } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const CefExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "CEF", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "CefExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "CefSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties } - }, - maxRequestAccessDuration: { - required: true, - serializedName: "maxRequestAccessDuration", + } + } + } +}; + +export const AtaSolutionProperties: msRest.CompositeMapper = { + serializedName: "AtaSolutionProperties", + type: { + name: "Composite", + className: "AtaSolutionProperties", + modelProperties: { + ...ExternalSecuritySolutionProperties.type.modelProperties, + lastEventReceived: { + serializedName: "lastEventReceived", type: { name: "String" } } + }, + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } +}; + +export const AtaExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "ATA", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AtaExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AtaSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } + } } } }; -export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyVirtualMachine", +export const ConnectedWorkspace: msRest.CompositeMapper = { + serializedName: "ConnectedWorkspace", type: { name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine", + className: "ConnectedWorkspace", modelProperties: { id: { - required: true, serializedName: "id", type: { name: "String" } - }, - ports: { - required: true, - serializedName: "ports", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPortRule" - } - } - } } } } }; -export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequestPort", +export const AadSolutionProperties: msRest.CompositeMapper = { + serializedName: "AadSolutionProperties", type: { name: "Composite", - className: "JitNetworkAccessRequestPort", + className: "AadSolutionProperties", modelProperties: { - number: { - required: true, - serializedName: "number", + deviceVendor: { + serializedName: "deviceVendor", type: { - name: "Number" + name: "String" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + deviceType: { + serializedName: "deviceType", type: { name: "String" } }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", + workspace: { + serializedName: "workspace", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "ConnectedWorkspace" } }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", + connectivityState: { + serializedName: "connectivityState", type: { - name: "DateTime" + name: "String" } - }, - status: { - required: true, - serializedName: "status", + } + } + } +}; + +export const AadExternalSecuritySolution: msRest.CompositeMapper = { + serializedName: "AAD", + type: { + name: "Composite", + polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, + uberParent: "ExternalSecuritySolution", + className: "AadExternalSecuritySolution", + modelProperties: { + ...ExternalSecuritySolution.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AadSolutionProperties" + } + } + } + } +}; + +export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionKind", + type: { + name: "Composite", + className: "ExternalSecuritySolutionKind1", + modelProperties: { + kind: { + serializedName: "kind", type: { name: "String" } - }, - statusReason: { - required: true, - serializedName: "statusReason", + } + } + } +}; + +export const AadConnectivityState1: msRest.CompositeMapper = { + serializedName: "AadConnectivityState", + type: { + name: "Composite", + className: "AadConnectivityState1", + modelProperties: { + connectivityState: { + serializedName: "connectivityState", type: { name: "String" } @@ -1246,65 +5255,84 @@ export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { } }; -export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequestVirtualMachine", +export const SecureScoreItem: msRest.CompositeMapper = { + serializedName: "SecureScoreItem", type: { name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine", + className: "SecureScoreItem", modelProperties: { - id: { - required: true, - serializedName: "id", + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", type: { name: "String" } }, - ports: { - required: true, - serializedName: "ports", + max: { + readOnly: true, + serializedName: "properties.score.max", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessRequestPort" - } - } + name: "Number" + } + }, + current: { + readOnly: true, + serializedName: "properties.score.current", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" } } } } }; -export const JitNetworkAccessRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequest", +export const SecureScoreControlScore: msRest.CompositeMapper = { + serializedName: "SecureScoreControlScore", type: { name: "Composite", - className: "JitNetworkAccessRequest", + className: "SecureScoreControlScore", modelProperties: { - virtualMachines: { - required: true, - serializedName: "virtualMachines", + max: { + readOnly: true, + serializedName: "max", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine" - } - } + name: "Number" } }, - startTimeUtc: { - required: true, - serializedName: "startTimeUtc", + current: { + readOnly: true, + serializedName: "current", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "DateTime" + name: "Number" } - }, - requestor: { - required: true, - serializedName: "requestor", + } + } + } +}; + +export const SecureScoreControlDefinitionSource: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDefinitionSource", + type: { + name: "Composite", + className: "SecureScoreControlDefinitionSource", + modelProperties: { + sourceType: { + serializedName: "sourceType", type: { name: "String" } @@ -1313,11 +5341,11 @@ export const JitNetworkAccessRequest: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPolicy: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicy", +export const AzureResourceLink: msRest.CompositeMapper = { + serializedName: "AzureResourceLink", type: { name: "Composite", - className: "JitNetworkAccessPolicy", + className: "AzureResourceLink", modelProperties: { id: { readOnly: true, @@ -1325,195 +5353,159 @@ export const JitNetworkAccessPolicy: msRest.CompositeMapper = { type: { name: "String" } - }, - name: { + } + } + } +}; + +export const SecureScoreControlDefinitionItem: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDefinitionItem", + type: { + name: "Composite", + className: "SecureScoreControlDefinitionItem", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { readOnly: true, - serializedName: "name", + serializedName: "properties.displayName", type: { name: "String" } }, - type: { + description: { readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", + serializedName: "properties.description", + constraints: { + MaxLength: 256 + }, type: { name: "String" } }, - location: { + maxScore: { readOnly: true, - serializedName: "location", + serializedName: "properties.maxScore", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - virtualMachines: { - required: true, - serializedName: "properties.virtualMachines", + source: { + readOnly: true, + serializedName: "properties.source", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine" - } - } + name: "Composite", + className: "SecureScoreControlDefinitionSource" } }, - requests: { - serializedName: "properties.requests", + assessmentDefinitions: { + readOnly: true, + serializedName: "properties.assessmentDefinitions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessRequest" + className: "AzureResourceLink" } } } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } } } } }; -export const JitNetworkAccessPolicyInitiatePort: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiatePort", +export const SecureScoreControlDetails: msRest.CompositeMapper = { + serializedName: "SecureScoreControlDetails", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiatePort", + className: "SecureScoreControlDetails", modelProperties: { - number: { - required: true, - serializedName: "number", + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + max: { + readOnly: true, + serializedName: "properties.score.max", + constraints: { + InclusiveMinimum: 0 + }, type: { name: "Number" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + current: { + readOnly: true, + serializedName: "properties.score.current", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", + healthyResourceCount: { + readOnly: true, + serializedName: "properties.healthyResourceCount", type: { - name: "DateTime" + name: "Number" } - } - } - } -}; - -export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine", - modelProperties: { - id: { - required: true, - serializedName: "id", + }, + unhealthyResourceCount: { + readOnly: true, + serializedName: "properties.unhealthyResourceCount", type: { - name: "String" + name: "Number" } }, - ports: { - required: true, - serializedName: "ports", + notApplicableResourceCount: { + readOnly: true, + serializedName: "properties.notApplicableResourceCount", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiatePort" - } - } + name: "Number" + } + }, + definition: { + serializedName: "properties.definition", + type: { + name: "Composite", + className: "SecureScoreControlDefinitionItem" } } } } }; -export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateRequest", +export const ComplianceResultList: msRest.CompositeMapper = { + serializedName: "ComplianceResultList", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiateRequest", + className: "ComplianceResultList", modelProperties: { - virtualMachines: { + value: { required: true, - serializedName: "virtualMachines", + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine" + className: "ComplianceResult" } } } - } - } - } -}; - -export const ExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolution", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "ExternalSecuritySolution", - className: "ExternalSecuritySolution", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - readOnly: true, - serializedName: "location", - type: { - name: "String" - } }, - kind: { - required: true, - serializedName: "kind", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1522,138 +5514,175 @@ export const ExternalSecuritySolution: msRest.CompositeMapper = { } }; -export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionProperties", +export const AlertList: msRest.CompositeMapper = { + serializedName: "AlertList", type: { name: "Composite", - className: "ExternalSecuritySolutionProperties", + className: "AlertList", modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } } }, - deviceType: { - serializedName: "deviceType", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } - }, - workspace: { - serializedName: "workspace", - type: { - name: "Composite", - className: "ConnectedWorkspace" - } - } - }, - additionalProperties: { - type: { - name: "Object" } } } }; -export const CefSolutionProperties: msRest.CompositeMapper = { - serializedName: "CefSolutionProperties", +export const SettingsList: msRest.CompositeMapper = { + serializedName: "SettingsList", type: { name: "Composite", - className: "CefSolutionProperties", + className: "SettingsList", modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - hostname: { - serializedName: "hostname", - type: { - name: "String" - } - }, - agent: { - serializedName: "agent", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Setting" + } + } } }, - lastEventReceived: { - serializedName: "lastEventReceived", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } } - }, - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } } }; -export const CefExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "CEF", +export const DeviceSecurityGroupList: msRest.CompositeMapper = { + serializedName: "DeviceSecurityGroupList", type: { name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "CefExternalSecuritySolution", + className: "DeviceSecurityGroupList", modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", + value: { + serializedName: "", type: { - name: "Composite", - className: "CefSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeviceSecurityGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const AtaSolutionProperties: msRest.CompositeMapper = { - serializedName: "AtaSolutionProperties", +export const IoTSecuritySolutionsList: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionsList", type: { name: "Composite", - className: "AtaSolutionProperties", + className: "IoTSecuritySolutionsList", modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - lastEventReceived: { - serializedName: "lastEventReceived", + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionModel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } } - }, - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } } }; -export const AtaExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "ATA", +export const IoTSecurityAggregatedAlertList: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlertList", type: { name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "AtaExternalSecuritySolution", + className: "IoTSecurityAggregatedAlertList", modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", + value: { + required: true, + serializedName: "", type: { - name: "Composite", - className: "AtaSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlert" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const ConnectedWorkspace: msRest.CompositeMapper = { - serializedName: "ConnectedWorkspace", +export const IoTSecurityAggregatedRecommendationList: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedRecommendationList", type: { name: "Composite", - className: "ConnectedWorkspace", + className: "IoTSecurityAggregatedRecommendationList", modelProperties: { - id: { - serializedName: "id", + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAggregatedRecommendation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1662,33 +5691,28 @@ export const ConnectedWorkspace: msRest.CompositeMapper = { } }; -export const AadSolutionProperties: msRest.CompositeMapper = { - serializedName: "AadSolutionProperties", +export const AscLocationList: msRest.CompositeMapper = { + serializedName: "AscLocationList", type: { name: "Composite", - className: "AadSolutionProperties", + className: "AscLocationList", modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", - type: { - name: "String" - } - }, - deviceType: { - serializedName: "deviceType", - type: { - name: "String" - } - }, - workspace: { - serializedName: "workspace", + value: { + readOnly: true, + serializedName: "", type: { - name: "Composite", - className: "ConnectedWorkspace" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AscLocation" + } + } } }, - connectivityState: { - serializedName: "connectivityState", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1697,34 +5721,57 @@ export const AadSolutionProperties: msRest.CompositeMapper = { } }; -export const AadExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "AAD", +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", type: { name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "AadExternalSecuritySolution", + className: "OperationList", modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", + value: { + serializedName: "", type: { - name: "Composite", - className: "AadSolutionProperties" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionKind", +export const SecurityTaskList: msRest.CompositeMapper = { + serializedName: "SecurityTaskList", type: { name: "Composite", - className: "ExternalSecuritySolutionKind1", + className: "SecurityTaskList", modelProperties: { - kind: { - serializedName: "kind", + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityTask" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1733,14 +5780,27 @@ export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { } }; -export const AadConnectivityState1: msRest.CompositeMapper = { - serializedName: "AadConnectivityState", +export const AutoProvisioningSettingList: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSettingList", type: { name: "Composite", - className: "AadConnectivityState1", + className: "AutoProvisioningSettingList", modelProperties: { - connectivityState: { - serializedName: "connectivityState", + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoProvisioningSetting" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1749,29 +5809,27 @@ export const AadConnectivityState1: msRest.CompositeMapper = { } }; -export const ConnectedResource: msRest.CompositeMapper = { - serializedName: "ConnectedResource", +export const ComplianceList: msRest.CompositeMapper = { + serializedName: "ComplianceList", type: { name: "Composite", - className: "ConnectedResource", + className: "ComplianceList", modelProperties: { - connectedResourceId: { - readOnly: true, - serializedName: "connectedResourceId", - type: { - name: "String" - } - }, - tcpPorts: { - readOnly: true, - serializedName: "tcpPorts", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Compliance" + } + } } }, - udpPorts: { + nextLink: { readOnly: true, - serializedName: "udpPorts", + serializedName: "nextLink", type: { name: "String" } @@ -1780,112 +5838,130 @@ export const ConnectedResource: msRest.CompositeMapper = { } }; -export const ConnectableResource: msRest.CompositeMapper = { - serializedName: "ConnectableResource", +export const InformationProtectionPolicyList: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicyList", type: { name: "Composite", - className: "ConnectableResource", + className: "InformationProtectionPolicyList", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - inboundConnectedResources: { - readOnly: true, - serializedName: "inboundConnectedResources", + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectedResource" + className: "InformationProtectionPolicy" } } } }, - outboundConnectedResources: { + nextLink: { readOnly: true, - serializedName: "outboundConnectedResources", + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedResource" - } - } + name: "String" } } } } }; -export const AllowedConnectionsResource: msRest.CompositeMapper = { - serializedName: "AllowedConnectionsResource", +export const SecurityContactList: msRest.CompositeMapper = { + serializedName: "SecurityContactList", type: { name: "Composite", - className: "AllowedConnectionsResource", + className: "SecurityContactList", modelProperties: { - id: { + value: { readOnly: true, - serializedName: "id", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityContact" + } + } } }, - name: { + nextLink: { readOnly: true, - serializedName: "name", + serializedName: "nextLink", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const WorkspaceSettingList: msRest.CompositeMapper = { + serializedName: "WorkspaceSettingList", + type: { + name: "Composite", + className: "WorkspaceSettingList", + modelProperties: { + value: { + required: true, + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceSetting" + } + } } }, - location: { + nextLink: { readOnly: true, - serializedName: "location", + serializedName: "nextLink", type: { name: "String" } - }, - calculatedDateTime: { - readOnly: true, - serializedName: "properties.calculatedDateTime", - type: { - name: "DateTime" - } - }, - connectableResources: { - readOnly: true, - serializedName: "properties.connectableResources", + } + } + } +}; + +export const RegulatoryComplianceStandardList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandardList", + type: { + name: "Composite", + className: "RegulatoryComplianceStandardList", + modelProperties: { + value: { + required: true, + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectableResource" + className: "RegulatoryComplianceStandard" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const PricingList: msRest.CompositeMapper = { - serializedName: "PricingList", +export const RegulatoryComplianceControlList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControlList", type: { name: "Composite", - className: "PricingList", + className: "RegulatoryComplianceControlList", modelProperties: { value: { required: true, @@ -1895,7 +5971,7 @@ export const PricingList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Pricing" + className: "RegulatoryComplianceControl" } } } @@ -1911,21 +5987,21 @@ export const PricingList: msRest.CompositeMapper = { } }; -export const SecurityContactList: msRest.CompositeMapper = { - serializedName: "SecurityContactList", +export const RegulatoryComplianceAssessmentList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessmentList", type: { name: "Composite", - className: "SecurityContactList", + className: "RegulatoryComplianceAssessmentList", modelProperties: { value: { - readOnly: true, + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SecurityContact" + className: "RegulatoryComplianceAssessment" } } } @@ -1941,21 +6017,21 @@ export const SecurityContactList: msRest.CompositeMapper = { } }; -export const WorkspaceSettingList: msRest.CompositeMapper = { - serializedName: "WorkspaceSettingList", +export const SecuritySubAssessmentList: msRest.CompositeMapper = { + serializedName: "SecuritySubAssessmentList", type: { name: "Composite", - className: "WorkspaceSettingList", + className: "SecuritySubAssessmentList", modelProperties: { value: { - required: true, + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkspaceSetting" + className: "SecuritySubAssessment" } } } @@ -1971,20 +6047,21 @@ export const WorkspaceSettingList: msRest.CompositeMapper = { } }; -export const AutoProvisioningSettingList: msRest.CompositeMapper = { - serializedName: "AutoProvisioningSettingList", +export const AutomationList: msRest.CompositeMapper = { + serializedName: "AutomationList", type: { name: "Composite", - className: "AutoProvisioningSettingList", + className: "AutomationList", modelProperties: { value: { + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AutoProvisioningSetting" + className: "Automation" } } } @@ -2000,20 +6077,21 @@ export const AutoProvisioningSettingList: msRest.CompositeMapper = { } }; -export const ComplianceList: msRest.CompositeMapper = { - serializedName: "ComplianceList", +export const AlertsSuppressionRulesList: msRest.CompositeMapper = { + serializedName: "AlertsSuppressionRulesList", type: { name: "Composite", - className: "ComplianceList", + className: "AlertsSuppressionRulesList", modelProperties: { value: { + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Compliance" + className: "AlertsSuppressionRule" } } } @@ -2029,20 +6107,21 @@ export const ComplianceList: msRest.CompositeMapper = { } }; -export const SettingsList: msRest.CompositeMapper = { - serializedName: "SettingsList", +export const SecurityAssessmentMetadataList: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentMetadataList", type: { name: "Composite", - className: "SettingsList", + className: "SecurityAssessmentMetadataList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Setting" + className: "SecurityAssessmentMetadata" } } } @@ -2058,20 +6137,21 @@ export const SettingsList: msRest.CompositeMapper = { } }; -export const InformationProtectionPolicyList: msRest.CompositeMapper = { - serializedName: "InformationProtectionPolicyList", +export const SecurityAssessmentList: msRest.CompositeMapper = { + serializedName: "SecurityAssessmentList", type: { name: "Composite", - className: "InformationProtectionPolicyList", + className: "SecurityAssessmentList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "InformationProtectionPolicy" + className: "SecurityAssessment" } } } @@ -2087,11 +6167,11 @@ export const InformationProtectionPolicyList: msRest.CompositeMapper = { } }; -export const OperationList: msRest.CompositeMapper = { - serializedName: "OperationList", +export const AdaptiveNetworkHardeningsList: msRest.CompositeMapper = { + serializedName: "AdaptiveNetworkHardeningsList", type: { name: "Composite", - className: "OperationList", + className: "AdaptiveNetworkHardeningsList", modelProperties: { value: { serializedName: "", @@ -2100,13 +6180,12 @@ export const OperationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "AdaptiveNetworkHardening" } } } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -2116,11 +6195,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const AscLocationList: msRest.CompositeMapper = { - serializedName: "AscLocationList", +export const AllowedConnectionsList: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsList", type: { name: "Composite", - className: "AscLocationList", + className: "AllowedConnectionsList", modelProperties: { value: { readOnly: true, @@ -2130,7 +6209,7 @@ export const AscLocationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AscLocation" + className: "AllowedConnectionsResource" } } } @@ -2146,11 +6225,11 @@ export const AscLocationList: msRest.CompositeMapper = { } }; -export const SecurityTaskList: msRest.CompositeMapper = { - serializedName: "SecurityTaskList", +export const TopologyList: msRest.CompositeMapper = { + serializedName: "TopologyList", type: { name: "Composite", - className: "SecurityTaskList", + className: "TopologyList", modelProperties: { value: { readOnly: true, @@ -2160,7 +6239,7 @@ export const SecurityTaskList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SecurityTask" + className: "TopologyResource" } } } @@ -2176,11 +6255,11 @@ export const SecurityTaskList: msRest.CompositeMapper = { } }; -export const AlertList: msRest.CompositeMapper = { - serializedName: "AlertList", +export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPoliciesList", type: { name: "Composite", - className: "AlertList", + className: "JitNetworkAccessPoliciesList", modelProperties: { value: { serializedName: "", @@ -2189,7 +6268,7 @@ export const AlertList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Alert" + className: "JitNetworkAccessPolicy" } } } @@ -2234,11 +6313,11 @@ export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPoliciesList", +export const ExternalSecuritySolutionList: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionList", type: { name: "Composite", - className: "JitNetworkAccessPoliciesList", + className: "ExternalSecuritySolutionList", modelProperties: { value: { serializedName: "", @@ -2247,7 +6326,7 @@ export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "JitNetworkAccessPolicy" + className: "ExternalSecuritySolution" } } } @@ -2263,20 +6342,21 @@ export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { } }; -export const ExternalSecuritySolutionList: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionList", +export const SecureScoresList: msRest.CompositeMapper = { + serializedName: "SecureScoresList", type: { name: "Composite", - className: "ExternalSecuritySolutionList", + className: "SecureScoresList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ExternalSecuritySolution" + className: "SecureScoreItem" } } } @@ -2292,11 +6372,11 @@ export const ExternalSecuritySolutionList: msRest.CompositeMapper = { } }; -export const TopologyList: msRest.CompositeMapper = { - serializedName: "TopologyList", +export const SecureScoreControlList: msRest.CompositeMapper = { + serializedName: "SecureScoreControlList", type: { name: "Composite", - className: "TopologyList", + className: "SecureScoreControlList", modelProperties: { value: { readOnly: true, @@ -2306,7 +6386,7 @@ export const TopologyList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "TopologyResource" + className: "SecureScoreControlDetails" } } } @@ -2322,11 +6402,11 @@ export const TopologyList: msRest.CompositeMapper = { } }; -export const AllowedConnectionsList: msRest.CompositeMapper = { - serializedName: "AllowedConnectionsList", +export const SecureScoreControlDefinitionList: msRest.CompositeMapper = { + serializedName: "secureScoreControlDefinitionList", type: { name: "Composite", - className: "AllowedConnectionsList", + className: "SecureScoreControlDefinitionList", modelProperties: { value: { readOnly: true, @@ -2336,7 +6416,7 @@ export const AllowedConnectionsList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AllowedConnectionsResource" + className: "SecureScoreControlDefinitionItem" } } } @@ -2353,10 +6433,48 @@ export const AllowedConnectionsList: msRest.CompositeMapper = { }; export const discriminators = { - 'Setting' : Setting, - 'Setting.DataExportSetting' : DataExportSetting, + 'BaseResource.Setting' : Setting, + 'BaseResource.DataExportSettings' : DataExportSettings, + 'BaseResource.SettingResource' : SettingResource, + 'CustomAlertRule.ThresholdCustomAlertRule' : ThresholdCustomAlertRule, + 'CustomAlertRule.TimeWindowCustomAlertRule' : TimeWindowCustomAlertRule, + 'CustomAlertRule.AllowlistCustomAlertRule' : AllowlistCustomAlertRule, + 'CustomAlertRule.DenylistCustomAlertRule' : DenylistCustomAlertRule, + 'CustomAlertRule' : CustomAlertRule, + 'CustomAlertRule.ListCustomAlertRule' : ListCustomAlertRule, + 'CustomAlertRule.ConnectionToIpNotAllowed' : ConnectionToIpNotAllowed, + 'CustomAlertRule.LocalUserNotAllowed' : LocalUserNotAllowed, + 'CustomAlertRule.ProcessNotAllowed' : ProcessNotAllowed, + 'CustomAlertRule.ActiveConnectionsNotInAllowedRange' : ActiveConnectionsNotInAllowedRange, + 'CustomAlertRule.AmqpC2DMessagesNotInAllowedRange' : AmqpC2DMessagesNotInAllowedRange, + 'CustomAlertRule.MqttC2DMessagesNotInAllowedRange' : MqttC2DMessagesNotInAllowedRange, + 'CustomAlertRule.HttpC2DMessagesNotInAllowedRange' : HttpC2DMessagesNotInAllowedRange, + 'CustomAlertRule.AmqpC2DRejectedMessagesNotInAllowedRange' : AmqpC2DRejectedMessagesNotInAllowedRange, + 'CustomAlertRule.MqttC2DRejectedMessagesNotInAllowedRange' : MqttC2DRejectedMessagesNotInAllowedRange, + 'CustomAlertRule.HttpC2DRejectedMessagesNotInAllowedRange' : HttpC2DRejectedMessagesNotInAllowedRange, + 'CustomAlertRule.AmqpD2CMessagesNotInAllowedRange' : AmqpD2CMessagesNotInAllowedRange, + 'CustomAlertRule.MqttD2CMessagesNotInAllowedRange' : MqttD2CMessagesNotInAllowedRange, + 'CustomAlertRule.HttpD2CMessagesNotInAllowedRange' : HttpD2CMessagesNotInAllowedRange, + 'CustomAlertRule.DirectMethodInvokesNotInAllowedRange' : DirectMethodInvokesNotInAllowedRange, + 'CustomAlertRule.FailedLocalLoginsNotInAllowedRange' : FailedLocalLoginsNotInAllowedRange, + 'CustomAlertRule.FileUploadsNotInAllowedRange' : FileUploadsNotInAllowedRange, + 'CustomAlertRule.QueuePurgesNotInAllowedRange' : QueuePurgesNotInAllowedRange, + 'CustomAlertRule.TwinUpdatesNotInAllowedRange' : TwinUpdatesNotInAllowedRange, + 'CustomAlertRule.UnauthorizedOperationsNotInAllowedRange' : UnauthorizedOperationsNotInAllowedRange, + 'ResourceDetails' : ResourceDetails, + 'AdditionalData' : AdditionalData, + 'AdditionalData.SqlServerVulnerability' : SqlServerVulnerabilityProperties, + 'AdditionalData.ContainerRegistryVulnerability' : ContainerRegistryVulnerabilityProperties, + 'AdditionalData.ServerVulnerabilityAssessment' : ServerVulnerabilityProperties, + 'ResourceDetails.OnPremise' : OnPremiseResourceDetails, + 'ResourceDetails.Azure' : AzureResourceDetails, + 'AutomationAction' : AutomationAction, + 'AutomationAction.LogicApp' : AutomationActionLogicApp, + 'AutomationAction.EventHub' : AutomationActionEventHub, + 'AutomationAction.Workspace' : AutomationActionWorkspace, 'ExternalSecuritySolution' : ExternalSecuritySolution, 'ExternalSecuritySolution.CEF' : CefExternalSecuritySolution, 'ExternalSecuritySolution.ATA' : AtaExternalSecuritySolution, 'ExternalSecuritySolution.AAD' : AadExternalSecuritySolution + }; diff --git a/sdk/security/arm-security/src/models/operationsMappers.ts b/sdk/security/arm-security/src/models/operationsMappers.ts index f2e907d82125..786d9130f59f 100644 --- a/sdk/security/arm-security/src/models/operationsMappers.ts +++ b/sdk/security/arm-security/src/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - OperationList, + CloudError, Operation, OperationDisplay, - CloudError + OperationList } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/parameters.ts b/sdk/security/arm-security/src/models/parameters.ts index fb823bdaca2c..f9b159e02557 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -20,6 +20,48 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +export const adaptiveNetworkHardeningEnforceAction: msRest.OperationURLParameter = { + parameterPath: "adaptiveNetworkHardeningEnforceAction", + mapper: { + required: true, + isConstant: true, + serializedName: "adaptiveNetworkHardeningEnforceAction", + defaultValue: 'enforce', + type: { + name: "String" + } + } +}; +export const adaptiveNetworkHardeningResourceName: msRest.OperationURLParameter = { + parameterPath: "adaptiveNetworkHardeningResourceName", + mapper: { + required: true, + serializedName: "adaptiveNetworkHardeningResourceName", + type: { + name: "String" + } + } +}; +export const aggregatedAlertName: msRest.OperationURLParameter = { + parameterPath: "aggregatedAlertName", + mapper: { + required: true, + serializedName: "aggregatedAlertName", + type: { + name: "String" + } + } +}; +export const aggregatedRecommendationName: msRest.OperationURLParameter = { + parameterPath: "aggregatedRecommendationName", + mapper: { + required: true, + serializedName: "aggregatedRecommendationName", + type: { + name: "String" + } + } +}; export const alertName: msRest.OperationURLParameter = { parameterPath: "alertName", mapper: { @@ -30,11 +72,23 @@ export const alertName: msRest.OperationURLParameter = { } } }; -export const alertUpdateActionType: msRest.OperationURLParameter = { - parameterPath: "alertUpdateActionType", +export const alertsSuppressionRuleName: msRest.OperationURLParameter = { + parameterPath: "alertsSuppressionRuleName", mapper: { required: true, - serializedName: "alertUpdateActionType", + serializedName: "alertsSuppressionRuleName", + type: { + name: "String" + } + } +}; +export const alertType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "alertType" + ], + mapper: { + serializedName: "AlertType", type: { name: "String" } @@ -46,13 +100,49 @@ export const apiVersion0: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2017-08-01-preview', + defaultValue: '2017-08-01', type: { name: "String" } } }; export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-06-01', + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-01-01', + type: { + name: "String" + } + } +}; +export const apiVersion3: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-08-01', + type: { + name: "String" + } + } +}; +export const apiVersion4: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, @@ -64,6 +154,54 @@ export const apiVersion1: msRest.OperationQueryParameter = { } } }; +export const apiVersion5: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-08-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion6: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-01-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion7: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-01-01', + type: { + name: "String" + } + } +}; +export const apiVersion8: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-01-01-preview', + type: { + name: "String" + } + } +}; export const ascLocation: msRest.OperationURLParameter = { parameterPath: "ascLocation", mapper: { @@ -74,6 +212,48 @@ export const ascLocation: msRest.OperationURLParameter = { } } }; +export const assessmentMetadataName: msRest.OperationURLParameter = { + parameterPath: "assessmentMetadataName", + mapper: { + required: true, + serializedName: "assessmentMetadataName", + type: { + name: "String" + } + } +}; +export const assessmentName: msRest.OperationURLParameter = { + parameterPath: "assessmentName", + mapper: { + required: true, + serializedName: "assessmentName", + type: { + name: "String" + } + } +}; +export const autoDismissRuleName: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "autoDismissRuleName" + ], + mapper: { + serializedName: "autoDismissRuleName", + type: { + name: "String" + } + } +}; +export const automationName: msRest.OperationURLParameter = { + parameterPath: "automationName", + mapper: { + required: true, + serializedName: "automationName", + type: { + name: "String" + } + } +}; export const complianceName: msRest.OperationURLParameter = { parameterPath: "complianceName", mapper: { @@ -84,6 +264,16 @@ export const complianceName: msRest.OperationURLParameter = { } } }; +export const complianceResultName: msRest.OperationURLParameter = { + parameterPath: "complianceResultName", + mapper: { + required: true, + serializedName: "complianceResultName", + type: { + name: "String" + } + } +}; export const connectionType: msRest.OperationURLParameter = { parameterPath: "connectionType", mapper: { @@ -94,6 +284,16 @@ export const connectionType: msRest.OperationURLParameter = { } } }; +export const deviceSecurityGroupName: msRest.OperationURLParameter = { + parameterPath: "deviceSecurityGroupName", + mapper: { + required: true, + serializedName: "deviceSecurityGroupName", + type: { + name: "String" + } + } +}; export const discoveredSecuritySolutionName: msRest.OperationURLParameter = { parameterPath: "discoveredSecuritySolutionName", mapper: { @@ -138,6 +338,28 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; +export const includePathRecommendations: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "includePathRecommendations" + ], + mapper: { + serializedName: "includePathRecommendations", + type: { + name: "Boolean" + } + } +}; export const informationProtectionPolicyName: msRest.OperationURLParameter = { parameterPath: "informationProtectionPolicyName", mapper: { @@ -191,6 +413,36 @@ export const pricingName: msRest.OperationURLParameter = { } } }; +export const regulatoryComplianceAssessmentName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceAssessmentName", + mapper: { + required: true, + serializedName: "regulatoryComplianceAssessmentName", + type: { + name: "String" + } + } +}; +export const regulatoryComplianceControlName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceControlName", + mapper: { + required: true, + serializedName: "regulatoryComplianceControlName", + type: { + name: "String" + } + } +}; +export const regulatoryComplianceStandardName: msRest.OperationURLParameter = { + parameterPath: "regulatoryComplianceStandardName", + mapper: { + required: true, + serializedName: "regulatoryComplianceStandardName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -216,6 +468,36 @@ export const resourceId: msRest.OperationURLParameter = { } } }; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + } +}; +export const resourceNamespace: msRest.OperationURLParameter = { + parameterPath: "resourceNamespace", + mapper: { + required: true, + serializedName: "resourceNamespace", + type: { + name: "String" + } + } +}; +export const resourceType: msRest.OperationURLParameter = { + parameterPath: "resourceType", + mapper: { + required: true, + serializedName: "resourceType", + type: { + name: "String" + } + } +}; export const scope: msRest.OperationURLParameter = { parameterPath: "scope", mapper: { @@ -226,6 +508,16 @@ export const scope: msRest.OperationURLParameter = { } } }; +export const secureScoreName: msRest.OperationURLParameter = { + parameterPath: "secureScoreName", + mapper: { + required: true, + serializedName: "secureScoreName", + type: { + name: "String" + } + } +}; export const securityContactName: msRest.OperationURLParameter = { parameterPath: "securityContactName", mapper: { @@ -248,6 +540,18 @@ export const select: msRest.OperationQueryParameter = { } } }; +export const serverVulnerabilityAssessment: msRest.OperationURLParameter = { + parameterPath: "serverVulnerabilityAssessment", + mapper: { + required: true, + isConstant: true, + serializedName: "serverVulnerabilityAssessment", + defaultValue: 'default', + type: { + name: "String" + } + } +}; export const settingName0: msRest.OperationURLParameter = { parameterPath: "settingName", mapper: { @@ -270,6 +574,26 @@ export const settingName1: msRest.OperationURLParameter = { } } }; +export const solutionName: msRest.OperationURLParameter = { + parameterPath: "solutionName", + mapper: { + required: true, + serializedName: "solutionName", + type: { + name: "String" + } + } +}; +export const subAssessmentName: msRest.OperationURLParameter = { + parameterPath: "subAssessmentName", + mapper: { + required: true, + serializedName: "subAssessmentName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -283,6 +607,18 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const summary: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "summary" + ], + mapper: { + serializedName: "summary", + type: { + name: "Boolean" + } + } +}; export const taskName: msRest.OperationURLParameter = { parameterPath: "taskName", mapper: { @@ -303,6 +639,18 @@ export const taskUpdateActionType: msRest.OperationURLParameter = { } } }; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; export const topologyResourceName: msRest.OperationURLParameter = { parameterPath: "topologyResourceName", mapper: { diff --git a/sdk/security/arm-security/src/models/pricingsMappers.ts b/sdk/security/arm-security/src/models/pricingsMappers.ts index 457b9ad15a1f..8c0b7e2f63d0 100644 --- a/sdk/security/arm-security/src/models/pricingsMappers.ts +++ b/sdk/security/arm-security/src/models/pricingsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - PricingList, - Pricing, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - SecurityContact, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + PricingList, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts new file mode 100644 index 000000000000..e7b0eb8c1f54 --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceAssessmentList, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts new file mode 100644 index 000000000000..4317808f4caa --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceControlList, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts b/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts new file mode 100644 index 000000000000..55f0fb2e32a0 --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + RegulatoryComplianceStandardList, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts b/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts new file mode 100644 index 000000000000..be7137baa179 --- /dev/null +++ b/sdk/security/arm-security/src/models/secureScoreControlDefinitionsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionList, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts b/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts new file mode 100644 index 000000000000..95ef07ed4ed6 --- /dev/null +++ b/sdk/security/arm-security/src/models/secureScoreControlsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreControlList, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/secureScoresMappers.ts b/sdk/security/arm-security/src/models/secureScoresMappers.ts new file mode 100644 index 000000000000..fad75d0ee288 --- /dev/null +++ b/sdk/security/arm-security/src/models/secureScoresMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecureScoresList, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/securityContactsMappers.ts b/sdk/security/arm-security/src/models/securityContactsMappers.ts index 1e4d8593b773..c55eb989a1e5 100644 --- a/sdk/security/arm-security/src/models/securityContactsMappers.ts +++ b/sdk/security/arm-security/src/models/securityContactsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - SecurityContactList, - SecurityContact, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecurityContactList, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts b/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts new file mode 100644 index 000000000000..6b1483809d9b --- /dev/null +++ b/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityAssessmentsList, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/settingsMappers.ts b/sdk/security/arm-security/src/models/settingsMappers.ts index 127c46204903..9f1dbb8616d5 100644 --- a/sdk/security/arm-security/src/models/settingsMappers.ts +++ b/sdk/security/arm-security/src/models/settingsMappers.ts @@ -1,18 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - SettingsList, - Setting, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, CloudError, - DataExportSetting + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SettingsList, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/subAssessmentsMappers.ts b/sdk/security/arm-security/src/models/subAssessmentsMappers.ts new file mode 100644 index 000000000000..fb7d8ae47902 --- /dev/null +++ b/sdk/security/arm-security/src/models/subAssessmentsMappers.ts @@ -0,0 +1,102 @@ +/* + * 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 { + discriminators, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecuritySubAssessmentList, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/tasksMappers.ts b/sdk/security/arm-security/src/models/tasksMappers.ts index 5e5eb961a569..b286ef7f5251 100644 --- a/sdk/security/arm-security/src/models/tasksMappers.ts +++ b/sdk/security/arm-security/src/models/tasksMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - SecurityTaskList, - SecurityTask, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, - SecurityTaskParameters, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, + SecurityTask, + SecurityTaskList, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/topologyMappers.ts b/sdk/security/arm-security/src/models/topologyMappers.ts index 2f721b7b6c8b..80804dc1264b 100644 --- a/sdk/security/arm-security/src/models/topologyMappers.ts +++ b/sdk/security/arm-security/src/models/topologyMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, + CloudError, TopologyList, TopologyResource, TopologySingleResource, - TopologySingleResourceParent, TopologySingleResourceChild, - CloudError + TopologySingleResourceParent } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts b/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts index df56c1d9defb..7073a31098ee 100644 --- a/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts @@ -1,35 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - WorkspaceSettingList, - WorkspaceSetting, - Resource, + ActiveConnectionsNotInAllowedRange, + AdaptiveNetworkHardening, + AdditionalData, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AlertsSuppressionRule, + AllowlistCustomAlertRule, + AmqpC2DMessagesNotInAllowedRange, + AmqpC2DRejectedMessagesNotInAllowedRange, + AmqpD2CMessagesNotInAllowedRange, + AscLocation, + AssessmentLinks, + AssessmentStatus, + AutoProvisioningSetting, + AzureResourceDetails, + AzureResourceLink, BaseResource, CloudError, - SecurityContact, - Pricing, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + ConnectionToIpNotAllowed, + ContainerRegistryVulnerabilityProperties, + CustomAlertRule, + CVE, + CVSS, + DataExportSettings, + DenylistCustomAlertRule, + DeviceSecurityGroup, + DirectMethodInvokesNotInAllowedRange, + EffectiveNetworkSecurityGroups, + FailedLocalLoginsNotInAllowedRange, + FileUploadsNotInAllowedRange, + HttpC2DMessagesNotInAllowedRange, + HttpC2DRejectedMessagesNotInAllowedRange, + HttpD2CMessagesNotInAllowedRange, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityDeviceAlert, + IoTSecurityDeviceRecommendation, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + ListCustomAlertRule, + LocalUserNotAllowed, + MqttC2DMessagesNotInAllowedRange, + MqttC2DRejectedMessagesNotInAllowedRange, + MqttD2CMessagesNotInAllowedRange, + OnPremiseResourceDetails, + Pricing, + ProcessNotAllowed, + QueuePurgesNotInAllowedRange, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + ResourceDetails, + Rule, + ScopeElement, + SecureScoreControlDefinitionItem, + SecureScoreControlDefinitionSource, + SecureScoreControlDetails, + SecureScoreItem, + SecurityAssessment, + SecurityAssessmentMetadata, + SecurityAssessmentMetadataPartnerData, + SecurityAssessmentMetadataProperties, + SecurityAssessmentPartnerData, + SecurityContact, + SecuritySubAssessment, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityProperties, + Setting, + SettingResource, + SqlServerVulnerabilityProperties, + SubAssessmentStatus, + SuppressionAlertsScope, + ThresholdCustomAlertRule, + TimeWindowCustomAlertRule, + TwinUpdatesNotInAllowedRange, + UnauthorizedOperationsNotInAllowedRange, + VendorReference, + WorkspaceSetting, + WorkspaceSettingList } from "../models/mappers"; - diff --git a/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts b/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts new file mode 100644 index 000000000000..8260930d328a --- /dev/null +++ b/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts @@ -0,0 +1,249 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/adaptiveApplicationControlsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AdaptiveApplicationControls. */ +export class AdaptiveApplicationControls { + private readonly client: SecurityCenterContext; + + /** + * Create a AdaptiveApplicationControls. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of application control VM/server groups for the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.AdaptiveApplicationControlsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.AdaptiveApplicationControlsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AdaptiveApplicationControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets an application control VM/server group. + * @param groupName Name of an application control VM/server group + * @param [options] The optional parameters + * @returns Promise + */ + get(groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of an application control VM/server group + * @param callback The callback + */ + get(groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of an application control VM/server group + * @param options The optional parameters + * @param callback The callback + */ + get(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update an application control VM/server group + * @param groupName Name of an application control VM/server group + * @param body + * @param [options] The optional parameters + * @returns Promise + */ + put(groupName: string, body: Models.AppWhitelistingGroup, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of an application control VM/server group + * @param body + * @param callback The callback + */ + put(groupName: string, body: Models.AppWhitelistingGroup, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of an application control VM/server group + * @param body + * @param options The optional parameters + * @param callback The callback + */ + put(groupName: string, body: Models.AppWhitelistingGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(groupName: string, body: Models.AppWhitelistingGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + body, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Delete an application control VM/server group + * @param groupName Name of an application control VM/server group + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of an application control VM/server group + * @param callback The callback + */ + deleteMethod(groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of an application control VM/server group + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7, + Parameters.includePathRecommendations, + Parameters.summary + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AppWhitelistingGroups + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AppWhitelistingGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.AppWhitelistingGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AppWhitelistingGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts new file mode 100644 index 000000000000..c46277aaafee --- /dev/null +++ b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts @@ -0,0 +1,304 @@ +/* + * 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. + */ + +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/adaptiveNetworkHardeningsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AdaptiveNetworkHardenings. */ +export class AdaptiveNetworkHardenings { + private readonly client: SecurityCenterContext; + + /** + * Create a AdaptiveNetworkHardenings. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + listByExtendedResourceOperationSpec, + callback) as Promise; + } + + /** + * Gets a single Adaptive Network Hardening resource + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param adaptiveNetworkHardeningResourceName The name of the Adaptive Network Hardening resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param adaptiveNetworkHardeningResourceName The name of the Adaptive Network Hardening resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param adaptiveNetworkHardeningResourceName The name of the Adaptive Network Hardening resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + adaptiveNetworkHardeningResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Enforces the given rules on the NSG(s) listed in the request + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param adaptiveNetworkHardeningResourceName The name of the Adaptive Network Hardening resource. + * @param body + * @param [options] The optional parameters + * @returns Promise + */ + enforce(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, body: Models.AdaptiveNetworkHardeningEnforceRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginEnforce(resourceGroupName,resourceNamespace,resourceType,resourceName,adaptiveNetworkHardeningResourceName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Enforces the given rules on the NSG(s) listed in the request + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param adaptiveNetworkHardeningResourceName The name of the Adaptive Network Hardening resource. + * @param body + * @param [options] The optional parameters + * @returns Promise + */ + beginEnforce(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, body: Models.AdaptiveNetworkHardeningEnforceRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + adaptiveNetworkHardeningResourceName, + body, + options + }, + beginEnforceOperationSpec, + options); + } + + /** + * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByExtendedResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByExtendedResourceNext(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 + */ + listByExtendedResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByExtendedResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByExtendedResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByExtendedResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdaptiveNetworkHardeningsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.adaptiveNetworkHardeningResourceName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdaptiveNetworkHardening + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginEnforceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.adaptiveNetworkHardeningResourceName, + Parameters.adaptiveNetworkHardeningEnforceAction + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.AdaptiveNetworkHardeningEnforceRequest, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByExtendedResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdaptiveNetworkHardeningsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/advancedThreatProtection.ts b/sdk/security/arm-security/src/operations/advancedThreatProtection.ts index 7c141526f4da..e46de5f02a25 100644 --- a/sdk/security/arm-security/src/operations/advancedThreatProtection.ts +++ b/sdk/security/arm-security/src/operations/advancedThreatProtection.ts @@ -97,7 +97,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.settingName1 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -121,7 +121,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.settingName1 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/alerts.ts b/sdk/security/arm-security/src/operations/alerts.ts index 5437e2d49e75..cff6bc8b0bd5 100644 --- a/sdk/security/arm-security/src/operations/alerts.ts +++ b/sdk/security/arm-security/src/operations/alerts.ts @@ -51,7 +51,7 @@ export class Alerts { } /** - * List all the alerts alerts that are associated with the resource group + * List all the alerts that are associated with the resource group * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param [options] The optional parameters @@ -204,77 +204,126 @@ export class Alerts { /** * Update the alert's state * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param [options] The optional parameters * @returns Promise */ - updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options?: msRest.RequestOptionsBase): Promise; + updateSubscriptionLevelAlertStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param callback The callback */ - updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelAlertStateToDismiss(alertName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param options The optional parameters * @param callback The callback */ - updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubscriptionLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateSubscriptionLevelAlertStateToDismiss(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelAlertStateToDismiss(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, - alertUpdateActionType, options }, - updateSubscriptionLevelAlertStateOperationSpec, + updateSubscriptionLevelAlertStateToDismissOperationSpec, + callback); + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param [options] The optional parameters + * @returns Promise + */ + updateSubscriptionLevelAlertStateToReactivate(alertName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param callback The callback + */ + updateSubscriptionLevelAlertStateToReactivate(alertName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param options The optional parameters + * @param callback The callback + */ + updateSubscriptionLevelAlertStateToReactivate(alertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSubscriptionLevelAlertStateToReactivate(alertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + options + }, + updateSubscriptionLevelAlertStateToReactivateOperationSpec, + callback); + } + + /** + * Update the alert's state + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertName Name of the alert object + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelAlertStateToDismiss(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertName, + resourceGroupName, + options + }, + updateResourceGroupLevelAlertStateToDismissOperationSpec, callback); } /** * Update the alert's state * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param [options] The optional parameters * @returns Promise */ - updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param callback The callback */ - updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param alertName Name of the alert object - * @param alertUpdateActionType Type of the action to do on the alert. Possible values include: - * 'Dismiss', 'Reactivate' * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param options The optional parameters * @param callback The callback */ - updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateResourceGroupLevelAlertState(alertName: string, alertUpdateActionType: Models.AlertUpdateActionType1, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateResourceGroupLevelAlertStateToReactivate(alertName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { alertName, - alertUpdateActionType, resourceGroupName, options }, - updateResourceGroupLevelAlertStateOperationSpec, + updateResourceGroupLevelAlertStateToReactivateOperationSpec, callback); } @@ -307,7 +356,7 @@ export class Alerts { } /** - * List all the alerts alerts that are associated with the resource group + * List all the alerts that are associated with the resource group * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -402,10 +451,11 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, - Parameters.expand + Parameters.expand, + Parameters.autoDismissRuleName ], headerParameters: [ Parameters.acceptLanguage @@ -429,10 +479,11 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, - Parameters.expand + Parameters.expand, + Parameters.autoDismissRuleName ], headerParameters: [ Parameters.acceptLanguage @@ -456,10 +507,11 @@ const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, - Parameters.expand + Parameters.expand, + Parameters.autoDismissRuleName ], headerParameters: [ Parameters.acceptLanguage @@ -484,10 +536,11 @@ const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, - Parameters.expand + Parameters.expand, + Parameters.autoDismissRuleName ], headerParameters: [ Parameters.acceptLanguage @@ -512,7 +565,7 @@ const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { Parameters.alertName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +591,7 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -554,17 +607,63 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { serializer }; -const updateSubscriptionLevelAlertStateOperationSpec: msRest.OperationSpec = { +const updateSubscriptionLevelAlertStateToDismissOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateSubscriptionLevelAlertStateToReactivateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", + urlParameters: [ + Parameters.subscriptionId, + Parameters.ascLocation, + Parameters.alertName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateResourceGroupLevelAlertStateToDismissOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", urlParameters: [ Parameters.subscriptionId, Parameters.ascLocation, Parameters.alertName, - Parameters.alertUpdateActionType + Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -578,18 +677,17 @@ const updateSubscriptionLevelAlertStateOperationSpec: msRest.OperationSpec = { serializer }; -const updateResourceGroupLevelAlertStateOperationSpec: msRest.OperationSpec = { +const updateResourceGroupLevelAlertStateToReactivateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", urlParameters: [ Parameters.subscriptionId, Parameters.ascLocation, Parameters.alertName, - Parameters.alertUpdateActionType, Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts new file mode 100644 index 000000000000..edd98341ab97 --- /dev/null +++ b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts @@ -0,0 +1,292 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/alertsSuppressionRulesMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AlertsSuppressionRules. */ +export class AlertsSuppressionRules { + private readonly client: SecurityCenterContext; + + /** + * Create a AlertsSuppressionRules. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List of all the dismiss rules for the given subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.AlertsSuppressionRulesListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.AlertsSuppressionRulesListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AlertsSuppressionRulesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param [options] The optional parameters + * @returns Promise + */ + get(alertsSuppressionRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param callback The callback + */ + get(alertsSuppressionRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param options The optional parameters + * @param callback The callback + */ + get(alertsSuppressionRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(alertsSuppressionRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertsSuppressionRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update existing rule or create new rule if it doesn't exist + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param alertsSuppressionRule Suppression rule object + * @param [options] The optional parameters + * @returns Promise + */ + update(alertsSuppressionRuleName: string, alertsSuppressionRule: Models.AlertsSuppressionRule, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param alertsSuppressionRule Suppression rule object + * @param callback The callback + */ + update(alertsSuppressionRuleName: string, alertsSuppressionRule: Models.AlertsSuppressionRule, callback: msRest.ServiceCallback): void; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param alertsSuppressionRule Suppression rule object + * @param options The optional parameters + * @param callback The callback + */ + update(alertsSuppressionRuleName: string, alertsSuppressionRule: Models.AlertsSuppressionRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(alertsSuppressionRuleName: string, alertsSuppressionRule: Models.AlertsSuppressionRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertsSuppressionRuleName, + alertsSuppressionRule, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete dismiss alert rule for this subscription. + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(alertsSuppressionRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param callback The callback + */ + deleteMethod(alertsSuppressionRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param alertsSuppressionRuleName The unique name of the suppression alert rule + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(alertsSuppressionRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(alertsSuppressionRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + alertsSuppressionRuleName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * List of all the dismiss rules for the given 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 + */ + 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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.alertType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertsSuppressionRulesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.alertsSuppressionRuleName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertsSuppressionRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.alertsSuppressionRuleName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "alertsSuppressionRule", + mapper: { + ...Mappers.AlertsSuppressionRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AlertsSuppressionRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.alertsSuppressionRuleName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertsSuppressionRulesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/allowedConnections.ts b/sdk/security/arm-security/src/operations/allowedConnections.ts index b738cdb1d55a..3c24f44ef537 100644 --- a/sdk/security/arm-security/src/operations/allowedConnections.ts +++ b/sdk/security/arm-security/src/operations/allowedConnections.ts @@ -179,7 +179,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +203,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.connectionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/assessments.ts b/sdk/security/arm-security/src/operations/assessments.ts new file mode 100644 index 000000000000..f189faf56043 --- /dev/null +++ b/sdk/security/arm-security/src/operations/assessments.ts @@ -0,0 +1,320 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/assessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Assessments. */ +export class Assessments { + private readonly client: SecurityCenterContext; + + /** + * Create a Assessments. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get security assessments on all your scanned resources inside a scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get a security assessment on your scanned resource + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceId: string, assessmentName: string, options?: Models.AssessmentsGetOptionalParams): Promise; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + get(resourceId: string, assessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + get(resourceId: string, assessmentName: string, options: Models.AssessmentsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceId: string, assessmentName: string, options?: Models.AssessmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + assessmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a security assessment on your resource. An assessment metadata that describes this + * assessment must be predefined with the same name before inserting the assessment result + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assessment Calculated assessment on a pre-defined assessment metadata + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceId: string, assessmentName: string, assessment: Models.SecurityAssessment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assessment Calculated assessment on a pre-defined assessment metadata + * @param callback The callback + */ + createOrUpdate(resourceId: string, assessmentName: string, assessment: Models.SecurityAssessment, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param assessment Calculated assessment on a pre-defined assessment metadata + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceId: string, assessmentName: string, assessment: Models.SecurityAssessment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceId: string, assessmentName: string, assessment: Models.SecurityAssessment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + assessmentName, + assessment, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete a security assessment on your resource. An assessment metadata that describes this + * assessment must be predefined with the same name before inserting the assessment result + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceId: string, assessmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + deleteMethod(resourceId: string, assessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceId: string, assessmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceId: string, assessmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + assessmentName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Get security assessments on all your scanned resources inside a scope + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/assessments", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", + urlParameters: [ + Parameters.resourceId, + Parameters.assessmentName + ], + queryParameters: [ + Parameters.apiVersion7, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", + urlParameters: [ + Parameters.resourceId, + Parameters.assessmentName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "assessment", + mapper: { + ...Mappers.SecurityAssessment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessment + }, + 201: { + bodyMapper: Mappers.SecurityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", + urlParameters: [ + Parameters.resourceId, + Parameters.assessmentName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/assessmentsMetadata.ts b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts new file mode 100644 index 000000000000..2413fa98e36f --- /dev/null +++ b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts @@ -0,0 +1,436 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/assessmentsMetadataMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a AssessmentsMetadata. */ +export class AssessmentsMetadata { + private readonly client: SecurityCenterContext; + + /** + * Create a AssessmentsMetadata. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get metadata information on all assessment types + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get metadata information on an assessment type + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + get(assessmentMetadataName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + get(assessmentMetadataName: string, callback: msRest.ServiceCallback): void; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + get(assessmentMetadataName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(assessmentMetadataName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + assessmentMetadataName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Get metadata information on all assessment types in a specific subscription + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Get metadata information on an assessment type in a specific subscription + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + getInSubscription(assessmentMetadataName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + getInSubscription(assessmentMetadataName: string, callback: msRest.ServiceCallback): void; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + getInSubscription(assessmentMetadataName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getInSubscription(assessmentMetadataName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + assessmentMetadataName, + options + }, + getInSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Create metadata information on an assessment type in a specific subscription + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param assessmentMetadata AssessmentMetadata object + * @param [options] The optional parameters + * @returns Promise + */ + createInSubscription(assessmentMetadataName: string, assessmentMetadata: Models.SecurityAssessmentMetadata, options?: msRest.RequestOptionsBase): Promise; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param assessmentMetadata AssessmentMetadata object + * @param callback The callback + */ + createInSubscription(assessmentMetadataName: string, assessmentMetadata: Models.SecurityAssessmentMetadata, callback: msRest.ServiceCallback): void; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param assessmentMetadata AssessmentMetadata object + * @param options The optional parameters + * @param callback The callback + */ + createInSubscription(assessmentMetadataName: string, assessmentMetadata: Models.SecurityAssessmentMetadata, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createInSubscription(assessmentMetadataName: string, assessmentMetadata: Models.SecurityAssessmentMetadata, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + assessmentMetadataName, + assessmentMetadata, + options + }, + createInSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Delete metadata information on an assessment type in a specific subscription, will cause the + * deletion of all the assessments of that type in that subscription + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + deleteInSubscription(assessmentMetadataName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + deleteInSubscription(assessmentMetadataName: string, callback: msRest.ServiceCallback): void; + /** + * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + deleteInSubscription(assessmentMetadataName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteInSubscription(assessmentMetadataName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + assessmentMetadataName, + options + }, + deleteInSubscriptionOperationSpec, + callback); + } + + /** + * Get metadata information on all assessment types + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Get metadata information on all assessment types in a specific subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Security/assessmentMetadata", + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}", + urlParameters: [ + Parameters.assessmentMetadataName + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadata + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}", + urlParameters: [ + Parameters.assessmentMetadataName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadata + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}", + urlParameters: [ + Parameters.assessmentMetadataName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "assessmentMetadata", + mapper: { + ...Mappers.SecurityAssessmentMetadata, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadata + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}", + urlParameters: [ + Parameters.assessmentMetadataName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecurityAssessmentMetadataList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts index be242ac19ac5..352f1989c6d3 100644 --- a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts +++ b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts @@ -148,7 +148,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -172,7 +172,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +196,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/automations.ts b/sdk/security/arm-security/src/operations/automations.ts new file mode 100644 index 000000000000..087e3abb5def --- /dev/null +++ b/sdk/security/arm-security/src/operations/automations.ts @@ -0,0 +1,499 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/automationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a Automations. */ +export class Automations { + private readonly client: SecurityCenterContext; + + /** + * Create a Automations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Lists all the security automations in the specified subscription. Use the 'nextLink' property in + * the response to get the next page of security automations for the specified subscription. + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all the security automations in the specified resource group. Use the 'nextLink' property + * in the response to get the next page of security automations for the specified resource group. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Retrieves information about the model of a security automation. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, automationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param callback The callback + */ + get(resourceGroupName: string, automationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, automationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, automationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + automationName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a security automation. If a security automation is already created and a + * subsequent request is issued for the same automation id, then it will be updated. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, automationName: string, automation: Models.Automation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, automationName: string, automation: Models.Automation, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, automationName: string, automation: Models.Automation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationName: string, automation: Models.Automation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + automationName, + automation, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a security automation. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, automationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, automationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, automationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + automationName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Validates the security automation model before create or update. Any validation errors are + * returned to the client. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param [options] The optional parameters + * @returns Promise + */ + validate(resourceGroupName: string, automationName: string, automation: Models.Automation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param callback The callback + */ + validate(resourceGroupName: string, automationName: string, automation: Models.Automation, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param automationName The security automation name. + * @param automation The security automation resource + * @param options The optional parameters + * @param callback The callback + */ + validate(resourceGroupName: string, automationName: string, automation: Models.Automation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validate(resourceGroupName: string, automationName: string, automation: Models.Automation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + automationName, + automation, + options + }, + validateOperationSpec, + callback) as Promise; + } + + /** + * Lists all the security automations in the specified subscription. Use the 'nextLink' property in + * the response to get the next page of security automations for 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 + */ + 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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists all the security automations in the specified resource group. Use the 'nextLink' property + * in the response to get the next page of security automations for the specified 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/automations", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutomationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutomationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.automationName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Automation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.automationName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "automation", + mapper: { + ...Mappers.Automation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Automation + }, + 201: { + bodyMapper: Mappers.Automation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.automationName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const validateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}/validate", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.automationName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "automation", + mapper: { + ...Mappers.Automation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AutomationValidationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutomationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AutomationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/complianceResults.ts b/sdk/security/arm-security/src/operations/complianceResults.ts new file mode 100644 index 000000000000..66c2d16295d4 --- /dev/null +++ b/sdk/security/arm-security/src/operations/complianceResults.ts @@ -0,0 +1,192 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/complianceResultsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a ComplianceResults. */ +export class ComplianceResults { + private readonly client: SecurityCenterContext; + + /** + * Create a ComplianceResults. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security compliance results in the subscription + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Security Compliance Result + * @param resourceId The identifier of the resource. + * @param complianceResultName name of the desired assessment compliance result + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceId: string, complianceResultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param complianceResultName name of the desired assessment compliance result + * @param callback The callback + */ + get(resourceId: string, complianceResultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param complianceResultName name of the desired assessment compliance result + * @param options The optional parameters + * @param callback The callback + */ + get(resourceId: string, complianceResultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceId: string, complianceResultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + complianceResultName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Security compliance results in the 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 + */ + 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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/complianceResults", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComplianceResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}", + urlParameters: [ + Parameters.resourceId, + Parameters.complianceResultName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComplianceResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComplianceResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/compliances.ts b/sdk/security/arm-security/src/operations/compliances.ts index 73cb750b550e..951f8b8f7abb 100644 --- a/sdk/security/arm-security/src/operations/compliances.ts +++ b/sdk/security/arm-security/src/operations/compliances.ts @@ -136,7 +136,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -160,7 +160,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.complianceName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts new file mode 100644 index 000000000000..8906c9565522 --- /dev/null +++ b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts @@ -0,0 +1,320 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/deviceSecurityGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a DeviceSecurityGroups. */ +export class DeviceSecurityGroups { + private readonly client: SecurityCenterContext; + + /** + * Create a DeviceSecurityGroups. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Use this method get the list of device security groups for the specified IoT Hub resource. + * @param resourceId The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param callback The callback + */ + list(resourceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get the device security group for the specified IoT Hub resource. + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceId: string, deviceSecurityGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param callback The callback + */ + get(resourceId: string, deviceSecurityGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceId: string, deviceSecurityGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceId: string, deviceSecurityGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + deviceSecurityGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Use this method to creates or updates the device security group on a specified IoT Hub resource. + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param deviceSecurityGroup Security group object. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceId: string, deviceSecurityGroupName: string, deviceSecurityGroup: Models.DeviceSecurityGroup, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param deviceSecurityGroup Security group object. + * @param callback The callback + */ + createOrUpdate(resourceId: string, deviceSecurityGroupName: string, deviceSecurityGroup: Models.DeviceSecurityGroup, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param deviceSecurityGroup Security group object. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceId: string, deviceSecurityGroupName: string, deviceSecurityGroup: Models.DeviceSecurityGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceId: string, deviceSecurityGroupName: string, deviceSecurityGroup: Models.DeviceSecurityGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + deviceSecurityGroupName, + deviceSecurityGroup, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * User this method to deletes the device security group. + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceId: string, deviceSecurityGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param callback The callback + */ + deleteMethod(resourceId: string, deviceSecurityGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceId The identifier of the resource. + * @param deviceSecurityGroupName The name of the device security group. Note that the name of the + * device security group is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceId: string, deviceSecurityGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceId: string, deviceSecurityGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceId, + deviceSecurityGroupName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Use this method get the list of device security groups for the specified IoT Hub resource. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/deviceSecurityGroups", + urlParameters: [ + Parameters.resourceId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceSecurityGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + urlParameters: [ + Parameters.resourceId, + Parameters.deviceSecurityGroupName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceSecurityGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + urlParameters: [ + Parameters.resourceId, + Parameters.deviceSecurityGroupName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "deviceSecurityGroup", + mapper: { + ...Mappers.DeviceSecurityGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DeviceSecurityGroup + }, + 201: { + bodyMapper: Mappers.DeviceSecurityGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + urlParameters: [ + Parameters.resourceId, + Parameters.deviceSecurityGroupName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeviceSecurityGroupList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts index 08ce2d37ee85..fee408b7fe91 100644 --- a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.discoveredSecuritySolutionName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts index 564bd6cab181..dcf849fd1092 100644 --- a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.externalSecuritySolutionsName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index dd820149dfa7..49b74e193742 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -8,20 +8,40 @@ * regenerated. */ +export * from "./complianceResults"; export * from "./pricings"; -export * from "./securityContacts"; -export * from "./workspaceSettings"; -export * from "./autoProvisioningSettings"; -export * from "./compliances"; -export * from "./advancedThreatProtection"; +export * from "./alerts"; export * from "./settings"; -export * from "./informationProtectionPolicies"; -export * from "./operations"; +export * from "./advancedThreatProtection"; +export * from "./deviceSecurityGroups"; +export * from "./iotSecuritySolution"; +export * from "./iotSecuritySolutionAnalytics"; +export * from "./iotSecuritySolutionsAnalyticsAggregatedAlert"; +export * from "./iotSecuritySolutionsAnalyticsRecommendation"; export * from "./locations"; +export * from "./operations"; export * from "./tasks"; -export * from "./alerts"; -export * from "./discoveredSecuritySolutions"; +export * from "./autoProvisioningSettings"; +export * from "./compliances"; +export * from "./informationProtectionPolicies"; +export * from "./securityContacts"; +export * from "./workspaceSettings"; +export * from "./regulatoryComplianceStandards"; +export * from "./regulatoryComplianceControls"; +export * from "./regulatoryComplianceAssessments"; +export * from "./serverVulnerabilityAssessmentOperations"; +export * from "./subAssessments"; +export * from "./automations"; +export * from "./alertsSuppressionRules"; +export * from "./assessmentsMetadata"; +export * from "./assessments"; +export * from "./adaptiveApplicationControls"; +export * from "./adaptiveNetworkHardenings"; +export * from "./allowedConnections"; +export * from "./topology"; export * from "./jitNetworkAccessPolicies"; +export * from "./discoveredSecuritySolutions"; export * from "./externalSecuritySolutions"; -export * from "./topology"; -export * from "./allowedConnections"; +export * from "./secureScores"; +export * from "./secureScoreControls"; +export * from "./secureScoreControlDefinitions"; diff --git a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts index 59e511fb0445..4bcf11236eda 100644 --- a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts +++ b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts @@ -74,34 +74,38 @@ export class InformationProtectionPolicies { * (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. Possible * values include: 'effective', 'custom' + * @param informationProtectionPolicy Information protection policy. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, informationProtectionPolicy: Models.InformationProtectionPolicy, options?: msRest.RequestOptionsBase): Promise; /** * @param scope Scope of the query, can be subscription * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group * (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. Possible * values include: 'effective', 'custom' + * @param informationProtectionPolicy Information protection policy. * @param callback The callback */ - createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, informationProtectionPolicy: Models.InformationProtectionPolicy, callback: msRest.ServiceCallback): void; /** * @param scope Scope of the query, can be subscription * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group * (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. Possible * values include: 'effective', 'custom' + * @param informationProtectionPolicy Information protection policy. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, informationProtectionPolicy: Models.InformationProtectionPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, informationProtectionPolicyName: Models.InformationProtectionPolicyName1, informationProtectionPolicy: Models.InformationProtectionPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, informationProtectionPolicyName, + informationProtectionPolicy, options }, createOrUpdateOperationSpec, @@ -181,7 +185,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -205,11 +209,18 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "informationProtectionPolicy", + mapper: { + ...Mappers.InformationProtectionPolicy, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.InformationProtectionPolicy @@ -231,7 +242,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolution.ts b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts new file mode 100644 index 000000000000..8584de5ac36e --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts @@ -0,0 +1,497 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSecuritySolutionMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSecuritySolution. */ +export class IotSecuritySolution { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSecuritySolution. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Use this method to get the list of IoT Security solutions by subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.IotSecuritySolutionListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.IotSecuritySolutionListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.IotSecuritySolutionListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get the list IoT Security solutions organized by resource group. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.IotSecuritySolutionListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.IotSecuritySolutionListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.IotSecuritySolutionListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * User this method to get details of a specific IoT Security solution based on solution name + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Use this method to create or update yours IoT Security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param iotSecuritySolutionData The security solution data + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param iotSecuritySolutionData The security solution data + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param iotSecuritySolutionData The security solution data + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + iotSecuritySolutionData, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Use this method to update existing IoT Security solution tags or user defined resources. To + * update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param updateIotSecuritySolutionData The security solution data + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, solutionName: string, updateIotSecuritySolutionData: Models.UpdateIotSecuritySolutionData, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param updateIotSecuritySolutionData The security solution data + * @param callback The callback + */ + update(resourceGroupName: string, solutionName: string, updateIotSecuritySolutionData: Models.UpdateIotSecuritySolutionData, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param updateIotSecuritySolutionData The security solution data + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, solutionName: string, updateIotSecuritySolutionData: Models.UpdateIotSecuritySolutionData, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, solutionName: string, updateIotSecuritySolutionData: Models.UpdateIotSecuritySolutionData, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + updateIotSecuritySolutionData, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Use this method to delete yours IoT Security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Use this method to get the list of IoT Security solutions by subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get the list IoT Security solutions organized by 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "iotSecuritySolutionData", + mapper: { + ...Mappers.IoTSecuritySolutionModel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionModel + }, + 201: { + bodyMapper: Mappers.IoTSecuritySolutionModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateIotSecuritySolutionData", + mapper: { + ...Mappers.UpdateIotSecuritySolutionData, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts new file mode 100644 index 000000000000..e66f18882294 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionAnalytics.ts @@ -0,0 +1,150 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSecuritySolutionAnalyticsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSecuritySolutionAnalytics. */ +export class IotSecuritySolutionAnalytics { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSecuritySolutionAnalytics. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Use this method to get IoT security Analytics metrics in an array. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get IoT Security Analytics metrics. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionAnalyticsModelList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionAnalyticsModel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts new file mode 100644 index 000000000000..914c656d760d --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts @@ -0,0 +1,269 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSecuritySolutionsAnalyticsAggregatedAlertMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSecuritySolutionsAnalyticsAggregatedAlert. */ +export class IotSecuritySolutionsAnalyticsAggregatedAlert { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSecuritySolutionsAnalyticsAggregatedAlert. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Use this method to get the aggregated alert list of yours IoT Security solution. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, solutionName: string, options?: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, options: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, solutionName: string, options?: Models.IotSecuritySolutionsAnalyticsAggregatedAlertListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get a single the aggregated alert of yours IoT Security solution. This + * aggregation is performed by alert name. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + aggregatedAlertName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Use this method to dismiss an aggregated IoT Security Solution Alert. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param [options] The optional parameters + * @returns Promise + */ + dismiss(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param callback The callback + */ + dismiss(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedAlertName Identifier of the aggregated alert. + * @param options The optional parameters + * @param callback The callback + */ + dismiss(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + dismiss(resourceGroupName: string, solutionName: string, aggregatedAlertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + aggregatedAlertName, + options + }, + dismissOperationSpec, + callback); + } + + /** + * Use this method to get the aggregated alert list of yours IoT Security solution. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedAlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName, + Parameters.aggregatedAlertName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedAlert + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const dismissOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName, + Parameters.aggregatedAlertName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedAlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts new file mode 100644 index 000000000000..2801c7369e88 --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts @@ -0,0 +1,208 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/iotSecuritySolutionsAnalyticsRecommendationMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IotSecuritySolutionsAnalyticsRecommendation. */ +export class IotSecuritySolutionsAnalyticsRecommendation { + private readonly client: SecurityCenterContext; + + /** + * Create a IotSecuritySolutionsAnalyticsRecommendation. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Use this method to get the aggregated security analytics recommendation of yours IoT Security + * solution. This aggregation is performed by recommendation name. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, solutionName: string, aggregatedRecommendationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, aggregatedRecommendationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, solutionName: string, aggregatedRecommendationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, solutionName: string, aggregatedRecommendationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + aggregatedRecommendationName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get the list of aggregated security analytics recommendations of yours IoT + * Security solution. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, solutionName: string, options?: Models.IotSecuritySolutionsAnalyticsRecommendationListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The name of the IoT Security solution. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, options: Models.IotSecuritySolutionsAnalyticsRecommendationListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, solutionName: string, options?: Models.IotSecuritySolutionsAnalyticsRecommendationListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Use this method to get the list of aggregated security analytics recommendations of yours IoT + * Security solution. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName, + Parameters.aggregatedRecommendationName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedRecommendation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.solutionName + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedRecommendationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecurityAggregatedRecommendationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts index a9eca485751a..9659d3beb32d 100644 --- a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts +++ b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts @@ -413,7 +413,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -437,7 +437,7 @@ const listByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -461,7 +461,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -486,7 +486,7 @@ const listByResourceGroupAndRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -512,7 +512,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +538,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -571,7 +571,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -597,7 +597,7 @@ const initiateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyInitiateType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/locations.ts b/sdk/security/arm-security/src/operations/locations.ts index ca7e3a22f61b..6fddbae9fa18 100644 --- a/sdk/security/arm-security/src/operations/locations.ts +++ b/sdk/security/arm-security/src/operations/locations.ts @@ -116,7 +116,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -140,7 +140,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/operations.ts b/sdk/security/arm-security/src/operations/operations.ts index 76388bc9221b..15d396b057d3 100644 --- a/sdk/security/arm-security/src/operations/operations.ts +++ b/sdk/security/arm-security/src/operations/operations.ts @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Security/operations", queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/pricings.ts b/sdk/security/arm-security/src/operations/pricings.ts index 835af87be06a..e604f40d8222 100644 --- a/sdk/security/arm-security/src/operations/pricings.ts +++ b/sdk/security/arm-security/src/operations/pricings.ts @@ -27,7 +27,7 @@ export class Pricings { } /** - * Security pricing configurations in the subscription + * Lists Security Center pricing configurations in the subscription. * @param [options] The optional parameters * @returns Promise */ @@ -51,225 +51,63 @@ export class Pricings { } /** - * Security pricing configurations in the resource group - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. - * @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 { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configuration in the subscriptionSecurity pricing configuration in the - * subscription - * @param pricingName name of the pricing configuration - * @param [options] The optional parameters - * @returns Promise - */ - getSubscriptionPricing(pricingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param pricingName name of the pricing configuration - * @param callback The callback - */ - getSubscriptionPricing(pricingName: string, callback: msRest.ServiceCallback): void; - /** - * @param pricingName name of the pricing configuration - * @param options The optional parameters - * @param callback The callback - */ - getSubscriptionPricing(pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSubscriptionPricing(pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - pricingName, - options - }, - getSubscriptionPricingOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configuration in the subscription - * @param pricingName name of the pricing configuration - * @param pricing Pricing object - * @param [options] The optional parameters - * @returns Promise - */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; - /** - * @param pricingName name of the pricing configuration - * @param pricing Pricing object - * @param callback The callback - */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; - /** - * @param pricingName name of the pricing configuration - * @param pricing Pricing object - * @param options The optional parameters - * @param callback The callback - */ - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubscriptionPricing(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - pricingName, - pricing, - options - }, - updateSubscriptionPricingOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configuration in the resource group - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. + * Gets a provided Security Center pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options?: msRest.RequestOptionsBase): Promise; + get(pricingName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param callback The callback */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, callback: msRest.ServiceCallback): void; + get(pricingName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param options The optional parameters * @param callback The callback */ - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getResourceGroupPricing(resourceGroupName: string, pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(pricingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(pricingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, pricingName, options }, - getResourceGroupPricingOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * Security pricing configuration in the resource group - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. + * Updates a provided Security Center pricing configuration in the subscription. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; + update(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param callback The callback */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; + update(pricingName: string, pricing: Models.Pricing, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group within the user's subscription. The name - * is case insensitive. * @param pricingName name of the pricing configuration * @param pricing Pricing object * @param options The optional parameters * @param callback The callback */ - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateResourceGroupPricing(resourceGroupName: string, pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(pricingName: string, pricing: Models.Pricing, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(pricingName: string, pricing: Models.Pricing, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, pricingName, pricing, options }, - createOrUpdateResourceGroupPricingOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configurations in the 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 - */ - 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 { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * Security pricing configurations in the 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + updateOperationSpec, + callback) as Promise; } } @@ -282,7 +120,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -298,31 +136,7 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", urlParameters: [ @@ -330,7 +144,7 @@ const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -346,7 +160,7 @@ const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { serializer }; -const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { +const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}", urlParameters: [ @@ -354,7 +168,7 @@ const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -376,102 +190,3 @@ const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { }, serializer }; - -const getResourceGroupPricingOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.pricingName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Pricing - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOrUpdateResourceGroupPricingOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/pricings/{pricingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.pricingName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "pricing", - mapper: { - ...Mappers.Pricing, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Pricing - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PricingList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts new file mode 100644 index 000000000000..d9e7f429a94d --- /dev/null +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts @@ -0,0 +1,199 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/regulatoryComplianceAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceAssessments. */ +export class RegulatoryComplianceAssessments { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceAssessments. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Details and state of assessments mapped to selected regulatory compliance control + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param [options] The optional parameters + * @returns Promise + */ + list(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: Models.RegulatoryComplianceAssessmentsListOptionalParams): Promise; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param callback The callback + */ + list(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, callback: msRest.ServiceCallback): void; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param options The optional parameters + * @param callback The callback + */ + list(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options: Models.RegulatoryComplianceAssessmentsListOptionalParams, callback: msRest.ServiceCallback): void; + list(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: Models.RegulatoryComplianceAssessmentsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance details and state for selected assessment + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param [options] The optional parameters + * @returns Promise + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object + * @param options The optional parameters + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, regulatoryComplianceAssessmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + regulatoryComplianceAssessmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Details and state of assessments mapped to selected regulatory compliance control + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName + ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName, + Parameters.regulatoryComplianceAssessmentName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts new file mode 100644 index 000000000000..5d40b5b0688b --- /dev/null +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts @@ -0,0 +1,189 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/regulatoryComplianceControlsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceControls. */ +export class RegulatoryComplianceControls { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceControls. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * All supported regulatory compliance controls details and state for selected standard + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param [options] The optional parameters + * @returns Promise + */ + list(regulatoryComplianceStandardName: string, options?: Models.RegulatoryComplianceControlsListOptionalParams): Promise; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param callback The callback + */ + list(regulatoryComplianceStandardName: string, callback: msRest.ServiceCallback): void; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param options The optional parameters + * @param callback The callback + */ + list(regulatoryComplianceStandardName: string, options: Models.RegulatoryComplianceControlsListOptionalParams, callback: msRest.ServiceCallback): void; + list(regulatoryComplianceStandardName: string, options?: Models.RegulatoryComplianceControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regulatoryComplianceStandardName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Selected regulatory compliance control details and state + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param [options] The optional parameters + * @returns Promise + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, callback: msRest.ServiceCallback): void; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param regulatoryComplianceControlName Name of the regulatory compliance control object + * @param options The optional parameters + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regulatoryComplianceStandardName: string, regulatoryComplianceControlName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regulatoryComplianceStandardName, + regulatoryComplianceControlName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * All supported regulatory compliance controls details and state for selected standard + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regulatoryComplianceStandardName + ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regulatoryComplianceStandardName, + Parameters.regulatoryComplianceControlName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControl + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts new file mode 100644 index 000000000000..07b2a60f5258 --- /dev/null +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts @@ -0,0 +1,179 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/regulatoryComplianceStandardsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a RegulatoryComplianceStandards. */ +export class RegulatoryComplianceStandards { + private readonly client: SecurityCenterContext; + + /** + * Create a RegulatoryComplianceStandards. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Supported regulatory compliance standards details and state + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.RegulatoryComplianceStandardsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.RegulatoryComplianceStandardsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.RegulatoryComplianceStandardsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance details state for selected standard + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param [options] The optional parameters + * @returns Promise + */ + get(regulatoryComplianceStandardName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, callback: msRest.ServiceCallback): void; + /** + * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object + * @param options The optional parameters + * @param callback The callback + */ + get(regulatoryComplianceStandardName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regulatoryComplianceStandardName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regulatoryComplianceStandardName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Supported regulatory compliance standards details and state + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion6, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandardList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regulatoryComplianceStandardName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandard + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RegulatoryComplianceStandardList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts new file mode 100644 index 000000000000..8f276006fba3 --- /dev/null +++ b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts @@ -0,0 +1,219 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/secureScoreControlDefinitionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecureScoreControlDefinitions. */ +export class SecureScoreControlDefinitions { + private readonly client: SecurityCenterContext; + + /** + * Create a SecureScoreControlDefinitions. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get definition information on all secure score controls + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get definition information on all secure score controls in subscription level + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Get definition information on all secure score controls + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Get definition information on all secure score controls in subscription level + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Security/secureScoreControlDefinitions", + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlDefinitionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScoreControlDefinitions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlDefinitionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlDefinitionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlDefinitionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/secureScoreControls.ts b/sdk/security/arm-security/src/operations/secureScoreControls.ts new file mode 100644 index 000000000000..28c52529053a --- /dev/null +++ b/sdk/security/arm-security/src/operations/secureScoreControls.ts @@ -0,0 +1,229 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/secureScoreControlsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecureScoreControls. */ +export class SecureScoreControls { + private readonly client: SecurityCenterContext; + + /** + * Create a SecureScoreControls. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get all secure score controls on specific initiatives inside a scope + * @param secureScoreName The secure score initiative name + * @param [options] The optional parameters + * @returns Promise + */ + listBySecureScore(secureScoreName: string, options?: Models.SecureScoreControlsListBySecureScoreOptionalParams): Promise; + /** + * @param secureScoreName The secure score initiative name + * @param callback The callback + */ + listBySecureScore(secureScoreName: string, callback: msRest.ServiceCallback): void; + /** + * @param secureScoreName The secure score initiative name + * @param options The optional parameters + * @param callback The callback + */ + listBySecureScore(secureScoreName: string, options: Models.SecureScoreControlsListBySecureScoreOptionalParams, callback: msRest.ServiceCallback): void; + listBySecureScore(secureScoreName: string, options?: Models.SecureScoreControlsListBySecureScoreOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + secureScoreName, + options + }, + listBySecureScoreOperationSpec, + callback) as Promise; + } + + /** + * Get all secure score controls on specific initiatives inside a scope + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.SecureScoreControlsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.SecureScoreControlsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.SecureScoreControlsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get all secure score controls on specific initiatives inside a scope + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySecureScoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySecureScoreNext(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 + */ + listBySecureScoreNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySecureScoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySecureScoreNextOperationSpec, + callback) as Promise; + } + + /** + * Get all secure score controls on specific initiatives inside a scope + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySecureScoreOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}/secureScoreControls", + urlParameters: [ + Parameters.subscriptionId, + Parameters.secureScoreName + ], + queryParameters: [ + Parameters.apiVersion8, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScoreControls", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySecureScoreNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreControlList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/secureScores.ts b/sdk/security/arm-security/src/operations/secureScores.ts new file mode 100644 index 000000000000..e873d1617bda --- /dev/null +++ b/sdk/security/arm-security/src/operations/secureScores.ts @@ -0,0 +1,178 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/secureScoresMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SecureScores. */ +export class SecureScores { + private readonly client: SecurityCenterContext; + + /** + * Create a SecureScores. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get secure scores on all your initiatives inside a scope + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get secure score for a specific initiatives inside a scope + * @param secureScoreName The secure score initiative name + * @param [options] The optional parameters + * @returns Promise + */ + get(secureScoreName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param secureScoreName The secure score initiative name + * @param callback The callback + */ + get(secureScoreName: string, callback: msRest.ServiceCallback): void; + /** + * @param secureScoreName The secure score initiative name + * @param options The optional parameters + * @param callback The callback + */ + get(secureScoreName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(secureScoreName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + secureScoreName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Get secure scores on all your initiatives inside a scope + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.secureScoreName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoreItem + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecureScoresList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/securityContacts.ts b/sdk/security/arm-security/src/operations/securityContacts.ts index d96d049f457f..e368e7b7cf1f 100644 --- a/sdk/security/arm-security/src/operations/securityContacts.ts +++ b/sdk/security/arm-security/src/operations/securityContacts.ts @@ -208,7 +208,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -232,7 +232,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -256,7 +256,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -287,7 +287,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -309,7 +309,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.securityContactName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts new file mode 100644 index 000000000000..660a35067e2d --- /dev/null +++ b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts @@ -0,0 +1,313 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverVulnerabilityAssessmentOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a ServerVulnerabilityAssessmentOperations. */ +export class ServerVulnerabilityAssessmentOperations { + private readonly client: SecurityCenterContext; + + /** + * Create a ServerVulnerabilityAssessmentOperations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Gets a list of server vulnerability assessment onboarding statuses on a given resource. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + listByExtendedResourceOperationSpec, + callback) as Promise; + } + + /** + * Gets a server vulnerability assessment onboarding statuses on a given resource. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creating a server vulnerability assessment on a resource, which will onboard a resource for + * having a vulnerability assessment on it + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removing server vulnerability assessment from a resource. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param resourceNamespace The Namespace of the resource. + * @param resourceType The type of the resource. + * @param resourceName Name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceNamespace, + resourceType, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByExtendedResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.serverVulnerabilityAssessment + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.serverVulnerabilityAssessment + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: { + bodyMapper: Mappers.ServerVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceNamespace, + Parameters.resourceType, + Parameters.resourceName, + Parameters.serverVulnerabilityAssessment + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index b5d38a326868..dfe07c34cb90 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -52,18 +52,18 @@ export class Settings { /** * Settings of different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param [options] The optional parameters * @returns Promise */ get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param callback The callback */ get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param options The optional parameters * @param callback The callback */ @@ -80,20 +80,20 @@ export class Settings { /** * updating settings about different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param [options] The optional parameters * @returns Promise */ update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param callback The callback */ update(settingName: Models.SettingName1, setting: Models.SettingUnion, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param options The optional parameters * @param callback The callback @@ -148,7 +148,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -172,7 +172,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -196,7 +196,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.settingName0 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/subAssessments.ts b/sdk/security/arm-security/src/operations/subAssessments.ts new file mode 100644 index 000000000000..64a0fbc45549 --- /dev/null +++ b/sdk/security/arm-security/src/operations/subAssessments.ts @@ -0,0 +1,314 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/subAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a SubAssessments. */ +export class SubAssessments { + private readonly client: SecurityCenterContext; + + /** + * Create a SubAssessments. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Get security sub-assessments on all your scanned resources inside a subscription scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param [options] The optional parameters + * @returns Promise + */ + listAll(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param callback The callback + */ + listAll(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param options The optional parameters + * @param callback The callback + */ + listAll(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAll(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listAllOperationSpec, + callback) as Promise; + } + + /** + * Get security sub-assessments on all your scanned resources inside a scope + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, assessmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param callback The callback + */ + list(scope: string, assessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, assessmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, assessmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + assessmentName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get a security sub-assessment on your scanned resource + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, assessmentName: string, subAssessmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type + * @param callback The callback + */ + get(scope: string, assessmentName: string, subAssessmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope Scope of the query, can be subscription + * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group + * (/providers/Microsoft.Management/managementGroups/mgName). + * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, assessmentName: string, subAssessmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, assessmentName: string, subAssessmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + assessmentName, + subAssessmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Get security sub-assessments on all your scanned resources inside a subscription scope + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listAllNext(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 + */ + listAllNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listAllNextOperationSpec, + callback) as Promise; + } + + /** + * Get security sub-assessments on all your scanned resources inside a scope + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listAllOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/subAssessments", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySubAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments", + urlParameters: [ + Parameters.scope, + Parameters.assessmentName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySubAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments/{subAssessmentName}", + urlParameters: [ + Parameters.scope, + Parameters.assessmentName, + Parameters.subAssessmentName + ], + queryParameters: [ + Parameters.apiVersion6 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySubAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listAllNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySubAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecuritySubAssessmentList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/tasks.ts b/sdk/security/arm-security/src/operations/tasks.ts index cf2414a50cfe..28712385dcf5 100644 --- a/sdk/security/arm-security/src/operations/tasks.ts +++ b/sdk/security/arm-security/src/operations/tasks.ts @@ -339,7 +339,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter ], headerParameters: [ @@ -364,7 +364,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter ], headerParameters: [ @@ -390,7 +390,7 @@ const getSubscriptionLevelTaskOperationSpec: msRest.OperationSpec = { Parameters.taskName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -416,7 +416,7 @@ const updateSubscriptionLevelTaskStateOperationSpec: msRest.OperationSpec = { Parameters.taskUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -439,7 +439,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion4, Parameters.filter ], headerParameters: [ @@ -466,7 +466,7 @@ const getResourceGroupLevelTaskOperationSpec: msRest.OperationSpec = { Parameters.taskName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -493,7 +493,7 @@ const updateResourceGroupLevelTaskStateOperationSpec: msRest.OperationSpec = { Parameters.taskUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/topology.ts b/sdk/security/arm-security/src/operations/topology.ts index 29881ed37736..05a1723a8999 100644 --- a/sdk/security/arm-security/src/operations/topology.ts +++ b/sdk/security/arm-security/src/operations/topology.ts @@ -175,7 +175,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.topologyResourceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion7 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/workspaceSettings.ts b/sdk/security/arm-security/src/operations/workspaceSettings.ts index 7aa4886714a4..242206b5175f 100644 --- a/sdk/security/arm-security/src/operations/workspaceSettings.ts +++ b/sdk/security/arm-security/src/operations/workspaceSettings.ts @@ -27,7 +27,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +52,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param workspaceSettingName Name of the security setting * @param [options] The optional parameters * @returns Promise @@ -172,7 +174,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -209,7 +212,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -233,7 +236,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -257,7 +260,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -288,7 +291,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -319,7 +322,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.workspaceSettingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index 5b1f4c9ebf51..5f78c4465490 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -17,23 +17,43 @@ import { SecurityCenterContext } from "./securityCenterContext"; class SecurityCenter extends SecurityCenterContext { // Operation groups + complianceResults: operations.ComplianceResults; pricings: operations.Pricings; - securityContacts: operations.SecurityContacts; - workspaceSettings: operations.WorkspaceSettings; - autoProvisioningSettings: operations.AutoProvisioningSettings; - compliances: operations.Compliances; - advancedThreatProtection: operations.AdvancedThreatProtection; + alerts: operations.Alerts; settings: operations.Settings; - informationProtectionPolicies: operations.InformationProtectionPolicies; - operations: operations.Operations; + advancedThreatProtection: operations.AdvancedThreatProtection; + deviceSecurityGroups: operations.DeviceSecurityGroups; + iotSecuritySolution: operations.IotSecuritySolution; + iotSecuritySolutionAnalytics: operations.IotSecuritySolutionAnalytics; + iotSecuritySolutionsAnalyticsAggregatedAlert: operations.IotSecuritySolutionsAnalyticsAggregatedAlert; + iotSecuritySolutionsAnalyticsRecommendation: operations.IotSecuritySolutionsAnalyticsRecommendation; locations: operations.Locations; + operations: operations.Operations; tasks: operations.Tasks; - alerts: operations.Alerts; - discoveredSecuritySolutions: operations.DiscoveredSecuritySolutions; + autoProvisioningSettings: operations.AutoProvisioningSettings; + compliances: operations.Compliances; + informationProtectionPolicies: operations.InformationProtectionPolicies; + securityContacts: operations.SecurityContacts; + workspaceSettings: operations.WorkspaceSettings; + regulatoryComplianceStandards: operations.RegulatoryComplianceStandards; + regulatoryComplianceControls: operations.RegulatoryComplianceControls; + regulatoryComplianceAssessments: operations.RegulatoryComplianceAssessments; + serverVulnerabilityAssessment: operations.ServerVulnerabilityAssessmentOperations; + subAssessments: operations.SubAssessments; + automations: operations.Automations; + alertsSuppressionRules: operations.AlertsSuppressionRules; + assessmentsMetadata: operations.AssessmentsMetadata; + assessments: operations.Assessments; + adaptiveApplicationControls: operations.AdaptiveApplicationControls; + adaptiveNetworkHardenings: operations.AdaptiveNetworkHardenings; + allowedConnections: operations.AllowedConnections; + topology: operations.Topology; jitNetworkAccessPolicies: operations.JitNetworkAccessPolicies; + discoveredSecuritySolutions: operations.DiscoveredSecuritySolutions; externalSecuritySolutions: operations.ExternalSecuritySolutions; - topology: operations.Topology; - allowedConnections: operations.AllowedConnections; + secureScores: operations.SecureScores; + secureScoreControls: operations.SecureScoreControls; + secureScoreControlDefinitions: operations.SecureScoreControlDefinitions; /** * Initializes a new instance of the SecurityCenter class. @@ -45,23 +65,43 @@ class SecurityCenter extends SecurityCenterContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, ascLocation: string, options?: Models.SecurityCenterOptions) { super(credentials, subscriptionId, ascLocation, options); + this.complianceResults = new operations.ComplianceResults(this); this.pricings = new operations.Pricings(this); - this.securityContacts = new operations.SecurityContacts(this); - this.workspaceSettings = new operations.WorkspaceSettings(this); - this.autoProvisioningSettings = new operations.AutoProvisioningSettings(this); - this.compliances = new operations.Compliances(this); - this.advancedThreatProtection = new operations.AdvancedThreatProtection(this); + this.alerts = new operations.Alerts(this); this.settings = new operations.Settings(this); - this.informationProtectionPolicies = new operations.InformationProtectionPolicies(this); - this.operations = new operations.Operations(this); + this.advancedThreatProtection = new operations.AdvancedThreatProtection(this); + this.deviceSecurityGroups = new operations.DeviceSecurityGroups(this); + this.iotSecuritySolution = new operations.IotSecuritySolution(this); + this.iotSecuritySolutionAnalytics = new operations.IotSecuritySolutionAnalytics(this); + this.iotSecuritySolutionsAnalyticsAggregatedAlert = new operations.IotSecuritySolutionsAnalyticsAggregatedAlert(this); + this.iotSecuritySolutionsAnalyticsRecommendation = new operations.IotSecuritySolutionsAnalyticsRecommendation(this); this.locations = new operations.Locations(this); + this.operations = new operations.Operations(this); this.tasks = new operations.Tasks(this); - this.alerts = new operations.Alerts(this); - this.discoveredSecuritySolutions = new operations.DiscoveredSecuritySolutions(this); + this.autoProvisioningSettings = new operations.AutoProvisioningSettings(this); + this.compliances = new operations.Compliances(this); + this.informationProtectionPolicies = new operations.InformationProtectionPolicies(this); + this.securityContacts = new operations.SecurityContacts(this); + this.workspaceSettings = new operations.WorkspaceSettings(this); + this.regulatoryComplianceStandards = new operations.RegulatoryComplianceStandards(this); + this.regulatoryComplianceControls = new operations.RegulatoryComplianceControls(this); + this.regulatoryComplianceAssessments = new operations.RegulatoryComplianceAssessments(this); + this.serverVulnerabilityAssessment = new operations.ServerVulnerabilityAssessmentOperations(this); + this.subAssessments = new operations.SubAssessments(this); + this.automations = new operations.Automations(this); + this.alertsSuppressionRules = new operations.AlertsSuppressionRules(this); + this.assessmentsMetadata = new operations.AssessmentsMetadata(this); + this.assessments = new operations.Assessments(this); + this.adaptiveApplicationControls = new operations.AdaptiveApplicationControls(this); + this.adaptiveNetworkHardenings = new operations.AdaptiveNetworkHardenings(this); + this.allowedConnections = new operations.AllowedConnections(this); + this.topology = new operations.Topology(this); this.jitNetworkAccessPolicies = new operations.JitNetworkAccessPolicies(this); + this.discoveredSecuritySolutions = new operations.DiscoveredSecuritySolutions(this); this.externalSecuritySolutions = new operations.ExternalSecuritySolutions(this); - this.topology = new operations.Topology(this); - this.allowedConnections = new operations.AllowedConnections(this); + this.secureScores = new operations.SecureScores(this); + this.secureScoreControls = new operations.SecureScoreControls(this); + this.secureScoreControlDefinitions = new operations.SecureScoreControlDefinitions(this); } } diff --git a/sdk/security/arm-security/src/securityCenterContext.ts b/sdk/security/arm-security/src/securityCenterContext.ts index 1456da91b8ae..e740963ad836 100644 --- a/sdk/security/arm-security/src/securityCenterContext.ts +++ b/sdk/security/arm-security/src/securityCenterContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-security"; -const packageVersion = "0.1.0"; +const packageVersion = "2.0.0"; export class SecurityCenterContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/security/arm-security/tsconfig.json +++ b/sdk/security/arm-security/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/servicebus/ci.yml b/sdk/servicebus/ci.yml index 2f32f25f5584..2c29da850840 100644 --- a/sdk/servicebus/ci.yml +++ b/sdk/servicebus/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/servicebus/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: servicebus - Artifacts: - - name: azure-service-bus - safeName: azureservicebus +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: servicebus + Artifacts: + - name: azure-service-bus + safeName: azureservicebus diff --git a/sdk/servicebus/service-bus/.vscode/launch.json b/sdk/servicebus/service-bus/.vscode/launch.json index 8e398fd1cd92..2035f40fe6d0 100644 --- a/sdk/servicebus/service-bus/.vscode/launch.json +++ b/sdk/servicebus/service-bus/.vscode/launch.json @@ -1,34 +1,35 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Debug sample", - "program": "${file}", - "preLaunchTask": "npm: build:samples", - "outFiles": [ - "${workspaceFolder}/dist-esm/**/*.js" - ] - }, - { - "type": "node", - "request": "launch", - "name": "Debug Unit Tests", - "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", - "args": [ - "-u", - "tdd", - "--timeout", - "999999", - "--colors", - "${workspaceFolder}/test-dist/index.js" - ], - "internalConsoleOptions": "openOnSessionStart", - "preLaunchTask": "npm: build:test" - } - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug sample", + "program": "${file}", + "preLaunchTask": "npm: build:samples", + "outFiles": ["${workspaceFolder}/dist-esm/**/*.js"] + }, + { + "type": "node", + "request": "launch", + "name": "Debug Unit Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-r", + "esm", + "--require", + "source-map-support/register", + "--timeout", + "120000", + "--full-trace", + "dist-esm/test/*.spec.js", + "dist-esm/test/**/*.spec.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build:test" + } + ] } diff --git a/sdk/servicebus/service-bus/CHANGELOG.md b/sdk/servicebus/service-bus/CHANGELOG.md index 8364539b86b5..4e0f4fbafe17 100644 --- a/sdk/servicebus/service-bus/CHANGELOG.md +++ b/sdk/servicebus/service-bus/CHANGELOG.md @@ -1,9 +1,25 @@ # Release History -## 7.0.0-preview.3 (Unreleased) +## 7.0.0-preview.4 (Unreleased) + +- Adds abortSignal support throughout Sender and non-session Receivers. + [PR 9233](https://github.com/Azure/azure-sdk-for-js/pull/9233) + [PR 9284](https://github.com/Azure/azure-sdk-for-js/pull/9284) + +## 7.0.0-preview.3 (2020-06-08) - Improves the performance of the `ServiceBusMessageBatch.tryAdd` method. [PR 8772](https://github.com/Azure/azure-sdk-for-js/pull/8772) +- Added management api features which allows CRUD operations on the entities of a namespace. + [PR 9116](https://github.com/Azure/azure-sdk-for-js/pull/9116) + [PR 9221](https://github.com/Azure/azure-sdk-for-js/pull/9221) + +### Breaking Changes + +- `ServiceBusClient.createSender()` which was made async in the previous preview to include the link initialization is no longer async. Instead, the sender now has an `open()` method that can be used to proactively initialize the link. + [PR 9302](https://github.com/Azure/azure-sdk-for-js/pull/9302) +- `Receiver/SessionReceiver.browseMessages()` has been renamed to `Receiver/SessionReceiver.peekMessages()`. + [PR 9280](https://github.com/Azure/azure-sdk-for-js/pull/9280) ## 7.0.0-preview.2 (2020-05-05) @@ -29,7 +45,7 @@ - This release is a preview of our efforts to create a client library that is user friendly and idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the - [Azure SDK Design Guidelines for TypeScript](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html). + [Azure SDK Design Guidelines for TypeScript](https://azure.github.io/azure-sdk/typescript_introduction.html). We also provide a migration guide for users familiar with the stable package that would like to try the preview: [migration guide to move from Service Bus V1 to Service Bus V7 Preview](https://github.com/azure/azure-sdk-for-js/blob/%40azure/service-bus_7.0.0-preview.1/sdk/servicebus/service-bus/migrationguide.md). diff --git a/sdk/servicebus/service-bus/README.md b/sdk/servicebus/service-bus/README.md index 1b153a726337..4695fcbd8115 100644 --- a/sdk/servicebus/service-bus/README.md +++ b/sdk/servicebus/service-bus/README.md @@ -7,7 +7,7 @@ Use the client library `@azure/service-bus` in your application to - Send messages to an Azure Service Bus Queue or Topic - Receive messages from an Azure Service Bus Queue or Subscription -Resources for the v7.0.0-preview.2 of `@azure/service-bus`: +Resources for the v7.0.0-preview.3 of `@azure/service-bus`: [Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus) | [Package (npm)](https://www.npmjs.com/package/@azure/service-bus) | @@ -92,6 +92,7 @@ The following sections provide code snippets that cover some of the common tasks - [Settle a message](#settle-a-message) - [Send messages using Sessions](#send-messages-using-sessions) - [Receive messages from Sessions](#receive-messages-from-sessions) +- [Manage resources of a service bus namespace](#manage-resources-of-a-service-bus-namespace) - [Additional samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples) ### Send messages @@ -102,7 +103,7 @@ using the [createSender][sbclient_createsender] method. This gives you a sender which you can use to [send][sender_send] messages. ```javascript -const sender = await serviceBusClient.createSender("my-queue"); +const sender = serviceBusClient.createSender("my-queue"); // sending a single message await sender.send({ @@ -189,7 +190,7 @@ When sending the message, set the `sessionId` property in the message to ensure your message lands in the right session. ```javascript -const sender = await serviceBusClient.createSender("my-session-queue"); +const sender = serviceBusClient.createSender("my-session-queue"); await sender.send({ body: "my-message-body", sessionId: "my-session" @@ -238,6 +239,30 @@ Once the receiver is created you can use choose between 3 ways to receive messag You can read more about how sessions work [here][docsms_messagesessions]. +### Manage resources of a service bus namespace + +`ServiceBusManagementClient` lets you manage a namespace with CRUD operations on the entities(queues, topics, and subscriptions) and on the rules of a subscription. + +- Supports authentication with a service bus connection string as well as with the AAD credentials from `@azure/identity` similar to the `ServiceBusClient`. + +```js +// Get the connection string from the portal +// OR +// use the token credential overload, provide the host name of your Service Bus instance and the AAD credentials from the @azure/identity library +const serviceBusManagementClient = new ServiceBusManagementClient(""); + +// Similarly, you can create topics and subscriptions as well. +const createQueueResponse = await serviceBusManagementClient.createQueue(queueName); +console.log("Created queue with name - ", createQueueResponse.name); + +const queueRuntimeInfo = await serviceBusManagementClient.getQueueRuntimeInfo(queueName); +console.log("Number of messages in the queue = ", queueRuntimeInfo.messageCount); + +await serviceBusManagementClient.deleteQueue(queueName); +``` + +- Sample for reference - [managementClient.ts](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/typescript/src/advanced/managementClient.ts) + ## Troubleshooting ## AMQP Dependencies @@ -302,20 +327,20 @@ If you'd like to contribute to this library, please read the [contributing guide ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fservicebus%2Fservice-bus%2FREADME.png) -[apiref]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/index.html -[sbclient]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/classes/servicebusclient.html -[sbclient_constructor]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/classes/servicebusclient.html#constructor -[sbclient_createsender]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/classes/servicebusclient.html#createsender -[sbclient_createreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/classes/servicebusclient.html#createreceiver -[sbclient_createsessionreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/classes/servicebusclient.html#createsessionreceiver -[sender]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/sender.html -[sender_send]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/sender.html#send -[receiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/receiver.html -[receiverreceivebatch]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/receiver.html#receivebatch -[receiver_subscribe]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/receiver.html#subscribe -[receiver_getmessageiterator]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/receiver.html#getmessageiterator -[sessionreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.2/interfaces/sessionreceiver.html -[migrationguide]: https://github.com/Azure/azure-sdk-for-js/blob/%40azure/service-bus_7.0.0-preview.2/sdk/servicebus/service-bus/migrationguide.md +[apiref]: https://aka.ms/azsdk/js/service-bus/docs +[sbclient]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/classes/servicebusclient.html +[sbclient_constructor]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/classes/servicebusclient.html#constructor +[sbclient_createsender]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/classes/servicebusclient.html#createsender +[sbclient_createreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/classes/servicebusclient.html#createreceiver +[sbclient_createsessionreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/classes/servicebusclient.html#createsessionreceiver +[sender]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/sender.html +[sender_send]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/sender.html#send +[receiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/receiver.html +[receiverreceivebatch]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/receiver.html#receivebatch +[receiver_subscribe]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/receiver.html#subscribe +[receiver_getmessageiterator]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/receiver.html#getmessageiterator +[sessionreceiver]: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-service-bus/7.0.0-preview.3/interfaces/sessionreceiver.html +[migrationguide]: https://github.com/Azure/azure-sdk-for-js/blob/%40azure/service-bus_7.0.0-preview.3/sdk/servicebus/service-bus/migrationguide.md [docsms_messagesessions]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sessions [docsms_messagesessions_fifo]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sessions#first-in-first-out-fifo-pattern [queue_concept]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview#queues diff --git a/sdk/servicebus/service-bus/migrationguide.md b/sdk/servicebus/service-bus/migrationguide.md index 70e63f3c8cb7..4fcc0ce4d9fe 100644 --- a/sdk/servicebus/service-bus/migrationguide.md +++ b/sdk/servicebus/service-bus/migrationguide.md @@ -1,4 +1,4 @@ -# Guide to migrate from @azure/service-bus v1 to v7.preview.2 +# Guide to migrate from @azure/service-bus v1 to v7.preview.3 This document is intended for users that would like to try out preview 7 for @azure/service-bus. As the package is in preview, these details might @@ -87,7 +87,7 @@ brings this package in line with the [Azure SDK Design Guidelines for Typescript }); ``` -* `peek()`is renamed to `browseMessages()` to avoid confusion with the PeekLock mode +* `peekBySequenceNumber()`is removed in favor of an overload to `peekMessages()` that would take the sequence number to start peeking from in the options. * Subscription rule management has been moved to its own class, rather than being part of the now-removed `SubscriptionClient` @@ -108,11 +108,11 @@ brings this package in line with the [Azure SDK Design Guidelines for Typescript ruleManager.removeRule(); ``` -* createSender() and createSessionReceiver() are now async methods and initialize the connection +* createSessionReceiver() is now an async method. The promise returned by this method + is resolved when a receiver link has been initialized with a session in the service. -Prior to v7 `createSender()` and `createSessionReceiver()` worked using lazy-initialization, where the -AMQP connection would only be initialized on first send or receiving of a message. - -The connection and link are now initialized after calling either method. +Prior to v7 `createSessionReceiver()` worked using lazy-initialization, where the +receiver link to the session was only initialized when the async methods on the `SessionReceiver` +were first called. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fservicebus%2Fservice-bus%2FMIGRATIONGUIDE.png) diff --git a/sdk/servicebus/service-bus/package.json b/sdk/servicebus/service-bus/package.json index 180a98557395..e9b502e62154 100644 --- a/sdk/servicebus/service-bus/package.json +++ b/sdk/servicebus/service-bus/package.json @@ -2,7 +2,7 @@ "name": "@azure/service-bus", "sdk-type": "client", "author": "Microsoft Corporation", - "version": "7.0.0-preview.3", + "version": "7.0.0-preview.4", "license": "MIT", "description": "Azure Service Bus SDK for Node.js", "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus", @@ -60,7 +60,7 @@ "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", "execute:samples": "echo skipped", "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "format": "prettier --write --config ../../.prettierrc.json \"samples/**/*.{ts,js}\" \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 120000 --full-trace dist-esm/test/*.spec.js dist-esm/test/**/*.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", @@ -86,7 +86,7 @@ }, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-amqp": "^1.1.1", + "@azure/core-amqp": "^1.1.3", "@azure/core-asynciterator-polyfill": "^1.0.0", "@azure/core-http": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.8", @@ -98,7 +98,7 @@ "is-buffer": "^2.0.3", "long": "^4.0.0", "process": "^0.11.10", - "tslib": "^1.10.0", + "tslib": "^2.0.0", "rhea-promise": "^1.0.0" }, "devDependencies": { @@ -109,23 +109,22 @@ "@rollup/plugin-inject": "^4.0.0", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", - "@types/async-lock": "^1.1.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", "@types/debug": "^4.1.4", "@types/glob": "^7.1.1", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/ws": "^6.0.1", + "@types/ws": "^7.2.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-exclude": "^2.0.2", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "delay": "^4.2.0", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", @@ -136,7 +135,6 @@ "eslint-plugin-promise": "^4.1.1", "esm": "^3.2.18", "glob": "^7.1.2", - "https-proxy-agent": "^3.0.1", "karma": "^4.0.1", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", @@ -154,14 +152,14 @@ "nyc": "^14.0.0", "prettier": "^1.16.4", "promise": "^8.0.3", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "ws": "^7.1.1" } } diff --git a/sdk/servicebus/service-bus/review/service-bus.api.md b/sdk/servicebus/service-bus/review/service-bus.api.md index 57222db7e05e..dea722fbe1b7 100644 --- a/sdk/servicebus/service-bus/review/service-bus.api.md +++ b/sdk/servicebus/service-bus/review/service-bus.api.md @@ -8,29 +8,46 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { AmqpMessage } from '@azure/core-amqp'; import { delay } from '@azure/core-amqp'; import { Delivery } from 'rhea-promise'; +import { HttpOperationResponse } from '@azure/core-http'; import Long from 'long'; import { MessagingError } from '@azure/core-amqp'; import { OperationTracingOptions } from '@azure/core-tracing'; +import { ProxySettings } from '@azure/core-http'; import { RetryOptions } from '@azure/core-amqp'; +import { ServiceClient } from '@azure/core-http'; import { TokenCredential } from '@azure/core-amqp'; import { TokenType } from '@azure/core-amqp'; import { WebSocketImpl } from 'rhea-promise'; import { WebSocketOptions } from '@azure/core-amqp'; // @public -export interface BrowseMessagesOptions extends OperationOptions { - fromSequenceNumber?: Long; - maxMessageCount?: number; -} +export type AuthorizationRule = { + claimType: string; + claimValue: string; + rights: { + accessRights?: string[]; + }; + keyName: string; + primaryKey?: string; + secondaryKey?: string; +}; // @public -export interface CreateBatchOptions extends OperationOptions { - maxSizeInBytes?: number; +export interface CorrelationRuleFilter { + contentType?: string; + correlationId?: string; + label?: string; + messageId?: string; + replyTo?: string; + replyToSessionId?: string; + sessionId?: string; + to?: string; + userProperties?: any; } // @public -export interface CreateSenderOptions { - abortSignal?: AbortSignalLike; +export interface CreateBatchOptions extends OperationOptions { + maxSizeInBytes?: number; } // @public @@ -47,10 +64,28 @@ export { delay } export { Delivery } +// @public +export type EntityStatus = "Active" | "Creating" | "Deleting" | "ReceiveDisabled" | "SendDisabled" | "Disabled" | "Renaming" | "Restoring" | "Unknown"; + // @public export interface GetMessageIteratorOptions extends OperationOptions, WaitTimeOptions { } +// @public +export interface ListRequestOptions { + skip?: number; + top?: number; +} + +// @public +export type MessageCountDetails = { + activeMessageCount: number; + deadLetterMessageCount: number; + scheduledMessageCount: number; + transferMessageCount: number; + transferDeadLetterMessageCount: number; +}; + // @public export interface MessageHandlerOptions { autoComplete?: boolean; @@ -66,12 +101,80 @@ export interface MessageHandlers { export { MessagingError } +// @public +export interface NamespaceProperties { + createdOn: Date; + messagingSku: string; + messagingUnits: number | undefined; + name: string; + namespaceType: string; + updatedOn: Date; +} + +// @public +export interface NamespacePropertiesResponse extends NamespaceProperties, Response { +} + // @public export interface OperationOptions { abortSignal?: AbortSignalLike; tracingOptions?: OperationTracingOptions; } +// @public +export interface PeekMessagesOptions extends OperationOptions { + fromSequenceNumber?: Long; + maxMessageCount?: number; +} + +// @public +export interface QueueDescription { + authorizationRules?: AuthorizationRule[]; + autoDeleteOnIdle?: string; + deadLetteringOnMessageExpiration?: boolean; + defaultMessageTtl?: string; + duplicateDetectionHistoryTimeWindow?: string; + enableBatchedOperations?: boolean; + enablePartitioning?: boolean; + forwardDeadLetteredMessagesTo?: string; + forwardTo?: string; + lockDuration?: string; + maxDeliveryCount?: number; + maxSizeInMegabytes?: number; + name: string; + requiresDuplicateDetection?: boolean; + requiresSession?: boolean; + status?: EntityStatus; + userMetadata?: string; +} + +// @public +export interface QueueResponse extends QueueDescription, Response { +} + +// @public +export interface QueueRuntimeInfo { + accessedOn: Date; + createdOn: Date; + messageCount?: number; + messageCountDetails?: MessageCountDetails; + name: string; + sizeInBytes?: number; + updatedOn: Date; +} + +// @public +export interface QueueRuntimeInfoResponse extends QueueRuntimeInfo, Response { +} + +// @public +export interface QueuesResponse extends Array, Response { +} + +// @public +export interface QueuesRuntimeInfoResponse extends Array, Response { +} + // @public export interface ReceiveBatchOptions extends OperationOptions, WaitTimeOptions { } @@ -106,12 +209,12 @@ export interface ReceivedMessageWithLock extends ReceivedMessage { // @public export interface Receiver { - browseMessages(options?: BrowseMessagesOptions): Promise; close(): Promise; entityPath: string; getMessageIterator(options?: GetMessageIteratorOptions): AsyncIterableIterator; isClosed: boolean; isReceivingMessages(): boolean; + peekMessages(options?: PeekMessagesOptions): Promise; receiveBatch(maxMessages: number, options?: ReceiveBatchOptions): Promise; receiveDeferredMessage(sequenceNumber: Long, options?: OperationOptions): Promise; receiveDeferredMessages(sequenceNumbers: Long[], options?: OperationOptions): Promise; @@ -119,8 +222,28 @@ export interface Receiver { subscribe(handlers: MessageHandlers, options?: SubscribeOptions): void; } +// @public +export interface Response { + _response: HttpOperationResponse; +} + export { RetryOptions } +// @public +export interface RuleDescription { + action?: SqlRuleAction; + filter?: SqlRuleFilter | CorrelationRuleFilter; + name: string; +} + +// @public +export interface RuleResponse extends RuleDescription, Response { +} + +// @public +export interface RulesResponse extends Array, Response { +} + // @public export interface Sender { cancelScheduledMessage(sequenceNumber: Long, options?: OperationOptions): Promise; @@ -129,6 +252,7 @@ export interface Sender { createBatch(options?: CreateBatchOptions): Promise; entityPath: string; isClosed: boolean; + open(options?: SenderOpenOptions): Promise; scheduleMessage(scheduledEnqueueTimeUtc: Date, message: ServiceBusMessage, options?: OperationOptions): Promise; scheduleMessages(scheduledEnqueueTimeUtc: Date, messages: ServiceBusMessage[], options?: OperationOptions): Promise; send(message: ServiceBusMessage, options?: OperationOptions): Promise; @@ -136,6 +260,11 @@ export interface Sender { send(messageBatch: ServiceBusMessageBatch, options?: OperationOptions): Promise; } +// @public +export interface SenderOpenOptions { + abortSignal?: AbortSignalLike; +} + // @public export class ServiceBusClient { constructor(connectionString: string, options?: ServiceBusClientOptions); @@ -149,7 +278,7 @@ export class ServiceBusClient { createReceiver(queueName: string, receiveMode: "receiveAndDelete"): Receiver; createReceiver(topicName: string, subscriptionName: string, receiveMode: "peekLock"): Receiver; createReceiver(topicName: string, subscriptionName: string, receiveMode: "receiveAndDelete"): Receiver; - createSender(queueOrTopicName: string, options?: CreateSenderOptions): Promise; + createSender(queueOrTopicName: string): Sender; createSessionReceiver(queueName: string, receiveMode: "peekLock", options?: CreateSessionReceiverOptions): Promise>; createSessionReceiver(queueName: string, receiveMode: "receiveAndDelete", options?: CreateSessionReceiverOptions): Promise>; createSessionReceiver(topicName: string, subscriptionName: string, receiveMode: "peekLock", options?: CreateSessionReceiverOptions): Promise>; @@ -163,6 +292,50 @@ export interface ServiceBusClientOptions { webSocketOptions?: WebSocketOptions; } +// @public +export class ServiceBusManagementClient extends ServiceClient { + constructor(connectionString: string, options?: ServiceBusManagementClientOptions); + constructor(fullyQualifiedNamespace: string, credential: TokenCredential, options?: ServiceBusManagementClientOptions); + createQueue(queueName: string): Promise; + createQueue(queue: QueueDescription): Promise; + createRule(topicName: string, subscriptionName: string, rule: RuleDescription): Promise; + createSubscription(topicName: string, subscriptionName: string): Promise; + createSubscription(subscription: SubscriptionDescription): Promise; + createTopic(topicName: string): Promise; + createTopic(topic: TopicDescription): Promise; + deleteQueue(queueName: string): Promise; + deleteRule(topicName: string, subscriptionName: string, ruleName: string): Promise; + deleteSubscription(topicName: string, subscriptionName: string): Promise; + deleteTopic(topicName: string): Promise; + getNamespaceProperties(): Promise; + getQueue(queueName: string): Promise; + getQueueRuntimeInfo(queueName: string): Promise; + getQueues(options?: ListRequestOptions): Promise; + getQueuesRuntimeInfo(options?: ListRequestOptions): Promise; + getRule(topicName: string, subscriptioName: string, ruleName: string): Promise; + getRules(topicName: string, subscriptionName: string, options?: ListRequestOptions): Promise; + getSubscription(topicName: string, subscriptionName: string): Promise; + getSubscriptionRuntimeInfo(topicName: string, subscriptionName: string): Promise; + getSubscriptions(topicName: string, options?: ListRequestOptions): Promise; + getSubscriptionsRuntimeInfo(topicName: string, options?: ListRequestOptions): Promise; + getTopic(topicName: string): Promise; + getTopicRuntimeInfo(topicName: string): Promise; + getTopics(options?: ListRequestOptions): Promise; + getTopicsRuntimeInfo(options?: ListRequestOptions): Promise; + queueExists(queueName: string): Promise; + subscriptionExists(topicName: string, subscriptionName: string): Promise; + topicExists(topicName: string): Promise; + updateQueue(queue: QueueDescription): Promise; + updateRule(topicName: string, subscriptionName: string, rule: RuleDescription): Promise; + updateSubscription(subscription: SubscriptionDescription): Promise; + updateTopic(topic: TopicDescription): Promise; +} + +// @public +export interface ServiceBusManagementClientOptions { + proxySettings?: ProxySettings; +} + // @public export interface ServiceBusMessage { body: any; @@ -186,6 +359,8 @@ export interface ServiceBusMessage { // @public export interface ServiceBusMessageBatch { readonly count: number; + // @internal + _generateMessage(): Buffer; readonly maxSizeInBytes: number; readonly sizeInBytes: number; tryAdd(message: ServiceBusMessage): boolean; @@ -212,14 +387,119 @@ export interface SessionReceiverOptions { sessionId?: string; } +// @public +export type SqlParameter = { + key: string; + value: string | number; + type: string; +}; + +// @public +export type SqlRuleAction = SqlRuleFilter; + +// @public +export interface SqlRuleFilter { + compatibilityLevel?: number; + requiresPreprocessing?: boolean; + sqlExpression?: string; + sqlParameters?: SqlParameter[]; +} + // @public export interface SubscribeOptions extends OperationOptions, MessageHandlerOptions { } +// @public +export interface SubscriptionDescription { + autoDeleteOnIdle?: string; + deadLetteringOnFilterEvaluationExceptions?: boolean; + deadLetteringOnMessageExpiration?: boolean; + defaultMessageTtl?: string; + enableBatchedOperations?: boolean; + forwardDeadLetteredMessagesTo?: string; + forwardTo?: string; + lockDuration?: string; + maxDeliveryCount?: number; + requiresSession?: boolean; + status?: EntityStatus; + subscriptionName: string; + topicName: string; + userMetadata?: string; +} + +// @public +export interface SubscriptionResponse extends SubscriptionDescription, Response { +} + +// @public +export interface SubscriptionRuntimeInfo { + accessedOn: Date; + createdOn: Date; + messageCount: number; + messageCountDetails?: MessageCountDetails; + subscriptionName: string; + topicName: string; + updatedOn: Date; +} + +// @public +export interface SubscriptionRuntimeInfoResponse extends SubscriptionRuntimeInfo, Response { +} + +// @public +export interface SubscriptionsResponse extends Array, Response { +} + +// @public +export interface SubscriptionsRuntimeInfoResponse extends Array, Response { +} + export { TokenCredential } export { TokenType } +// @public +export interface TopicDescription { + authorizationRules?: AuthorizationRule[]; + autoDeleteOnIdle?: string; + defaultMessageTtl?: string; + duplicateDetectionHistoryTimeWindow?: string; + enableBatchedOperations?: boolean; + enablePartitioning?: boolean; + maxSizeInMegabytes?: number; + name: string; + requiresDuplicateDetection?: boolean; + status?: EntityStatus; + supportOrdering?: boolean; + userMetadata?: string; +} + +// @public +export interface TopicResponse extends TopicDescription, Response { +} + +// @public +export interface TopicRuntimeInfo { + accessedOn: Date; + createdOn: Date; + name: string; + sizeInBytes?: number; + subscriptionCount?: number; + updatedOn: Date; +} + +// @public +export interface TopicRuntimeInfoResponse extends TopicRuntimeInfo, Response { +} + +// @public +export interface TopicsResponse extends Array, Response { +} + +// @public +export interface TopicsRuntimeInfoResponse extends Array, Response { +} + // @public export interface WaitTimeOptions { maxWaitTimeInMs: number; diff --git a/sdk/servicebus/service-bus/rollup.base.config.js b/sdk/servicebus/service-bus/rollup.base.config.js index 8f53410ffc34..7f6e6db2b7a4 100644 --- a/sdk/servicebus/service-bus/rollup.base.config.js +++ b/sdk/servicebus/service-bus/rollup.base.config.js @@ -74,13 +74,7 @@ export function nodeConfig({ test = false, production = false } = {}) { baseConfig.output.file = "test-dist/index.js"; // mark assert as external - baseConfig.external.push( - "assert", - "fs", - "path", - "@azure/arm-servicebus", - "@azure/ms-rest-nodeauth" - ); + baseConfig.external.push("assert", "fs", "path", "@azure/identity"); baseConfig.onwarn = ignoreKnownWarnings; diff --git a/sdk/servicebus/service-bus/samples-v1/javascript/package.json b/sdk/servicebus/service-bus/samples-v1/javascript/package.json index bab09c695ed7..97048225bdf5 100644 --- a/sdk/servicebus/service-bus/samples-v1/javascript/package.json +++ b/sdk/servicebus/service-bus/samples-v1/javascript/package.json @@ -32,7 +32,7 @@ "@azure/ms-rest-nodeauth": "^3.0.0", "@azure/service-bus": "^1.1.6", "dotenv": "^8.2.0", - "https-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", "ws": "^7.0.0" }, "devDependencies": { diff --git a/sdk/servicebus/service-bus/samples-v1/typescript/package.json b/sdk/servicebus/service-bus/samples-v1/typescript/package.json index ae7fe51c86ae..82b0126a3ed8 100644 --- a/sdk/servicebus/service-bus/samples-v1/typescript/package.json +++ b/sdk/servicebus/service-bus/samples-v1/typescript/package.json @@ -32,7 +32,7 @@ "@azure/ms-rest-nodeauth": "^3.0.0", "@azure/service-bus": "^1.1.6", "dotenv": "^8.2.0", - "https-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", "ws": "^7.0.0" }, "devDependencies": { diff --git a/sdk/servicebus/service-bus/samples/javascript/README.md b/sdk/servicebus/service-bus/samples/javascript/README.md index 1229578b1b23..6cdb39a656f0 100644 --- a/sdk/servicebus/service-bus/samples/javascript/README.md +++ b/sdk/servicebus/service-bus/samples/javascript/README.md @@ -11,7 +11,7 @@ These sample programs show how to use the JavaScript client libraries for Azure | [receiveMessagesLoop.js][receivemessagesloop] | uses the receiveMessages() function to receive Service Bus messages in a loop | | [scheduledMessages.js][scheduledmessages] | uses the scheduleMessage() function to schedule messages to appear on a Service Bus Queue/Subscription at a later time | | [session.js][session] | sends/receives messages to/from session enabled queues/subscriptions in Service Bus | -| [browseMessages.js][browsemessages] | uses the browseMessages() function to browse a Service Bus | +| [browseMessages.js][browsemessages] | uses the peekMessages() function to browse a Service Bus | | [usingAadAuth.js][usingaadauth] | creates a ServiceBusClient that authenticates using AAD credentials | | [useProxy.js][useproxy] | creates a ServiceBusClient that uses an HTTP(S) proxy server to make requests | | [advanced/movingMessagesToDLQ.js][advanced-movingmessagestodlq] | moves a message explicitly to the dead-letter queue | @@ -19,6 +19,7 @@ These sample programs show how to use the JavaScript client libraries for Azure | [advanced/processMessageFromDLQ.js][advanced-processmessagefromdlq] | retrieves a message from a dead-letter queue, edits it, and sends it back to the main queue | | [advanced/sessionRoundRobin.js][advanced-session-round-robin] | uses `SessionReceiver`'s ability to get the next available session to round-robin through all sessions in a Queue/Subscription | | [advanced/sessionState.js][advanced-sessionstate] | uses a "shopping cart" example to demonstrate how SessionState information can be read and maintained in an application | +| [advanced/managementClient.js][advanced-management-client] | demonstrates how the ServiceBusManagementClient can be used to manage the resources of a service bus namespace | ## Prerequisites @@ -70,6 +71,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [advanced-sessionstate]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js [sendmessages]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/javascript/sendMessages.js [serviceprincipallogin]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/javascript/servicePrincipalLogin.js +[advanced-management-client]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/javascript/advanced/managementClient.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/service-bus [azsvcbus]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-create-namespace-portal [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js b/sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js index 7056f1d3090e..668b4c1ed7c2 100644 --- a/sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js @@ -32,7 +32,7 @@ async function main() { async function sendMessages() { const sbClient = new ServiceBusClient(connectionString); // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const data = [ { step: 1, title: "Shop" }, diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/managementClient.js b/sdk/servicebus/service-bus/samples/javascript/advanced/managementClient.js new file mode 100644 index 000000000000..8b1aaa771e05 --- /dev/null +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/managementClient.js @@ -0,0 +1,56 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the MIT Licence. + + **NOTE**: This sample uses the preview of the next version of the @azure/service-bus package. + For samples using the current stable version of the package, please use the link below: + https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.5/sdk/servicebus/service-bus/samples + + This sample demonstrates how the ServiceBusManagementClient can be used to manage the resources of a service bus namespace. + + See https://docs.microsoft.com/en-us/rest/api/servicebus/resource-provider-apis to learn more. +*/ + +const { ServiceBusManagementClient } = require("@azure/service-bus"); + +// Load the .env file if it exists +require("dotenv").config(); + +// Define connection string and related Service Bus entity names here +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const queueName = process.env.QUEUE_NAME || ""; + +export async function main() { + // You can also use AAD credentials from `@azure/identity` along with the host url + // instead of the connection string for authentication. + const serviceBusManagementClient = new ServiceBusManagementClient(connectionString); + + // Similarly, you can create topics and subscriptions as well. + const createQueueResponse = await serviceBusManagementClient.createQueue(queueName); + console.log("Created queue with name - ", createQueueResponse.name); + + const getQueueResponse = await serviceBusManagementClient.getQueue(queueName); + console.log("(Current)max delivery count = ", getQueueResponse.maxDeliveryCount); + + getQueueResponse.maxDeliveryCount = 12; + const updateQueueResponse = await serviceBusManagementClient.updateQueue(getQueueResponse); + console.log("(Updated)max delivery count = ", updateQueueResponse.maxDeliveryCount); + + const queueRuntimeInfo = await serviceBusManagementClient.getQueueRuntimeInfo(queueName); + console.log("Number of messages in the queue = ", queueRuntimeInfo.messageCount); + + const namespaceInfo = await serviceBusManagementClient.getNamespaceProperties(); + console.log("Type of the namespace - ", namespaceInfo.namespaceType); + + await serviceBusManagementClient.deleteQueue(queueName); + const queueExists = await serviceBusManagementClient.queueExists(queueName); + if (queueExists == true) { + console.log("Something went wrong, queue should have been deleted"); + return; + } + console.log(`Queue ${queueName} has been deleted`); +} + +main().catch((err) => { + console.log("Error occurred: ", err); +}); diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/movingMessagesToDLQ.js b/sdk/servicebus/service-bus/samples/javascript/advanced/movingMessagesToDLQ.js index 7d91bba3b092..ca138fe02b17 100644 --- a/sdk/servicebus/service-bus/samples/javascript/advanced/movingMessagesToDLQ.js +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/movingMessagesToDLQ.js @@ -35,7 +35,7 @@ async function main() { async function sendMessage() { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const message = { body: { diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js b/sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js index 270680887d82..a624f30a0686 100644 --- a/sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js @@ -55,7 +55,7 @@ async function processDeadletterMessageQueue() { // Send repaired message back to the current queue / topic async function fixAndResendMessage(oldMessage) { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); // Inspect given message and make any changes if necessary const repairedMessage = { ...oldMessage }; diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/sessionRoundRobin.js b/sdk/servicebus/service-bus/samples/javascript/advanced/sessionRoundRobin.js index c5573c857f75..40cb1d004c6f 100644 --- a/sdk/servicebus/service-bus/samples/javascript/advanced/sessionRoundRobin.js +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/sessionRoundRobin.js @@ -15,7 +15,7 @@ const { AbortController } = require("@azure/abort-controller"); dotenv.config(); const serviceBusConnectionString = -process.env.SERVICE_BUS_CONNECTION_STRING || ""; + process.env.SERVICE_BUS_CONNECTION_STRING || ""; // NOTE: this sample uses a queue but would also work a session enabled subscription. const queueName = process.env.QUEUE_NAME || ""; diff --git a/sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js b/sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js index fa84b1c6f238..daeeb72fdea9 100644 --- a/sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js +++ b/sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js @@ -86,7 +86,7 @@ async function getSessionState(sessionId) { } async function sendMessagesForSession(shoppingEvents, sessionId) { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(userEventsQueueName); + const sender = sbClient.createSender(userEventsQueueName); for (let index = 0; index < shoppingEvents.length; index++) { const message = { sessionId: sessionId, diff --git a/sdk/servicebus/service-bus/samples/javascript/browseMessages.js b/sdk/servicebus/service-bus/samples/javascript/browseMessages.js index c94f88134fb1..48139b519c92 100644 --- a/sdk/servicebus/service-bus/samples/javascript/browseMessages.js +++ b/sdk/servicebus/service-bus/samples/javascript/browseMessages.js @@ -5,7 +5,7 @@ **NOTE**: If you are using version 1.1.x or lower, then please use the link below: https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.5/sdk/servicebus/service-bus/samples - This sample demonstrates how the browseMessages() function can be used to browse a Service Bus message. + This sample demonstrates how the peekMessages() function can be used to browse a Service Bus message. See https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-browsing to learn about message browsing. @@ -19,8 +19,7 @@ const { ServiceBusClient } = require("@azure/service-bus"); require("dotenv").config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; async function main() { @@ -31,7 +30,7 @@ async function main() { const queueReceiver = sbClient.createReceiver(queueName, "receiveAndDelete"); try { for (let i = 0; i < 20; i++) { - const messages = await queueReceiver.browseMessages(); + const messages = await queueReceiver.peekMessages(); if (!messages.length) { console.log("No more messages to peek"); break; @@ -44,6 +43,6 @@ async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/javascript/package.json b/sdk/servicebus/service-bus/samples/javascript/package.json index e2ddf92c99ae..2dfc73dafe46 100644 --- a/sdk/servicebus/service-bus/samples/javascript/package.json +++ b/sdk/servicebus/service-bus/samples/javascript/package.json @@ -28,7 +28,7 @@ "@azure/identity": "^1.0.2", "@azure/service-bus": "next", "dotenv": "^8.2.0", - "https-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", "ws": "^7.0.0" }, "devDependencies": { diff --git a/sdk/servicebus/service-bus/samples/javascript/receiveMessagesLoop.js b/sdk/servicebus/service-bus/samples/javascript/receiveMessagesLoop.js index 544070fe754c..03d869040465 100644 --- a/sdk/servicebus/service-bus/samples/javascript/receiveMessagesLoop.js +++ b/sdk/servicebus/service-bus/samples/javascript/receiveMessagesLoop.js @@ -14,8 +14,7 @@ const { ServiceBusClient } = require("@azure/service-bus"); // Load the .env file if it exists require("dotenv").config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; async function main() { const sbClient = new ServiceBusClient(connectionString); @@ -45,6 +44,6 @@ async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js b/sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js index b4a745c87729..febe38825d87 100644 --- a/sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js +++ b/sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js @@ -16,8 +16,7 @@ const { delay, ServiceBusClient } = require("@azure/service-bus"); // Load the .env file if it exists require("dotenv").config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; async function main() { const sbClient = new ServiceBusClient(connectionString); @@ -26,12 +25,12 @@ async function main() { // - See session.ts for how to receive using sessions. const receiver = sbClient.createReceiver(queueName, "peekLock"); - const processMessage = async brokeredMessage => { + const processMessage = async (brokeredMessage) => { console.log(`Received message: ${brokeredMessage.body}`); await brokeredMessage.complete(); }; - const processError = async err => { + const processError = async (err) => { console.log("Error occurred: ", err); }; @@ -55,6 +54,6 @@ async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/javascript/scheduledMessages.js b/sdk/servicebus/service-bus/samples/javascript/scheduledMessages.js index 80816ad5919e..f95ac1908cf8 100644 --- a/sdk/servicebus/service-bus/samples/javascript/scheduledMessages.js +++ b/sdk/servicebus/service-bus/samples/javascript/scheduledMessages.js @@ -47,7 +47,7 @@ async function main() { // Scheduling messages to be sent after 10 seconds from now async function sendScheduledMessages(sbClient) { // createSender() handles sending to a queue or a topic - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const messages = listOfScientists.map((scientist) => ({ body: `${scientist.firstName} ${scientist.lastName}`, diff --git a/sdk/servicebus/service-bus/samples/javascript/sendMessages.js b/sdk/servicebus/service-bus/samples/javascript/sendMessages.js index e656111ece1f..57a6a3d1c660 100644 --- a/sdk/servicebus/service-bus/samples/javascript/sendMessages.js +++ b/sdk/servicebus/service-bus/samples/javascript/sendMessages.js @@ -37,7 +37,7 @@ async function main() { const sbClient = new ServiceBusClient(connectionString); // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); try { for (let index = 0; index < listOfScientists.length; index++) { diff --git a/sdk/servicebus/service-bus/samples/javascript/session.js b/sdk/servicebus/service-bus/samples/javascript/session.js index bebc5ea79094..0aca4d18448a 100644 --- a/sdk/servicebus/service-bus/samples/javascript/session.js +++ b/sdk/servicebus/service-bus/samples/javascript/session.js @@ -60,7 +60,7 @@ async function main() { async function sendMessage(sbClient, scientist, sessionId) { // createSender() also works with topics - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const message = { body: `${scientist.firstName} ${scientist.lastName}`, diff --git a/sdk/servicebus/service-bus/samples/javascript/useProxy.js b/sdk/servicebus/service-bus/samples/javascript/useProxy.js index da46486997e7..a96eb18df767 100644 --- a/sdk/servicebus/service-bus/samples/javascript/useProxy.js +++ b/sdk/servicebus/service-bus/samples/javascript/useProxy.js @@ -18,6 +18,7 @@ require("dotenv").config(); // Define connection string for your Service Bus instance here const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const queueName = process.env.QUEUE_NAME || ""; async function main() { const proxyInfo = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; @@ -40,10 +41,14 @@ async function main() { } }); - /* - Refer to other samples, and place your code here - to create queue clients, and to send/receive messages - */ + const sender = sbClient.createSender(queueName); + + console.log(`Sending message using proxy server ${proxyInfo}`); + + await sender.send({ + body: "sample message" + }); + await sbClient.close(); } diff --git a/sdk/servicebus/service-bus/samples/javascript/usingAadAuth.js b/sdk/servicebus/service-bus/samples/javascript/usingAadAuth.js index cbefab03139a..5cbb1187c90f 100644 --- a/sdk/servicebus/service-bus/samples/javascript/usingAadAuth.js +++ b/sdk/servicebus/service-bus/samples/javascript/usingAadAuth.js @@ -29,8 +29,7 @@ require("dotenv").config(); // Define Service Bus Endpoint here and related entity names here const serviceBusEndpoint = - process.env.SERVICE_BUS_ENDPOINT || - ".servicebus.windows.net"; + process.env.SERVICE_BUS_ENDPOINT || ".servicebus.windows.net"; // Define CLIENT_ID, TENANT_ID and SECRET of your AAD application here const clientId = process.env.AZURE_TENANT_ID || ""; @@ -47,6 +46,6 @@ async function main() { await sbClient.close(); } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/typescript/README.md b/sdk/servicebus/service-bus/samples/typescript/README.md index a0e4ec796187..d6882a711996 100644 --- a/sdk/servicebus/service-bus/samples/typescript/README.md +++ b/sdk/servicebus/service-bus/samples/typescript/README.md @@ -11,7 +11,7 @@ These sample programs show how to use the TypeScript client libraries for Azure | [receiveMessagesLoop.ts][receivemessagesloop] | uses the receiveMessages() function to receive Service Bus messages in a loop | | [scheduledMessages.ts][scheduledmessages] | uses the scheduleMessage() function to schedule messages to appear on a Service Bus Queue/Subscription at a later time | | [session.ts][session] | sends/receives messages to/from session enabled queues/subscriptions in Service Bus | -| [browseMessages.ts][browsemessages] | uses the browseMessages() function to browse a Service Bus | +| [browseMessages.ts][browsemessages] | uses the peekMessages() function to browse a Service Bus | | [usingAadAuth.ts][usingaadauth] | creates a ServiceBusClient that authenticates using AAD credentials | | [useProxy.ts][useproxy] | creates a ServiceBusClient that uses an HTTP(S) proxy server to make requests | | [advanced/movingMessagesToDLQ.ts][advanced-movingmessagestodlq] | moves a message explicitly to the dead-letter queue | @@ -19,6 +19,7 @@ These sample programs show how to use the TypeScript client libraries for Azure | [advanced/processMessageFromDLQ.ts][advanced-processmessagefromdlq] | retrieves a message from a dead-letter queue, edits it, and sends it back to the main queue | | [advanced/sessionRoundRobin.ts][advanced-session-round-robin] | uses `SessionReceiver`'s ability to get the next available session to round-robin through all sessions in a Queue/Subscription | | [advanced/sessionState.ts][advanced-sessionstate] | uses a "shopping cart" example to demonstrate how SessionState information can be read and maintained in an application | +| [advanced/managementClient.ts][advanced-management-client] | demonstrates how the ServiceBusManagementClient can be used to manage the resources of a service bus namespace | ## Prerequisites @@ -83,6 +84,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [advanced-session-round-robin]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts [sendmessages]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/typescript/src/sendMessages.ts [serviceprincipallogin]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/typescript/src/servicePrincipalLogin.ts +[advanced-management-client]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples/typescript/src/advanced/managementClient.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/service-bus [azsvcbus]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-create-namespace-portal [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/servicebus/service-bus/samples/typescript/package.json b/sdk/servicebus/service-bus/samples/typescript/package.json index 3c657d8df263..6d51e13ae6a7 100644 --- a/sdk/servicebus/service-bus/samples/typescript/package.json +++ b/sdk/servicebus/service-bus/samples/typescript/package.json @@ -32,7 +32,7 @@ "@azure/identity": "^1.0.2", "@azure/service-bus": "next", "dotenv": "^8.2.0", - "https-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", "ws": "^7.0.0" }, "devDependencies": { diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/deferral.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/deferral.ts index ecf8ea98cc99..c13d74e6f80b 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/advanced/deferral.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/deferral.ts @@ -34,7 +34,7 @@ export async function main() { async function sendMessages() { const sbClient = new ServiceBusClient(connectionString); // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const data = [ { step: 1, title: "Shop" }, diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/managementClient.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/managementClient.ts new file mode 100644 index 000000000000..cbfd52247a75 --- /dev/null +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/managementClient.ts @@ -0,0 +1,57 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the MIT Licence. + + **NOTE**: This sample uses the preview of the next version of the @azure/service-bus package. + For samples using the current stable version of the package, please use the link below: + https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.5/sdk/servicebus/service-bus/samples + + This sample demonstrates how the ServiceBusManagementClient can be used to manage the resources of a service bus namespace. + + See https://docs.microsoft.com/en-us/rest/api/servicebus/resource-provider-apis to learn more. +*/ + +import { ServiceBusManagementClient } from "@azure/service-bus"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +dotenv.config(); + +// Define connection string and related Service Bus entity names here +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const queueName = process.env.QUEUE_NAME || ""; + +export async function main() { + // You can also use AAD credentials from `@azure/identity` along with the host url + // instead of the connection string for authentication. + const serviceBusManagementClient = new ServiceBusManagementClient(connectionString); + + // Similarly, you can create topics and subscriptions as well. + const createQueueResponse = await serviceBusManagementClient.createQueue(queueName); + console.log("Created queue with name - ", createQueueResponse.name); + + const getQueueResponse = await serviceBusManagementClient.getQueue(queueName); + console.log("(Current)max delivery count = ", getQueueResponse.maxDeliveryCount); + + getQueueResponse.maxDeliveryCount = 12; + const updateQueueResponse = await serviceBusManagementClient.updateQueue(getQueueResponse); + console.log("(Updated)max delivery count = ", updateQueueResponse.maxDeliveryCount); + + const queueRuntimeInfo = await serviceBusManagementClient.getQueueRuntimeInfo(queueName); + console.log("Number of messages in the queue = ", queueRuntimeInfo.messageCount); + + const namespaceInfo = await serviceBusManagementClient.getNamespaceProperties(); + console.log("Type of the namespace - ", namespaceInfo.namespaceType); + + await serviceBusManagementClient.deleteQueue(queueName); + const queueExists = await serviceBusManagementClient.queueExists(queueName); + if (queueExists == true) { + console.log("Something went wrong, queue should have been deleted"); + return; + } + console.log(`Queue ${queueName} has been deleted`); +} + +main().catch((err) => { + console.log("Error occurred: ", err); +}); diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/movingMessagesToDLQ.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/movingMessagesToDLQ.ts index 17cda9b4e6c4..f3b8d34b60ab 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/advanced/movingMessagesToDLQ.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/movingMessagesToDLQ.ts @@ -37,7 +37,7 @@ export async function main() { async function sendMessage() { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const message = { body: { diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/processMessageFromDLQ.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/processMessageFromDLQ.ts index f60c2af4b703..a92111ab7826 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/advanced/processMessageFromDLQ.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/processMessageFromDLQ.ts @@ -57,7 +57,7 @@ async function processDeadletterMessageQueue() { // Send repaired message back to the current queue / topic async function fixAndResendMessage(oldMessage: ServiceBusMessage) { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); // Inspect given message and make any changes if necessary const repairedMessage = { ...oldMessage }; diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts index bcbd219b4176..576571901ef5 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts @@ -21,7 +21,7 @@ import { AbortController } from "@azure/abort-controller"; dotenv.config(); const serviceBusConnectionString = -process.env.SERVICE_BUS_CONNECTION_STRING || ""; + process.env.SERVICE_BUS_CONNECTION_STRING || ""; // NOTE: this sample uses a queue but would also work a session enabled subscription. const queueName = process.env.QUEUE_NAME || ""; diff --git a/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionState.ts b/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionState.ts index c11c0decb995..fe1dbe0b3240 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionState.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionState.ts @@ -101,7 +101,7 @@ async function getSessionState(sessionId: string) { async function sendMessagesForSession(shoppingEvents: any[], sessionId: string) { // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(userEventsQueueName); + const sender = sbClient.createSender(userEventsQueueName); for (let index = 0; index < shoppingEvents.length; index++) { const message = { diff --git a/sdk/servicebus/service-bus/samples/typescript/src/browseMessages.ts b/sdk/servicebus/service-bus/samples/typescript/src/browseMessages.ts index 0b13795c5e17..3bcffd0c6f18 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/browseMessages.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/browseMessages.ts @@ -6,7 +6,7 @@ For samples using the current stable version of the package, please use the link below: https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.5/sdk/servicebus/service-bus/samples - This sample demonstrates how the browseMessages() function can be used to browse a Service Bus message. + This sample demonstrates how the peekMessages() function can be used to browse a Service Bus message. See https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-browsing to learn about message browsing. @@ -21,8 +21,7 @@ import * as dotenv from "dotenv"; dotenv.config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; export async function main() { @@ -35,7 +34,7 @@ export async function main() { try { for (let i = 0; i < 20; i++) { - const messages = await queueReceiver.browseMessages(); + const messages = await queueReceiver.peekMessages(); if (!messages.length) { console.log("No more messages to peek"); break; @@ -48,6 +47,6 @@ export async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesLoop.ts b/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesLoop.ts index 7562bb4b5035..f6548bb73efa 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesLoop.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesLoop.ts @@ -19,8 +19,7 @@ import * as dotenv from "dotenv"; dotenv.config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; export async function main() { @@ -52,6 +51,6 @@ export async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts b/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts index 2bef0e600072..e27e4372c23e 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts @@ -19,8 +19,7 @@ import * as dotenv from "dotenv"; dotenv.config(); // Define connection string and related Service Bus entity names here -const connectionString = - process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; const queueName = process.env.QUEUE_NAME || ""; export async function main() { @@ -31,11 +30,11 @@ export async function main() { // - See session.ts for how to receive using sessions. const receiver = sbClient.createReceiver(queueName, "peekLock"); - const processMessage = async brokeredMessage => { + const processMessage = async (brokeredMessage) => { console.log(`Received message: ${brokeredMessage.body}`); await brokeredMessage.complete(); }; - const processError = async err => { + const processError = async (err) => { console.log("Error occurred: ", err); }; @@ -59,6 +58,6 @@ export async function main() { } } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/typescript/src/scheduledMessages.ts b/sdk/servicebus/service-bus/samples/typescript/src/scheduledMessages.ts index 96dafbac402a..5d4774a34e61 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/scheduledMessages.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/scheduledMessages.ts @@ -50,7 +50,7 @@ export async function main() { // Scheduling messages to be sent after 10 seconds from now async function sendScheduledMessages(sbClient: ServiceBusClient) { // createSender() handles sending to a queue or a topic - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const messages: ServiceBusMessage[] = listOfScientists.map((scientist) => ({ body: `${scientist.firstName} ${scientist.lastName}`, diff --git a/sdk/servicebus/service-bus/samples/typescript/src/sendMessages.ts b/sdk/servicebus/service-bus/samples/typescript/src/sendMessages.ts index 61001381a710..85cf53751096 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/sendMessages.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/sendMessages.ts @@ -40,7 +40,7 @@ export async function main() { const sbClient = new ServiceBusClient(connectionString); // createSender() can also be used to create a sender for a topic. - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); try { for (let index = 0; index < listOfScientists.length; index++) { diff --git a/sdk/servicebus/service-bus/samples/typescript/src/session.ts b/sdk/servicebus/service-bus/samples/typescript/src/session.ts index 6f62d42455e7..6e79e20971d2 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/session.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/session.ts @@ -64,7 +64,7 @@ export async function main() { async function sendMessage(sbClient: ServiceBusClient, scientist: any, sessionId: string) { // createSender() also works with topics - const sender = await sbClient.createSender(queueName); + const sender = sbClient.createSender(queueName); const message = { body: `${scientist.firstName} ${scientist.lastName}`, diff --git a/sdk/servicebus/service-bus/samples/typescript/src/useProxy.ts b/sdk/servicebus/service-bus/samples/typescript/src/useProxy.ts index 305a8be169dd..0f4bdf12c006 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/useProxy.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/useProxy.ts @@ -12,7 +12,7 @@ import { ServiceBusClient } from "@azure/service-bus"; import WebSocket from "ws"; -import HttpsProxyAgent from "https-proxy-agent"; +import { HttpsProxyAgent } from "https-proxy-agent"; // Load the .env file if it exists import * as dotenv from "dotenv"; @@ -20,9 +20,11 @@ dotenv.config(); // Define connection string for your Service Bus instance here const connectionString = process.env.SERVICE_BUS_CONNECTION_STRING || ""; +const queueName = process.env.QUEUE_NAME || ""; export async function main() { const proxyInfo = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; + if (!proxyInfo) { console.error( "Error: Proxy information not provided, but it is required to run this sample. Exiting." @@ -42,10 +44,14 @@ export async function main() { } }); - /* - Refer to other samples, and place your code here - to create queue clients, and to send/receive messages - */ + const sender = sbClient.createSender(queueName); + + console.log(`Sending message using proxy server ${proxyInfo}`); + + await sender.send({ + body: "sample message" + }); + await sbClient.close(); } diff --git a/sdk/servicebus/service-bus/samples/typescript/src/usingAadAuth.ts b/sdk/servicebus/service-bus/samples/typescript/src/usingAadAuth.ts index 55e0ebfcdbe1..bd5d62762087 100644 --- a/sdk/servicebus/service-bus/samples/typescript/src/usingAadAuth.ts +++ b/sdk/servicebus/service-bus/samples/typescript/src/usingAadAuth.ts @@ -31,8 +31,7 @@ dotenv.config(); // Define Service Bus Endpoint here and related entity names here const serviceBusEndpoint = - process.env.SERVICE_BUS_ENDPOINT || - ".servicebus.windows.net"; + process.env.SERVICE_BUS_ENDPOINT || ".servicebus.windows.net"; // Define CLIENT_ID, TENANT_ID and SECRET of your AAD application here const clientId = process.env.AZURE_TENANT_ID || ""; @@ -50,6 +49,6 @@ export async function main() { await sbClient.close(); } -main().catch(err => { +main().catch((err) => { console.log("Error occurred: ", err); }); diff --git a/sdk/servicebus/service-bus/samples/typescript/tsconfig.json b/sdk/servicebus/service-bus/samples/typescript/tsconfig.json index 18985e1b1051..db1651fcc966 100644 --- a/sdk/servicebus/service-bus/samples/typescript/tsconfig.json +++ b/sdk/servicebus/service-bus/samples/typescript/tsconfig.json @@ -4,8 +4,8 @@ "target": "ES2015", "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - + "esModuleInterop": true, + "lib": ["ESNext.AsyncIterable"], "outDir": "dist", "rootDir": "src" }, diff --git a/sdk/servicebus/service-bus/src/clientEntityContext.ts b/sdk/servicebus/service-bus/src/clientEntityContext.ts index 8bf0dc606311..4c91d8aa68a9 100644 --- a/sdk/servicebus/service-bus/src/clientEntityContext.ts +++ b/sdk/servicebus/service-bus/src/clientEntityContext.ts @@ -6,7 +6,7 @@ import { StreamingReceiver } from "./core/streamingReceiver"; import { MessageSender } from "./core/messageSender"; import { ManagementClient, ManagementClientOptions } from "./core/managementClient"; import { ConnectionContext } from "./connectionContext"; -import { Dictionary, AmqpError } from "rhea-promise"; +import { AmqpError, Dictionary } from "rhea-promise"; import { BatchingReceiver } from "./core/batchingReceiver"; import { ConcurrentExpiringMap } from "./util/concurrentExpiringMap"; import { MessageReceiver } from "./core/messageReceiver"; diff --git a/sdk/servicebus/service-bus/src/connectionContext.ts b/sdk/servicebus/service-bus/src/connectionContext.ts index d4f4b0db11ec..41859baa9d82 100644 --- a/sdk/servicebus/service-bus/src/connectionContext.ts +++ b/sdk/servicebus/service-bus/src/connectionContext.ts @@ -6,17 +6,17 @@ import * as os from "os"; import { packageJsonInfo } from "./util/constants"; import { ConnectionConfig, - Constants, ConnectionContextBase, + Constants, CreateConnectionContextBaseParameters, Dictionary, - delay, + SharedKeyCredential, TokenCredential, - SharedKeyCredential + delay } from "@azure/core-amqp"; import { ServiceBusClientOptions } from "./constructorHelpers"; import { ClientEntityContext } from "./clientEntityContext"; -import { OnAmqpEvent, EventContext, ConnectionEvents, Connection } from "rhea-promise"; +import { Connection, ConnectionEvents, EventContext, OnAmqpEvent } from "rhea-promise"; /** * @internal @@ -67,7 +67,7 @@ export namespace ConnectionContext { // Define listeners to be added to the connection object for // "connection_open" and "connection_error" events. - const onConnectionOpen: OnAmqpEvent = (context: EventContext) => { + const onConnectionOpen: OnAmqpEvent = () => { connectionContext.wasConnectionCloseCalled = false; log.connectionCtxt( "[%s] setting 'wasConnectionCloseCalled' property of connection context to %s.", diff --git a/sdk/servicebus/service-bus/src/constructorHelpers.ts b/sdk/servicebus/service-bus/src/constructorHelpers.ts index 48f39270352b..e84acee12b70 100644 --- a/sdk/servicebus/service-bus/src/constructorHelpers.ts +++ b/sdk/servicebus/service-bus/src/constructorHelpers.ts @@ -3,11 +3,11 @@ import { ReceiveMode } from "./serviceBusMessage"; import { - TokenCredential, ConnectionConfig, + RetryOptions, SharedKeyCredential, - WebSocketOptions, - RetryOptions + TokenCredential, + WebSocketOptions } from "@azure/core-amqp"; import { ConnectionContext } from "./connectionContext"; diff --git a/sdk/servicebus/service-bus/src/core/batchingReceiver.ts b/sdk/servicebus/service-bus/src/core/batchingReceiver.ts index f72eb5229e8a..ec051cb7d394 100644 --- a/sdk/servicebus/service-bus/src/core/batchingReceiver.ts +++ b/sdk/servicebus/service-bus/src/core/batchingReceiver.ts @@ -2,18 +2,27 @@ // Licensed under the MIT license. import * as log from "../log"; -import { translate, MessagingError, Constants } from "@azure/core-amqp"; -import { ReceiverEvents, EventContext, OnAmqpEvent, SessionEvents, AmqpError } from "rhea-promise"; -import { ServiceBusMessageImpl, ReceiveMode } from "../serviceBusMessage"; +import { Constants, MessagingError, translate } from "@azure/core-amqp"; +import { + AmqpError, + EventContext, + OnAmqpEvent, + ReceiverEvents, + SessionEvents, + Receiver +} from "rhea-promise"; +import { ReceiveMode, ServiceBusMessageImpl } from "../serviceBusMessage"; import { MessageReceiver, - ReceiveOptions, - ReceiverType, + OnAmqpEventAsPromise, PromiseLike, - OnAmqpEventAsPromise + ReceiveOptions, + ReceiverType } from "./messageReceiver"; import { ClientEntityContext } from "../clientEntityContext"; import { throwErrorIfConnectionClosed } from "../util/errors"; +import { AbortSignalLike } from "@azure/core-http"; +import { checkAndRegisterWithAbortSignal } from "../util/utils"; /** * Describes the batching receiver where the user can receive a specified number of messages for @@ -84,7 +93,8 @@ export class BatchingReceiver extends MessageReceiver { */ async receive( maxMessageCount: number, - maxWaitTimeInMs?: number + maxWaitTimeInMs?: number, + abortSignal?: AbortSignalLike ): Promise { throwErrorIfConnectionClosed(this._context.namespace); @@ -95,7 +105,7 @@ export class BatchingReceiver extends MessageReceiver { this.isReceivingMessages = true; try { - return await this._receiveImpl(maxMessageCount, maxWaitTimeInMs); + return await this._receiveImpl(maxMessageCount, maxWaitTimeInMs, abortSignal); } catch (error) { log.error( "[%s] Receiver '%s': Rejecting receiveMessages() with error %O: ", @@ -112,7 +122,8 @@ export class BatchingReceiver extends MessageReceiver { private _receiveImpl( maxMessageCount: number, - maxWaitTimeInMs: number + maxWaitTimeInMs: number, + abortSignal?: AbortSignalLike ): Promise { const brokeredMessages: ServiceBusMessageImpl[] = []; @@ -120,12 +131,14 @@ export class BatchingReceiver extends MessageReceiver { return new Promise((resolve, reject) => { let totalWaitTimer: NodeJS.Timer | undefined; + // eslint-disable-next-line prefer-const + let cleanupBeforeResolveOrReject: ( + receiver: Receiver | undefined, + shouldRemoveDrain: "removeDrainHandler" | "leaveDrainHandler" + ) => void; + const onSessionError: OnAmqpEvent = (context: EventContext) => { - const receiver = this._receiver || context.receiver!; - receiver.removeListener(ReceiverEvents.receiverError, onReceiveError); - receiver.removeListener(ReceiverEvents.message, onReceiveMessage); - receiver.removeListener(ReceiverEvents.receiverDrained, onReceiveDrain); - receiver.session.removeListener(SessionEvents.sessionError, onSessionError); + cleanupBeforeResolveOrReject(this._receiver || context.receiver!, "removeDrainHandler"); const sessionError = context.session && context.session.error; let error: Error | MessagingError; @@ -140,30 +153,11 @@ export class BatchingReceiver extends MessageReceiver { } else { error = new MessagingError("An error occurred while receiving messages."); } - if (totalWaitTimer) { - clearTimeout(totalWaitTimer); - } - if (this._newMessageReceivedTimer) { - clearTimeout(this._newMessageReceivedTimer); - } reject(error); }; this._connectionErrorHandler = (error: AmqpError | Error): void => { - if (totalWaitTimer) { - clearTimeout(totalWaitTimer); - } - if (this._newMessageReceivedTimer) { - clearTimeout(this._newMessageReceivedTimer); - } - - // Removing listeners, so that the next receiveMessages() call can set them again. - if (this._receiver) { - this._receiver.removeListener(ReceiverEvents.receiverDrained, onReceiveDrain); - this._receiver.removeListener(ReceiverEvents.receiverError, onReceiveError); - this._receiver.removeListener(ReceiverEvents.message, onReceiveMessage); - this._receiver.session.removeListener(SessionEvents.sessionError, onSessionError); - } + cleanupBeforeResolveOrReject(this._receiver, "removeDrainHandler"); // Return the collected messages if in ReceiveAndDelete mode because otherwise they are lost forever if (this.receiveMode === ReceiveMode.receiveAndDelete && brokeredMessages.length) { @@ -179,25 +173,14 @@ export class BatchingReceiver extends MessageReceiver { reject(translate(error)); }; + let removeAbortSignalListenersFn: (() => void) | undefined = undefined; + // Final action to be performed after // - maxMessageCount is reached or // - maxWaitTime is passed or // - newMessageWaitTimeoutInSeconds is passed since the last message was received const finalAction = (): void => { - if (this._newMessageReceivedTimer) { - clearTimeout(this._newMessageReceivedTimer); - } - if (totalWaitTimer) { - clearTimeout(totalWaitTimer); - } - - // Removing listeners, so that the next receiveMessages() call can set them again. - // Listener for drain is removed when it is determined we dont need to drain or when drain is completed - if (this._receiver) { - this._receiver.removeListener(ReceiverEvents.receiverError, onReceiveError); - this._receiver.removeListener(ReceiverEvents.message, onReceiveMessage); - this._receiver.session.removeListener(SessionEvents.sessionError, onSessionError); - } + cleanupBeforeResolveOrReject(this._receiver, "leaveDrainHandler"); // Drain any pending credits. if (this._receiver && this._receiver.isOpen() && this._receiver.credit > 0) { @@ -313,12 +296,9 @@ export class BatchingReceiver extends MessageReceiver { }; // Action to be taken when an error is received. - const onReceiveError: OnAmqpEvent = (context: EventContext) => { + const onReceiveError: OnAmqpEvent = (context: Pick) => { const receiver = this._receiver || context.receiver!; - receiver.removeListener(ReceiverEvents.receiverError, onReceiveError); - receiver.removeListener(ReceiverEvents.message, onReceiveMessage); - receiver.removeListener(ReceiverEvents.receiverDrained, onReceiveDrain); - receiver.session.removeListener(SessionEvents.sessionError, onSessionError); + cleanupBeforeResolveOrReject(receiver, "removeDrainHandler"); const receiverError = context.receiver && context.receiver.error; let error: Error | MessagingError; @@ -333,15 +313,43 @@ export class BatchingReceiver extends MessageReceiver { } else { error = new MessagingError("An error occurred while receiving messages."); } + reject(error); + }; + + cleanupBeforeResolveOrReject = ( + receiver: Receiver | undefined, + shouldRemoveDrain: + | "removeDrainHandler" // remove drain handler (not waiting or initiating a drain) + | "leaveDrainHandler" // listener for drain is removed when it is determined we dont need to drain or when drain is completed + ): void => { + if (receiver != null) { + receiver.removeListener(ReceiverEvents.receiverError, onReceiveError); + receiver.removeListener(ReceiverEvents.message, onReceiveMessage); + receiver.session.removeListener(SessionEvents.sessionError, onSessionError); + + if (shouldRemoveDrain === "removeDrainHandler") { + receiver.removeListener(ReceiverEvents.receiverDrained, onReceiveDrain); + } + } + if (totalWaitTimer) { clearTimeout(totalWaitTimer); } if (this._newMessageReceivedTimer) { clearTimeout(this._newMessageReceivedTimer); } - reject(error); + + if (removeAbortSignalListenersFn) { + removeAbortSignalListenersFn(); + removeAbortSignalListenersFn = undefined; + } }; + removeAbortSignalListenersFn = checkAndRegisterWithAbortSignal((err) => { + cleanupBeforeResolveOrReject(this._receiver, "removeDrainHandler"); + reject(err); + }, abortSignal); + // Use new message wait timer only in peekLock mode if (this.receiveMode === ReceiveMode.peekLock) { /** @@ -462,10 +470,20 @@ export class BatchingReceiver extends MessageReceiver { onClose: onReceiveClose, onSessionClose: onSessionClose }); - this._init(rcvrOptions) + this._init(rcvrOptions, abortSignal) .then(() => { - this._receiver!.on(ReceiverEvents.receiverDrained, onReceiveDrain); - addCreditAndSetTimer(); + if (!this._receiver) { + // there's a really small window here where the receiver can be closed + // if that happens we'll just resolve to an empty array of messages. + return resolve([]); + } + + // TODO: long-term we probably need to split the code in this promise. This check + // is just a band-aid for now. + if (!abortSignal?.aborted) { + this._receiver.on(ReceiverEvents.receiverDrained, onReceiveDrain); + addCreditAndSetTimer(); + } return; }) .catch(reject); diff --git a/sdk/servicebus/service-bus/src/core/linkEntity.ts b/sdk/servicebus/service-bus/src/core/linkEntity.ts index e48f67597517..99827aea93c9 100644 --- a/sdk/servicebus/service-bus/src/core/linkEntity.ts +++ b/sdk/servicebus/service-bus/src/core/linkEntity.ts @@ -2,11 +2,11 @@ // Licensed under the MIT license. import { - defaultLock, - TokenType, AccessToken, Constants, - SharedKeyCredential + SharedKeyCredential, + TokenType, + defaultLock } from "@azure/core-amqp"; import { ClientEntityContext } from "../clientEntityContext"; import * as log from "../log"; @@ -176,7 +176,7 @@ export class LinkEntity { this.address ); if (setTokenRenewal) { - await this._ensureTokenRenewal(); + this._ensureTokenRenewal(); } } @@ -184,7 +184,7 @@ export class LinkEntity { * Ensures that the token is renewed within the predefined renewal margin. * @returns {void} */ - protected async _ensureTokenRenewal(): Promise { + protected _ensureTokenRenewal(): void { if (!this._tokenTimeout) { return; } diff --git a/sdk/servicebus/service-bus/src/core/managementClient.ts b/sdk/servicebus/service-bus/src/core/managementClient.ts index acb172251d98..f2f0e8c0ee2f 100644 --- a/sdk/servicebus/service-bus/src/core/managementClient.ts +++ b/sdk/servicebus/service-bus/src/core/managementClient.ts @@ -4,33 +4,33 @@ import Long from "long"; import { EventContext, - SenderEvents, ReceiverEvents, - SenderOptions, ReceiverOptions, - types, message as RheaMessageUtil, + SenderEvents, + SenderOptions, generate_uuid, - string_to_uuid + string_to_uuid, + types } from "rhea-promise"; import { - defaultLock, - translate, + AmqpMessage, + ConditionErrorNameMapper, Constants, + MessagingError, RequestResponseLink, - ConditionErrorNameMapper, - AmqpMessage, SendRequestOptions as SendManagementRequestOptions, - MessagingError + defaultLock, + translate } from "@azure/core-amqp"; import { ClientEntityContext } from "../clientEntityContext"; import { + DispositionType, ReceivedMessage, - ServiceBusMessageImpl, ServiceBusMessage, - toAmqpMessage, + ServiceBusMessageImpl, getMessagePropertyTypeMismatchError, - DispositionType + toAmqpMessage } from "../serviceBusMessage"; import { LinkEntity } from "./linkEntity"; import * as log from "../log"; @@ -38,10 +38,10 @@ import { ReceiveMode, fromAmqpMessage } from "../serviceBusMessage"; import { toBuffer } from "../util/utils"; import { throwErrorIfConnectionClosed, + throwTypeErrorIfParameterIsEmptyString, throwTypeErrorIfParameterMissing, throwTypeErrorIfParameterNotLong, - throwTypeErrorIfParameterTypeMismatch, - throwTypeErrorIfParameterIsEmptyString + throwTypeErrorIfParameterTypeMismatch } from "../util/errors"; import { Typed } from "rhea-promise"; import { max32BitNumber } from "../util/constants"; @@ -50,8 +50,6 @@ import { OperationOptions } from "../modelsToBeSharedWithEventHubs"; import { AbortError } from "@azure/abort-controller"; /** - * @internal - * @ignore * Represents a Rule on a Subscription that is used to filter the incoming message from the * Subscription. */ @@ -61,9 +59,9 @@ export interface RuleDescription { * - `string`: SQL-like condition expression that is evaluated against the messages' * user-defined properties and system properties. All system properties will be prefixed with * `sys.` in the condition expression. - * - `CorrelationFilter`: Properties of the filter will be used to match with the message properties. + * - `CorrelationRuleFilter`: Properties of the filter will be used to match with the message properties. */ - filter?: string | CorrelationFilter; + filter?: string | CorrelationRuleFilter; /** * Action to perform if the message satisfies the filtering expression. */ @@ -75,14 +73,11 @@ export interface RuleDescription { } /** - * @internal - * @ignore - * * Represents the correlation filter expression. - * A CorrelationFilter holds a set of conditions that are matched against user and system properties + * A CorrelationRuleFilter holds a set of conditions that are matched against user and system properties * of incoming messages from a Subscription. */ -export interface CorrelationFilter { +export interface CorrelationRuleFilter { /** * Value to be matched with the `correlationId` property of the incoming message. */ @@ -267,7 +262,7 @@ export class ManagementClient extends LinkEntity { this._mgmtReqResLink!.sender.name, this._mgmtReqResLink!.receiver.name ); - await this._ensureTokenRenewal(); + this._ensureTokenRenewal(); } } catch (err) { err = translate(err); @@ -1306,7 +1301,7 @@ export class ManagementClient extends LinkEntity { */ async addRule( ruleName: string, - filter: boolean | string | CorrelationFilter, + filter: boolean | string | CorrelationRuleFilter, sqlRuleActionExpression?: string, options?: OperationOptions & SendManagementRequestOptions ): Promise { @@ -1327,7 +1322,7 @@ export class ManagementClient extends LinkEntity { !correlationProperties.some((validProperty) => filter.hasOwnProperty(validProperty)) ) { throw new TypeError( - `The parameter "filter" should be either a boolean, string or implement the CorrelationFilter interface.` + `The parameter "filter" should be either a boolean, string or implement the CorrelationRuleFilter interface.` ); } diff --git a/sdk/servicebus/service-bus/src/core/messageReceiver.ts b/sdk/servicebus/service-bus/src/core/messageReceiver.ts index 4e239d00dc80..1408d3a559c0 100644 --- a/sdk/servicebus/service-bus/src/core/messageReceiver.ts +++ b/sdk/servicebus/service-bus/src/core/messageReceiver.ts @@ -2,31 +2,33 @@ // Licensed under the MIT license. import { - translate, + ConditionErrorNameMapper, Constants, + ErrorNameConditionMapper, MessagingError, - retry, - RetryOperationType, RetryConfig, - ConditionErrorNameMapper, - ErrorNameConditionMapper, - RetryOptions + RetryOperationType, + RetryOptions, + retry, + translate } from "@azure/core-amqp"; import { - Receiver, - OnAmqpEvent, + AmqpError, EventContext, + OnAmqpEvent, + Receiver, ReceiverOptions, - AmqpError, isAmqpError } from "rhea-promise"; import * as log from "../log"; import { LinkEntity } from "./linkEntity"; import { ClientEntityContext } from "../clientEntityContext"; -import { ServiceBusMessageImpl, DispositionType, ReceiveMode } from "../serviceBusMessage"; -import { getUniqueName, calculateRenewAfterDuration } from "../util/utils"; +import { DispositionType, ReceiveMode, ServiceBusMessageImpl } from "../serviceBusMessage"; +import { calculateRenewAfterDuration, getUniqueName, StandardAbortMessage } from "../util/utils"; import { MessageHandlerOptions } from "../models"; import { DispositionStatusOptions } from "./managementClient"; +import { AbortSignalLike } from "@azure/core-http"; +import { AbortError } from "@azure/abort-controller"; /** * @internal @@ -757,10 +759,26 @@ export class MessageReceiver extends LinkEntity { * * @returns {Promise} Promise. */ - protected async _init(options?: ReceiverOptions): Promise { + protected async _init(options?: ReceiverOptions, abortSignal?: AbortSignalLike): Promise { + const checkAborted = (): void => { + if (abortSignal?.aborted) { + throw new AbortError(StandardAbortMessage); + } + }; + const connectionId = this._context.namespace.connectionId; + + checkAborted(); + try { if (!this.isOpen() && !this.isConnecting) { + if (this.wasCloseInitiated) { + // in track 1 we'll maintain backwards compatible behavior for the codebase and + // just treat this as a no-op. There are cases, like in onDetached, where throwing + // an error here could have unintended consequences. + return; + } + log.error( "[%s] The receiver '%s' with address '%s' is not open and is not currently " + "establishing itself. Hence let's try to connect.", @@ -774,7 +792,10 @@ export class MessageReceiver extends LinkEntity { } this.isConnecting = true; + await this._negotiateClaim(); + checkAborted(); + if (!options) { options = this._createReceiverOptions(); } @@ -787,6 +808,8 @@ export class MessageReceiver extends LinkEntity { this._receiver = await this._context.namespace.connection.createReceiver(options); this.isConnecting = false; + checkAborted(); + log.error( "[%s] Receiver '%s' with address '%s' has established itself.", connectionId, @@ -810,7 +833,7 @@ export class MessageReceiver extends LinkEntity { } else if (this.receiverType === ReceiverType.batching && !this._context.batchingReceiver) { this._context.batchingReceiver = this as any; } - await this._ensureTokenRenewal(); + this._ensureTokenRenewal(); } else { log.error( "[%s] The receiver '%s' with address '%s' is open -> %s and is connecting " + @@ -908,7 +931,7 @@ export class MessageReceiver extends LinkEntity { // - Any non MessagingError because such errors do not get // translated by `@azure/core-amqp` to a MessagingError // - More details here - https://github.com/Azure/azure-sdk-for-js/pull/8580#discussion_r417087030 - let shouldReopen = + const shouldReopen = translatedError instanceof MessagingError ? translatedError.retryable : true; // Non-retryable errors that aren't caused by disconnect diff --git a/sdk/servicebus/service-bus/src/core/messageSender.ts b/sdk/servicebus/service-bus/src/core/messageSender.ts index 1214c5172d93..a5b36d884ec1 100644 --- a/sdk/servicebus/service-bus/src/core/messageSender.ts +++ b/sdk/servicebus/service-bus/src/core/messageSender.ts @@ -3,36 +3,36 @@ import * as log from "../log"; import { - messageProperties, + AmqpError, AwaitableSender, AwaitableSenderOptions, EventContext, OnAmqpEvent, message as RheaMessageUtil, - AmqpError, - generate_uuid + generate_uuid, + messageProperties } from "rhea-promise"; import { - defaultLock, - retry, - translate, AmqpMessage, + Constants, ErrorNameConditionMapper, + MessagingError, RetryConfig, RetryOperationType, - Constants, + RetryOptions, + defaultLock, delay, - MessagingError, - RetryOptions + retry, + translate } from "@azure/core-amqp"; import { ServiceBusMessage, - toAmqpMessage, - getMessagePropertyTypeMismatchError + getMessagePropertyTypeMismatchError, + toAmqpMessage } from "../serviceBusMessage"; import { ClientEntityContext } from "../clientEntityContext"; import { LinkEntity } from "./linkEntity"; -import { getUniqueName } from "../util/utils"; +import { getUniqueName, waitForTimeoutOrAbortOrResolve, StandardAbortMessage } from "../util/utils"; import { throwErrorIfConnectionClosed } from "../util/errors"; import { ServiceBusMessageBatch, ServiceBusMessageBatchImpl } from "../serviceBusMessageBatch"; import { CreateBatchOptions } from "../models"; @@ -254,40 +254,25 @@ export class MessageSender extends LinkEntity { options: OperationOptions | undefined ): Promise { const abortSignal = options?.abortSignal; - let timeoutInMs = + const timeoutInMs = this._retryOptions.timeoutInMs == undefined ? Constants.defaultOperationTimeoutInMs : this._retryOptions.timeoutInMs; const sendEventPromise = () => new Promise(async (resolve, reject) => { - let initTimeoutTimer: any; - - this._checkAndSetupAbortSignalCleanup( - abortSignal, - () => clearTimeout(initTimeoutTimer), - reject - ); - const initStartTime = Date.now(); if (!this.isOpen()) { - const initTimeoutPromise = new Promise((_res, rejectInitTimeoutPromise) => { - initTimeoutTimer = setTimeout(() => { - const desc: string = + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: () => this.open(undefined, options?.abortSignal), + abortSignal: options?.abortSignal, + timeoutMs: timeoutInMs, + timeoutMessage: `[${this._context.namespace.connectionId}] Sender "${this.name}" ` + `with address "${this.address}", was not able to send the message right now, due ` + - `to operation timeout.`; - log.error(desc); - const e: AmqpError = { - condition: ErrorNameConditionMapper.ServiceUnavailableError, - description: desc - }; - return rejectInitTimeoutPromise(translate(e)); - }, timeoutInMs); - }); - - try { - await Promise.race([this.open(), initTimeoutPromise]); + `to operation timeout.` + }); } catch (err) { err = translate(err); log.warning( @@ -297,8 +282,6 @@ export class MessageSender extends LinkEntity { err ); return reject(err); - } finally { - clearTimeout(initTimeoutTimer); } } const timeTakenByInit = Date.now() - initStartTime; @@ -392,7 +375,18 @@ export class MessageSender extends LinkEntity { /** * Initializes the sender session on the connection. */ - public async open(options?: AwaitableSenderOptions): Promise { + public async open( + options?: AwaitableSenderOptions, + abortSignal?: AbortSignalLike + ): Promise { + const checkAborted = (): void => { + if (abortSignal?.aborted) { + throw new AbortError(StandardAbortMessage); + } + }; + + checkAborted(); + if (this.isOpen()) { return; } @@ -402,8 +396,10 @@ export class MessageSender extends LinkEntity { this.openLock ); - return await defaultLock.acquire(this.openLock, async () => { + return defaultLock.acquire(this.openLock, async () => { try { + checkAborted(); + // isOpen isConnecting Should establish // true false No // true true No @@ -419,6 +415,8 @@ export class MessageSender extends LinkEntity { ); this.isConnecting = true; await this._negotiateClaim(); + checkAborted(); + log.error( "[%s] Trying to create sender '%s'...", this._context.namespace.connectionId, @@ -427,8 +425,10 @@ export class MessageSender extends LinkEntity { if (!options) { options = this._createSenderOptions(Constants.defaultOperationTimeoutInMs); } + this._sender = await this._context.namespace.connection.createAwaitableSender(options); - this.isConnecting = false; + checkAborted(); + log.error( "[%s] Sender '%s' with address '%s' has established itself.", this._context.namespace.connectionId, @@ -450,7 +450,7 @@ export class MessageSender extends LinkEntity { // It is possible for someone to close the sender and then start it again. // Thus make sure that the sender is present in the client cache. if (!this._sender) this._context.sender = this; - await this._ensureTokenRenewal(); + this._ensureTokenRenewal(); } } catch (err) { err = translate(err); @@ -461,6 +461,8 @@ export class MessageSender extends LinkEntity { err ); throw err; + } finally { + this.isConnecting = false; } }); } @@ -729,7 +731,7 @@ export class MessageSender extends LinkEntity { async getMaxMessageSize( options: { retryOptions?: RetryOptions; - } = {} + } & Pick = {} ): Promise { const retryOptions = options.retryOptions || {}; if (this.isOpen()) { @@ -738,10 +740,11 @@ export class MessageSender extends LinkEntity { return new Promise(async (resolve, reject) => { try { const config: RetryConfig = { - operation: () => this.open(), + operation: () => this.open(undefined, options?.abortSignal), connectionId: this._context.namespace.connectionId, operationType: RetryOperationType.senderLink, - retryOptions: retryOptions + retryOptions: retryOptions, + abortSignal: options?.abortSignal }; await retry(config); @@ -756,7 +759,8 @@ export class MessageSender extends LinkEntity { async createBatch(options?: CreateBatchOptions): Promise { throwErrorIfConnectionClosed(this._context.namespace); let maxMessageSize = await this.getMaxMessageSize({ - retryOptions: this._retryOptions + retryOptions: this._retryOptions, + abortSignal: options?.abortSignal }); if (options?.maxSizeInBytes) { if (options.maxSizeInBytes > maxMessageSize!) { @@ -792,38 +796,6 @@ export class MessageSender extends LinkEntity { } } - private _checkAndSetupAbortSignalCleanup( - abortSignal: AbortSignalLike | undefined, - clearStateFn: () => void, - reject: (err: Error) => void - ) { - if (abortSignal == null) { - return; - } - - const rejectOnAbort = () => { - const desc: string = - `[${this._context.namespace.connectionId}] The send operation on the Sender "${this.name}" with ` + - `address "${this.address}" has been cancelled by the user.`; - // Cancellation is user-intended, so log to info instead of warning. - log.error(desc); - return reject(new AbortError("The send operation has been cancelled by the user.")); - }; - - if (abortSignal.aborted) { - // operation has been cancelled, so exit quickly - return rejectOnAbort(); - } - - const onAborted = () => { - clearStateFn(); - abortSignal.removeEventListener("abort", onAborted); - return rejectOnAbort(); - }; - - abortSignal.addEventListener("abort", onAborted); - } - /** * Creates a new sender to the specific ServiceBus entity, and optionally to a given * partition if it is not present in the context or returns the one present in the context. diff --git a/sdk/servicebus/service-bus/src/core/streamingReceiver.ts b/sdk/servicebus/service-bus/src/core/streamingReceiver.ts index a01ee07c3d0f..66aee8da448c 100644 --- a/sdk/servicebus/service-bus/src/core/streamingReceiver.ts +++ b/sdk/servicebus/service-bus/src/core/streamingReceiver.ts @@ -3,9 +3,9 @@ import { MessageReceiver, - ReceiveOptions, - OnMessage, OnError, + OnMessage, + ReceiveOptions, ReceiverType } from "./messageReceiver"; @@ -14,6 +14,7 @@ import { ClientEntityContext } from "../clientEntityContext"; import * as log from "../log"; import { throwErrorIfConnectionClosed } from "../util/errors"; import { RetryOperationType, RetryConfig, retry } from "@azure/core-amqp"; +import { OperationOptions } from "../modelsToBeSharedWithEventHubs"; /** * @internal @@ -75,20 +76,34 @@ export class StreamingReceiver extends MessageReceiver { */ static async create( context: ClientEntityContext, - options?: ReceiveOptions + options?: ReceiveOptions & + Pick & { + _createStreamingReceiver?: ( + context: ClientEntityContext, + options?: ReceiveOptions + ) => StreamingReceiver; + } ): Promise { throwErrorIfConnectionClosed(context.namespace); if (!options) options = {}; if (options.autoComplete == null) options.autoComplete = true; - const sReceiver = new StreamingReceiver(context, options); + + let sReceiver: StreamingReceiver; + + if (options?._createStreamingReceiver) { + sReceiver = options._createStreamingReceiver(context, options); + } else { + sReceiver = new StreamingReceiver(context, options); + } const config: RetryConfig = { operation: () => { - return sReceiver._init(); + return sReceiver._init(undefined, options?.abortSignal); }, connectionId: context.namespace.connectionId, operationType: RetryOperationType.receiveMessage, - retryOptions: options.retryOptions + retryOptions: options.retryOptions, + abortSignal: options?.abortSignal }; await retry(config); context.streamingReceiver = sReceiver; diff --git a/sdk/servicebus/service-bus/src/index.ts b/sdk/servicebus/service-bus/src/index.ts index e533d8f75afb..a958a1c8150f 100644 --- a/sdk/servicebus/service-bus/src/index.ts +++ b/sdk/servicebus/service-bus/src/index.ts @@ -4,43 +4,74 @@ /// /// -export { ServiceBusClientOptions } from "./constructorHelpers"; export { - TokenType, - TokenCredential, delay, MessagingError, RetryOptions, + TokenCredential, + TokenType, WebSocketOptions } from "@azure/core-amqp"; - -export { SessionReceiverOptions, SessionMessageHandlerOptions } from "./session/messageSession"; - -export { - ReceivedMessage, - ServiceBusMessage, - DeadLetterOptions, - ReceivedMessageWithLock -} from "./serviceBusMessage"; -export { ServiceBusMessageBatch } from "./serviceBusMessageBatch"; - export { Delivery, WebSocketImpl } from "rhea-promise"; - +export { ServiceBusClientOptions } from "./constructorHelpers"; +export { CorrelationRuleFilter } from "./core/managementClient"; export { - GetMessageIteratorOptions, + CreateBatchOptions, CreateSessionReceiverOptions, - CreateSenderOptions, + GetMessageIteratorOptions, MessageHandlerOptions, MessageHandlers, + PeekMessagesOptions, ReceiveBatchOptions, + SenderOpenOptions, SubscribeOptions, - WaitTimeOptions, - CreateBatchOptions, - BrowseMessagesOptions + WaitTimeOptions } from "./models"; export { OperationOptions } from "./modelsToBeSharedWithEventHubs"; - export { Receiver } from "./receivers/receiver"; export { SessionReceiver } from "./receivers/sessionReceiver"; export { Sender } from "./sender"; +export { NamespaceProperties } from "./serializers/namespaceResourceSerializer"; +export { QueueDescription, QueueRuntimeInfo } from "./serializers/queueResourceSerializer"; +export { + RuleDescription, + SqlParameter, + SqlRuleAction, + SqlRuleFilter +} from "./serializers/ruleResourceSerializer"; +export { + SubscriptionDescription, + SubscriptionRuntimeInfo +} from "./serializers/subscriptionResourceSerializer"; +export { TopicDescription, TopicRuntimeInfo } from "./serializers/topicResourceSerializer"; +export { + ListRequestOptions, + NamespacePropertiesResponse, + QueueResponse, + QueueRuntimeInfoResponse, + QueuesResponse, + QueuesRuntimeInfoResponse, + Response, + RuleResponse, + RulesResponse, + ServiceBusManagementClient, + ServiceBusManagementClientOptions, + SubscriptionResponse, + SubscriptionRuntimeInfoResponse, + SubscriptionsResponse, + SubscriptionsRuntimeInfoResponse, + TopicResponse, + TopicRuntimeInfoResponse, + TopicsResponse, + TopicsRuntimeInfoResponse +} from "./serviceBusAtomManagementClient"; export { ServiceBusClient } from "./serviceBusClient"; +export { + DeadLetterOptions, + ReceivedMessage, + ReceivedMessageWithLock, + ServiceBusMessage +} from "./serviceBusMessage"; +export { ServiceBusMessageBatch } from "./serviceBusMessageBatch"; +export { SessionMessageHandlerOptions, SessionReceiverOptions } from "./session/messageSession"; +export { AuthorizationRule, EntityStatus, MessageCountDetails } from "./util/utils"; diff --git a/sdk/servicebus/service-bus/src/models.ts b/sdk/servicebus/service-bus/src/models.ts index 0ed808d15232..0e0e2d2442e4 100644 --- a/sdk/servicebus/service-bus/src/models.ts +++ b/sdk/servicebus/service-bus/src/models.ts @@ -105,9 +105,9 @@ export interface MessageHandlerOptions { export interface CreateSessionReceiverOptions extends SessionReceiverOptions, OperationOptions {} /** - * Describes the options passed to the `createSender` method on `ServiceBusClient`. + * Describes the options passed to the `open` method on a `Sender`. */ -export interface CreateSenderOptions { +export interface SenderOpenOptions { /** * The signal which can be used to abort requests. */ @@ -115,16 +115,16 @@ export interface CreateSenderOptions { } /** - * Describes the options passed to the `browseMessages` method on a receiver. + * Describes the options passed to the `peekMessages` method on a receiver. */ -export interface BrowseMessagesOptions extends OperationOptions { +export interface PeekMessagesOptions extends OperationOptions { /** - * @property The maximum number of messages to browse. + * @property The maximum number of messages to peek. * Default value is 1 */ maxMessageCount?: number; /** - * @property The sequence number to start browsing messages from (inclusive). + * @property The sequence number to start peeking messages from (inclusive). */ fromSequenceNumber?: Long; } diff --git a/sdk/servicebus/service-bus/src/receivers/receiver.ts b/sdk/servicebus/service-bus/src/receivers/receiver.ts index 7d5141193f62..e263b94f628f 100644 --- a/sdk/servicebus/service-bus/src/receivers/receiver.ts +++ b/sdk/servicebus/service-bus/src/receivers/receiver.ts @@ -2,34 +2,32 @@ // Licensed under the MIT license. import { - MessageHandlers, - SubscribeOptions, + PeekMessagesOptions, GetMessageIteratorOptions, + MessageHandlers, ReceiveBatchOptions, - MessageHandlerOptions, - BrowseMessagesOptions + SubscribeOptions } from "../models"; import { OperationOptions } from "../modelsToBeSharedWithEventHubs"; import { ReceivedMessage } from ".."; import { ClientEntityContext } from "../clientEntityContext"; import { - throwErrorIfConnectionClosed, getAlreadyReceivingErrorMsg, getReceiverClosedErrorMsg, + throwErrorIfConnectionClosed, throwTypeErrorIfParameterMissing, throwTypeErrorIfParameterNotLong, - throwTypeErrorIfParameterNotLongArray, - throwErrorIfClientOrConnectionClosed + throwTypeErrorIfParameterNotLongArray } from "../util/errors"; import * as log from "../log"; -import { OnMessage, OnError, ReceiveOptions } from "../core/messageReceiver"; +import { OnError, OnMessage, ReceiveOptions } from "../core/messageReceiver"; import { StreamingReceiver } from "../core/streamingReceiver"; import { BatchingReceiver } from "../core/batchingReceiver"; import { assertValidMessageHandlers, getMessageIterator } from "./shared"; import { convertToInternalReceiveMode } from "../constructorHelpers"; import Long from "long"; -import { ServiceBusMessageImpl, ReceivedMessageWithLock } from "../serviceBusMessage"; -import { RetryConfig, RetryOperationType, retry, Constants, RetryOptions } from "@azure/core-amqp"; +import { ReceivedMessageWithLock, ServiceBusMessageImpl } from "../serviceBusMessage"; +import { Constants, RetryConfig, RetryOperationType, RetryOptions, retry } from "@azure/core-amqp"; import "@azure/core-asynciterator-polyfill"; /** @@ -93,16 +91,16 @@ export interface Receiver { isReceivingMessages(): boolean; /** - * Browse the next batch of active messages (including deferred but not deadlettered messages) on the + * Peek the next batch of active messages (including deferred but not deadlettered messages) on the * queue or subscription without modifying them. - * - The first call to `browseMessages()` fetches the first active message. Each subsequent call fetches the + * - The first call to `peekMessages()` fetches the first active message. Each subsequent call fetches the * subsequent message. - * - Unlike a "received" message, "browsed" message is a read-only version of the message. + * - Unlike a "received" message, "peeked" message is a read-only version of the message. * It cannot be `Completed/Abandoned/Deferred/Deadlettered`. - * @param options Options that allow to specify the maximum number of messages to browse, - * the sequenceNumber to start browsing from or an abortSignal to abort the operation. + * @param options Options that allow to specify the maximum number of messages to peek, + * the sequenceNumber to start peeking from or an abortSignal to abort the operation. */ - browseMessages(options?: BrowseMessagesOptions): Promise; + peekMessages(options?: PeekMessagesOptions): Promise; /** * Path of the entity for which the receiver has been created. */ @@ -209,7 +207,7 @@ export class ReceiverImpl & { + createStreamingReceiver?: ( + context: ClientEntityContext, + options?: ReceiveOptions + ) => StreamingReceiver; + } + ): Promise { + return StreamingReceiver.create(context, options); + } + /** * Returns a promise that resolves to an array of messages based on given count and timeout over * an AMQP receiver link from a Queue/Subscription. @@ -272,11 +283,12 @@ export class ReceiverImpl { - throwErrorIfClientOrConnectionClosed( - this._context.namespace, - this._context.entityPath, - this._context.isClosed - ); - + async peekMessages(options: PeekMessagesOptions = {}): Promise { + this._throwIfReceiverOrConnectionClosed(); const managementRequestOptions = { ...options, - requestName: "browseMessages", + requestName: "peekMessages", timeoutInMs: this._retryOptions?.timeoutInMs }; const peekOperationPromise = async () => { @@ -517,4 +524,11 @@ export class ReceiverImpl(config); } - async browseMessages(options: BrowseMessagesOptions = {}): Promise { + async peekMessages(options: PeekMessagesOptions = {}): Promise { this._throwIfReceiverOrConnectionClosed(); const managementRequestOptions = { ...options, - requestName: "browseMessages", + requestName: "peekMessages", timeoutInMs: this._retryOptions?.timeoutInMs }; const peekOperationPromise = async () => { diff --git a/sdk/servicebus/service-bus/src/receivers/subscriptionRuleManager.ts b/sdk/servicebus/service-bus/src/receivers/subscriptionRuleManager.ts index d47777eb0081..c1db878803a3 100644 --- a/sdk/servicebus/service-bus/src/receivers/subscriptionRuleManager.ts +++ b/sdk/servicebus/service-bus/src/receivers/subscriptionRuleManager.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { RuleDescription, CorrelationFilter } from "../core/managementClient"; -import { throwErrorIfClientOrConnectionClosed } from "../util/errors"; +import { retry, RetryConfig, RetryOperationType, RetryOptions } from "@azure/core-amqp"; import { ClientEntityContext } from "../clientEntityContext"; -import { retry, RetryOperationType, RetryConfig, RetryOptions } from "@azure/core-amqp"; +import { CorrelationRuleFilter, RuleDescription } from "../core/managementClient"; import { OperationOptions } from "../modelsToBeSharedWithEventHubs"; +import { throwErrorIfClientOrConnectionClosed } from "../util/errors"; /** * @internal @@ -51,7 +51,7 @@ interface SubscriptionRuleManager { */ addRule( ruleName: string, - filter: boolean | string | CorrelationFilter, + filter: boolean | string | CorrelationRuleFilter, sqlRuleActionExpression?: string, options?: OperationOptions ): Promise; @@ -129,7 +129,7 @@ export class SubscriptionRuleManagerImpl implements SubscriptionRuleManager { addRule( ruleName: string, - filter: boolean | string | CorrelationFilter, + filter: boolean | string | CorrelationRuleFilter, sqlRuleActionExpression?: string, options: OperationOptions = {} ): Promise { diff --git a/sdk/servicebus/service-bus/src/sender.ts b/sdk/servicebus/service-bus/src/sender.ts index 95bcb0f9723c..303912db540c 100644 --- a/sdk/servicebus/service-bus/src/sender.ts +++ b/sdk/servicebus/service-bus/src/sender.ts @@ -4,7 +4,7 @@ import Long from "long"; import * as log from "./log"; import { MessageSender } from "./core/messageSender"; -import { ServiceBusMessage } from "./serviceBusMessage"; +import { ServiceBusMessage, isServiceBusMessage } from "./serviceBusMessage"; import { ClientEntityContext } from "./clientEntityContext"; import { getSenderClosedErrorMsg, @@ -14,13 +14,13 @@ import { throwTypeErrorIfParameterNotLongArray } from "./util/errors"; import { ServiceBusMessageBatch } from "./serviceBusMessageBatch"; -import { CreateBatchOptions, CreateSenderOptions } from "./models"; +import { CreateBatchOptions, SenderOpenOptions } from "./models"; import { - retry, - RetryOperationType, + MessagingError, RetryConfig, + RetryOperationType, RetryOptions, - MessagingError + retry } from "@azure/core-amqp"; import { OperationOptions } from "./modelsToBeSharedWithEventHubs"; @@ -90,6 +90,17 @@ export interface Sender { */ createBatch(options?: CreateBatchOptions): Promise; + /** + * Opens the AMQP link to Azure Service Bus from the sender. + * + * It is not necessary to call this method in order to use the sender. It is + * recommended to call this before your first send() or sendBatch() call if you + * want to front load the work of setting up the AMQP link to the service. + * + * @param options - Options bag to pass an abort signal. + */ + open(options?: SenderOpenOptions): Promise; + /** * @property Returns `true` if either the sender or the client that created it has been closed * @readonly @@ -199,10 +210,7 @@ export class SenderImpl implements Sender { private _throwIfSenderOrConnectionClosed(): void { throwErrorIfConnectionClosed(this._context.namespace); if (this.isClosed) { - const errorMessage = getSenderClosedErrorMsg( - this._context.entityPath, - this._context.isClosed - ); + const errorMessage = getSenderClosedErrorMsg(this._context.entityPath); const error = new Error(errorMessage); log.error(`[${this._context.namespace.connectionId}] %O`, error); throw error; @@ -239,13 +247,12 @@ export class SenderImpl implements Sender { return this._sender.sendBatch(batch, options); } else if (isServiceBusMessageBatch(messageOrMessagesOrBatch)) { return this._sender.sendBatch(messageOrMessagesOrBatch, options); + } else if (isServiceBusMessage(messageOrMessagesOrBatch)) { + return this._sender.send(messageOrMessagesOrBatch, options); } else { - throwTypeErrorIfParameterMissing( - this._context.namespace.connectionId, - "message, messages or messageBatch", - messageOrMessagesOrBatch + throw new TypeError( + "Invalid type for message. Must be a ServiceBusMessage, an array of ServiceBusMessage or a ServiceBusMessageBatch" ); - return this._sender.send(messageOrMessagesOrBatch, options); } } @@ -405,11 +412,11 @@ export class SenderImpl implements Sender { return retry(config); } - async open(options?: CreateSenderOptions): Promise { + async open(options?: SenderOpenOptions): Promise { this._throwIfSenderOrConnectionClosed(); const config: RetryConfig = { - operation: () => this._sender.open(), + operation: () => this._sender.open(undefined, options?.abortSignal), connectionId: this._context.namespace.connectionId, operationType: RetryOperationType.senderLink, retryOptions: this._retryOptions, diff --git a/sdk/servicebus/service-bus/src/serializers/namespaceResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/namespaceResourceSerializer.ts new file mode 100644 index 000000000000..add75c4bc129 --- /dev/null +++ b/sdk/servicebus/service-bus/src/serializers/namespaceResourceSerializer.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpOperationResponse } from "@azure/core-http"; +import { + AtomXmlSerializer, + deserializeAtomXmlResponse, + serializeToAtomXmlRequest +} from "../util/atomXmlHelper"; +import { getInteger, getString, getDate } from "../util/utils"; + +/** + * Represents the metadata related to a service bus namespace. + * + * @export + * @interface NamespaceProperties + */ +export interface NamespaceProperties { + /** + * The time at which the namespace was created. + */ + createdOn: Date; + /** + * The SKU/tier of the namespace. + * "Basic", "Standard" and "Premium" + */ + messagingSku: string; + /** + * The last time at which the namespace was modified. + */ + updatedOn: Date; + /** + * Name of the namespace. + */ + name: string; + /** + * Type of entities present in the namespace. + */ + namespaceType: string; + /** + * Number of messaging units allocated for namespace. + * Valid only for Premium namespaces. + * messagingUnits would be set to `undefined` for Basic and Standard namespaces. + */ + messagingUnits: number | undefined; +} + +/** + * @internal + * @ignore + * Builds the namespace object from the raw json object gotten after deserializing the + * response from the service + * @param rawNamespace + */ +export function buildNamespace(rawNamespace: any): NamespaceProperties { + const messagingSku = getString(rawNamespace["MessagingSKU"], "messagingSku"); + return { + createdOn: getDate(rawNamespace["CreatedTime"], "createdOn"), + messagingSku: messagingSku, + updatedOn: getDate(rawNamespace["ModifiedTime"], "updatedOn"), + name: getString(rawNamespace["Name"], "name"), + namespaceType: getString(rawNamespace["NamespaceType"], "namespaceType"), + messagingUnits: + messagingSku === "Premium" + ? getInteger(rawNamespace["MessagingUnits"], "messagingUnits") + : undefined + }; +} + +/** + * @internal + * @ignore + * Atom XML Serializer for Namespaces. + */ +export class NamespaceResourceSerializer implements AtomXmlSerializer { + serialize(): object { + return serializeToAtomXmlRequest("NamespaceProperties", {}); + } + + async deserialize(response: HttpOperationResponse): Promise { + return deserializeAtomXmlResponse(["name"], response); + } +} diff --git a/sdk/servicebus/service-bus/src/serializers/queueResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/queueResourceSerializer.ts index 0b54c1d2a8ce..31e24d7200f0 100644 --- a/sdk/servicebus/service-bus/src/serializers/queueResourceSerializer.ts +++ b/sdk/servicebus/service-bus/src/serializers/queueResourceSerializer.ts @@ -2,25 +2,25 @@ // Licensed under the MIT license. import { HttpOperationResponse } from "@azure/core-http"; -import * as Constants from "../util/constants"; import { - serializeToAtomXmlRequest, + AtomXmlSerializer, deserializeAtomXmlResponse, - AtomXmlSerializer + serializeToAtomXmlRequest } from "../util/atomXmlHelper"; +import * as Constants from "../util/constants"; import { - getStringOrUndefined, - getCountDetailsOrUndefined, - getRawAuthorizationRules, - getAuthorizationRulesOrUndefined, - MessageCountDetails, AuthorizationRule, - getInteger, + EntityStatus, + getAuthorizationRulesOrUndefined, getBoolean, - getString, - getBooleanOrUndefined, + getCountDetailsOrUndefined, + getInteger, getIntegerOrUndefined, - EntityStatus + getRawAuthorizationRules, + getString, + getStringOrUndefined, + MessageCountDetails, + getDate } from "../util/utils"; /** @@ -29,28 +29,26 @@ import { * Builds the queue options object from the user provided options. * Handles the differences in casing for the property names, * converts values to string and ensures the right order as expected by the service - * @param queueOptions + * @param queue */ -export function buildQueueOptions(queueOptions: QueueOptions): InternalQueueOptions { +export function buildQueueOptions(queue: QueueDescription): InternalQueueOptions { return { - LockDuration: queueOptions.lockDuration, - MaxSizeInMegabytes: getStringOrUndefined(queueOptions.maxSizeInMegabytes), - RequiresDuplicateDetection: getStringOrUndefined(queueOptions.requiresDuplicateDetection), - RequiresSession: getStringOrUndefined(queueOptions.requiresSession), - DefaultMessageTimeToLive: queueOptions.defaultMessageTtl, - DeadLetteringOnMessageExpiration: getStringOrUndefined( - queueOptions.deadLetteringOnMessageExpiration - ), - DuplicateDetectionHistoryTimeWindow: queueOptions.duplicateDetectionHistoryTimeWindow, - MaxDeliveryCount: getStringOrUndefined(queueOptions.maxDeliveryCount), - EnableBatchedOperations: getStringOrUndefined(queueOptions.enableBatchedOperations), - AuthorizationRules: getRawAuthorizationRules(queueOptions.authorizationRules), - Status: getStringOrUndefined(queueOptions.status), - AutoDeleteOnIdle: getStringOrUndefined(queueOptions.autoDeleteOnIdle), - EnablePartitioning: getStringOrUndefined(queueOptions.enablePartitioning), - ForwardDeadLetteredMessagesTo: getStringOrUndefined(queueOptions.forwardDeadLetteredMessagesTo), - ForwardTo: getStringOrUndefined(queueOptions.forwardTo), - UserMetadata: getStringOrUndefined(queueOptions.userMetadata) + LockDuration: queue.lockDuration, + MaxSizeInMegabytes: getStringOrUndefined(queue.maxSizeInMegabytes), + RequiresDuplicateDetection: getStringOrUndefined(queue.requiresDuplicateDetection), + RequiresSession: getStringOrUndefined(queue.requiresSession), + DefaultMessageTimeToLive: queue.defaultMessageTtl, + DeadLetteringOnMessageExpiration: getStringOrUndefined(queue.deadLetteringOnMessageExpiration), + DuplicateDetectionHistoryTimeWindow: queue.duplicateDetectionHistoryTimeWindow, + MaxDeliveryCount: getStringOrUndefined(queue.maxDeliveryCount), + EnableBatchedOperations: getStringOrUndefined(queue.enableBatchedOperations), + AuthorizationRules: getRawAuthorizationRules(queue.authorizationRules), + Status: getStringOrUndefined(queue.status), + AutoDeleteOnIdle: getStringOrUndefined(queue.autoDeleteOnIdle), + EnablePartitioning: getStringOrUndefined(queue.enablePartitioning), + ForwardDeadLetteredMessagesTo: getStringOrUndefined(queue.forwardDeadLetteredMessagesTo), + ForwardTo: getStringOrUndefined(queue.forwardTo), + UserMetadata: getStringOrUndefined(queue.userMetadata) }; } @@ -61,18 +59,16 @@ export function buildQueueOptions(queueOptions: QueueOptions): InternalQueueOpti * response from the service * @param rawQueue */ -export function buildQueue(rawQueue: any): QueueDetails { +export function buildQueue(rawQueue: any): QueueDescription { return { - queueName: getString(rawQueue[Constants.QUEUE_NAME], "queueName"), + name: getString(rawQueue[Constants.QUEUE_NAME], "queueName"), forwardTo: getStringOrUndefined(rawQueue[Constants.FORWARD_TO]), userMetadata: rawQueue[Constants.USER_METADATA], lockDuration: getString(rawQueue[Constants.LOCK_DURATION], "lockDuration"), - sizeInBytes: getIntegerOrUndefined(rawQueue[Constants.SIZE_IN_BYTES]), maxSizeInMegabytes: getInteger(rawQueue[Constants.MAX_SIZE_IN_MEGABYTES], "maxSizeInMegabytes"), - messageCount: getIntegerOrUndefined(rawQueue[Constants.MESSAGE_COUNT]), maxDeliveryCount: getInteger(rawQueue[Constants.MAX_DELIVERY_COUNT], "maxDeliveryCount"), enablePartitioning: getBoolean(rawQueue[Constants.ENABLE_PARTITIONING], "enablePartitioning"), @@ -104,28 +100,40 @@ export function buildQueue(rawQueue: any): QueueDetails { rawQueue[Constants.FORWARD_DEADLETTERED_MESSAGES_TO] ), - messageCountDetails: getCountDetailsOrUndefined(rawQueue[Constants.COUNT_DETAILS]), - supportOrdering: getBooleanOrUndefined(rawQueue[Constants.SUPPORT_ORDERING]), - enableExpress: getBooleanOrUndefined(rawQueue[Constants.ENABLE_EXPRESS]), - authorizationRules: getAuthorizationRulesOrUndefined(rawQueue[Constants.AUTHORIZATION_RULES]), - isAnonymousAccessible: getBooleanOrUndefined(rawQueue[Constants.IS_ANONYMOUS_ACCESSIBLE]), - - entityAvailabilityStatus: rawQueue[Constants.ENTITY_AVAILABILITY_STATUS], - status: rawQueue[Constants.STATUS], - createdOn: rawQueue[Constants.CREATED_AT], - updatedOn: rawQueue[Constants.UPDATED_AT], - accessedOn: rawQueue[Constants.ACCESSED_AT] + status: rawQueue[Constants.STATUS] }; } /** * @internal * @ignore + * Builds the queue runtime info object from the raw json object gotten after deserializing the + * response from the service + * @param rawQueue + */ +export function buildQueueRuntimeInfo(rawQueue: any): QueueRuntimeInfo { + return { + name: getString(rawQueue[Constants.QUEUE_NAME], "queueName"), + sizeInBytes: getIntegerOrUndefined(rawQueue[Constants.SIZE_IN_BYTES]), + messageCount: getIntegerOrUndefined(rawQueue[Constants.MESSAGE_COUNT]), + messageCountDetails: getCountDetailsOrUndefined(rawQueue[Constants.COUNT_DETAILS]), + createdOn: getDate(rawQueue[Constants.CREATED_AT], "createdOn"), + updatedOn: getDate(rawQueue[Constants.UPDATED_AT], "updatedOn"), + accessedOn: getDate(rawQueue[Constants.ACCESSED_AT], "accessedOn") + }; +} + +/** * Represents settable options on a queue */ -export interface QueueOptions { +export interface QueueDescription { + /** + * Name of the queue + */ + name: string; + /** * Determines the amount of time in seconds in which a message should be locked for * processing by a receiver. After this period, the message is unlocked and available @@ -360,37 +368,28 @@ export interface InternalQueueOptions { } /** - * @internal - * @ignore - * Represents all attributes of a queue entity + * Represents runtime info attributes of a queue entity */ -export interface QueueDetails { +export interface QueueRuntimeInfo { /** * Name of the queue */ - queueName: string; + name: string; /** - * Determines the amount of time in seconds in which a message should be locked - * for processing by a receiver. After this period, the message is unlocked and - * can be consumed by the next receiver. - * Settable only at queue creation time. - * This is specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. + * Created at timestamp */ - lockDuration: string; + createdOn: Date; /** - * The entity's size in bytes. - * + * Updated at timestamp */ - sizeInBytes?: number; + updatedOn: Date; /** - * Specifies the maximum queue size in megabytes. Any attempt to enqueue - * a message that will cause the queue to exceed this value will fail. + * Accessed at timestamp */ - maxSizeInMegabytes: number; + accessedOn: Date; /** * The entity's message count. @@ -398,142 +397,16 @@ export interface QueueDetails { */ messageCount?: number; - /** - * Depending on whether DeadLettering is enabled, a message is automatically - * moved to the DeadLetterQueue or deleted if it has been stored in the queue - * for longer than the specified time. This value is overwritten by a TTL - * specified on the message if and only if the message TTL is smaller than - * the TTL set on the queue. - * This value is immutable after the Queue has been created. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - defaultMessageTtl: string; - - /** - * Specifies the time span during which the Service Bus detects message duplication. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - duplicateDetectionHistoryTimeWindow: string; - - /** - * Absolute URL or the name of the queue or topic the dead-lettered - * messages are to be forwarded to. - * For example, an absolute URL input would be of the form - * `sb:///` - */ - forwardDeadLetteredMessagesTo?: string; - - /** - * Max idle time before entity is deleted. - * This is specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - autoDeleteOnIdle: string; - - /** - * The maximum delivery count of messages after which if it is still not settled, - * gets moved to the dead-letter sub-queue. - * - */ - maxDeliveryCount: number; - - /** - * If set to true, the queue will be session-aware and only SessionReceiver - * will be supported. Session-aware queues are not supported through REST. - * Settable only at queue creation time. - */ - requiresSession: boolean; - - /** - * Specifies if batched operations should be allowed. - */ - enableBatchedOperations: boolean; - - /** - * If enabled, the topic will detect duplicate messages within the time - * span specified by the DuplicateDetectionHistoryTimeWindow property. - * Settable only at queue creation time. - */ - requiresDuplicateDetection: boolean; - - /** - * If it is enabled and a message expires, the Service Bus moves the message - * from the queue into the queue’s dead-letter sub-queue. If disabled, message - * will be permanently deleted from the queue. Settable only at queue creation time. - */ - deadLetteringOnMessageExpiration: boolean; - - /** - * Absolute URL or the name of the queue or topic the - * messages are to be forwarded to. - * For example, an absolute URL input would be of the form - * `sb:///` - */ - forwardTo?: string; - - /** - * The user provided metadata information associated with the queue description. - * Used to specify textual content such as tags, labels, etc. - * Value must not exceed 1024 bytes encoded in utf-8. - */ - userMetadata?: string; - - /** - * Specifies whether the queue should be partitioned. - */ - enablePartitioning: boolean; - - /** - * Authorization rules on the queue - */ - authorizationRules?: AuthorizationRule[]; - /** * Message count details */ messageCountDetails?: MessageCountDetails; /** - * Ordering support for messages - */ - supportOrdering?: boolean; - - /** - * Enable express option - */ - enableExpress?: boolean; - - /** - * Is anonymous accessible queue option - */ - isAnonymousAccessible?: boolean; - - /** - * Entity availability status - */ - entityAvailabilityStatus?: string; - - /** - * Status of the messaging entity. - */ - status?: EntityStatus; - - /** - * Created at timestamp - */ - createdOn?: string; - - /** - * Updated at timestamp - */ - updatedOn?: string; - - /** - * Accessed at timestamp + * The entity's size in bytes. + * */ - accessedOn?: string; + sizeInBytes?: number; } /** diff --git a/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts index 74e107ce00c3..0d5cc1281575 100644 --- a/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts +++ b/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts @@ -2,34 +2,20 @@ // Licensed under the MIT license. import { HttpOperationResponse } from "@azure/core-http"; -import * as Constants from "../util/constants"; +import { CorrelationRuleFilter } from "../core/managementClient"; import { - serializeToAtomXmlRequest, + AtomXmlSerializer, deserializeAtomXmlResponse, - AtomXmlSerializer + serializeToAtomXmlRequest } from "../util/atomXmlHelper"; +import * as Constants from "../util/constants"; import { - getIntegerOrUndefined, - getStringOrUndefined, getBooleanOrUndefined, + getIntegerOrUndefined, getString, + getStringOrUndefined, isJSONLikeObject } from "../util/utils"; -import { CorrelationFilter } from "../core/managementClient"; - -/** - * @internal - * @ignore - * Builds the rule options object from the user provided options. - * Handles the differences in casing for the property names, - * converts values to string and ensures the right order as expected by the service - * @param name - * @param ruleOptions - */ -export function buildRuleOptions(name: string, ruleOptions: RuleOptions = {}): InternalRuleOptions { - const internalRuleOptions: InternalRuleOptions = Object.assign({}, ruleOptions, { name: name }); - return internalRuleOptions; -} /** * @internal @@ -38,14 +24,11 @@ export function buildRuleOptions(name: string, ruleOptions: RuleOptions = {}): I * response from the service * @param rawRule */ -export function buildRule(rawRule: any): RuleDetails { +export function buildRule(rawRule: any): RuleDescription { return { - ruleName: getString(rawRule["RuleName"], "ruleName"), - topicName: getString(rawRule["TopicName"], "topicName"), - subscriptionName: getString(rawRule["SubscriptionName"], "subscriptionName"), + name: getString(rawRule["RuleName"], "ruleName"), filter: getTopicFilter(rawRule["Filter"]), - action: getRuleActionOrUndefined(rawRule["Action"]), - createdOn: getString(rawRule["CreatedAt"], "createdOn") + action: getRuleActionOrUndefined(rawRule["Action"]) }; } @@ -56,8 +39,8 @@ export function buildRule(rawRule: any): RuleDetails { * or undefined if not passed in. * @param value */ -function getTopicFilter(value: any): SqlFilter | CorrelationFilter { - let result: SqlFilter | CorrelationFilter; +function getTopicFilter(value: any): SqlRuleFilter | CorrelationRuleFilter { + let result: SqlRuleFilter | CorrelationRuleFilter; if (value["SqlExpression"] != undefined) { result = { @@ -89,7 +72,7 @@ function getTopicFilter(value: any): SqlFilter | CorrelationFilter { * or undefined if not passed in. * @param value */ -function getRuleActionOrUndefined(value: any): SqlAction | undefined { +function getRuleActionOrUndefined(value: any): SqlRuleAction | undefined { if (value == undefined) { return undefined; } else { @@ -103,135 +86,55 @@ function getRuleActionOrUndefined(value: any): SqlAction | undefined { } /** - * @internal - * @ignore - * Represents settable options on a rule - */ -export interface RuleOptions { - /** - * @internal - * @ignore - * Defines the filter expression that the rule evaluates. For `SqlFilter` input, - * the expression string is interpreted as a SQL92 expression which must - * evaluate to True or False. Only one between a `CorrelationFilter` or - * a `SqlFilter` can be defined. - */ - filter?: SqlFilter | CorrelationFilter; - - /** - * @internal - * @ignore - * The SQL like expression that can be executed on the message should the - * associated filter apply. - */ - action?: SqlAction; -} - -/** - * @internal - * @ignore - * Internal representation of settable options on a rule - */ -export interface InternalRuleOptions extends RuleOptions { - /** - * @internal - * @ignore - * Name of the rule. - */ - name?: string; -} - -/** - * @internal - * @ignore * Represents all attributes of a rule entity */ -export interface RuleDetails { +export interface RuleDescription { /** - * @internal - * @ignore * Name of the rule */ - ruleName: string; + name: string; /** - * @internal - * @ignore - * Defines the filter expression that the rule evaluates. For `SqlFilter` input, + * Defines the filter expression that the rule evaluates. For `SqlRuleFilter` input, * the expression string is interpreted as a SQL92 expression which must - * evaluate to True or False. Only one between a `CorrelationFilter` or - * a `SqlFilter` can be defined. + * evaluate to True or False. Only one between a `CorrelationRuleFilter` or + * a `SqlRuleFilter` can be defined. */ - filter?: SqlFilter | CorrelationFilter; + filter?: SqlRuleFilter | CorrelationRuleFilter; /** - * @internal - * @ignore * The SQL like expression that can be executed on the message should the * associated filter apply. */ - action?: SqlAction; - - /** - * @internal - * @ignore - * Name of topic - */ - topicName: string; - - /** - * @internal - * @ignore - * Name of subscription - */ - subscriptionName: string; - - /** - * @internal - * @ignore - * Created at timestamp - */ - createdOn: string; + action?: SqlRuleAction; } /** - * @internal - * @ignore * Represents all possible fields on SqlAction */ -export type SqlAction = SqlFilter; +export type SqlRuleAction = SqlRuleFilter; /** - * @internal - * @ignore - * Represents all possible fields on SqlFilter + * Represents all possible fields on SqlRuleFilter */ -export interface SqlFilter { +export interface SqlRuleFilter { /** - * @internal - * @ignore * SQL expression to use. */ sqlExpression?: string; /** - * @internal - * @ignore * SQL parameters to the expression */ sqlParameters?: SqlParameter[]; /** - * @internal - * @ignore * This property is reserved for future use. An integer value showing the * compatibility level, currently hard-coded to 20. */ compatibilityLevel?: number; /** - * @internal - * @ignore * Boolean value indicating whether the SQL filter expression requires preprocessing */ requiresPreprocessing?: boolean; @@ -239,10 +142,11 @@ export interface SqlFilter { /** * @internal - * @ignore RuleResourceSerializer for serializing / deserializing Rule entities + * @ignore + * RuleResourceSerializer for serializing / deserializing Rule entities */ export class RuleResourceSerializer implements AtomXmlSerializer { - serialize(rule: InternalRuleOptions): object { + serialize(rule: RuleDescription): object { const resource: { Name: any; Filter: any; Action: any } = { Filter: {}, Action: {}, @@ -261,7 +165,7 @@ export class RuleResourceSerializer implements AtomXmlSerializer { }; } else { if (rule.filter.hasOwnProperty("sqlExpression")) { - const sqlFilter: SqlFilter = rule.filter as SqlFilter; + const sqlFilter: SqlRuleFilter = rule.filter as SqlRuleFilter; resource.Filter = { SqlExpression: sqlFilter.sqlExpression, Parameters: getRawSqlParameters(sqlFilter.sqlParameters), @@ -273,7 +177,7 @@ export class RuleResourceSerializer implements AtomXmlSerializer { "xmlns:p4": "http://www.w3.org/2001/XMLSchema-instance" }; } else { - const correlationFilter: CorrelationFilter = rule.filter as CorrelationFilter; + const correlationFilter: CorrelationRuleFilter = rule.filter as CorrelationRuleFilter; resource.Filter = { CorrelationId: correlationFilter.correlationId, @@ -333,8 +237,6 @@ enum SqlParameterType { Date = "l28:date" } /** - * @internal - * @ignore * Represents type of SQL `Parameter` in ATOM based management operations */ export type SqlParameter = { diff --git a/sdk/servicebus/service-bus/src/serializers/subscriptionResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/subscriptionResourceSerializer.ts index b1fc058b4aba..4c14bf7ef836 100644 --- a/sdk/servicebus/service-bus/src/serializers/subscriptionResourceSerializer.ts +++ b/sdk/servicebus/service-bus/src/serializers/subscriptionResourceSerializer.ts @@ -2,22 +2,21 @@ // Licensed under the MIT license. import { HttpOperationResponse } from "@azure/core-http"; -import * as Constants from "../util/constants"; import { - serializeToAtomXmlRequest, + AtomXmlSerializer, deserializeAtomXmlResponse, - AtomXmlSerializer + serializeToAtomXmlRequest } from "../util/atomXmlHelper"; +import * as Constants from "../util/constants"; import { - getStringOrUndefined, - getIntegerOrUndefined, - getBooleanOrUndefined, + EntityStatus, + getBoolean, getCountDetailsOrUndefined, - MessageCountDetails, - getString, getInteger, - getBoolean, - EntityStatus + getString, + getStringOrUndefined, + MessageCountDetails, + getDate } from "../util/utils"; /** @@ -26,30 +25,28 @@ import { * Builds the subscription options object from the user provided options. * Handles the differences in casing for the property names, * converts values to string and ensures the right order as expected by the service - * @param subscriptionOptions + * @param subscription */ export function buildSubscriptionOptions( - subscriptionOptions: SubscriptionOptions + subscription: SubscriptionDescription ): InternalSubscriptionOptions { return { - LockDuration: subscriptionOptions.lockDuration, - RequiresSession: getStringOrUndefined(subscriptionOptions.requiresSession), - DefaultMessageTimeToLive: getStringOrUndefined(subscriptionOptions.defaultMessageTtl), + LockDuration: subscription.lockDuration, + RequiresSession: getStringOrUndefined(subscription.requiresSession), + DefaultMessageTimeToLive: getStringOrUndefined(subscription.defaultMessageTtl), DeadLetteringOnMessageExpiration: getStringOrUndefined( - subscriptionOptions.deadLetteringOnMessageExpiration + subscription.deadLetteringOnMessageExpiration ), DeadLetteringOnFilterEvaluationExceptions: getStringOrUndefined( - subscriptionOptions.deadLetteringOnFilterEvaluationExceptions + subscription.deadLetteringOnFilterEvaluationExceptions ), - MaxDeliveryCount: getStringOrUndefined(subscriptionOptions.maxDeliveryCount), - EnableBatchedOperations: getStringOrUndefined(subscriptionOptions.enableBatchedOperations), - Status: getStringOrUndefined(subscriptionOptions.status), - ForwardTo: getStringOrUndefined(subscriptionOptions.forwardTo), - UserMetadata: getStringOrUndefined(subscriptionOptions.userMetadata), - ForwardDeadLetteredMessagesTo: getStringOrUndefined( - subscriptionOptions.forwardDeadLetteredMessagesTo - ), - AutoDeleteOnIdle: getStringOrUndefined(subscriptionOptions.autoDeleteOnIdle) + MaxDeliveryCount: getStringOrUndefined(subscription.maxDeliveryCount), + EnableBatchedOperations: getStringOrUndefined(subscription.enableBatchedOperations), + Status: getStringOrUndefined(subscription.status), + ForwardTo: getStringOrUndefined(subscription.forwardTo), + UserMetadata: getStringOrUndefined(subscription.userMetadata), + ForwardDeadLetteredMessagesTo: getStringOrUndefined(subscription.forwardDeadLetteredMessagesTo), + AutoDeleteOnIdle: getStringOrUndefined(subscription.autoDeleteOnIdle) }; } @@ -60,19 +57,14 @@ export function buildSubscriptionOptions( * the response from the service * @param rawSubscription */ -export function buildSubscription(rawSubscription: any): SubscriptionDetails { +export function buildSubscription(rawSubscription: any): SubscriptionDescription { return { subscriptionName: getString(rawSubscription[Constants.SUBSCRIPTION_NAME], "subscriptionName"), topicName: getString(rawSubscription[Constants.TOPIC_NAME], "topicName"), lockDuration: getString(rawSubscription[Constants.LOCK_DURATION], "lockDuration"), - sizeInBytes: getIntegerOrUndefined(rawSubscription[Constants.SIZE_IN_BYTES]), - maxSizeInMegabytes: getIntegerOrUndefined(rawSubscription[Constants.MAX_SIZE_IN_MEGABYTES]), - - messageCount: getInteger(rawSubscription[Constants.MESSAGE_COUNT], "messageCount"), maxDeliveryCount: getInteger(rawSubscription[Constants.MAX_DELIVERY_COUNT], "maxDeliveryCount"), - enablePartitioning: getBooleanOrUndefined(rawSubscription[Constants.ENABLE_PARTITIONING]), requiresSession: getBoolean(rawSubscription[Constants.REQUIRES_SESSION], "requiresSession"), enableBatchedOperations: getBoolean( rawSubscription[Constants.ENABLE_BATCHED_OPERATIONS], @@ -96,30 +88,47 @@ export function buildSubscription(rawSubscription: any): SubscriptionDetails { forwardDeadLetteredMessagesTo: getStringOrUndefined( rawSubscription[Constants.FORWARD_DEADLETTERED_MESSAGES_TO] ), - defaultRuleDescription: rawSubscription[Constants.DEFAULT_RULE_DESCRIPTION], - - messageCountDetails: getCountDetailsOrUndefined(rawSubscription[Constants.COUNT_DETAILS]), forwardTo: getStringOrUndefined(rawSubscription[Constants.FORWARD_TO]), userMetadata: rawSubscription[Constants.USER_METADATA], - entityAvailabilityStatus: getString( - rawSubscription[Constants.ENTITY_AVAILABILITY_STATUS], - "entityAvailabilityStatus" - ), - status: getString(rawSubscription[Constants.STATUS], "status") as EntityStatus, - createdOn: getString(rawSubscription[Constants.CREATED_AT], "createdOn"), - updatedOn: getString(rawSubscription[Constants.UPDATED_AT], "updatedOn"), - accessedOn: rawSubscription[Constants.ACCESSED_AT] + status: getString(rawSubscription[Constants.STATUS], "status") as EntityStatus }; } /** * @internal * @ignore + * Builds the subscription runtime info object from the raw json object gotten after deserializing + * the response from the service + * @param rawSubscription + */ +export function buildSubscriptionRuntimeInfo(rawSubscription: any): SubscriptionRuntimeInfo { + return { + subscriptionName: getString(rawSubscription[Constants.SUBSCRIPTION_NAME], "subscriptionName"), + topicName: getString(rawSubscription[Constants.TOPIC_NAME], "topicName"), + messageCount: getInteger(rawSubscription[Constants.MESSAGE_COUNT], "messageCount"), + messageCountDetails: getCountDetailsOrUndefined(rawSubscription[Constants.COUNT_DETAILS]), + createdOn: getDate(rawSubscription[Constants.CREATED_AT], "createdOn"), + updatedOn: getDate(rawSubscription[Constants.UPDATED_AT], "updatedOn"), + accessedOn: getDate(rawSubscription[Constants.ACCESSED_AT], "accessedOn") + }; +} + +/** * Represents settable options on a subscription */ -export interface SubscriptionOptions { +export interface SubscriptionDescription { + /** + * Name of the subscription + */ + subscriptionName: string; + + /** + * Name of the topic + */ + topicName: string; + /** * The default lock duration is applied to subscriptions that do not define a lock * duration. Settable only at subscription creation time. @@ -309,11 +318,9 @@ export interface InternalSubscriptionOptions { } /** - * @internal - * @ignore - * Represents all attributes of a subscription entity + * Represents runtime info attributes of a subscription entity */ -export interface SubscriptionDetails { +export interface SubscriptionRuntimeInfo { /** * Name of the subscription */ @@ -324,155 +331,31 @@ export interface SubscriptionDetails { */ topicName: string; - /** - * The default lock duration is applied to subscriptions that do not define a - * lock duration. - * Settable only at subscription creation time. - * This is specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - lockDuration: string; - - /** - * The entity's size in bytes. - * - */ - sizeInBytes?: number; - - /** - * Specifies the maximum topic size in megabytes. Any attempt to enqueue a message - * that will cause the topic to exceed this value will fail. All messages that are - * stored in the topic or any of its subscriptions count towards this value. - * Multiple copies of a message that reside in one or multiple subscriptions - * count as a single messages. For example, if message m exists once in subscription - * s1 and twice in subscription s2, m is counted as a single message. - */ - maxSizeInMegabytes?: number; - /** * The entity's message count. * */ messageCount: number; - /** - * Specifies whether the topic should be partitioned - */ - enablePartitioning?: boolean; - - /** - * If set to true, the subscription will be session-aware and only SessionReceiver - * will be supported. Session-aware subscription are not supported through REST. - * Settable only at subscription creation time. - */ - requiresSession: boolean; - - /** - * Specifies if batched operations should be allowed. - */ - enableBatchedOperations: boolean; - - /** - * Determines how long a message lives in the subscription. Based on whether - * dead-lettering is enabled, a message whose TTL has expired will either be moved - * to the subscription’s associated dead-letter sub-queue or permanently deleted. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - defaultMessageTtl?: string; - - /** - * Indicates the default rule description. - * - */ - defaultRuleDescription?: any; - - /** - * Max idle time before entity is deleted. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - autoDeleteOnIdle: string; - - /** - * If it is enabled and a message expires, the Service Bus moves the message from - * the queue into the subscription’s dead-letter sub-queue. If disabled, message - * will be permanently deleted from the subscription’s main queue. Settable only - * at subscription creation time. - */ - deadLetteringOnMessageExpiration: boolean; - - /** - * Determines how the Service Bus handles a message that causes an exception - * during a subscription’s filter evaluation. If the value is set to true, - * the message that caused the exception will be moved to the subscription’s - * dead-letter sub-queue. Otherwise, it will be discarded. By default this - * parameter is set to true, allowing the user a chance to investigate the - * cause of the exception. It can occur from a malformed message or some - * incorrect assumptions being made in the filter about the form of the message. - * Settable only at topic creation time. - */ - deadLetteringOnFilterEvaluationExceptions: boolean; - - /** - * Absolute URL or the name of the queue or topic the dead-lettered - * messages are to be forwarded to. - * For example, an absolute URL input would be of the form - * `sb:///` - */ - forwardDeadLetteredMessagesTo?: string; - - /** - * The maximum delivery count of messages after which if it is still not settled, - * gets moved to the dead-letter sub-queue. - * - */ - maxDeliveryCount: number; - - /** - * Absolute URL or the name of the queue or topic the - * messages are to be forwarded to. - * For example, an absolute URL input would be of the form - * `sb:///` - */ - forwardTo?: string; - - /** - * The user provided metadata information associated with the subscription description. - * Used to specify textual content such as tags, labels, etc. - * Value must not exceed 1024 bytes encoded in utf-8. - */ - userMetadata?: string; - /** * Message count details */ messageCountDetails?: MessageCountDetails; - /** - * Entity availability status - */ - entityAvailabilityStatus: string; - - /** - * Status of the messaging entity. - */ - status?: EntityStatus; - /** * Created at timestamp */ - createdOn: string; + createdOn: Date; /** * Updated at timestamp */ - updatedOn: string; + updatedOn: Date; /** * Accessed at timestamp */ - accessedOn?: string; + accessedOn: Date; } /** diff --git a/sdk/servicebus/service-bus/src/serializers/topicResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/topicResourceSerializer.ts index 3be0839cb173..daaeb3513965 100644 --- a/sdk/servicebus/service-bus/src/serializers/topicResourceSerializer.ts +++ b/sdk/servicebus/service-bus/src/serializers/topicResourceSerializer.ts @@ -2,25 +2,23 @@ // Licensed under the MIT license. import { HttpOperationResponse } from "@azure/core-http"; -import * as Constants from "../util/constants"; import { - serializeToAtomXmlRequest, + AtomXmlSerializer, deserializeAtomXmlResponse, - AtomXmlSerializer + serializeToAtomXmlRequest } from "../util/atomXmlHelper"; +import * as Constants from "../util/constants"; import { - getStringOrUndefined, + AuthorizationRule, + EntityStatus, + getAuthorizationRulesOrUndefined, + getBoolean, + getInteger, getIntegerOrUndefined, - getCountDetailsOrUndefined, - MessageCountDetails, getRawAuthorizationRules, - getAuthorizationRulesOrUndefined, - AuthorizationRule, getString, - getInteger, - getBoolean, - getBooleanOrUndefined, - EntityStatus + getStringOrUndefined, + getDate } from "../util/utils"; /** @@ -29,21 +27,21 @@ import { * Builds the topic options object from the user provided options. * Handles the differences in casing for the property names, * converts values to string and ensures the right order as expected by the service - * @param topicOptions + * @param topic */ -export function buildTopicOptions(topicOptions: TopicOptions): InternalTopicOptions { +export function buildTopicOptions(topic: TopicDescription): InternalTopicOptions { return { - DefaultMessageTimeToLive: topicOptions.defaultMessageTtl, - MaxSizeInMegabytes: getStringOrUndefined(topicOptions.maxSizeInMegabytes), - RequiresDuplicateDetection: getStringOrUndefined(topicOptions.requiresDuplicateDetection), - DuplicateDetectionHistoryTimeWindow: topicOptions.duplicateDetectionHistoryTimeWindow, - EnableBatchedOperations: getStringOrUndefined(topicOptions.enableBatchedOperations), - AuthorizationRules: getRawAuthorizationRules(topicOptions.authorizationRules), - Status: getStringOrUndefined(topicOptions.status), - UserMetadata: getStringOrUndefined(topicOptions.userMetadata), - SupportOrdering: getStringOrUndefined(topicOptions.supportOrdering), - AutoDeleteOnIdle: getStringOrUndefined(topicOptions.autoDeleteOnIdle), - EnablePartitioning: getStringOrUndefined(topicOptions.enablePartitioning) + DefaultMessageTimeToLive: topic.defaultMessageTtl, + MaxSizeInMegabytes: getStringOrUndefined(topic.maxSizeInMegabytes), + RequiresDuplicateDetection: getStringOrUndefined(topic.requiresDuplicateDetection), + DuplicateDetectionHistoryTimeWindow: topic.duplicateDetectionHistoryTimeWindow, + EnableBatchedOperations: getStringOrUndefined(topic.enableBatchedOperations), + AuthorizationRules: getRawAuthorizationRules(topic.authorizationRules), + Status: getStringOrUndefined(topic.status), + UserMetadata: getStringOrUndefined(topic.userMetadata), + SupportOrdering: getStringOrUndefined(topic.supportOrdering), + AutoDeleteOnIdle: getStringOrUndefined(topic.autoDeleteOnIdle), + EnablePartitioning: getStringOrUndefined(topic.enablePartitioning) }; } @@ -54,14 +52,10 @@ export function buildTopicOptions(topicOptions: TopicOptions): InternalTopicOpti * response from the service * @param rawTopic */ -export function buildTopic(rawTopic: any): TopicDetails { +export function buildTopic(rawTopic: any): TopicDescription { return { - topicName: getString(rawTopic[Constants.TOPIC_NAME], "topicName"), - sizeInBytes: getIntegerOrUndefined(rawTopic[Constants.SIZE_IN_BYTES]), + name: getString(rawTopic[Constants.TOPIC_NAME], "topicName"), maxSizeInMegabytes: getInteger(rawTopic[Constants.MAX_SIZE_IN_MEGABYTES], "maxSizeInMegabytes"), - messageCount: getIntegerOrUndefined(rawTopic[Constants.MESSAGE_COUNT]), - maxDeliveryCount: getIntegerOrUndefined(rawTopic[Constants.MAX_DELIVERY_COUNT]), - subscriptionCount: getIntegerOrUndefined(rawTopic[Constants.SUBSCRIPTION_COUNT]), enablePartitioning: getBoolean(rawTopic[Constants.ENABLE_PARTITIONING], "enablePartitioning"), supportOrdering: getBoolean(rawTopic[Constants.SUPPORT_ORDERING], "supportOrdering"), @@ -85,35 +79,40 @@ export function buildTopic(rawTopic: any): TopicDetails { "duplicateDetectionHistoryTimeWindow" ), - filteringMessagesBeforePublishing: getBooleanOrUndefined( - rawTopic[Constants.FILTER_MESSAGES_BEFORE_PUBLISHING] - ), - enableSubscriptionPartitioning: getBooleanOrUndefined( - rawTopic[Constants.ENABLE_SUBSCRIPTION_PARTITIONING] - ), - - messageCountDetails: getCountDetailsOrUndefined(rawTopic[Constants.COUNT_DETAILS]), - isExpress: getBooleanOrUndefined(rawTopic[Constants.IS_EXPRESS]), - enableExpress: getBooleanOrUndefined(rawTopic[Constants.ENABLE_EXPRESS]), - authorizationRules: getAuthorizationRulesOrUndefined(rawTopic[Constants.AUTHORIZATION_RULES]), - isAnonymousAccessible: getBooleanOrUndefined(rawTopic[Constants.IS_ANONYMOUS_ACCESSIBLE]), userMetadata: rawTopic[Constants.USER_METADATA], - entityAvailabilityStatus: rawTopic[Constants.ENTITY_AVAILABILITY_STATUS], - status: rawTopic[Constants.STATUS], - createdOn: rawTopic[Constants.CREATED_AT], - updatedOn: rawTopic[Constants.UPDATED_AT], - accessedOn: rawTopic[Constants.ACCESSED_AT] + status: rawTopic[Constants.STATUS] }; } /** * @internal * @ignore + * Builds the topic runtime info object from the raw json object gotten after deserializing the + * response from the service + * @param rawTopic + */ +export function buildTopicRuntimeInfo(rawTopic: any): TopicRuntimeInfo { + return { + name: getString(rawTopic[Constants.TOPIC_NAME], "topicName"), + sizeInBytes: getIntegerOrUndefined(rawTopic[Constants.SIZE_IN_BYTES]), + subscriptionCount: getIntegerOrUndefined(rawTopic[Constants.SUBSCRIPTION_COUNT]), + createdOn: getDate(rawTopic[Constants.CREATED_AT], "createdOn"), + updatedOn: getDate(rawTopic[Constants.UPDATED_AT], "updatedOn"), + accessedOn: getDate(rawTopic[Constants.ACCESSED_AT], "accessedOn") + }; +} + +/** * Represents settable options on a topic */ -export interface TopicOptions { +export interface TopicDescription { + /** + * Name of the topic + */ + name: string; + /** * Determines how long a message lives in the associated subscriptions. * Subscriptions inherit the TTL from the topic unless they are created explicitly @@ -272,163 +271,39 @@ export interface InternalTopicOptions { } /** - * @internal - * @ignore - * Represents all attributes of a topic entity + * Represents runtime info attributes of a topic entity */ -export interface TopicDetails { +export interface TopicRuntimeInfo { /** * Name of the topic */ - topicName: string; + name: string; /** * Specifies the topic size in bytes. */ sizeInBytes?: number; - /** - * Specifies the maximum topic size in megabytes. Any attempt to enqueue a message - * that will cause the topic to exceed this value will fail. All messages that are - * stored in the topic or any of its subscriptions count towards this value. - * Multiple copies of a message that reside in one or multiple subscriptions - * count as a single messages. For example, if message m exists once in subscription - * s1 and twice in subscription s2, m is counted as a single message. - */ - maxSizeInMegabytes: number; - - /** - * If enabled, the topic will detect duplicate messages within the time span specified - * by the DuplicateDetectionHistoryTimeWindow property. - * Settable only at topic creation time. - */ - requiresDuplicateDetection: boolean; - - /** - * Enable Subscription Partitioning option - */ - enableSubscriptionPartitioning?: boolean; - - /** - * Filtering Messages Before Publishing option - */ - filteringMessagesBeforePublishing?: boolean; - - /** - * Authorization rules on the topic - */ - authorizationRules?: AuthorizationRule[]; - - /** - * Specifies whether the topic should be partitioned - */ - enablePartitioning: boolean; - - /** - * Specifies whether the topic supports message ordering. - */ - supportOrdering: boolean; - - /** - * Specifies if batched operations should be allowed. - */ - enableBatchedOperations: boolean; - - /** - * Max idle time before entity is deleted. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - autoDeleteOnIdle?: string; - - /** - * The entity's message count. - * - */ - messageCount?: number; - /** * The subscription count on given topic. * */ subscriptionCount?: number; - /** - * The maximum delivery count of messages after which if it is still not settled, - * gets moved to the dead-letter sub-queue. - * - */ - maxDeliveryCount?: number; - - /** - * Determines how long a message lives in the associated subscriptions. - * Subscriptions inherit the TTL from the topic unless they are created explicitly with - * a smaller TTL. Based on whether dead-lettering is enabled, a message whose TTL has - * expired will either be moved to the subscription’s associated dead-letter sub-queue or - * will be permanently deleted. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - defaultMessageTtl: string; - - /** - * Specifies the time span during which the Service Bus will detect message duplication. - * This is to be specified in ISO-8601 duration format - * such as "PT1M" for 1 minute, "PT5S" for 5 seconds. - */ - duplicateDetectionHistoryTimeWindow: string; - - /** - * The user provided metadata information associated with the topic description. - * Used to specify textual content such as tags, labels, etc. - * Value must not exceed 1024 bytes encoded in utf-8. - */ - userMetadata?: string; - - /** - * Is Express option - */ - isExpress?: boolean; - - /** - * Enable express option - */ - enableExpress?: boolean; - - /** - * Message count details - */ - messageCountDetails?: MessageCountDetails; - - /** - * Is anonymous accessible topic option - */ - isAnonymousAccessible?: boolean; - - /** - * Entity availability status - */ - entityAvailabilityStatus?: string; - - /** - * Status of the messaging entity. - */ - status?: EntityStatus; - /** * Created at timestamp */ - createdOn?: string; + createdOn: Date; /** * Updated at timestamp */ - updatedOn?: string; + updatedOn: Date; /** * Accessed at timestamp */ - accessedOn?: string; + accessedOn: Date; } /** diff --git a/sdk/servicebus/service-bus/src/serviceBusAtomManagementClient.ts b/sdk/servicebus/service-bus/src/serviceBusAtomManagementClient.ts index 4bd83ceea837..c7bde16a1cf3 100644 --- a/sdk/servicebus/service-bus/src/serviceBusAtomManagementClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusAtomManagementClient.ts @@ -2,68 +2,72 @@ // Licensed under the MIT license. import { - WebResource, - ServiceClient, - ServiceClientOptions, + Constants as AMQPConstants, + isTokenCredential, + parseConnectionString, + TokenCredential +} from "@azure/core-amqp"; +import { + bearerTokenAuthenticationPolicy, HttpOperationResponse, - signingPolicy, proxyPolicy, - RequestPolicyFactory, - URLBuilder, ProxySettings, + RequestPolicyFactory, + RestError, + ServiceClient, + ServiceClientOptions, + signingPolicy, stripRequest, stripResponse, - RestError + URLBuilder, + WebResource } from "@azure/core-http"; - -import { parseConnectionString, SharedKeyCredential } from "@azure/core-amqp"; - -import { AtomXmlSerializer, executeAtomXmlOperation } from "./util/atomXmlHelper"; - import * as log from "./log"; -import { SasServiceClientCredentials } from "./util/sasServiceClientCredentials"; -import * as Constants from "./util/constants"; - import { - QueueResourceSerializer, - InternalQueueOptions, - QueueOptions, + buildNamespace, + NamespaceProperties, + NamespaceResourceSerializer +} from "./serializers/namespaceResourceSerializer"; +import { + buildQueue, buildQueueOptions, - QueueDetails, - buildQueue + buildQueueRuntimeInfo, + InternalQueueOptions, + QueueDescription, + QueueResourceSerializer, + QueueRuntimeInfo } from "./serializers/queueResourceSerializer"; import { - TopicResourceSerializer, - InternalTopicOptions, - TopicOptions, - buildTopicOptions, - TopicDetails, - buildTopic -} from "./serializers/topicResourceSerializer"; + buildRule, + RuleDescription, + RuleResourceSerializer +} from "./serializers/ruleResourceSerializer"; import { - SubscriptionResourceSerializer, - InternalSubscriptionOptions, - SubscriptionOptions, + buildSubscription, buildSubscriptionOptions, - SubscriptionDetails, - buildSubscription + buildSubscriptionRuntimeInfo, + InternalSubscriptionOptions, + SubscriptionDescription, + SubscriptionResourceSerializer, + SubscriptionRuntimeInfo } from "./serializers/subscriptionResourceSerializer"; import { - RuleResourceSerializer, - InternalRuleOptions, - RuleOptions, - buildRuleOptions, - RuleDetails, - buildRule -} from "./serializers/ruleResourceSerializer"; -import { isJSONLikeObject, isAbsoluteUrl } from "./util/utils"; - + buildTopic, + buildTopicOptions, + buildTopicRuntimeInfo, + InternalTopicOptions, + TopicDescription, + TopicResourceSerializer, + TopicRuntimeInfo +} from "./serializers/topicResourceSerializer"; +import { AtomXmlSerializer, executeAtomXmlOperation } from "./util/atomXmlHelper"; +import * as Constants from "./util/constants"; +import { SasServiceClientCredentials } from "./util/sasServiceClientCredentials"; +import { isAbsoluteUrl, isJSONLikeObject } from "./util/utils"; /** - * @internal - * @ignore - * Options to use with ServiceBusAtomManagementClient creation + * Options to use with ServiceBusManagementClient creation */ -export interface ServiceBusAtomManagementClientOptions { +export interface ServiceBusManagementClientOptions { /** * Proxy related settings */ @@ -71,8 +75,6 @@ export interface ServiceBusAtomManagementClientOptions { } /** - * @internal - * @ignore * Request options for list() operations */ export interface ListRequestOptions { @@ -88,11 +90,9 @@ export interface ListRequestOptions { } /** - * @internal - * @ignore - * Represents result of create, get, update and delete operations on queue. + * The underlying HTTP response. */ -export interface QueueResponse extends QueueDetails { +export interface Response { /** * The underlying HTTP response. */ @@ -100,289 +100,87 @@ export interface QueueResponse extends QueueDetails { } /** - * @internal - * @ignore - * Create Queue response + * Represents properties of the namespace. */ -export interface CreateQueueResponse extends QueueDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface NamespacePropertiesResponse extends NamespaceProperties, Response {} /** - * @internal - * @ignore - * Get Queue response + * Represents runtime info of a queue. */ -export interface GetQueueResponse extends QueueDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface QueueRuntimeInfoResponse extends QueueRuntimeInfo, Response {} /** - * @internal - * @ignore - * Update Queue response + * Array of objects representing runtime info for multiple queues. */ -export interface UpdateQueueResponse extends QueueDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - +export interface QueuesRuntimeInfoResponse extends Array, Response {} /** - * @internal - * @ignore - * Delete Queue response + * Represents result of create, get, update and delete operations on queue. */ -export interface DeleteQueueResponse { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface QueueResponse extends QueueDescription, Response {} /** - * @internal - * @ignore * Represents result of list operation on queues. */ -export interface ListQueuesResponse extends Array { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface QueuesResponse extends Array, Response {} /** - * @internal - * @ignore * Represents result of create, get, update and delete operations on topic. */ -export interface TopicResponse extends TopicDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Create Topic response - */ -export interface CreateTopicResponse extends TopicDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Get Topic response - */ -export interface GetTopicResponse extends TopicDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Update Topic response - */ -export interface UpdateTopicResponse extends TopicDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Delete Topic response - */ -export interface DeleteTopicResponse { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface TopicResponse extends TopicDescription, Response {} /** - * @internal - * @ignore * Represents result of list operation on topics. */ -export interface ListTopicsResponse extends Array { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface TopicsResponse extends Array, Response {} /** - * @internal - * @ignore - * Represents result of create, get, update and delete operations on subscription. + * Represents runtime info of a topic. */ -export interface SubscriptionResponse extends SubscriptionDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface TopicRuntimeInfoResponse extends TopicRuntimeInfo, Response {} /** - * @internal - * @ignore - * Create Subscription response + * Array of objects representing runtime info for multiple topics. */ -export interface CreateSubscriptionResponse extends SubscriptionDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface TopicsRuntimeInfoResponse extends Array, Response {} /** - * @internal - * @ignore - * Get Subscription response - */ -export interface GetSubscriptionResponse extends SubscriptionDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Update Subscription response + * Represents result of create, get, update and delete operations on subscription. */ -export interface UpdateSubscriptionResponse extends SubscriptionDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface SubscriptionResponse extends SubscriptionDescription, Response {} /** - * @internal - * @ignore - * Delete Subscription response - */ -export interface DeleteSubscriptionResponse { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore * Represents result of list operation on subscriptions. */ -export interface ListSubscriptionsResponse extends Array { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore - * Represents result of create, get, update and delete operations on rule. - */ -export interface RuleResponse extends RuleDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface SubscriptionsResponse extends Array, Response {} /** - * @internal - * @ignore - * Create Rule response + * Represents runtime info of a subscription. */ -export interface CreateRuleResponse extends RuleDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface SubscriptionRuntimeInfoResponse extends SubscriptionRuntimeInfo, Response {} /** - * @internal - * @ignore - * Get Rule response + * Array of objects representing runtime info for multiple subscriptions. */ -export interface GetRuleResponse extends RuleDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface SubscriptionsRuntimeInfoResponse + extends Array, + Response {} /** - * @internal - * @ignore - * Update Rule response + * Represents result of create, get, update and delete operations on rule. */ -export interface UpdateRuleResponse extends RuleDetails { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface RuleResponse extends RuleDescription, Response {} /** - * @internal - * @ignore - * Delete Rule response - */ -export interface DeleteRuleResponse { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} - -/** - * @internal - * @ignore * Represents result of list operation on rules. */ -export interface ListRulesResponse extends Array { - /** - * The underlying HTTP response. - */ - _response: HttpOperationResponse; -} +export interface RulesResponse extends Array, Response {} /** - * @internal - * @ignore * All operations return promises that resolve to an object that has the relevant output. * These objects also have a property called `_response` that you can use if you want to * access the direct response from the service. */ -export class ServiceBusAtomManagementClient extends ServiceClient { +export class ServiceBusManagementClient extends ServiceClient { /** * Reference to the endpoint as extracted from input connection string. */ @@ -396,36 +194,73 @@ export class ServiceBusAtomManagementClient extends ServiceClient { /** * Singleton instances of serializers used across the various operations. */ + private namespaceResourceSerializer: AtomXmlSerializer; private queueResourceSerializer: AtomXmlSerializer; private topicResourceSerializer: AtomXmlSerializer; private subscriptionResourceSerializer: AtomXmlSerializer; private ruleResourceSerializer: AtomXmlSerializer; /** - * SAS token provider used to generate tokens as required for the various operations. + * Credentials used to generate tokens as required for the various operations. */ - private sasTokenProvider: SharedKeyCredential; + private credentials: SasServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the ServiceBusManagementClient class. * @param connectionString The connection string needed for the client to connect to Azure. - * @param options ServiceBusAtomManagementClientOptions + * @param options ServiceBusManagementClientOptions */ - constructor(connectionString: string, options?: ServiceBusAtomManagementClientOptions) { - const connectionStringObj: any = parseConnectionString(connectionString); - - if (connectionStringObj.Endpoint == undefined) { - throw new Error("Missing Endpoint in connection string."); - } - - const credentials = new SasServiceClientCredentials( - connectionStringObj.SharedAccessKeyName, - connectionStringObj.SharedAccessKey - ); - + constructor(connectionString: string, options?: ServiceBusManagementClientOptions); + /** + * + * @param fullyQualifiedNamespace The fully qualified namespace of your Service Bus instance which is + * likely to be similar to .servicebus.windows.net. + * @param credential A credential object used by the client to get the token to authenticate the connection + * with the Azure Service Bus. See @azure/identity for creating the credentials. + * If you're using your own implementation of the `TokenCredential` interface against AAD, then set the "scopes" for service-bus + * to be `["https://servicebus.azure.net//user_impersonation"]` to get the appropriate token. + * @param options ServiceBusManagementClientOptions + */ + constructor( + fullyQualifiedNamespace: string, + credential: TokenCredential, + options?: ServiceBusManagementClientOptions + ); + + constructor( + fullyQualifiedNamespaceOrConnectionString1: string, + credentialOrOptions2?: TokenCredential | ServiceBusManagementClientOptions, + options3?: ServiceBusManagementClientOptions + ) { const requestPolicyFactories: RequestPolicyFactory[] = []; - requestPolicyFactories.push(signingPolicy(credentials)); - + let options: ServiceBusManagementClientOptions; + let fullyQualifiedNamespace: string; + let credentials: SasServiceClientCredentials | TokenCredential; + if (isTokenCredential(credentialOrOptions2)) { + fullyQualifiedNamespace = fullyQualifiedNamespaceOrConnectionString1; + options = options3 || {}; + credentials = credentialOrOptions2; + requestPolicyFactories.push( + bearerTokenAuthenticationPolicy(credentials, AMQPConstants.aadServiceBusScope) + ); + } else { + const connectionString = fullyQualifiedNamespaceOrConnectionString1; + options = credentialOrOptions2 || {}; + const connectionStringObj: any = parseConnectionString(connectionString); + if (connectionStringObj.Endpoint == undefined) { + throw new Error("Missing Endpoint in connection string."); + } + try { + fullyQualifiedNamespace = connectionStringObj.Endpoint.match(".*://([^/]*)")[1]; + } catch (error) { + throw new Error("Endpoint in the connection string is not valid."); + } + credentials = new SasServiceClientCredentials( + connectionStringObj.SharedAccessKeyName, + connectionStringObj.SharedAccessKey + ); + requestPolicyFactories.push(signingPolicy(credentials)); + } if (options && options.proxySettings) { requestPolicyFactories.push(proxyPolicy(options.proxySettings)); } @@ -434,23 +269,52 @@ export class ServiceBusAtomManagementClient extends ServiceClient { }; super(credentials, serviceClientOptions); + this.endpoint = fullyQualifiedNamespace; + this.endpointWithProtocol = fullyQualifiedNamespace.endsWith("/") + ? "sb://" + fullyQualifiedNamespace + : "sb://" + fullyQualifiedNamespace + "/"; + this.credentials = credentials; + this.namespaceResourceSerializer = new NamespaceResourceSerializer(); this.queueResourceSerializer = new QueueResourceSerializer(); this.topicResourceSerializer = new TopicResourceSerializer(); this.subscriptionResourceSerializer = new SubscriptionResourceSerializer(); this.ruleResourceSerializer = new RuleResourceSerializer(); - this.endpoint = (connectionString.match("Endpoint=.*://(.*)/;") || "")[1]; - this.endpointWithProtocol = connectionStringObj.Endpoint; + } - this.sasTokenProvider = new SharedKeyCredential( - connectionStringObj.SharedAccessKeyName, - connectionStringObj.SharedAccessKey + /** + * Returns an object representing the metadata related to a service bus namespace. + * @param queueName + * + */ + async getNamespaceProperties(): Promise { + log.httpAtomXml(`Performing management operation - getNamespaceProperties()`); + const response: HttpOperationResponse = await this.getResource( + "$namespaceinfo", + this.namespaceResourceSerializer ); + + return this.buildNamespacePropertiesResponse(response); } /** * Creates a queue with given name, configured using the given options * @param queueName - * @param queueOptions Options to configure the Queue being created. + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async createQueue(queueName: string): Promise; + /** + * Creates a queue configured using the given options + * @param queue Options to configure the Queue being created. * For example, you can configure a queue to support partitions or sessions. * * Following are errors that can be expected from this operation @@ -464,13 +328,20 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async createQueue(queueName: string, queueOptions?: QueueOptions): Promise { + async createQueue(queue: QueueDescription): Promise; + async createQueue(queueNameOrOptions: string | QueueDescription): Promise { + let queue: QueueDescription; + if (typeof queueNameOrOptions === "string") { + queue = { name: queueNameOrOptions }; + } else { + queue = queueNameOrOptions; + } log.httpAtomXml( - `Performing management operation - createQueue() for "${queueName}" with options: ${queueOptions}` + `Performing management operation - createQueue() for "${queue.name}" with options: ${queue}` ); const response: HttpOperationResponse = await this.putResource( - queueName, - buildQueueOptions(queueOptions || {}), + queue.name, + buildQueueOptions(queue), this.queueResourceSerializer, false ); @@ -479,7 +350,8 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } /** - * Returns an object representing the Queue with the given name along with all its properties + * Returns an object representing the Queue and its properties. + * If you want to get the Queue runtime info like message count details, use `getQueueRuntimeInfo` API. * @param queueName * * Following are errors that can be expected from this operation @@ -492,7 +364,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async getQueueDetails(queueName: string): Promise { + async getQueue(queueName: string): Promise { log.httpAtomXml(`Performing management operation - getQueue() for "${queueName}"`); const response: HttpOperationResponse = await this.getResource( queueName, @@ -503,11 +375,12 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } /** - * Lists existing queues. - * @param listRequestOptions + * Returns an object representing the Queue runtime info like message count details. + * @param queueName * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as @@ -515,23 +388,74 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async listQueues(listRequestOptions?: ListRequestOptions): Promise { + async getQueueRuntimeInfo(queueName: string): Promise { + log.httpAtomXml(`Performing management operation - getQueue() for "${queueName}"`); + const response: HttpOperationResponse = await this.getResource( + queueName, + this.queueResourceSerializer + ); + + return this.buildQueueRuntimeInfoResponse(response); + } + + /** + * Returns a list of objects, each representing a Queue along with its properties. + * If you want to get the runtime info of the queues like message count, use `getQueuesRuntimeInfo` API instead. + * @param options + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async getQueues(options?: ListRequestOptions): Promise { log.httpAtomXml( - `Performing management operation - listQueues() with options: ${listRequestOptions}` + `Performing management operation - listQueues() with options: ${options}` ); const response: HttpOperationResponse = await this.listResources( "$Resources/Queues", - listRequestOptions, + options, this.queueResourceSerializer ); return this.buildListQueuesResponse(response); } + /** + * Returns a list of objects, each representing a Queue's runtime info like message count details. + * @param options + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async getQueuesRuntimeInfo( + options?: ListRequestOptions + ): Promise { + log.httpAtomXml( + `Performing management operation - listQueues() with options: ${options}` + ); + const response: HttpOperationResponse = await this.listResources( + "$Resources/Queues", + options, + this.queueResourceSerializer + ); + + return this.buildListQueuesRuntimeInfoResponse(response); + } + /** * Updates properties on the Queue by the given name based on the given options - * @param queueName - * @param queueOptions Options to configure the Queue being updated. + * @param queue Options to configure the Queue being updated. * For example, you can configure a queue to support partitions or sessions. * * Following are errors that can be expected from this operation @@ -544,23 +468,27 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async updateQueue(queueName: string, queueOptions: QueueOptions): Promise { + async updateQueue(queue: QueueDescription): Promise { log.httpAtomXml( - `Performing management operation - updateQueue() for "${queueName}" with options: ${queueOptions}` + `Performing management operation - updateQueue() for "${queue.name}" with options: ${queue}` ); - if (!isJSONLikeObject(queueOptions) || queueOptions === null) { + if (!isJSONLikeObject(queue) || queue == null) { throw new TypeError( - `Parameter "queueOptions" must be an object of type "QueueOptions" and cannot be undefined or null.` + `Parameter "queue" must be an object of type "QueueDescription" and cannot be undefined or null.` ); } - const finalQueueOptions: QueueOptions = {}; - const getQueueResult = await this.getQueueDetails(queueName); - Object.assign(finalQueueOptions, getQueueResult, queueOptions); + if (!queue.name) { + throw new TypeError(`"name" attribute of the parameter "queue" cannot be undefined.`); + } + + const finalQueueOptions: QueueDescription = { name: queue.name }; + const getQueueResult = await this.getQueue(queue.name); + Object.assign(finalQueueOptions, getQueueResult, queue); const response: HttpOperationResponse = await this.putResource( - queueName, + queue.name, buildQueueOptions(finalQueueOptions), this.queueResourceSerializer, true @@ -583,7 +511,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async deleteQueue(queueName: string): Promise { + async deleteQueue(queueName: string): Promise { log.httpAtomXml(`Performing management operation - deleteQueue() for "${queueName}"`); const response: HttpOperationResponse = await this.deleteResource( queueName, @@ -593,10 +521,42 @@ export class ServiceBusAtomManagementClient extends ServiceClient { return { _response: response }; } + /** + * Checks whether a given queue exists or not. + * @param queueName + */ + async queueExists(queueName: string): Promise { + log.httpAtomXml(`Performing management operation - queueExists() for "${queueName}"`); + try { + await this.getQueue(queueName); + } catch (error) { + if (error.code == "MessageEntityNotFoundError") { + return false; + } + throw error; + } + return true; + } + /** * Creates a topic with given name, configured using the given options * @param topicName - * @param topicOptions Options to configure the Topic being created. + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async createTopic(topicName: string): Promise; + /** + * Creates a topic with given name, configured using the given options + * @param topic Options to configure the Topic being created. * For example, you can configure a topic to support partitions or sessions. * * Following are errors that can be expected from this operation @@ -610,13 +570,20 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async createTopic(topicName: string, topicOptions?: TopicOptions): Promise { + async createTopic(topic: TopicDescription): Promise; + async createTopic(topicNameOrOptions: string | TopicDescription): Promise { + let topic: TopicDescription; + if (typeof topicNameOrOptions === "string") { + topic = { name: topicNameOrOptions }; + } else { + topic = topicNameOrOptions; + } log.httpAtomXml( - `Performing management operation - createTopic() for "${topicName}" with options: ${topicOptions}` + `Performing management operation - createTopic() for "${topic.name}" with options: ${topic}` ); const response: HttpOperationResponse = await this.putResource( - topicName, - buildTopicOptions(topicOptions || {}), + topic.name, + buildTopicOptions(topic), this.topicResourceSerializer, false ); @@ -625,7 +592,8 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } /** - * Returns an object representing the Topic with the given name along with all its properties + * Returns an object representing the Topic and its properties. + * If you want to get the Topic runtime info like subscription count details, use `getTopicRuntimeInfo` API. * @param topicName * * Following are errors that can be expected from this operation @@ -638,7 +606,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async getTopicDetails(topicName: string): Promise { + async getTopic(topicName: string): Promise { log.httpAtomXml(`Performing management operation - getTopic() for "${topicName}"`); const response: HttpOperationResponse = await this.getResource( topicName, @@ -649,8 +617,33 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } /** - * Lists existing topics. - * @param listRequestOptions + * Returns an object representing the Topic runtime info like subscription count. + * @param topicName + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async getTopicRuntimeInfo(topicName: string): Promise { + log.httpAtomXml(`Performing management operation - getTopicRuntimeInfo() for "${topicName}"`); + const response: HttpOperationResponse = await this.getResource( + topicName, + this.topicResourceSerializer + ); + + return this.buildTopicRuntimeInfoResponse(response); + } + + /** + * Returns a list of objects, each representing a Topic along with its properties. + * If you want to get the runtime info of the topics like subscription count, use `getTopicsRuntimeInfo` API instead. + * @param options * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, @@ -661,13 +654,13 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async listTopics(listRequestOptions?: ListRequestOptions): Promise { + async getTopics(options?: ListRequestOptions): Promise { log.httpAtomXml( - `Performing management operation - listTopics() with options: ${listRequestOptions}` + `Performing management operation - listTopics() with options: ${options}` ); const response: HttpOperationResponse = await this.listResources( "$Resources/Topics", - listRequestOptions, + options, this.topicResourceSerializer ); @@ -675,49 +668,194 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } /** - * Updates properties on the Topic by the given name based on the given options - * @param topicName - * @param topicOptions Options to configure the Topic being updated. - * For example, you can configure a topic to support partitions or sessions. + * Returns a list of objects, each representing a Topic's runtime info like subscription count. + * @param options + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async getTopicsRuntimeInfo( + options?: ListRequestOptions + ): Promise { + log.httpAtomXml( + `Performing management operation - listTopics() with options: ${options}` + ); + const response: HttpOperationResponse = await this.listResources( + "$Resources/Topics", + options, + this.topicResourceSerializer + ); + + return this.buildListTopicsRuntimeInfoResponse(response); + } + + /** + * Updates properties on the Topic by the given name based on the given options + * @param topic Options to configure the Topic being updated. + * For example, you can configure a topic to support partitions or sessions. + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async updateTopic(topic: TopicDescription): Promise { + log.httpAtomXml( + `Performing management operation - updateTopic() for "${topic.name}" with options: ${topic}` + ); + + if (!isJSONLikeObject(topic) || topic == null) { + throw new TypeError( + `Parameter "topic" must be an object of type "TopicDescription" and cannot be undefined or null.` + ); + } + + if (!topic.name) { + throw new TypeError(`"name" attribute of the parameter "topic" cannot be undefined.`); + } + + const finalTopicOptions: TopicDescription = { name: topic.name }; + const getTopicResult = await this.getTopic(topic.name); + Object.assign(finalTopicOptions, getTopicResult, topic); + + const response: HttpOperationResponse = await this.putResource( + topic.name, + buildTopicOptions(finalTopicOptions), + this.topicResourceSerializer, + true + ); + + return this.buildTopicResponse(response); + } + + /** + * Deletes a topic. + * @param topicName + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async deleteTopic(topicName: string): Promise { + log.httpAtomXml(`Performing management operation - deleteTopic() for "${topicName}"`); + const response: HttpOperationResponse = await this.deleteResource( + topicName, + this.topicResourceSerializer + ); + + return { _response: response }; + } + + /** + * Checks whether a given topic exists or not. + * @param topicName + */ + async topicExists(topicName: string): Promise { + log.httpAtomXml(`Performing management operation - topicExists() for "${topicName}"`); + try { + await this.getTopic(topicName); + } catch (error) { + if (error.code == "MessageEntityNotFoundError") { + return false; + } + throw error; + } + return true; + } + + /** + * Creates a subscription with given name, configured using the given options + * @param topicName + * @param subscriptionName + * + * Following are errors that can be expected from this operation + * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, + * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists, + * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side, + * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, + * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as + * bad requests or requests resulting in conflicting operation on the server, + * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at + * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 + */ + async createSubscription( + topicName: string, + subscriptionName: string + ): Promise; + + /** + * Creates a subscription with given name, configured using the given options + * @param subscription Options to configure the Subscription being created. + * For example, you can configure a Subscription to support partitions or sessions. * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, - * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, + * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists, * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, + * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side, * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as * bad requests or requests resulting in conflicting operation on the server, * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async updateTopic(topicName: string, topicOptions: TopicOptions): Promise { + async createSubscription(subscription: SubscriptionDescription): Promise; + async createSubscription( + topicNameOrSubscriptionOptions: string | SubscriptionDescription, + subscriptionName?: string + ): Promise { + let subscription: SubscriptionDescription; + if (typeof topicNameOrSubscriptionOptions === "string") { + if (!subscriptionName) { + throw new Error("Subscription name is not provided"); + } + subscription = { + topicName: topicNameOrSubscriptionOptions, + subscriptionName: subscriptionName + }; + } else { + subscription = topicNameOrSubscriptionOptions; + } log.httpAtomXml( - `Performing management operation - updateTopic() for "${topicName}" with options: ${topicOptions}` + `Performing management operation - createSubscription() for "${subscription.subscriptionName}" with options: ${subscription}` + ); + const fullPath = this.getSubscriptionPath( + subscription.topicName, + subscription.subscriptionName ); - - if (!isJSONLikeObject(topicOptions) || topicOptions === null) { - throw new TypeError( - `Parameter "topicOptions" must be an object of type "TopicOptions" and cannot be undefined or null.` - ); - } - - const finalTopicOptions: TopicOptions = {}; - const getTopicResult = await this.getTopicDetails(topicName); - Object.assign(finalTopicOptions, getTopicResult, topicOptions); - const response: HttpOperationResponse = await this.putResource( - topicName, - buildTopicOptions(finalTopicOptions), - this.topicResourceSerializer, - true + fullPath, + buildSubscriptionOptions(subscription), + this.subscriptionResourceSerializer, + false ); - return this.buildTopicResponse(response); + return this.buildSubscriptionResponse(response); } /** - * Deletes a topic. + * Returns an object representing the Subscription and its properties. + * If you want to get the Subscription runtime info like message count details, use `getSubscriptionRuntimeInfo` API. * @param topicName + * @param subscriptionName * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, @@ -729,61 +867,61 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async deleteTopic(topicName: string): Promise { - log.httpAtomXml(`Performing management operation - deleteTopic() for "${topicName}"`); - const response: HttpOperationResponse = await this.deleteResource( - topicName, - this.topicResourceSerializer + async getSubscription( + topicName: string, + subscriptionName: string + ): Promise { + log.httpAtomXml( + `Performing management operation - getSubscription() for "${subscriptionName}"` + ); + const fullPath = this.getSubscriptionPath(topicName, subscriptionName); + const response: HttpOperationResponse = await this.getResource( + fullPath, + this.subscriptionResourceSerializer ); - return { _response: response }; + return this.buildSubscriptionRuntimeInfoResponse(response); } /** - * Creates a subscription with given name, configured using the given options + * Returns an object representing the Subscription runtime info like message count details. * @param topicName * @param subscriptionName - * @param subscriptionOptions Options to configure the Subscription being created. - * For example, you can configure a Subscription to support partitions or sessions. * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, - * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists, + * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, - * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side, * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as * bad requests or requests resulting in conflicting operation on the server, * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async createSubscription( + async getSubscriptionRuntimeInfo( topicName: string, - subscriptionName: string, - subscriptionOptions?: SubscriptionOptions - ): Promise { + subscriptionName: string + ): Promise { log.httpAtomXml( - `Performing management operation - createSubscription() for "${subscriptionName}" with options: ${subscriptionOptions}` + `Performing management operation - getSubscription() for "${subscriptionName}"` ); const fullPath = this.getSubscriptionPath(topicName, subscriptionName); - const response: HttpOperationResponse = await this.putResource( + const response: HttpOperationResponse = await this.getResource( fullPath, - buildSubscriptionOptions(subscriptionOptions || {}), - this.subscriptionResourceSerializer, - false + this.subscriptionResourceSerializer ); - return this.buildSubscriptionResponse(response); + return this.buildSubscriptionRuntimeInfoResponse(response); } /** - * Returns an object representing the Subscription with the given name along with all its properties + * Returns a list of objects, each representing a Subscription along with its properties. + * If you want to get the runtime info of the subscriptions like message count, use `getSubscriptionsRuntimeInfo` API instead. * @param topicName - * @param subscriptionName + * @param options * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, - * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist, * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code, * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy, * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as @@ -791,26 +929,26 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async getSubscriptionDetails( + async getSubscriptions( topicName: string, - subscriptionName: string - ): Promise { + options?: ListRequestOptions + ): Promise { log.httpAtomXml( - `Performing management operation - getSubscription() for "${subscriptionName}"` + `Performing management operation - listSubscriptions() with options: ${options}` ); - const fullPath = this.getSubscriptionPath(topicName, subscriptionName); - const response: HttpOperationResponse = await this.getResource( - fullPath, + const response: HttpOperationResponse = await this.listResources( + topicName + "/Subscriptions/", + options, this.subscriptionResourceSerializer ); - return this.buildSubscriptionResponse(response); + return this.buildListSubscriptionsResponse(response); } /** - * Lists existing subscriptions. + * Returns a list of objects, each representing a Subscription's runtime info like message count details. * @param topicName - * @param listRequestOptions + * @param options * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, @@ -821,27 +959,25 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async listSubscriptions( + async getSubscriptionsRuntimeInfo( topicName: string, - listRequestOptions?: ListRequestOptions - ): Promise { + options?: ListRequestOptions + ): Promise { log.httpAtomXml( - `Performing management operation - listSubscriptions() with options: ${listRequestOptions}` + `Performing management operation - listSubscriptions() with options: ${options}` ); const response: HttpOperationResponse = await this.listResources( topicName + "/Subscriptions/", - listRequestOptions, + options, this.subscriptionResourceSerializer ); - return this.buildListSubscriptionsResponse(response); + return this.buildListSubscriptionsRuntimeInfoResponse(response); } /** * Updates properties on the Subscription by the given name based on the given options - * @param topicName - * @param subscriptionName - * @param subscriptionOptions Options to configure the Subscription being updated. + * @param subscription Options to configure the Subscription being updated. * For example, you can configure a Subscription to support partitions or sessions. * * Following are errors that can be expected from this operation @@ -854,26 +990,37 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async updateSubscription( - topicName: string, - subscriptionName: string, - subscriptionOptions: SubscriptionOptions - ): Promise { + async updateSubscription(subscription: SubscriptionDescription): Promise { log.httpAtomXml( - `Performing management operation - updateSubscription() for "${subscriptionName}" with options: ${subscriptionOptions}` + `Performing management operation - updateSubscription() for "${subscription.subscriptionName}" with options: ${subscription}` ); - if (!isJSONLikeObject(subscriptionOptions) || subscriptionOptions === null) { + if (!isJSONLikeObject(subscription) || subscription == null) { throw new TypeError( - `Parameter "subscriptionOptions" must be an object of type "SubscriptionOptions" and cannot be undefined or null.` + `Parameter "subscription" must be an object of type "SubscriptionDescription" and cannot be undefined or null.` ); } - const fullPath = this.getSubscriptionPath(topicName, subscriptionName); + if (!subscription.topicName || !subscription.subscriptionName) { + throw new TypeError( + `The attributes "topicName" and "subscriptionName" of the parameter "subscription" cannot be undefined.` + ); + } + + const fullPath = this.getSubscriptionPath( + subscription.topicName, + subscription.subscriptionName + ); - const finalSubscriptionOptions: SubscriptionOptions = {}; - const getSubscriptionResult = await this.getSubscriptionDetails(topicName, subscriptionName); - Object.assign(finalSubscriptionOptions, getSubscriptionResult, subscriptionOptions); + const finalSubscriptionOptions: SubscriptionDescription = { + topicName: subscription.topicName, + subscriptionName: subscription.subscriptionName + }; + const getSubscriptionResult = await this.getSubscription( + subscription.topicName, + subscription.subscriptionName + ); + Object.assign(finalSubscriptionOptions, getSubscriptionResult, subscription); const response: HttpOperationResponse = await this.putResource( fullPath, @@ -900,10 +1047,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async deleteSubscription( - topicName: string, - subscriptionName: string - ): Promise { + async deleteSubscription(topicName: string, subscriptionName: string): Promise { log.httpAtomXml( `Performing management operation - deleteSubscription() for "${subscriptionName}"` ); @@ -916,12 +1060,32 @@ export class ServiceBusAtomManagementClient extends ServiceClient { return { _response: response }; } + /** + * Checks whether a given subscription exists in the topic or not. + * @param topicName + * @param subscriptionName + * + */ + async subscriptionExists(topicName: string, subscriptionName: string): Promise { + log.httpAtomXml( + `Performing management operation - subscriptionExists() for "${topicName}" and "${subscriptionName}"` + ); + try { + await this.getSubscription(topicName, subscriptionName); + } catch (error) { + if (error.code == "MessageEntityNotFoundError") { + return false; + } + throw error; + } + return true; + } + /** * Creates a rule with given name, configured using the given options. * @param topicName * @param subscriptionName - * @param ruleName - * @param ruleOptions + * @param rule * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, @@ -937,16 +1101,15 @@ export class ServiceBusAtomManagementClient extends ServiceClient { async createRule( topicName: string, subscriptionName: string, - ruleName: string, - ruleOptions?: RuleOptions - ): Promise { + rule: RuleDescription + ): Promise { log.httpAtomXml( - `Performing management operation - createRule() for "${ruleName}" with options: "${ruleOptions}"` + `Performing management operation - createRule() for "${rule.name}" with options: "${rule}"` ); - const fullPath = this.getRulePath(topicName, subscriptionName, ruleName); + const fullPath = this.getRulePath(topicName, subscriptionName, rule.name); const response: HttpOperationResponse = await this.putResource( fullPath, - buildRuleOptions(ruleName, ruleOptions), + rule, this.ruleResourceSerializer, false ); @@ -969,11 +1132,11 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async getRuleDetails( + async getRule( topicName: string, subscriptioName: string, ruleName: string - ): Promise { + ): Promise { log.httpAtomXml(`Performing management operation - getRule() for "${ruleName}"`); const fullPath = this.getRulePath(topicName, subscriptioName, ruleName); const response: HttpOperationResponse = await this.getResource( @@ -988,7 +1151,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * Lists existing rules. * @param topicName * @param subscriptionName - * @param listRequestOptions + * @param options * * Following are errors that can be expected from this operation * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems, @@ -999,18 +1162,18 @@ export class ServiceBusAtomManagementClient extends ServiceClient { * @throws `RestError` with code that is a value from the standard set of HTTP status codes as documented at * https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.8 */ - async listRules( + async getRules( topicName: string, subscriptionName: string, - listRequestOptions?: ListRequestOptions - ): Promise { + options?: ListRequestOptions + ): Promise { log.httpAtomXml( - `Performing management operation - listRules() with options: ${listRequestOptions}` + `Performing management operation - listRules() with options: ${options}` ); const fullPath = this.getSubscriptionPath(topicName, subscriptionName) + "/Rules/"; const response: HttpOperationResponse = await this.listResources( fullPath, - listRequestOptions, + options, this.ruleResourceSerializer ); @@ -1038,23 +1201,26 @@ export class ServiceBusAtomManagementClient extends ServiceClient { async updateRule( topicName: string, subscriptionName: string, - ruleName: string, - ruleOptions: RuleOptions - ): Promise { + rule: RuleDescription + ): Promise { log.httpAtomXml( - `Performing management operation - updateRule() for "${ruleName}" with options: ${ruleOptions}` + `Performing management operation - updateRule() for "${rule.name}" with options: ${rule}` ); - if (!isJSONLikeObject(ruleOptions) || ruleOptions === null) { + if (!isJSONLikeObject(rule) || rule === null) { throw new TypeError( - `Parameter "ruleOptions" must be an object of type "RuleOptions" and cannot be undefined or null.` + `Parameter "rule" must be an object of type "RuleDescription" and cannot be undefined or null.` ); } - const fullPath = this.getRulePath(topicName, subscriptionName, ruleName); + if (!rule.name) { + throw new TypeError(`"name" attribute of the parameter "rule" cannot be undefined.`); + } + + const fullPath = this.getRulePath(topicName, subscriptionName, rule.name); const response: HttpOperationResponse = await this.putResource( fullPath, - buildRuleOptions(ruleName, ruleOptions), + rule, this.ruleResourceSerializer, true ); @@ -1082,7 +1248,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { topicName: string, subscriptionName: string, ruleName: string - ): Promise { + ): Promise { log.httpAtomXml(`Performing management operation - deleteRule() for "${ruleName}"`); const fullPath = this.getRulePath(topicName, subscriptionName, ruleName); const response: HttpOperationResponse = await this.deleteResource( @@ -1106,7 +1272,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { | InternalQueueOptions | InternalTopicOptions | InternalSubscriptionOptions - | InternalRuleOptions, + | RuleDescription, serializer: AtomXmlSerializer, isUpdate: boolean = false ): Promise { @@ -1123,7 +1289,11 @@ export class ServiceBusAtomManagementClient extends ServiceClient { queueOrSubscriptionFields.ForwardTo || queueOrSubscriptionFields.ForwardDeadLetteredMessagesTo ) { - const token = (await this.sasTokenProvider.getToken(this.endpoint)).token; + const token = + this.credentials instanceof SasServiceClientCredentials + ? this.credentials.getToken(this.endpoint).token + : (await this.credentials.getToken([AMQPConstants.aadServiceBusScope]))!.token; + if (queueOrSubscriptionFields.ForwardTo) { webResource.headers.set("ServiceBusSupplementaryAuthorization", token); if (!isAbsoluteUrl(queueOrSubscriptionFields.ForwardTo)) { @@ -1237,9 +1407,30 @@ export class ServiceBusAtomManagementClient extends ServiceClient { return topicName + "/Subscriptions/" + subscriptionName + "/Rules/" + ruleName; } - private buildListQueuesResponse(response: HttpOperationResponse): ListQueuesResponse { + private buildNamespacePropertiesResponse( + response: HttpOperationResponse + ): NamespacePropertiesResponse { + try { + const namespace = buildNamespace(response.parsedBody); + const namespaceResponse: NamespacePropertiesResponse = Object.assign(namespace || {}, { + _response: response + }); + return namespaceResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a namespace object using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + + private buildListQueuesResponse(response: HttpOperationResponse): QueuesResponse { try { - const queues: QueueDetails[] = []; + const queues: QueueDescription[] = []; if (!Array.isArray(response.parsedBody)) { throw new TypeError(`${response.parsedBody} was expected to be of type Array`); } @@ -1250,7 +1441,38 @@ export class ServiceBusAtomManagementClient extends ServiceClient { queues.push(queue); } } - const listQueuesResponse: ListQueuesResponse = Object.assign(queues, { + const listQueuesResponse: QueuesResponse = Object.assign(queues, { + _response: response + }); + return listQueuesResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a list of queues using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + + private buildListQueuesRuntimeInfoResponse( + response: HttpOperationResponse + ): QueuesRuntimeInfoResponse { + try { + const queues: QueueRuntimeInfo[] = []; + if (!Array.isArray(response.parsedBody)) { + throw new TypeError(`${response.parsedBody} was expected to be of type Array`); + } + const rawQueueArray: any = response.parsedBody; + for (let i = 0; i < rawQueueArray.length; i++) { + const queue = buildQueueRuntimeInfo(rawQueueArray[i]); + if (queue) { + queues.push(queue); + } + } + const listQueuesResponse: QueuesRuntimeInfoResponse = Object.assign(queues, { _response: response }); return listQueuesResponse; @@ -1285,9 +1507,28 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } } - private buildListTopicsResponse(response: HttpOperationResponse): ListTopicsResponse { + private buildQueueRuntimeInfoResponse(response: HttpOperationResponse): QueueRuntimeInfoResponse { + try { + const queue = buildQueueRuntimeInfo(response.parsedBody); + const queueResponse: QueueRuntimeInfoResponse = Object.assign(queue || {}, { + _response: response + }); + return queueResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a queue object using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + + private buildListTopicsResponse(response: HttpOperationResponse): TopicsResponse { try { - const topics: TopicDetails[] = []; + const topics: TopicDescription[] = []; if (!Array.isArray(response.parsedBody)) { throw new TypeError(`${response.parsedBody} was expected to be of type Array`); } @@ -1298,7 +1539,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { topics.push(topic); } } - const listTopicsResponse: ListTopicsResponse = Object.assign(topics, { + const listTopicsResponse: TopicsResponse = Object.assign(topics, { _response: response }); return listTopicsResponse; @@ -1314,6 +1555,36 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } } + private buildListTopicsRuntimeInfoResponse( + response: HttpOperationResponse + ): TopicsRuntimeInfoResponse { + try { + const topics: TopicRuntimeInfo[] = []; + if (!Array.isArray(response.parsedBody)) { + throw new TypeError(`${response.parsedBody} was expected to be of type Array`); + } + const rawTopicArray: any = response.parsedBody; + for (let i = 0; i < rawTopicArray.length; i++) { + const topic = buildTopicRuntimeInfo(rawTopicArray[i]); + if (topic) { + topics.push(topic); + } + } + const listTopicsResponse: TopicsRuntimeInfoResponse = Object.assign(topics, { + _response: response + }); + return listTopicsResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a list of topics using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } private buildTopicResponse(response: HttpOperationResponse): TopicResponse { try { const topic = buildTopic(response.parsedBody); @@ -1333,11 +1604,28 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } } - private buildListSubscriptionsResponse( - response: HttpOperationResponse - ): ListSubscriptionsResponse { + private buildTopicRuntimeInfoResponse(response: HttpOperationResponse): TopicRuntimeInfoResponse { + try { + const topic = buildTopicRuntimeInfo(response.parsedBody); + const topicResponse: TopicRuntimeInfoResponse = Object.assign(topic || {}, { + _response: response + }); + return topicResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a topic object using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + + private buildListSubscriptionsResponse(response: HttpOperationResponse): SubscriptionsResponse { try { - const subscriptions: SubscriptionDetails[] = []; + const subscriptions: SubscriptionDescription[] = []; if (!Array.isArray(response.parsedBody)) { throw new TypeError(`${response.parsedBody} was expected to be of type Array`); } @@ -1348,7 +1636,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { subscriptions.push(subscription); } } - const listSubscriptionsResponse: ListSubscriptionsResponse = Object.assign(subscriptions, { + const listSubscriptionsResponse: SubscriptionsResponse = Object.assign(subscriptions, { _response: response }); return listSubscriptionsResponse; @@ -1364,6 +1652,40 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } } + private buildListSubscriptionsRuntimeInfoResponse( + response: HttpOperationResponse + ): SubscriptionsRuntimeInfoResponse { + try { + const subscriptions: SubscriptionRuntimeInfo[] = []; + if (!Array.isArray(response.parsedBody)) { + throw new TypeError(`${response.parsedBody} was expected to be of type Array`); + } + const rawSubscriptionArray: any = response.parsedBody; + for (let i = 0; i < rawSubscriptionArray.length; i++) { + const subscription = buildSubscriptionRuntimeInfo(rawSubscriptionArray[i]); + if (subscription) { + subscriptions.push(subscription); + } + } + const listSubscriptionsResponse: SubscriptionsRuntimeInfoResponse = Object.assign( + subscriptions, + { + _response: response + } + ); + return listSubscriptionsResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a list of subscriptions using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + private buildSubscriptionResponse(response: HttpOperationResponse): SubscriptionResponse { try { const subscription = buildSubscription(response.parsedBody); @@ -1383,9 +1705,33 @@ export class ServiceBusAtomManagementClient extends ServiceClient { } } - private buildListRulesResponse(response: HttpOperationResponse): ListRulesResponse { + private buildSubscriptionRuntimeInfoResponse( + response: HttpOperationResponse + ): SubscriptionRuntimeInfoResponse { + try { + const subscription = buildSubscriptionRuntimeInfo(response.parsedBody); + const subscriptionResponse: SubscriptionRuntimeInfoResponse = Object.assign( + subscription || {}, + { + _response: response + } + ); + return subscriptionResponse; + } catch (err) { + log.warning("Failure parsing response from service - %0 ", err); + throw new RestError( + `Error occurred while parsing the response body - cannot form a subscription object using the response from the service.`, + RestError.PARSE_ERROR, + response.status, + stripRequest(response.request), + stripResponse(response) + ); + } + } + + private buildListRulesResponse(response: HttpOperationResponse): RulesResponse { try { - const rules: RuleDetails[] = []; + const rules: RuleDescription[] = []; if (!Array.isArray(response.parsedBody)) { throw new TypeError(`${response.parsedBody} was expected to be of type Array`); } @@ -1396,7 +1742,7 @@ export class ServiceBusAtomManagementClient extends ServiceClient { rules.push(rule); } } - const listRulesResponse: ListRulesResponse = Object.assign(rules, { + const listRulesResponse: RulesResponse = Object.assign(rules, { _response: response }); return listRulesResponse; diff --git a/sdk/servicebus/service-bus/src/serviceBusClient.ts b/sdk/servicebus/service-bus/src/serviceBusClient.ts index 9e03a021c901..560fbaeb16da 100644 --- a/sdk/servicebus/service-bus/src/serviceBusClient.ts +++ b/sdk/servicebus/service-bus/src/serviceBusClient.ts @@ -2,19 +2,19 @@ // Licensed under the MIT license. import { generate_uuid } from "rhea-promise"; -import { isTokenCredential, TokenCredential } from "@azure/core-amqp"; +import { TokenCredential, isTokenCredential } from "@azure/core-amqp"; import { ServiceBusClientOptions, - createConnectionContextForTokenCredential, - createConnectionContextForConnectionString + createConnectionContextForConnectionString, + createConnectionContextForTokenCredential } from "./constructorHelpers"; import { ConnectionContext } from "./connectionContext"; import { ClientEntityContext } from "./clientEntityContext"; -import { SenderImpl, Sender } from "./sender"; -import { CreateSessionReceiverOptions, CreateSenderOptions } from "./models"; +import { Sender, SenderImpl } from "./sender"; +import { CreateSessionReceiverOptions } from "./models"; import { Receiver, ReceiverImpl } from "./receivers/receiver"; import { SessionReceiver, SessionReceiverImpl } from "./receivers/sessionReceiver"; -import { ReceivedMessageWithLock, ReceivedMessage } from "./serviceBusMessage"; +import { ReceivedMessage, ReceivedMessageWithLock } from "./serviceBusMessage"; /** * A client that can create Sender instances for sending messages to queues and @@ -310,17 +310,14 @@ export class ServiceBusClient { * Creates a Sender which can be used to send messages, schedule messages to be * sent at a later time and cancel such scheduled messages. * @param queueOrTopicName The name of a queue or topic to send messages to. - * @param options Options for creating a sender. */ - async createSender(queueOrTopicName: string, options?: CreateSenderOptions): Promise { + createSender(queueOrTopicName: string): Sender { const clientEntityContext = ClientEntityContext.create( queueOrTopicName, this._connectionContext, `${queueOrTopicName}/${generate_uuid()}` ); - const sender = new SenderImpl(clientEntityContext, this._clientOptions.retryOptions); - await sender.open(options); - return sender; + return new SenderImpl(clientEntityContext, this._clientOptions.retryOptions); } // /** diff --git a/sdk/servicebus/service-bus/src/serviceBusMessage.ts b/sdk/servicebus/service-bus/src/serviceBusMessage.ts index 94f8154d94a1..15364611c708 100644 --- a/sdk/servicebus/service-bus/src/serviceBusMessage.ts +++ b/sdk/servicebus/service-bus/src/serviceBusMessage.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import Long from "long"; -import { Delivery, uuid_to_string, MessageAnnotations, DeliveryAnnotations } from "rhea-promise"; -import { Constants, AmqpMessage, translate, ErrorNameConditionMapper } from "@azure/core-amqp"; +import { Delivery, DeliveryAnnotations, MessageAnnotations, uuid_to_string } from "rhea-promise"; +import { AmqpMessage, Constants, ErrorNameConditionMapper, translate } from "@azure/core-amqp"; import * as log from "./log"; import { ClientEntityContext } from "./clientEntityContext"; import { reorderLockToken } from "./util/utils"; @@ -668,6 +668,14 @@ export function fromAmqpMessage( return rcvdsbmsg; } +/** + * @internal + * @ignore + */ +export function isServiceBusMessage(possible: any): possible is ServiceBusMessage { + return possible != null && typeof possible === "object" && "body" in possible; +} + /** * Describes the message received from Service Bus. * diff --git a/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts b/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts index 741e74eef585..cdb07d014375 100644 --- a/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts +++ b/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts @@ -5,9 +5,9 @@ import { ServiceBusMessage, toAmqpMessage } from "./serviceBusMessage"; import { throwTypeErrorIfParameterMissing } from "./util/errors"; import { ClientEntityContext } from "./clientEntityContext"; import { - message as RheaMessageUtil, + MessageAnnotations, messageProperties as RheaMessagePropertiesList, - MessageAnnotations + message as RheaMessageUtil } from "rhea-promise"; import { AmqpMessage } from "@azure/core-amqp"; diff --git a/sdk/servicebus/service-bus/src/session/messageSession.ts b/sdk/servicebus/service-bus/src/session/messageSession.ts index 2f79931e12d2..c86271d65580 100644 --- a/sdk/servicebus/service-bus/src/session/messageSession.ts +++ b/sdk/servicebus/service-bus/src/session/messageSession.ts @@ -2,28 +2,28 @@ // Licensed under the MIT license. import { - translate, Constants, ErrorNameConditionMapper, + Func, MessagingError, - Func + translate } from "@azure/core-amqp"; import { - Receiver, - OnAmqpEvent, + AmqpError, EventContext, - ReceiverOptions, + OnAmqpEvent, + Receiver, ReceiverEvents, - AmqpError, + ReceiverOptions, isAmqpError } from "rhea-promise"; import * as log from "../log"; -import { OnError, OnAmqpEventAsPromise, PromiseLike, OnMessage } from "../core/messageReceiver"; +import { OnAmqpEventAsPromise, OnError, OnMessage, PromiseLike } from "../core/messageReceiver"; import { LinkEntity } from "../core/linkEntity"; import { ClientEntityContext } from "../clientEntityContext"; -import { convertTicksToDate, calculateRenewAfterDuration } from "../util/utils"; +import { calculateRenewAfterDuration, convertTicksToDate } from "../util/utils"; import { throwErrorIfConnectionClosed } from "../util/errors"; -import { ServiceBusMessageImpl, DispositionType, ReceiveMode } from "../serviceBusMessage"; +import { DispositionType, ReceiveMode, ServiceBusMessageImpl } from "../serviceBusMessage"; import { DispositionStatusOptions } from "../core/managementClient"; /** diff --git a/sdk/servicebus/service-bus/src/util/atomXmlHelper.ts b/sdk/servicebus/service-bus/src/util/atomXmlHelper.ts index 9fed25782210..881795131e42 100644 --- a/sdk/servicebus/service-bus/src/util/atomXmlHelper.ts +++ b/sdk/servicebus/service-bus/src/util/atomXmlHelper.ts @@ -1,18 +1,15 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { HttpOperationResponse, RestError, - stripRequest, - stripResponse, + ServiceClient, WebResource, - stringifyXML, parseXML, - ServiceClient + stringifyXML, + stripRequest, + stripResponse } from "@azure/core-http"; import * as Constants from "./constants"; diff --git a/sdk/servicebus/service-bus/src/util/concurrentExpiringMap.ts b/sdk/servicebus/service-bus/src/util/concurrentExpiringMap.ts index 6b7cf8e42a6c..7122d540f010 100644 --- a/sdk/servicebus/service-bus/src/util/concurrentExpiringMap.ts +++ b/sdk/servicebus/service-bus/src/util/concurrentExpiringMap.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { generate_uuid } from "rhea-promise"; -import { delay, AsyncLock } from "@azure/core-amqp"; +import { AsyncLock, delay } from "@azure/core-amqp"; import * as log from "../log"; /** diff --git a/sdk/servicebus/service-bus/src/util/constants.ts b/sdk/servicebus/service-bus/src/util/constants.ts index d3c687ffed71..48a2e219824f 100644 --- a/sdk/servicebus/service-bus/src/util/constants.ts +++ b/sdk/servicebus/service-bus/src/util/constants.ts @@ -7,7 +7,7 @@ */ export const packageJsonInfo = { name: "@azure/service-bus", - version: "7.0.0-preview.3" + version: "7.0.0-preview.4" }; /** diff --git a/sdk/servicebus/service-bus/src/util/errors.ts b/sdk/servicebus/service-bus/src/util/errors.ts index f20869704f91..354c9dd54311 100644 --- a/sdk/servicebus/service-bus/src/util/errors.ts +++ b/sdk/servicebus/service-bus/src/util/errors.ts @@ -66,15 +66,8 @@ export function getClientClosedErrorMsg(entityPath: string): string { * @internal * Gets the error message when a sender is used when its already closed * @param entityPath Value of the `entityPath` property on the client which denotes its name - * @param isClientClosed Denotes if the close() was called on the client that created the sender */ -export function getSenderClosedErrorMsg(entityPath: string, isClientClosed: boolean): string { - if (isClientClosed) { - return ( - `The client for "${entityPath}" has been closed. The sender created by it can no longer be used. ` + - `Please create a new client using an instance of ServiceBusClient.` - ); - } +export function getSenderClosedErrorMsg(entityPath: string): string { return ( `The sender for "${entityPath}" has been closed and can no longer be used. ` + `Please create a new sender using the "getSender" method on the ServiceBusClient.` diff --git a/sdk/servicebus/service-bus/src/util/parseUrl.browser.ts b/sdk/servicebus/service-bus/src/util/parseUrl.browser.ts index fd6b11eae9a8..32b15b01fb51 100644 --- a/sdk/servicebus/service-bus/src/util/parseUrl.browser.ts +++ b/sdk/servicebus/service-bus/src/util/parseUrl.browser.ts @@ -10,6 +10,8 @@ * @param {string} rawUrl * @returns */ -export const parseURL = (rawUrl: string) => { +export const parseURL = (rawUrl: string): any => { + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore: "self" will exist in the browser. return new self.URL(rawUrl); }; diff --git a/sdk/servicebus/service-bus/src/util/sasServiceClientCredentials.ts b/sdk/servicebus/service-bus/src/util/sasServiceClientCredentials.ts index da58436e73a5..496546d59e1e 100644 --- a/sdk/servicebus/service-bus/src/util/sasServiceClientCredentials.ts +++ b/sdk/servicebus/service-bus/src/util/sasServiceClientCredentials.ts @@ -4,7 +4,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { HttpHeaders, WebResource, ServiceClientCredentials } from "@azure/core-http"; +import { AccessToken, SharedKeyCredential } from "@azure/core-amqp"; +import { HttpHeaders, ServiceClientCredentials, WebResource } from "@azure/core-http"; import { generateKey } from "./crypto"; /** @@ -16,7 +17,7 @@ import { generateKey } from "./crypto"; export class SasServiceClientCredentials implements ServiceClientCredentials { keyName: string; keyValue: string; - + private sharedKeyCredential: SharedKeyCredential; /** * Creates a new sasServiceClientCredentials object. * @@ -27,6 +28,7 @@ export class SasServiceClientCredentials implements ServiceClientCredentials { constructor(sharedAccessKeyName: string, sharedAccessKey: string) { this.keyName = sharedAccessKeyName; this.keyValue = sharedAccessKey; + this.sharedKeyCredential = new SharedKeyCredential(this.keyName, this.keyValue); } private async _generateSignature(targetUri: string, expirationDate: number): Promise { @@ -57,4 +59,8 @@ export class SasServiceClientCredentials implements ServiceClientCredentials { webResource.withCredentials = true; return webResource; } + + getToken(audience: string): AccessToken { + return this.sharedKeyCredential.getToken(audience); + } } diff --git a/sdk/servicebus/service-bus/src/util/utils.ts b/sdk/servicebus/service-bus/src/util/utils.ts index 26be40bac87f..d42079f07d00 100644 --- a/sdk/servicebus/service-bus/src/util/utils.ts +++ b/sdk/servicebus/service-bus/src/util/utils.ts @@ -3,10 +3,11 @@ import Long from "long"; import * as log from "../log"; -import { generate_uuid } from "rhea-promise"; +import { OperationTimeoutError, generate_uuid } from "rhea-promise"; import isBuffer from "is-buffer"; import { Buffer } from "buffer"; import * as Constants from "../util/constants"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; // This is the only dependency we have on DOM types, so rather than require // the DOM lib we can just shim this in. @@ -241,6 +242,16 @@ export function getIntegerOrUndefined(value: any): number | undefined { return result == NaN ? undefined : result; } +/** + * @internal + * @ignore + * Helper utility to convert ISO-8601 time into Date type. + * @param value + */ +export function getDate(value: string, nameOfProperty: string): Date { + return new Date(getString(value, nameOfProperty)); +} + /** * @internal * @ignore @@ -308,8 +319,6 @@ export function getCountDetailsOrUndefined(value: any): MessageCountDetails | un } /** - * @internal - * @ignore * Represents type of message count details in ATOM based management operations. */ export type MessageCountDetails = { @@ -321,8 +330,6 @@ export type MessageCountDetails = { }; /** - * @internal - * @ignore * Represents type of `AuthorizationRule` in ATOM based management operations. */ export type AuthorizationRule = { @@ -471,8 +478,6 @@ export function isAbsoluteUrl(url: string) { } /** - * @internal - * @ignore * Possible values for `status` of the Service Bus messaging entities. */ export type EntityStatus = @@ -485,3 +490,98 @@ export type EntityStatus = | "Renaming" | "Restoring" | "Unknown"; + +/** + * @internal + * @ignore + */ +export const StandardAbortMessage = "The operation was aborted."; + +/** + * An executor for a function that returns a Promise that obeys both a timeout and an + * optional AbortSignal. + * @param timeoutMs - The number of milliseconds to allow before throwing an OperationTimeoutError. + * @param timeoutMessage - The message to place in the .description field for the thrown exception for Timeout. + * @param abortSignal - The abortSignal associated with containing operation. + * @param abortErrorMsg - The abort error message associated with containing operation. + * @param value - The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} - Resolved promise + * + * @internal + * @ignore + */ +export async function waitForTimeoutOrAbortOrResolve(args: { + actionFn: () => Promise; + timeoutMs: number; + timeoutMessage: string; + abortSignal?: AbortSignalLike; + // these are optional and only here for testing. + timeoutFunctions?: { + setTimeoutFn: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => any; + clearTimeoutFn: (timeoutId: any) => void; + }; +}): Promise { + if (args.abortSignal && args.abortSignal.aborted) { + throw new AbortError(StandardAbortMessage); + } + + let timer: any | undefined = undefined; + let clearAbortSignal: (() => void) | undefined = undefined; + + const clearAbortSignalAndTimer = (): void => { + (args.timeoutFunctions?.clearTimeoutFn ?? clearTimeout)(timer); + + if (clearAbortSignal) { + clearAbortSignal(); + } + }; + + // eslint-disable-next-line promise/param-names + const abortOrTimeoutPromise = new Promise((_resolve, reject) => { + clearAbortSignal = checkAndRegisterWithAbortSignal(reject, args.abortSignal); + + timer = (args.timeoutFunctions?.setTimeoutFn ?? setTimeout)(() => { + reject(new OperationTimeoutError(args.timeoutMessage)); + }, args.timeoutMs); + }); + + try { + return await Promise.race([abortOrTimeoutPromise, args.actionFn()]); + } finally { + clearAbortSignalAndTimer(); + } +} + +/** + * Registers listener to the abort event on the abortSignal to call your abortFn and + * returns a function that will clear the same listener. + * + * If abort signal is already aborted, then throws an AbortError and returns a function that does nothing + * + * @returns A function that removes any of our attached event listeners on the abort signal or an empty function if + * the abortSignal was not defined. + * + * @internal + * @ignore + */ +export function checkAndRegisterWithAbortSignal( + onAbortFn: (abortError: AbortError) => void, + abortSignal?: AbortSignalLike +): () => void { + if (abortSignal == null) { + return () => {}; + } + + if (abortSignal.aborted) { + throw new AbortError(StandardAbortMessage); + } + + const onAbort = (): void => { + abortSignal.removeEventListener("abort", onAbort); + onAbortFn(new AbortError(StandardAbortMessage)); + }; + + abortSignal.addEventListener("abort", onAbort); + + return () => abortSignal.removeEventListener("abort", onAbort); +} diff --git a/sdk/servicebus/service-bus/test/abortSignal.spec.ts b/sdk/servicebus/service-bus/test/abortSignal.spec.ts deleted file mode 100644 index 518f6ada24c6..000000000000 --- a/sdk/servicebus/service-bus/test/abortSignal.spec.ts +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -chai.use(chaiAsPromised); -const assert = chai.assert; - -import { ClientEntityContext } from "../src/clientEntityContext"; -import { MessageSender } from "../src/core/messageSender"; -import { OperationOptions } from "../src/modelsToBeSharedWithEventHubs"; -import { DefaultDataTransformer } from "@azure/core-amqp"; -import { AbortSignalLike } from "@azure/abort-controller"; -import { delay, AwaitableSender } from "rhea-promise"; -import { ServiceBusMessageBatchImpl } from "../src/serviceBusMessageBatch"; - -describe("AbortSignal", () => { - const testMessageThatDoesntMatter = { - body: "doesn't matter" - }; - - describe("sender", () => { - let clientEntityContext: ReturnType; - - beforeEach(() => { - clientEntityContext = createClientEntityContextForTests(); - }); - - it("AbortSignal is plumbed through all send operations", async () => { - const sender = new MessageSender(clientEntityContext, {}); - - let passedInOptions: OperationOptions | undefined; - - sender["_trySend"] = async (buffer, sendBatch, options) => { - passedInOptions = options; - }; - - await sender.send(testMessageThatDoesntMatter, { - abortSignal: createTaggedAbortSignal("passed with send", false) - }); - - assert.equal((passedInOptions?.abortSignal as any).tag, "passed with send"); - - const batchMessage = new ServiceBusMessageBatchImpl(clientEntityContext, 1000); - await sender.sendBatch(batchMessage, { - abortSignal: createTaggedAbortSignal("passed with sendBatch", false) - }); - - assert.equal((passedInOptions?.abortSignal as any).tag, "passed with sendBatch"); - - await sender.sendMessages([testMessageThatDoesntMatter], { - abortSignal: createTaggedAbortSignal("passed with sendMessages", false) - }); - - assert.equal((passedInOptions?.abortSignal as any).tag, "passed with sendMessages"); - }); - - it("_trySend with an already aborted AbortSignal", async () => { - const sender = new MessageSender(clientEntityContext, { timeoutInMs: 1 }); - - sender["open"] = async () => { - throw new Error("INIT SHOULD NEVER HAVE BEEN CALLED"); - }; - - const abortSignal = createTaggedAbortSignal("_trySend test", true); - - try { - await sender["_trySend"]({} as Buffer, true, { - abortSignal - }); - assert.fail("AbortError should be thrown when the signal is already in an aborted state"); - } catch (err) { - assert.equal(err.message, "The send operation has been cancelled by the user."); - - // we aborted in the sync part of the abort check so these event listeners are never set up - assert.isFalse(abortSignal.addWasCalled); - assert.isFalse(abortSignal.removeWasCalled); - - // init() doesn't get called - we abort early on this one. - assert.isFalse(clientEntityContext.initWasCalled); - } - }); - - it("_trySend with a signal aborted while init() is still running", async () => { - const sender = new MessageSender(clientEntityContext, { - timeoutInMs: 1 - }); - sender["_retryOptions"].timeoutInMs = 1; - sender["_retryOptions"].maxRetries = 1; - sender["_retryOptions"].retryDelayInMs = 1; - - sender["_sender"] = { - credit: 999, - isOpen: () => false, - session: { - outgoing: { - available: () => true - } - } - } as AwaitableSender; - - let initWasCalled = true; - - sender["open"] = async () => { - initWasCalled = true; - // long enough to let the init timeout expiration code to run. - await delay(1000); - }; - - try { - await sender["_trySend"]({} as Buffer, true, { - abortSignal: createTaggedAbortSignal("not used for this test", false) - }); - assert.fail("Sender should have thrown in the async portion of the abort handling"); - } catch (err) { - // in this case init() does get called - we abort through a timer. - assert.isTrue(initWasCalled); - - assert.match( - err.message, - /.*was not able to send the message right now, due to operation timeout.*/ - ); - } - }); - }); -}); - -function createClientEntityContextForTests(): ClientEntityContext & { initWasCalled: boolean } { - let initWasCalled = false; - - const fakeClientEntityContext = { - entityPath: "queue", - sender: { - credit: 999 - }, - namespace: { - config: { endpoint: "my.service.bus" }, - connectionId: "connection-id", - dataTransformer: new DefaultDataTransformer(), - cbsSession: { - cbsLock: "cbs-lock", - async init() { - initWasCalled = true; - } - } - }, - initWasCalled - }; - - return (fakeClientEntityContext as any) as ReturnType; -} - -function createTaggedAbortSignal( - tag: string, - aborted: boolean -): AbortSignalLike & { tag: string; removeWasCalled: boolean; addWasCalled: boolean } { - const removeWasCalled = false; - let addWasCalled = false; - - const signal = { - aborted, - addEventListener(): void { - addWasCalled = true; - }, - removeEventListener(): void { - this.removeWasCalled = true; - }, - tag, - removeWasCalled, - addWasCalled - }; - - return signal; -} diff --git a/sdk/servicebus/service-bus/test/atomManagement.spec.ts b/sdk/servicebus/service-bus/test/atomManagement.spec.ts index debcffe42e80..c96a0139e74b 100644 --- a/sdk/servicebus/service-bus/test/atomManagement.spec.ts +++ b/sdk/servicebus/service-bus/test/atomManagement.spec.ts @@ -1,33 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { QueueOptions } from "../src/serializers/queueResourceSerializer"; -import { TopicOptions } from "../src/serializers/topicResourceSerializer"; -import { SubscriptionOptions } from "../src/serializers/subscriptionResourceSerializer"; -import { RuleOptions } from "../src/serializers/ruleResourceSerializer"; -import { EntityStatus } from "../src/util/utils"; -import { ServiceBusAtomManagementClient } from "../src/serviceBusAtomManagementClient"; - +import { isNode, parseConnectionString } from "@azure/core-amqp"; +import { DefaultAzureCredential } from "@azure/identity"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import chaiExclude from "chai-exclude"; +import * as dotenv from "dotenv"; +import { QueueDescription } from "../src/serializers/queueResourceSerializer"; +import { RuleDescription } from "../src/serializers/ruleResourceSerializer"; +import { SubscriptionDescription } from "../src/serializers/subscriptionResourceSerializer"; +import { TopicDescription } from "../src/serializers/topicResourceSerializer"; +import { ServiceBusManagementClient } from "../src/serviceBusAtomManagementClient"; +import { EntityStatus } from "../src/util/utils"; +import { EnvVarNames, getEnvVars } from "./utils/envVarUtils"; +import { recreateQueue, recreateSubscription, recreateTopic } from "./utils/managementUtils"; +import { EntityNames } from "./utils/testUtils"; + chai.use(chaiAsPromised); chai.use(chaiExclude); const should = chai.should(); const assert = chai.assert; -import * as dotenv from "dotenv"; dotenv.config(); -import { EnvVarNames, getEnvVars } from "./utils/envVarUtils"; const env = getEnvVars(); -import { EntityNames } from "./utils/testUtils"; - -import { parseConnectionString } from "@azure/core-amqp"; -import { recreateQueue, recreateTopic, recreateSubscription } from "./utils/managementUtils"; - -const serviceBusAtomManagementClient: ServiceBusAtomManagementClient = new ServiceBusAtomManagementClient( +const serviceBusAtomManagementClient: ServiceBusManagementClient = new ServiceBusManagementClient( env[EnvVarNames.SERVICEBUS_CONNECTION_STRING] ); @@ -55,6 +54,75 @@ const managementRule2 = EntityNames.MANAGEMENT_RULE_2; const newManagementEntity1 = EntityNames.MANAGEMENT_NEW_ENTITY_1; const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; +describe("Atom management - Namespace", function(): void { + it("Get namespace properties", async () => { + const namespaceProperties = await serviceBusAtomManagementClient.getNamespaceProperties(); + assert.deepEqualExcluding( + namespaceProperties, + { messagingSku: "Standard", namespaceType: "Messaging", messagingUnits: undefined } as any, + ["_response", "createdOn", "updatedOn", "name"] + ); + }); +}); + +describe("Atom management - Authentication", function(): void { + if (isNode) { + it("Token credential - DefaultAzureCredential from `@azure/identity`", async () => { + const endpoint = (parseConnectionString(env[EnvVarNames.SERVICEBUS_CONNECTION_STRING]) as any) + .Endpoint; + const host = endpoint.match(".*://([^/]*)")[1]; + + const serviceBusManagementClient = new ServiceBusManagementClient( + host, + new DefaultAzureCredential() + ); + + should.equal( + (await serviceBusManagementClient.createQueue(managementQueue1)).name, + managementQueue1, + "Unexpected queue name in the createQueue response" + ); + const createQueue2Response = await serviceBusManagementClient.createQueue({ + name: managementQueue2, + forwardTo: managementQueue1 + }); + should.equal( + createQueue2Response.name, + managementQueue2, + "Unexpected queue name in the createQueue response" + ); + should.equal( + createQueue2Response.forwardTo, + endpoint + managementQueue1, + "Unexpected name in the `forwardTo` field of createQueue response" + ); + const getQueueResponse = await serviceBusManagementClient.getQueue(managementQueue1); + should.equal( + getQueueResponse.name, + managementQueue1, + "Unexpected queue name in the getQueue response" + ); + should.equal( + (await serviceBusManagementClient.updateQueue(getQueueResponse)).name, + managementQueue1, + "Unexpected queue name in the updateQueue response" + ); + should.equal( + (await serviceBusManagementClient.getQueueRuntimeInfo(managementQueue1)).name, + managementQueue1, + "Unexpected queue name in the getQueueRuntimeInfo response" + ); + should.equal( + (await serviceBusManagementClient.getNamespaceProperties()).name, + host.match("(.*).servicebus.windows.net")[1], + "Unexpected namespace name in the getNamespaceProperties response" + ); + await serviceBusManagementClient.deleteQueue(managementQueue1); + await serviceBusManagementClient.deleteQueue(managementQueue2); + }); + } +}); + [EntityType.QUEUE, EntityType.TOPIC, EntityType.SUBSCRIPTION, EntityType.RULE].forEach( (entityType) => { describe(`Atom management - List on "${entityType}" entities`, function(): void { @@ -246,10 +314,327 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; managementSubscription1 ); should.equal( - response[testCase.entityType.toLowerCase() + "Name"], + response[testCase.entityType === EntityType.SUBSCRIPTION ? "subscriptionName" : "name"], + testCase.alwaysBeExistingEntity, + "Entity name mismatch" + ); + }); + }); +}); + +[ + { + entityType: EntityType.QUEUE, + alwaysBeExistingEntity: managementQueue1, + output: { + sizeInBytes: 0, + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + name: managementQueue1 + } + }, + { + entityType: EntityType.TOPIC, + alwaysBeExistingEntity: managementTopic1, + output: { + sizeInBytes: 0, + subscriptionCount: 0, + name: managementTopic1 + } + }, + { + entityType: EntityType.SUBSCRIPTION, + alwaysBeExistingEntity: managementSubscription1, + output: { + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + topicName: managementTopic1, + subscriptionName: managementSubscription1 + } + } +].forEach((testCase) => { + describe(`Atom management - Get runtime info on "${testCase.entityType}" entity`, function(): void { + beforeEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await recreateQueue(managementQueue1); + break; + + case EntityType.TOPIC: + await recreateTopic(managementTopic1); + break; + + case EntityType.SUBSCRIPTION: + await recreateTopic(managementTopic1); + await recreateSubscription(managementTopic1, managementSubscription1); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + afterEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await deleteEntity(EntityType.QUEUE, managementQueue1); + break; + + case EntityType.TOPIC: + case EntityType.SUBSCRIPTION: + await deleteEntity(EntityType.TOPIC, managementTopic1); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + it(`Gets runtime info for an existing ${testCase.entityType} entity(single) successfully`, async () => { + const response = await getEntityRuntimeInfo( + testCase.entityType, + testCase.alwaysBeExistingEntity, + managementTopic1 + ); + should.equal( + response[testCase.entityType === EntityType.SUBSCRIPTION ? "subscriptionName" : "name"], testCase.alwaysBeExistingEntity, "Entity name mismatch" ); + assert.deepEqualExcluding(response, testCase.output, [ + "_response", + "createdOn", + "updatedOn", + "accessedOn" + ]); + }); + }); +}); + +[ + { + entityType: EntityType.QUEUE, + 1: { + alwaysBeExistingEntity: managementQueue1, + output: { + sizeInBytes: 0, + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + name: managementQueue1 + } + }, + 2: { + alwaysBeExistingEntity: managementQueue2, + output: { + sizeInBytes: 0, + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + name: managementQueue2 + } + } + }, + { + entityType: EntityType.TOPIC, + 1: { + alwaysBeExistingEntity: managementTopic1, + output: { + sizeInBytes: 0, + subscriptionCount: 0, + name: managementTopic1 + } + }, + 2: { + alwaysBeExistingEntity: managementTopic2, + output: { + sizeInBytes: 0, + subscriptionCount: 0, + name: managementTopic2 + } + } + }, + { + entityType: EntityType.SUBSCRIPTION, + 1: { + alwaysBeExistingEntity: managementSubscription1, + output: { + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + topicName: managementTopic1, + subscriptionName: managementSubscription1 + } + }, + 2: { + alwaysBeExistingEntity: managementSubscription2, + output: { + messageCount: 0, + messageCountDetails: { + activeMessageCount: 0, + deadLetterMessageCount: 0, + scheduledMessageCount: 0, + transferMessageCount: 0, + transferDeadLetterMessageCount: 0 + }, + topicName: managementTopic1, + subscriptionName: managementSubscription2 + } + } + } +].forEach((testCase) => { + describe(`Atom management - Get runtime info on "${testCase.entityType}" entities`, function(): void { + beforeEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await recreateQueue(managementQueue1); + await recreateQueue(managementQueue2); + break; + + case EntityType.TOPIC: + await recreateTopic(managementTopic1); + await recreateTopic(managementTopic2); + break; + + case EntityType.SUBSCRIPTION: + await recreateTopic(managementTopic1); + await recreateSubscription(managementTopic1, managementSubscription1); + await recreateSubscription(managementTopic1, managementSubscription2); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + afterEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await deleteEntity(EntityType.QUEUE, managementQueue1); + await deleteEntity(EntityType.QUEUE, managementQueue2); + break; + + case EntityType.TOPIC: + await deleteEntity(EntityType.TOPIC, managementTopic1); + await deleteEntity(EntityType.TOPIC, managementTopic2); + break; + + case EntityType.SUBSCRIPTION: + await deleteEntity(EntityType.TOPIC, managementTopic1); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + it(`Gets runtime info for existing ${testCase.entityType} entities(multiple) successfully`, async () => { + const response = await getEntitiesRuntimeInfo(testCase.entityType, managementTopic1); + const name = testCase.entityType === EntityType.SUBSCRIPTION ? "subscriptionName" : "name"; + const paramsToExclude = ["createdOn", "accessedOn", "updatedOn"]; + for (const info of response) { + if (info[name] == testCase[1].alwaysBeExistingEntity) { + assert.deepEqualExcluding(info, testCase[1].output, paramsToExclude); + } else if (info[name] == testCase[2].alwaysBeExistingEntity) { + assert.deepEqualExcluding(info, testCase[2].output, paramsToExclude); + } + } + }); + }); +}); + +[ + { + entityType: EntityType.QUEUE, + alwaysBeExistingEntity: managementQueue1 + }, + { + entityType: EntityType.TOPIC, + alwaysBeExistingEntity: managementTopic1 + }, + { + entityType: EntityType.SUBSCRIPTION, + alwaysBeExistingEntity: managementSubscription1 + } +].forEach((testCase) => { + describe(`Atom management - "${testCase.entityType}" exists`, function(): void { + beforeEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await recreateQueue(managementQueue1); + break; + + case EntityType.TOPIC: + await recreateTopic(managementTopic1); + break; + + case EntityType.SUBSCRIPTION: + await recreateTopic(managementTopic1); + await recreateSubscription(managementTopic1, managementSubscription1); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + afterEach(async () => { + switch (testCase.entityType) { + case EntityType.QUEUE: + await deleteEntity(EntityType.QUEUE, managementQueue1); + break; + + case EntityType.TOPIC: + case EntityType.SUBSCRIPTION: + await deleteEntity(EntityType.TOPIC, managementTopic1); + break; + + default: + throw new Error("TestError: Unrecognized EntityType"); + } + }); + + it(`Returns true for an existing ${testCase.entityType} entity`, async () => { + should.equal( + await entityExists(testCase.entityType, testCase.alwaysBeExistingEntity, managementTopic1), + true, + "Returned `false` for an existing entity" + ); + }); + + it(`Returns false for a non-existing ${testCase.entityType} entity`, async () => { + should.equal( + await entityExists(testCase.entityType, "non-existing-entity-name", managementTopic1), + false, + "Returned `true` for a non-existing entity" + ); }); }); }); @@ -328,7 +713,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; managementSubscription1 ); should.equal( - response[testCase.entityType.toLowerCase() + "Name"], + response[testCase.entityType === EntityType.SUBSCRIPTION ? "subscriptionName" : "name"], testCase.alwaysBeExistingEntity, "Entity name mismatch" ); @@ -543,7 +928,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; ); should.equal( - response[entityType.toLowerCase() + "Name"], + response[entityType === EntityType.SUBSCRIPTION ? "subscriptionName" : "name"], newManagementEntity2, "Entity name mismatch" ); @@ -657,27 +1042,16 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; output: { authorizationRules: undefined, autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", - messageCountDetails: undefined, defaultMessageTtl: "P10675199DT2H48M5.4775807S", duplicateDetectionHistoryTimeWindow: "PT10M", enableBatchedOperations: true, - enableExpress: false, enablePartitioning: false, - enableSubscriptionPartitioning: false, - entityAvailabilityStatus: "Available", - filteringMessagesBeforePublishing: false, - isAnonymousAccessible: false, - isExpress: undefined, - maxDeliveryCount: undefined, maxSizeInMegabytes: 1024, - messageCount: undefined, userMetadata: undefined, requiresDuplicateDetection: false, - sizeInBytes: 0, status: "Active", - subscriptionCount: undefined, supportOrdering: true, - topicName: managementTopic1 + name: managementTopic1 } }, { @@ -700,23 +1074,12 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; enableBatchedOperations: false, supportOrdering: false, requiresDuplicateDetection: true, - sizeInBytes: 0, - messageCount: undefined, - subscriptionCount: undefined, - maxDeliveryCount: undefined, enablePartitioning: true, maxSizeInMegabytes: 16384, autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", - enableExpress: false, authorizationRules: undefined, userMetadata: "test metadata", - isExpress: undefined, - enableSubscriptionPartitioning: false, - filteringMessagesBeforePublishing: false, - messageCountDetails: undefined, - entityAvailabilityStatus: "Available", - isAnonymousAccessible: false, - topicName: managementTopic1 + name: managementTopic1 } } ].forEach((testCase) => { @@ -735,7 +1098,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; testCase.input ); - should.equal(response.topicName, managementTopic1, "Topic name mismatch"); + should.equal(response.name, managementTopic1, "Topic name mismatch"); assert.deepEqualExcluding(response, testCase.output, [ "_response", "createdOn", @@ -753,7 +1116,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; input: undefined, output: { autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", - messageCountDetails: undefined, deadLetteringOnMessageExpiration: false, deadLetteringOnFilterEvaluationExceptions: true, defaultMessageTtl: "P10675199DT2H48M5.4775807S", @@ -761,15 +1123,9 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; enableBatchedOperations: true, forwardTo: undefined, userMetadata: undefined, - defaultRuleDescription: undefined, - enablePartitioning: undefined, - entityAvailabilityStatus: "Available", lockDuration: "PT1M", maxDeliveryCount: 10, - maxSizeInMegabytes: undefined, - messageCount: 0, requiresSession: false, - sizeInBytes: undefined, status: "Active", subscriptionName: managementSubscription1, topicName: managementTopic1 @@ -800,17 +1156,8 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; requiresSession: true, forwardDeadLetteredMessagesTo: undefined, - defaultRuleDescription: undefined, - - messageCount: 0, - enablePartitioning: undefined, - maxSizeInMegabytes: undefined, - sizeInBytes: undefined, - forwardTo: undefined, userMetadata: "test metadata", - messageCountDetails: undefined, - entityAvailabilityStatus: "Available", status: "ReceiveDisabled", subscriptionName: managementSubscription1, @@ -948,26 +1295,19 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; output: { authorizationRules: undefined, autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", - messageCountDetails: undefined, deadLetteringOnMessageExpiration: false, defaultMessageTtl: "P10675199DT2H48M5.4775807S", duplicateDetectionHistoryTimeWindow: "PT10M", enableBatchedOperations: true, - enableExpress: false, enablePartitioning: false, - entityAvailabilityStatus: "Available", forwardDeadLetteredMessagesTo: undefined, - isAnonymousAccessible: false, lockDuration: "PT1M", maxDeliveryCount: 10, maxSizeInMegabytes: 1024, - messageCount: 0, - queueName: managementQueue1, + name: managementQueue1, requiresDuplicateDetection: false, requiresSession: false, - sizeInBytes: 0, status: "Active", - supportOrdering: true, forwardTo: undefined, userMetadata: undefined } @@ -1013,8 +1353,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; output: { duplicateDetectionHistoryTimeWindow: "PT1M", lockDuration: "PT45S", - messageCount: 0, - sizeInBytes: 0, defaultMessageTtl: "P2D", deadLetteringOnMessageExpiration: true, enableBatchedOperations: false, @@ -1047,18 +1385,12 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; enablePartitioning: true, maxSizeInMegabytes: 16384, - supportOrdering: false, - forwardDeadLetteredMessagesTo: undefined, forwardTo: undefined, userMetadata: "test metadata", - messageCountDetails: undefined, - enableExpress: false, - entityAvailabilityStatus: "Available", - isAnonymousAccessible: false, status: "ReceiveDisabled", - queueName: managementQueue1 + name: managementQueue1 } } ].forEach((testCase) => { @@ -1077,7 +1409,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; testCase.input ); - should.equal(response.queueName, managementQueue1, "Queue name mismatch"); + should.equal(response.name, managementQueue1, "Queue name mismatch"); assert.deepEqualExcluding(response, testCase.output, [ "_response", @@ -1162,9 +1494,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; compatibilityLevel: undefined }, - ruleName: managementRule1, - subscriptionName: managementSubscription1, - topicName: managementTopic1 + name: managementRule1 } }, { @@ -1196,9 +1526,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; compatibilityLevel: 20 }, - ruleName: managementRule1, - subscriptionName: managementSubscription1, - topicName: managementTopic1 + name: managementRule1 } }, { @@ -1228,9 +1556,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; compatibilityLevel: 20 }, - ruleName: managementRule1, - subscriptionName: managementSubscription1, - topicName: managementTopic1 + name: managementRule1 } } ].forEach((testCase) => { @@ -1256,7 +1582,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; testCase.input ); - should.equal(response.ruleName, managementRule1, "Rule name mismatch"); + should.equal(response.name, managementRule1, "Rule name mismatch"); assert.deepEqualExcluding(response, testCase.output, [ "_response", "createdOn", @@ -1269,13 +1595,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; // Queue tests [ - { - testCaseTitle: "Undefined queue options", - input: undefined, - output: { - testErrorMessage: `Parameter "queueOptions" must be an object of type "QueueOptions" and cannot be undefined or null.` - } - }, { testCaseTitle: "all properties except forwardTo, forwardDeadLetteredMessagesTo", input: { @@ -1315,12 +1634,9 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; output: { duplicateDetectionHistoryTimeWindow: "PT2M", lockDuration: "PT50S", - messageCount: undefined, - sizeInBytes: undefined, defaultMessageTtl: "P1D", deadLetteringOnMessageExpiration: true, enableBatchedOperations: false, - requiresDuplicateDetection: true, requiresSession: true, authorizationRules: [ @@ -1345,24 +1661,15 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; secondaryKey: "UreXLPWiP6Murmsq2HYiIXs23qAvWa36ZOL3gb9rXLs=" } ], - maxDeliveryCount: 5, maxSizeInMegabytes: 16384, - autoDeleteOnIdle: "PT2H", forwardDeadLetteredMessagesTo: undefined, forwardTo: undefined, userMetadata: "test metadata", - - messageCountDetails: undefined, - - enableExpress: undefined, - entityAvailabilityStatus: undefined, - isAnonymousAccessible: undefined, - supportOrdering: undefined, status: "ReceiveDisabled", enablePartitioning: true, - queueName: managementQueue1 + name: managementQueue1 } } ].forEach((testCase) => { @@ -1490,7 +1797,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; isAnonymousAccessible: undefined, supportOrdering: undefined, enablePartitioning: true, - queueName: managementQueue1 + name: managementQueue1 } }, { @@ -1541,13 +1848,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; // Topic tests [ - { - testCaseTitle: "Undefined topic options", - input: undefined, - output: { - testErrorMessage: `Parameter "topicOptions" must be an object of type "TopicOptions" and cannot be undefined or null.` - } - }, { topicName: managementTopic1, testCaseTitle: "all properties", @@ -1562,10 +1862,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; maxSizeInMegabytes: 3072 }, output: { - maxDeliveryCount: undefined, - subscriptionCount: undefined, - sizeInBytes: undefined, - messageCount: undefined, requiresDuplicateDetection: false, defaultMessageTtl: "P1D", duplicateDetectionHistoryTimeWindow: "PT2M", @@ -1575,16 +1871,9 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; enableBatchedOperations: true, enablePartitioning: false, authorizationRules: undefined, - isExpress: undefined, - enableSubscriptionPartitioning: undefined, - filteringMessagesBeforePublishing: undefined, - enableExpress: undefined, - entityAvailabilityStatus: undefined, - isAnonymousAccessible: undefined, status: "SendDisabled", userMetadata: "test metadata", - messageCountDetails: undefined, - topicName: managementTopic1 + name: managementTopic1 } } ].forEach((testCase) => { @@ -1623,13 +1912,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; // Subscription tests [ - { - testCaseTitle: "Undefined subscription options", - input: undefined, - output: { - testErrorMessage: `Parameter "subscriptionOptions" must be an object of type "SubscriptionOptions" and cannot be undefined or null.` - } - }, { testCaseTitle: "all properties except forwardTo, forwardDeadLetteredMessagesTo", input: { @@ -1652,23 +1934,11 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; deadLetteringOnFilterEvaluationExceptions: true, deadLetteringOnMessageExpiration: false, enableBatchedOperations: true, - forwardDeadLetteredMessagesTo: undefined, forwardTo: undefined, - defaultRuleDescription: undefined, - - messageCount: 0, - maxSizeInMegabytes: undefined, - sizeInBytes: undefined, - requiresSession: false, - enablePartitioning: undefined, - userMetadata: "test metadata", - messageCountDetails: undefined, - entityAvailabilityStatus: "Available", status: "ReceiveDisabled", - subscriptionName: managementSubscription1, topicName: managementTopic1 } @@ -1776,13 +2046,6 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; // Rule tests [ - { - testCaseTitle: "Undefined rule options", - input: undefined, - output: { - testErrorMessage: `Parameter "ruleOptions" must be an object of type "RuleOptions" and cannot be undefined or null.` - } - }, { testCaseTitle: "Sql Filter rule options", input: { @@ -1806,9 +2069,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; compatibilityLevel: 20 }, - ruleName: managementRule1, - subscriptionName: managementSubscription1, - topicName: managementTopic1 + name: managementRule1 } }, { @@ -1838,9 +2099,7 @@ const newManagementEntity2 = EntityNames.MANAGEMENT_NEW_ENTITY_2; compatibilityLevel: 20 }, - ruleName: managementRule1, - subscriptionName: managementSubscription1, - topicName: managementTopic1 + name: managementRule1 } } ].forEach((testCase) => { @@ -1919,10 +2178,10 @@ async function createEntity( topicPath?: string, subscriptionPath?: string, overrideOptions?: boolean, // If this is false, then the default options will be populated as used for basic testing. - queueOptions?: QueueOptions, - topicOptions?: TopicOptions, - subscriptionOptions?: SubscriptionOptions, - ruleOptions?: RuleOptions + queueOptions?: Omit, + topicOptions?: Omit, + subscriptionOptions?: Omit, + ruleOptions?: Omit ): Promise { if (!overrideOptions) { if (queueOptions == undefined) { @@ -1971,16 +2230,16 @@ async function createEntity( switch (testEntityType) { case EntityType.QUEUE: - const queueResponse = await serviceBusAtomManagementClient.createQueue( - entityPath, - queueOptions - ); + const queueResponse = await serviceBusAtomManagementClient.createQueue({ + name: entityPath, + ...queueOptions + }); return queueResponse; case EntityType.TOPIC: - const topicResponse = await serviceBusAtomManagementClient.createTopic( - entityPath, - topicOptions - ); + const topicResponse = await serviceBusAtomManagementClient.createTopic({ + name: entityPath, + ...topicOptions + }); return topicResponse; case EntityType.SUBSCRIPTION: if (!topicPath) { @@ -1988,11 +2247,11 @@ async function createEntity( "TestError: Topic path must be passed when invoking tests on subscriptions" ); } - const subscriptionResponse = await serviceBusAtomManagementClient.createSubscription( - topicPath, - entityPath, - subscriptionOptions - ); + const subscriptionResponse = await serviceBusAtomManagementClient.createSubscription({ + topicName: topicPath, + subscriptionName: entityPath, + ...subscriptionOptions + }); return subscriptionResponse; case EntityType.RULE: if (!topicPath || !subscriptionPath) { @@ -2003,8 +2262,7 @@ async function createEntity( const ruleResponse = await serviceBusAtomManagementClient.createRule( topicPath, subscriptionPath, - entityPath, - ruleOptions + { name: entityPath, ...ruleOptions } ); return ruleResponse; } @@ -2019,10 +2277,10 @@ async function getEntity( ): Promise { switch (testEntityType) { case EntityType.QUEUE: - const queueResponse = await serviceBusAtomManagementClient.getQueueDetails(entityPath); + const queueResponse = await serviceBusAtomManagementClient.getQueue(entityPath); return queueResponse; case EntityType.TOPIC: - const topicResponse = await serviceBusAtomManagementClient.getTopicDetails(entityPath); + const topicResponse = await serviceBusAtomManagementClient.getTopic(entityPath); return topicResponse; case EntityType.SUBSCRIPTION: if (!topicPath) { @@ -2030,7 +2288,7 @@ async function getEntity( "TestError: Topic path must be passed when invoking tests on subscriptions" ); } - const subscriptionResponse = await serviceBusAtomManagementClient.getSubscriptionDetails( + const subscriptionResponse = await serviceBusAtomManagementClient.getSubscription( topicPath, entityPath ); @@ -2041,7 +2299,7 @@ async function getEntity( "TestError: Topic path AND subscription path must be passed when invoking tests on rules" ); } - const ruleResponse = await serviceBusAtomManagementClient.getRuleDetails( + const ruleResponse = await serviceBusAtomManagementClient.getRule( topicPath, subscriptionPath, entityPath @@ -2051,16 +2309,95 @@ async function getEntity( throw new Error("TestError: Unrecognized EntityType"); } +async function getEntityRuntimeInfo( + testEntityType: EntityType, + entityPath: string, + topicPath?: string +): Promise { + switch (testEntityType) { + case EntityType.QUEUE: + const queueResponse = await serviceBusAtomManagementClient.getQueueRuntimeInfo(entityPath); + return queueResponse; + case EntityType.TOPIC: + const topicResponse = await serviceBusAtomManagementClient.getTopicRuntimeInfo(entityPath); + return topicResponse; + case EntityType.SUBSCRIPTION: + if (!topicPath) { + throw new Error( + "TestError: Topic path must be passed when invoking tests on subscriptions" + ); + } + const subscriptionResponse = await serviceBusAtomManagementClient.getSubscriptionRuntimeInfo( + topicPath, + entityPath + ); + return subscriptionResponse; + } + throw new Error("TestError: Unrecognized EntityType"); +} + +async function getEntitiesRuntimeInfo( + testEntityType: EntityType, + topicPath?: string +): Promise { + switch (testEntityType) { + case EntityType.QUEUE: + const queueResponse = await serviceBusAtomManagementClient.getQueuesRuntimeInfo(); + return queueResponse; + case EntityType.TOPIC: + const topicResponse = await serviceBusAtomManagementClient.getTopicsRuntimeInfo(); + return topicResponse; + case EntityType.SUBSCRIPTION: + if (!topicPath) { + throw new Error( + "TestError: Topic path must be passed when invoking tests on subscriptions" + ); + } + const subscriptionResponse = await serviceBusAtomManagementClient.getSubscriptionsRuntimeInfo( + topicPath + ); + return subscriptionResponse; + } + throw new Error("TestError: Unrecognized EntityType"); +} + +async function entityExists( + testEntityType: EntityType, + entityPath: string, + topicPath?: string +): Promise { + switch (testEntityType) { + case EntityType.QUEUE: + const queueResponse = await serviceBusAtomManagementClient.queueExists(entityPath); + return queueResponse; + case EntityType.TOPIC: + const topicResponse = await serviceBusAtomManagementClient.topicExists(entityPath); + return topicResponse; + case EntityType.SUBSCRIPTION: + if (!topicPath) { + throw new Error( + "TestError: Topic path must be passed when invoking tests on subscriptions" + ); + } + const subscriptionResponse = await serviceBusAtomManagementClient.subscriptionExists( + topicPath, + entityPath + ); + return subscriptionResponse; + } + throw new Error("TestError: Unrecognized EntityType"); +} + async function updateEntity( testEntityType: EntityType, entityPath: string, topicPath?: string, subscriptionPath?: string, overrideOptions?: boolean, // If this is false, then the default options will be populated as used for basic testing. - queueOptions?: QueueOptions, - topicOptions?: TopicOptions, - subscriptionOptions?: SubscriptionOptions, - ruleOptions?: RuleOptions + queueOptions?: Omit, + topicOptions?: Omit, + subscriptionOptions?: Omit, + ruleOptions?: Omit ): Promise { if (!overrideOptions) { if (queueOptions == undefined) { @@ -2109,18 +2446,16 @@ async function updateEntity( switch (testEntityType) { case EntityType.QUEUE: - const queueResponse = await serviceBusAtomManagementClient.updateQueue( - entityPath, - // @ts-ignore - queueOptions - ); + const queueResponse = await serviceBusAtomManagementClient.updateQueue({ + name: entityPath, + ...queueOptions + }); return queueResponse; case EntityType.TOPIC: - const topicResponse = await serviceBusAtomManagementClient.updateTopic( - entityPath, - // @ts-ignore - topicOptions - ); + const topicResponse = await serviceBusAtomManagementClient.updateTopic({ + name: entityPath, + ...topicOptions + }); return topicResponse; case EntityType.SUBSCRIPTION: if (!topicPath) { @@ -2128,12 +2463,11 @@ async function updateEntity( "TestError: Topic path must be passed when invoking tests on subscriptions" ); } - const subscriptionResponse = await serviceBusAtomManagementClient.updateSubscription( - topicPath, - entityPath, - // @ts-ignore - subscriptionOptions - ); + const subscriptionResponse = await serviceBusAtomManagementClient.updateSubscription({ + topicName: topicPath, + subscriptionName: entityPath, + ...subscriptionOptions + }); return subscriptionResponse; case EntityType.RULE: if (!topicPath || !subscriptionPath) { @@ -2144,9 +2478,10 @@ async function updateEntity( const ruleResponse = await serviceBusAtomManagementClient.updateRule( topicPath, subscriptionPath, - entityPath, - // @ts-ignore - ruleOptions + { + name: entityPath, + ...ruleOptions + } ); return ruleResponse; } @@ -2202,13 +2537,13 @@ async function listEntities( ): Promise { switch (testEntityType) { case EntityType.QUEUE: - const queueResponse = await serviceBusAtomManagementClient.listQueues({ + const queueResponse = await serviceBusAtomManagementClient.getQueues({ skip: skip, top: top }); return queueResponse; case EntityType.TOPIC: - const topicResponse = await serviceBusAtomManagementClient.listTopics({ + const topicResponse = await serviceBusAtomManagementClient.getTopics({ skip: skip, top: top }); @@ -2219,7 +2554,7 @@ async function listEntities( "TestError: Topic path must be passed when invoking tests on subscriptions" ); } - const subscriptionResponse = await serviceBusAtomManagementClient.listSubscriptions( + const subscriptionResponse = await serviceBusAtomManagementClient.getSubscriptions( topicPath, { skip: skip, top: top } ); @@ -2230,7 +2565,7 @@ async function listEntities( "TestError: Topic path AND subscription path must be passed when invoking tests on rules" ); } - const ruleResponse = await serviceBusAtomManagementClient.listRules( + const ruleResponse = await serviceBusAtomManagementClient.getRules( topicPath, subscriptionPath, { skip: skip, top: top } diff --git a/sdk/servicebus/service-bus/test/atomXml.spec.ts b/sdk/servicebus/service-bus/test/atomXml.spec.ts index a7fa094fc350..bf5b38cec6a8 100644 --- a/sdk/servicebus/service-bus/test/atomXml.spec.ts +++ b/sdk/servicebus/service-bus/test/atomXml.spec.ts @@ -10,14 +10,14 @@ chai.use(chaiAsPromised); const assert = chai.assert; import { - executeAtomXmlOperation, AtomXmlSerializer, - deserializeAtomXmlResponse + deserializeAtomXmlResponse, + executeAtomXmlOperation } from "../src/util/atomXmlHelper"; import * as Constants from "../src/util/constants"; -import { ServiceBusAtomManagementClient } from "../src/serviceBusAtomManagementClient"; +import { ServiceBusManagementClient } from "../src/serviceBusAtomManagementClient"; import { QueueResourceSerializer } from "../src/serializers/queueResourceSerializer"; -import { HttpOperationResponse, WebResource, HttpHeaders } from "@azure/core-http"; +import { HttpHeaders, HttpOperationResponse, WebResource } from "@azure/core-http"; import { TopicResourceSerializer } from "../src/serializers/topicResourceSerializer"; import { SubscriptionResourceSerializer } from "../src/serializers/subscriptionResourceSerializer"; import { RuleResourceSerializer } from "../src/serializers/ruleResourceSerializer"; @@ -71,8 +71,8 @@ const subscriptionProperties = [ const ruleProperties = ["Filter", "Action", "Name"]; -const mockServiceBusAtomManagementClient: ServiceBusAtomManagementClient = new ServiceBusAtomManagementClient( - "Endpoint=test/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=test" +const mockServiceBusAtomManagementClient: ServiceBusManagementClient = new ServiceBusManagementClient( + "Endpoint=sb://test/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=test" ); describe("atomSerializationPolicy", function() { @@ -595,7 +595,10 @@ class MockSerializer implements AtomXmlSerializer { }; }; try { - await mockServiceBusAtomManagementClient.createQueue("test", testCase.input as any); + await mockServiceBusAtomManagementClient.createQueue({ + queueName: "test", + ...(testCase.input as any) + }); assert.fail("Error must be thrown"); } catch (err) { assert.equal( @@ -751,7 +754,10 @@ class MockSerializer implements AtomXmlSerializer { return response; }; try { - await mockServiceBusAtomManagementClient.createQueue("test", testCase.input as any); + await mockServiceBusAtomManagementClient.createQueue({ + queueName: "test", + ...(testCase.input as any) + }); assert.fail("Error must be thrown"); } catch (err) { assert.equal(err.code, testCase.output.errorCode, `Unexpected error code found.`); @@ -889,7 +895,10 @@ class MockSerializer implements AtomXmlSerializer { }; try { - await mockServiceBusAtomManagementClient.createQueue("test", testCase as any); + await mockServiceBusAtomManagementClient.createQueue({ + queueName: "test", + ...(testCase as any) + }); assert.fail("Error must be thrown"); } catch (err) { assert.equal(err.code, testCase.errorCode, `Unexpected error code found.`); @@ -932,7 +941,7 @@ describe(`Parse empty response for list() requests to return as empty array`, fu headers: new HttpHeaders({}) }; }; - const result = await mockServiceBusAtomManagementClient.listQueues(); + const result = await mockServiceBusAtomManagementClient.getQueues(); assertEmptyArray(result); }); @@ -945,7 +954,7 @@ describe(`Parse empty response for list() requests to return as empty array`, fu headers: new HttpHeaders({}) }; }; - const result = await mockServiceBusAtomManagementClient.listTopics(); + const result = await mockServiceBusAtomManagementClient.getTopics(); assertEmptyArray(result); }); @@ -958,7 +967,7 @@ describe(`Parse empty response for list() requests to return as empty array`, fu headers: new HttpHeaders({}) }; }; - const result = await mockServiceBusAtomManagementClient.listSubscriptions("testTopic"); + const result = await mockServiceBusAtomManagementClient.getSubscriptions("testTopic"); assertEmptyArray(result); }); @@ -971,7 +980,7 @@ describe(`Parse empty response for list() requests to return as empty array`, fu headers: new HttpHeaders({}) }; }; - const result = await mockServiceBusAtomManagementClient.listRules( + const result = await mockServiceBusAtomManagementClient.getRules( "testTopic", "testSubscription" ); diff --git a/sdk/servicebus/service-bus/test/backupMessageSettlement.spec.ts b/sdk/servicebus/service-bus/test/backupMessageSettlement.spec.ts index 2d0009462485..d9c298435fe6 100644 --- a/sdk/servicebus/service-bus/test/backupMessageSettlement.spec.ts +++ b/sdk/servicebus/service-bus/test/backupMessageSettlement.spec.ts @@ -8,12 +8,12 @@ import { TestClientType, TestMessage } from "./utils/testUtils"; import { Receiver } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; import { - createServiceBusClientForTests, + EntityName, ServiceBusClientForTests, - testPeekMsgsLength, - EntityName + createServiceBusClientForTests, + testPeekMsgsLength } from "./utils/testutils2"; -import { ReceivedMessageWithLock, DispositionType } from "../src/serviceBusMessage"; +import { DispositionType, ReceivedMessageWithLock } from "../src/serviceBusMessage"; const should = chai.should(); chai.use(chaiAsPromised); @@ -39,7 +39,7 @@ describe("Backup message settlement - Through ManagementLink", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); deadLetterReceiver = serviceBusClient.test.createDeadLetterReceiver(entityNames); diff --git a/sdk/servicebus/service-bus/test/batchReceiver.spec.ts b/sdk/servicebus/service-bus/test/batchReceiver.spec.ts index dbbfa7a2f1f1..3b8066dcb047 100644 --- a/sdk/servicebus/service-bus/test/batchReceiver.spec.ts +++ b/sdk/servicebus/service-bus/test/batchReceiver.spec.ts @@ -4,17 +4,17 @@ import chai from "chai"; import Long from "long"; import chaiAsPromised from "chai-as-promised"; -import { delay, ServiceBusMessage } from "../src"; +import { ServiceBusMessage, delay } from "../src"; import { getAlreadyReceivingErrorMsg } from "../src/util/errors"; import { TestClientType, TestMessage } from "./utils/testUtils"; import { Receiver, ReceiverImpl } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; import { - createServiceBusClientForTests, ServiceBusClientForTests, + createServiceBusClientForTests, testPeekMsgsLength } from "./utils/testutils2"; -import { ReceivedMessageWithLock, ReceivedMessage } from "../src/serviceBusMessage"; +import { ReceivedMessage, ReceivedMessageWithLock } from "../src/serviceBusMessage"; import { AbortController } from "@azure/abort-controller"; import { isNode } from "@azure/core-amqp"; import { ReceiverEvents } from "rhea-promise"; @@ -44,7 +44,7 @@ describe("batchReceiver", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); deadLetterReceiver = serviceBusClient.test.createDeadLetterReceiver(entityNames); @@ -1033,7 +1033,7 @@ describe("Batching - disconnects", function(): void { } sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } diff --git a/sdk/servicebus/service-bus/test/connectionManagement.spec.ts b/sdk/servicebus/service-bus/test/connectionManagement.spec.ts index 8f553cb63c6d..68de4fc3c996 100644 --- a/sdk/servicebus/service-bus/test/connectionManagement.spec.ts +++ b/sdk/servicebus/service-bus/test/connectionManagement.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -5,13 +8,12 @@ import chai from "chai"; const assert = chai.assert; import chaiAsPromised from "chai-as-promised"; import { delay } from "../src"; -import { createServiceBusClientForTests, ServiceBusClientForTests } from "./utils/testutils2"; +import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { defaultLock } from "@azure/core-amqp"; import { TestClientType } from "./utils/testUtils"; import { SenderImpl } from "../src/sender"; import { AbortController } from "@azure/abort-controller"; -const should = chai.should(); chai.use(chaiAsPromised); describe("controlled connection initialization", () => { @@ -34,7 +36,7 @@ describe("controlled connection initialization", () => { // casting because I need access to 'open' and the return type of createSender() is an // interface. - sender = (await serviceBusClient.createSender(queue!)) as SenderImpl; + sender = serviceBusClient.createSender(queue!) as SenderImpl; senderEntityPath = queue!; }); @@ -44,12 +46,9 @@ describe("controlled connection initialization", () => { await serviceBusClient.test.after(); }); - it("createSender() is no longer lazy", async () => { - assert.isTrue(sender["_context"].sender?.isOpen()); - await checkThatInitializationDoesntReoccur(sender); - }); - it("open() early exits if the connection is already open (avoid taking unnecessary lock)", async () => { + await sender.open(); + // open uses a lock (at the sender level) that helps us not to have overlapping open() calls. await defaultLock.acquire(sender["_context"]!.sender!["openLock"], async () => { // the connection is _already_ open so it doesn't attempt to take a lock @@ -123,41 +122,3 @@ function delayThatReturns999(): Promise | Promise { const ac = new AbortController(); return delay(1000, ac.signal, "ignored", 999); } - -/** - * Checks that calling open() on the sender at this point doesn't reopen it - * NOTE: this does change the underlying sender so you won't be able to use it - * again afterwards. - */ -async function checkThatInitializationDoesntReoccur(sender: SenderImpl) { - // make sure the private details haven't shifted out from underneath me. - should.exist(sender["_context"].sender!["_negotiateClaim"]); - assert.isTrue(sender["_context"].sender!["isOpen"](), "The connection is actually open()"); - - // stub out the `MessageSender` methods that handle initializing the - // connection - now that everything is up we should always see that it - // takes the "early exit" path when it sees that the connection is open - let negotiateClaimWasCalled = false; - - // now we'll just fake the rest - let isOpenWasCalled = false; - - sender["_context"].sender!["isOpen"] = () => { - isOpenWasCalled = true; - return true; - }; - - sender["_context"].sender!["_negotiateClaim"] = async () => { - negotiateClaimWasCalled = true; - }; - - await sender.send({ - body: "sending another message just to prove the connection checks work" - }); - - assert.isTrue(isOpenWasCalled, "we should have checked that the connection was open"); - assert.isFalse( - negotiateClaimWasCalled, - "we should NOT have tried to _negotiateClaim since the connection was open" - ); -} diff --git a/sdk/servicebus/service-bus/test/deferredMessage.spec.ts b/sdk/servicebus/service-bus/test/deferredMessage.spec.ts index 0d3160fc232b..cd5f1fcb1ff6 100644 --- a/sdk/servicebus/service-bus/test/deferredMessage.spec.ts +++ b/sdk/servicebus/service-bus/test/deferredMessage.spec.ts @@ -6,8 +6,8 @@ const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); import { ServiceBusMessage } from "../src"; -import { TestMessage, TestClientType } from "./utils/testUtils"; -import { testPeekMsgsLength, createServiceBusClientForTests } from "./utils/testutils2"; +import { TestClientType, TestMessage } from "./utils/testUtils"; +import { createServiceBusClientForTests, testPeekMsgsLength } from "./utils/testutils2"; import { Receiver } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; import { ReceivedMessageWithLock } from "../src/serviceBusMessage"; @@ -32,7 +32,7 @@ describe("deferred messages", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); deadLetterReceiver = serviceBusClient.test.createDeadLetterReceiver(entityNames); diff --git a/sdk/servicebus/service-bus/test/internal/abortSignal.spec.ts b/sdk/servicebus/service-bus/test/internal/abortSignal.spec.ts new file mode 100644 index 000000000000..6f5f0edc5553 --- /dev/null +++ b/sdk/servicebus/service-bus/test/internal/abortSignal.spec.ts @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +const assert = chai.assert; + +import { MessageSender } from "../../src/core/messageSender"; +import { OperationOptions } from "../../src/modelsToBeSharedWithEventHubs"; +import { AwaitableSender, delay } from "rhea-promise"; +import { ServiceBusMessageBatchImpl } from "../../src/serviceBusMessageBatch"; +import { MessageReceiver, ReceiverType } from "../../src/core/messageReceiver"; +import { + createAbortSignalForTest, + createCountdownAbortSignal +} from "../utils/abortSignalTestUtils"; +import { createClientEntityContextForTests } from "./unittestUtils"; +import { StandardAbortMessage } from "../../src/util/utils"; + +describe("AbortSignal", () => { + const testMessageThatDoesntMatter = { + body: "doesn't matter" + }; + + describe("sender", () => { + let clientEntityContext: ReturnType; + + beforeEach(() => { + clientEntityContext = createClientEntityContextForTests(); + }); + + it("AbortSignal is plumbed through all send operations", async () => { + const sender = new MessageSender(clientEntityContext, {}); + + let passedInOptions: OperationOptions | undefined; + + sender["_trySend"] = async (_buffer, _sendBatch, options) => { + passedInOptions = options; + }; + + let abortSignal = createAbortSignalForTest(false); + + await sender.send(testMessageThatDoesntMatter, { + abortSignal + }); + + assert.equal(passedInOptions?.abortSignal, abortSignal); + + abortSignal = createAbortSignalForTest(false); + + const batchMessage = new ServiceBusMessageBatchImpl(clientEntityContext, 1000); + await sender.sendBatch(batchMessage, { + abortSignal + }); + + assert.equal(passedInOptions?.abortSignal, abortSignal); + + await sender.sendMessages([testMessageThatDoesntMatter], { + abortSignal + }); + + assert.equal(passedInOptions?.abortSignal, abortSignal); + }); + + it("_trySend with an already aborted AbortSignal", async () => { + const sender = new MessageSender(clientEntityContext, { timeoutInMs: 1 }); + + sender["open"] = async () => { + throw new Error("INIT SHOULD NEVER HAVE BEEN CALLED"); + }; + + const abortSignal = createAbortSignalForTest(true); + + try { + await sender["_trySend"]({} as Buffer, true, { + abortSignal + }); + assert.fail("AbortError should be thrown when the signal is already in an aborted state"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + + // we aborted in the sync part of the abort check so these event listeners are never set up + assert.isFalse(abortSignal.addWasCalled); + assert.isFalse(abortSignal.removeWasCalled); + + // init() doesn't get called - we abort early on this one. + assert.isFalse(clientEntityContext.initWasCalled); + } + }); + + it("_trySend when the timer expires", async () => { + const sender = new MessageSender(clientEntityContext, { + timeoutInMs: 1 + }); + sender["_retryOptions"].timeoutInMs = 1; + sender["_retryOptions"].maxRetries = 1; + sender["_retryOptions"].retryDelayInMs = 1; + + sender["_sender"] = { + credit: 999, + isOpen: () => false, + session: { + outgoing: { + available: () => true + } + } + } as AwaitableSender; + + let initWasCalled = true; + + sender["open"] = async () => { + initWasCalled = true; + // long enough to let the init timeout expiration code to run. + await delay(1000); + }; + + try { + await sender["_trySend"]({} as Buffer, true, { + abortSignal: createAbortSignalForTest(false) + }); + assert.fail("Sender should have thrown in the async portion of the abort handling"); + } catch (err) { + // in this case init() does get called - we abort through a timer. + assert.isTrue(initWasCalled); + + assert.match( + err.message, + /.*was not able to send the message right now, due to operation timeout.*/ + ); + + assert.isTrue((err as any).retryable); + } + }); + }); + + describe("MessageSender.open() aborts after...", () => { + it("...beforeLock", async () => { + const sender = new MessageSender(createClientEntityContextForTests(), {}); + const abortSignal = createCountdownAbortSignal(1); + + try { + await sender.open(undefined, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(sender.isConnecting); + }); + + it("...afterLock", async () => { + const sender = new MessageSender(createClientEntityContextForTests(), {}); + const abortSignal = createCountdownAbortSignal(2); + + try { + await sender.open(undefined, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(sender.isConnecting); + }); + + it("...negotiateClaim", async () => { + let isAborted = false; + const taggedAbortSignal = createAbortSignalForTest(() => isAborted); + + const sender = new MessageSender( + createClientEntityContextForTests({ + onCreateAwaitableSenderCalled: () => {} + }), + {} + ); + + sender["_negotiateClaim"] = async () => { + isAborted = true; + }; + + try { + await sender.createBatch({ abortSignal: taggedAbortSignal }); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(sender.isConnecting); + }); + + it("...createAwaitableSender", async () => { + let isAborted = false; + const taggedAbortSignal = createAbortSignalForTest(() => isAborted); + + const sender = new MessageSender( + createClientEntityContextForTests({ + onCreateAwaitableSenderCalled: () => { + isAborted = true; + } + }), + {} + ); + + sender["_negotiateClaim"] = async () => {}; + + try { + await sender.createBatch({ abortSignal: taggedAbortSignal }); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(sender.isConnecting); + }); + }); + + describe("MessageReceiver.open() aborts after...", () => { + it("...before first async call", async () => { + const messageReceiver = new MessageReceiver( + createClientEntityContextForTests(), + ReceiverType.streaming + ); + + const abortSignal = createCountdownAbortSignal(1); + + try { + await messageReceiver["_init"](undefined, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(messageReceiver.isConnecting); + }); + + it("...after negotiateClaim", async () => { + const messageReceiver = new MessageReceiver( + createClientEntityContextForTests(), + ReceiverType.streaming + ); + + let isAborted = false; + const abortSignal = createAbortSignalForTest(() => isAborted); + + messageReceiver["_negotiateClaim"] = async () => { + isAborted = true; + }; + + try { + await messageReceiver["_init"](undefined, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(messageReceiver.isConnecting); + }); + + it("...after createReceiver", async () => { + let isAborted = false; + const abortSignal = createAbortSignalForTest(() => isAborted); + + const fakeContext = createClientEntityContextForTests({ + onCreateReceiverCalled: () => { + isAborted = true; + } + }); + const messageReceiver = new MessageReceiver(fakeContext, ReceiverType.streaming); + + messageReceiver["_negotiateClaim"] = async () => {}; + + try { + await messageReceiver["_init"](undefined, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isFalse(messageReceiver.isConnecting); + }); + }); +}); diff --git a/sdk/servicebus/service-bus/test/internal/batchingReceiver.spec.ts b/sdk/servicebus/service-bus/test/internal/batchingReceiver.spec.ts new file mode 100644 index 000000000000..80e51aa57785 --- /dev/null +++ b/sdk/servicebus/service-bus/test/internal/batchingReceiver.spec.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +const assert = chai.assert; + +import { BatchingReceiver } from "../../src/core/batchingReceiver"; +import { createClientEntityContextForTests } from "./unittestUtils"; +import { ReceiverImpl } from "../../src/receivers/receiver"; +import { createAbortSignalForTest } from "../utils/abortSignalTestUtils"; +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { ServiceBusMessageImpl, ReceiveMode } from "../../src/serviceBusMessage"; +import { Receiver as RheaReceiver, ReceiverEvents, SessionEvents } from "rhea-promise"; +import { StandardAbortMessage } from "../../src/util/utils"; + +describe("BatchingReceiver unit tests", () => { + describe("AbortSignal", () => { + // establish that the abortSignal does get properly sent down. Now the rest of the tests + // will test at the BatchingReceiver level. + it("is plumbed into BatchingReceiver from ReceiverImpl", async () => { + const origAbortSignal = createAbortSignalForTest(); + const receiver = new ReceiverImpl(createClientEntityContextForTests(), "peekLock"); + let wasCalled = false; + + receiver["_createBatchingReceiver"] = () => { + return { + async receive( + _maxMessageCount: number, + _maxWaitTimeInMs?: number, + abortSignal?: AbortSignalLike + ): Promise { + assert.equal(abortSignal, origAbortSignal); + wasCalled = true; + return []; + } + } as BatchingReceiver; + }; + + await receiver.receiveBatch(1000, { + maxWaitTimeInMs: 60 * 1000, + abortSignal: origAbortSignal + }); + + assert.isTrue(wasCalled, "Expected a call to BatchingReceiver.receive()"); + }); + + it("abortSignal is already signalled", async () => { + const abortController = new AbortController(); + abortController.abort(); + + const receiver = new BatchingReceiver(createClientEntityContextForTests(), { + receiveMode: ReceiveMode.peekLock + }); + + try { + await receiver.receive(1, 60 * 1000, abortController.signal); + assert.fail("Should have thrown"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + }).timeout(1000); + + it("abortSignal while receive is in process", async () => { + const abortController = new AbortController(); + + const receiver = new BatchingReceiver(createClientEntityContextForTests(), { + receiveMode: ReceiveMode.peekLock + }); + + const listenersBeingRemoved: string[] = []; + const callsDoneAfterAbort: string[] = []; + + receiver["_init"] = async () => { + // just enough of a Receiver to validate that cleanup actions + // are being run on abort. + receiver["_receiver"] = ({ + removeListener: (eventType: ReceiverEvents) => { + listenersBeingRemoved.push(eventType.toString()); + }, + on: (eventType: ReceiverEvents) => { + // we definitely shouldn't be registering any new handlers if we've aborted. + callsDoneAfterAbort.push(eventType); + }, + addCredit: () => { + // we definitely shouldn't be adding credits if we know we've aborted. + callsDoneAfterAbort.push("addCredit"); + }, + session: { + removeListener: (eventType: SessionEvents) => { + listenersBeingRemoved.push(eventType.toString()); + } + } + } as any) as RheaReceiver; + + abortController.abort(); + }; + + try { + await receiver.receive(1, 60 * 1000, abortController.signal); + assert.fail("Should have thrown"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + // order here isn't important, it just happens to be the order we call in `cleanupBeforeReject` + assert.deepEqual(listenersBeingRemoved, [ + "receiver_error", + "message", + "session_error", + "receiver_drained" + ]); + assert.isEmpty(callsDoneAfterAbort); + }); + }); +}); diff --git a/sdk/servicebus/service-bus/test/internal/sender.spec.ts b/sdk/servicebus/service-bus/test/internal/sender.spec.ts index fc82367a78c9..2d0f3432666a 100644 --- a/sdk/servicebus/service-bus/test/internal/sender.spec.ts +++ b/sdk/servicebus/service-bus/test/internal/sender.spec.ts @@ -5,7 +5,8 @@ import chai from "chai"; import { ServiceBusMessageBatchImpl } from "../../src/serviceBusMessageBatch"; import { ClientEntityContext } from "../../src/clientEntityContext"; import { ServiceBusMessage } from "../../src"; -import { isServiceBusMessageBatch } from "../../src/sender"; +import { isServiceBusMessageBatch, SenderImpl } from "../../src/sender"; +import { DefaultDataTransformer } from "@azure/core-amqp"; const assert = chai.assert; describe("sender unit tests", () => { @@ -18,4 +19,48 @@ describe("sender unit tests", () => { assert.isFalse(isServiceBusMessageBatch((4 as any) as ServiceBusMessage)); assert.isFalse(isServiceBusMessageBatch(({} as any) as ServiceBusMessage)); }); + + ["hello", {}, null, undefined].forEach((invalidValue) => { + it(`don't allow Sender.send(${invalidValue})`, async () => { + const sender = new SenderImpl(createClientEntityContextForTests()); + + try { + await sender.send( + // @ts-expect-error + invalidValue + ); + } catch (err) { + assert.equal(err.name, "TypeError"); + assert.equal( + err.message, + "Invalid type for message. Must be a ServiceBusMessage, an array of ServiceBusMessage or a ServiceBusMessageBatch" + ); + } + }); + }); }); + +function createClientEntityContextForTests(): ClientEntityContext & { initWasCalled: boolean } { + let initWasCalled = false; + + const fakeClientEntityContext = { + entityPath: "queue", + sender: { + credit: 999 + }, + namespace: { + config: { endpoint: "my.service.bus" }, + connectionId: "connection-id", + dataTransformer: new DefaultDataTransformer(), + cbsSession: { + cbsLock: "cbs-lock", + async init() { + initWasCalled = true; + } + } + }, + initWasCalled + }; + + return (fakeClientEntityContext as any) as ReturnType; +} diff --git a/sdk/servicebus/service-bus/test/internal/streamingReceiver.spec.ts b/sdk/servicebus/service-bus/test/internal/streamingReceiver.spec.ts new file mode 100644 index 000000000000..41d46aaabfbc --- /dev/null +++ b/sdk/servicebus/service-bus/test/internal/streamingReceiver.spec.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { ReceiverImpl } from "../../src/receivers/receiver"; +import { createClientEntityContextForTests, getPromiseResolverForTest } from "./unittestUtils"; +import { ClientEntityContext } from "../../src/clientEntityContext"; +import { ReceiveOptions } from "../../src/core/messageReceiver"; +import { OperationOptions } from "../../src"; +import { StreamingReceiver } from "../../src/core/streamingReceiver"; +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +chai.use(chaiAsPromised); +const assert = chai.assert; + +describe("StreamingReceiver unit tests", () => { + describe("AbortSignal", () => { + it("sanity check - abortSignal is propagated", async () => { + const receiverImpl = new ReceiverImpl(createClientEntityContextForTests(), "peekLock"); + + const abortController = new AbortController(); + const abortSignal = abortController.signal; + + const { resolve, promise } = getPromiseResolverForTest(); + + receiverImpl["_createStreamingReceiver"] = async ( + _context: ClientEntityContext, + options?: ReceiveOptions & + Pick & { + createStreamingReceiver?: ( + context: ClientEntityContext, + options?: ReceiveOptions + ) => StreamingReceiver; + } + ) => { + assert.equal(abortSignal, options?.abortSignal, "abortSignal is properly passed through"); + resolve(); + return {} as StreamingReceiver; + }; + + const errors: string[] = []; + + receiverImpl.subscribe( + { + processMessage: async () => {}, + processError: async (err) => { + errors.push(err.message); + } + }, + { + abortSignal + } + ); + + await promise; + assert.isEmpty(errors); + }).timeout(2000); // just for safety + + it("sanity check - abortSignal is propagated to _init()", async () => { + let wasCalled = false; + const abortController = new AbortController(); + + await StreamingReceiver.create(createClientEntityContextForTests(), { + _createStreamingReceiver: (_context, _options) => { + wasCalled = true; + return ({ + _init: (_ignoredOptions: any, abortSignal?: AbortSignalLike) => { + wasCalled = true; + assert.equal( + abortSignal, + abortController.signal, + "abortSignal passed in when created should propagate to _init()" + ); + return; + } + } as any) as StreamingReceiver; + }, + abortSignal: abortController.signal + }); + + assert.isTrue(wasCalled); + }); + }); +}); diff --git a/sdk/servicebus/service-bus/test/internal/unittestUtils.ts b/sdk/servicebus/service-bus/test/internal/unittestUtils.ts new file mode 100644 index 000000000000..9e9769052f28 --- /dev/null +++ b/sdk/servicebus/service-bus/test/internal/unittestUtils.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { ClientEntityContext } from "../../src/clientEntityContext"; +import { AwaitableSender, Receiver as RheaReceiver } from "rhea-promise"; +import { DefaultDataTransformer, AccessToken } from "@azure/core-amqp"; + +export function createClientEntityContextForTests(options?: { + onCreateAwaitableSenderCalled?: () => void; + onCreateReceiverCalled?: () => void; +}): ClientEntityContext & { initWasCalled: boolean } { + let initWasCalled = false; + + const fakeClientEntityContext = { + entityPath: "queue", + sender: { + credit: 999 + }, + namespace: { + config: { endpoint: "my.service.bus" }, + connectionId: "connection-id", + connection: { + createAwaitableSender: async (): Promise => { + if (options?.onCreateAwaitableSenderCalled) { + options.onCreateAwaitableSenderCalled(); + } + + const testAwaitableSender = ({ + setMaxListeners: () => testAwaitableSender + } as any) as AwaitableSender; + + return testAwaitableSender; + }, + createReceiver: async (): Promise => { + if (options?.onCreateReceiverCalled) { + options.onCreateReceiverCalled(); + } + + return ({} as any) as RheaReceiver; + } + }, + dataTransformer: new DefaultDataTransformer(), + tokenCredential: { + getToken() { + return {} as AccessToken; + } + }, + cbsSession: { + cbsLock: "cbs-lock", + async init() { + initWasCalled = true; + } + } + }, + initWasCalled + }; + + return (fakeClientEntityContext as any) as ReturnType; +} + +export function getPromiseResolverForTest(): { + promise: Promise; + resolve: () => void; + reject: (err: Error) => void; +} { + let resolver: () => void; + let rejecter: (err: Error) => void; + + const promise = new Promise((resolve, reject) => { + resolver = resolve; + rejecter = reject; + }); + + return { + promise, + resolve: resolver!, + reject: rejecter! + }; +} diff --git a/sdk/servicebus/service-bus/test/internal/utils.spec.ts b/sdk/servicebus/service-bus/test/internal/utils.spec.ts new file mode 100644 index 000000000000..d005aa180404 --- /dev/null +++ b/sdk/servicebus/service-bus/test/internal/utils.spec.ts @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + checkAndRegisterWithAbortSignal, + waitForTimeoutOrAbortOrResolve, + StandardAbortMessage +} from "../../src/util/utils"; +import { AbortController, AbortError, AbortSignalLike } from "@azure/abort-controller"; +import { delay } from "rhea-promise"; +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +const assert = chai.assert; + +describe("utils", () => { + describe("waitForTimeoutAbortOrResolve", () => { + let abortController: AbortController; + let abortSignal: ReturnType; + let ourTimerId: NodeJS.Timer | undefined; + let timerWasCleared: boolean; + + let timeoutFunctions: { + setTimeoutFn: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => any; + clearTimeoutFn: (timeoutId: NodeJS.Timer) => void; + }; + + const neverFireMs = 10 * 1000; + + beforeEach(() => { + abortController = new AbortController(); + abortSignal = getAbortSignalWithTracking(abortController); + ourTimerId = undefined; + timerWasCleared = false; + + const setTimeoutFn = ( + callback: (...args: any[]) => void, + ms: number, + ...args: any[] + ): any => { + const id = setTimeout(callback, ms, ...args); + + assert.notExists( + ourTimerId, + "Definitely shouldn't schedule our timeout callback more than once" + ); + + ourTimerId = id; + return id; + }; + + const clearTimeoutFn = (timerIdToClear: NodeJS.Timer): any => { + assert.exists(timerIdToClear); + assert.isFalse(timerWasCleared, "Timer should not be cleared multiple times"); + timerWasCleared = true; + + return clearTimeout(timerIdToClear); + }; + + timeoutFunctions = { + setTimeoutFn, + clearTimeoutFn + }; + }); + + it("abortSignal cancelled in mid-flight", async () => { + const prm = waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(neverFireMs); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: neverFireMs, + abortSignal, + timeoutFunctions + }); + + await delay(500); + abortController.abort(); + + try { + await prm; + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isTrue( + abortSignal.ourListenersWereRemoved(), + "All paths should properly clean up any event listeners on the signal" + ); + assert.isTrue(timerWasCleared); + }); + + it("abortSignal already aborted", async () => { + abortController.abort(); + + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(neverFireMs); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: neverFireMs, + abortSignal, + timeoutFunctions + }); + + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + assert.equal(err.name, "AbortError"); + } + + assert.isTrue( + abortSignal.ourListenersWereRemoved(), + "All paths should properly clean up any event listeners on the signal" + ); + // the abort signal is checked early, so the timeout never gets set up here. + assert.notExists(ourTimerId); + }); + + it("abortSignal is optional", async () => { + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(neverFireMs); + }, + timeoutMs: 500, + timeoutMessage: "the message for the timeout", + timeoutFunctions + }); + + assert.fail("Should have thrown an TimeoutError"); + } catch (err) { + assert.equal(err.message, "the message for the timeout"); + assert.equal(err.name, "OperationTimeoutError"); + } + + assert.isTrue(timerWasCleared); + }); + + it("timeout expires", async () => { + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(neverFireMs); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: 500, + abortSignal, + timeoutFunctions + }); + + assert.fail("Should have thrown an TimeoutError"); + } catch (err) { + assert.equal(err.message, "the message for the timeout"); + assert.equal(err.name, "OperationTimeoutError"); + } + + assert.isTrue( + abortSignal.ourListenersWereRemoved(), + "All paths should properly clean up any event listeners on the signal" + ); + assert.isTrue(timerWasCleared); + }); + + it("nothing expires", async () => { + const result = await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(500); + return 100; + }, + timeoutMessage: "the message for the timeout", + timeoutMs: neverFireMs, + abortSignal, + timeoutFunctions + }); + + assert.equal(result, 100); + assert.isTrue( + abortSignal.ourListenersWereRemoved(), + "All paths should properly clean up any event listeners on the signal" + ); + assert.isTrue(timerWasCleared); + }); + + it("actionFn throws an error", async () => { + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + throw new Error("Error thrown from action"); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: neverFireMs, + abortSignal, + timeoutFunctions + }); + + assert.fail("Should have thrown"); + } catch (err) { + assert.equal(err.message, "Error thrown from action"); + } + + assert.isTrue( + abortSignal.ourListenersWereRemoved(), + "All paths should properly clean up any event listeners on the signal" + ); + assert.isTrue(timerWasCleared); + }); + + it("sanity check - the real timeout methods do get used if we don't provide fake ones", async () => { + try { + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(5000); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: 1, + abortSignal + }); + } catch (err) { + assert.equal(err.message, "the message for the timeout"); + } + + try { + abortController.abort(); + + await waitForTimeoutOrAbortOrResolve({ + actionFn: async () => { + await delay(5000); + }, + timeoutMessage: "the message for the timeout", + timeoutMs: neverFireMs, + abortSignal + }); + } catch (err) { + assert.equal(err.message, StandardAbortMessage); + } + }); + }); + + describe("checkAndRegisterWithAbortSignal", () => { + let abortController: AbortController; + let abortSignal: ReturnType; + + beforeEach(() => { + abortController = new AbortController(); + abortSignal = getAbortSignalWithTracking(abortController); + }); + + it("abortSignal is undefined", () => { + const cleanupFn = checkAndRegisterWithAbortSignal(() => { + throw new Error("Will never be called"); + }, undefined); + + // we just return a no-op function in this case. + assert.exists(cleanupFn); + cleanupFn(); + }); + + it("abortSignal is already aborted", () => { + abortController.abort(); + + try { + checkAndRegisterWithAbortSignal(() => { + throw new Error("Will never be called"); + }, abortSignal); + assert.fail("Should have thrown an AbortError"); + } catch (err) { + assert.equal(err.name, "AbortError"); + assert.equal(err.message, StandardAbortMessage); + } + + assert.isTrue(abortSignal.ourListenersWereRemoved()); + }); + + it("abortSignal abort calls handlers", async () => { + let callbackWasCalled = false; + const cleanupFn = checkAndRegisterWithAbortSignal((abortError: AbortError) => { + callbackWasCalled = true; + assert.equal(abortError.message, StandardAbortMessage); + }, abortSignal); + assert.exists(cleanupFn); + + assert.isFalse(abortSignal.ourListenersWereRemoved()); + assert.isFalse(callbackWasCalled); + + abortController.abort(); + await delay(0); + + assert.isTrue(abortSignal.ourListenersWereRemoved()); + assert.isTrue(callbackWasCalled); + + // and cleanupFn is harmless to call here. + cleanupFn!(); + }); + + it("calling cleanup removes handlers from abortSignal", async () => { + let callbackWasCalled = false; + const cleanupFn = checkAndRegisterWithAbortSignal(() => { + callbackWasCalled = true; + }, abortSignal); + assert.exists(cleanupFn); + + assert.isFalse(abortSignal.ourListenersWereRemoved()); + assert.isFalse(callbackWasCalled); + + if (cleanupFn == null) { + throw new Error("No cleanup function!"); + } + + cleanupFn(); + + assert.isTrue(abortSignal.ourListenersWereRemoved()); + // sanity check - let's make sure we're not accidentally triggering their abort handler! + assert.isFalse(callbackWasCalled); + }); + }); +}); + +function getAbortSignalWithTracking( + abortController: AbortController +): AbortSignalLike & { ourListenersWereRemoved(): boolean } { + const signal = (abortController.signal as any) as ReturnType; + + const allFunctions = new Set(); + + const origAddEventListener = signal.addEventListener; + const origRemoveEventListener = signal.removeEventListener; + + signal.addEventListener = (name, handler) => { + assert.isFalse(allFunctions.has(handler), "Handler should not have already been added"); + allFunctions.add(handler); + origAddEventListener.call(signal, name, handler); + }; + + signal.removeEventListener = (name, handler) => { + // being less stringent about potentially removing it more than once since it simplifies + // our error handling code. + allFunctions.delete(handler); + origRemoveEventListener.call(signal, name, handler); + }; + + signal.ourListenersWereRemoved = () => { + return allFunctions.size === 0; + }; + return signal; +} diff --git a/sdk/servicebus/service-bus/test/invalidParameters.spec.ts b/sdk/servicebus/service-bus/test/invalidParameters.spec.ts index 4c8333cd482b..891e0b3e183f 100644 --- a/sdk/servicebus/service-bus/test/invalidParameters.spec.ts +++ b/sdk/servicebus/service-bus/test/invalidParameters.spec.ts @@ -6,7 +6,7 @@ import Long from "long"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { TestMessage, TestClientType } from "./utils/testUtils"; +import { TestClientType, TestMessage } from "./utils/testUtils"; import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { Receiver } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; @@ -42,14 +42,14 @@ describe("invalid parameters", () => { }); it("Peek: Invalid maxMessageCount for Queue", async function(): Promise { - const browsedMessages = await receiver.browseMessages({ maxMessageCount: -100 }); - should.equal(browsedMessages.length, 0); + const peekedMessages = await receiver.peekMessages({ maxMessageCount: -100 }); + should.equal(peekedMessages.length, 0); }); it("Peek: Wrong type maxMessageCount for Queue", async function(): Promise { let caughtError: Error | undefined; try { - await receiver.browseMessages({ maxMessageCount: "somestring" as any }); + await receiver.peekMessages({ maxMessageCount: "somestring" as any }); } catch (error) { caughtError = error; } @@ -61,11 +61,11 @@ describe("invalid parameters", () => { }); it("PeekBySequenceNumber: Invalid maxMessageCount for Queue", async function(): Promise { - const browsedMessages = await receiver.browseMessages({ + const peekedMessages = await receiver.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: -100 }); - should.equal(browsedMessages.length, 0); + should.equal(peekedMessages.length, 0); }); it("PeekBySequenceNumber: Wrong type maxMessageCount for Queue", async function(): Promise< @@ -73,7 +73,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await receiver.browseMessages({ + await receiver.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: "somestring" as any }); @@ -92,7 +92,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await receiver.browseMessages({ fromSequenceNumber: "somestring" as any }); + await receiver.peekMessages({ fromSequenceNumber: "somestring" as any }); } catch (error) { caughtError = error; } @@ -127,7 +127,7 @@ describe("invalid parameters", () => { }); it("Peek: Invalid maxMessageCount for Subscription", async function(): Promise { - const browsedMessages = await subscriptionReceiverClient.browseMessages({ + const browsedMessages = await subscriptionReceiverClient.peekMessages({ maxMessageCount: -100 }); should.equal(browsedMessages.length, 0); @@ -136,7 +136,7 @@ describe("invalid parameters", () => { it("Peek: Wrong type maxMessageCount for Subscription", async function(): Promise { let caughtError: Error | undefined; try { - await subscriptionReceiverClient.browseMessages({ maxMessageCount: "somestring" as any }); + await subscriptionReceiverClient.peekMessages({ maxMessageCount: "somestring" as any }); } catch (error) { caughtError = error; } @@ -150,7 +150,7 @@ describe("invalid parameters", () => { it("PeekBySequenceNumber: Invalid maxMessageCount for Subscription", async function(): Promise< void > { - const browsedMessages = await subscriptionReceiverClient.browseMessages({ + const browsedMessages = await subscriptionReceiverClient.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: -100 }); @@ -162,7 +162,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await subscriptionReceiverClient.browseMessages({ + await subscriptionReceiverClient.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: "somestring" as any }); @@ -181,7 +181,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await subscriptionReceiverClient.browseMessages({ + await subscriptionReceiverClient.peekMessages({ fromSequenceNumber: "somestring" as any }); } catch (error) { @@ -309,7 +309,7 @@ describe("invalid parameters", () => { ); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue!) + serviceBusClient.createSender(entityNames.queue!) ); receiver = await serviceBusClient.test.getSessionPeekLockReceiver(entityNames, { @@ -366,14 +366,14 @@ describe("invalid parameters", () => { }); it("Peek: Invalid maxMessageCount in SessionReceiver", async function(): Promise { - const browsedMessages = await receiver.browseMessages({ maxMessageCount: -100 }); - should.equal(browsedMessages.length, 0); + const peekedMessages = await receiver.peekMessages({ maxMessageCount: -100 }); + should.equal(peekedMessages.length, 0); }); it("Peek: Wrong type maxMessageCount in SessionReceiver", async function(): Promise { let caughtError: Error | undefined; try { - await receiver.browseMessages({ maxMessageCount: "somestring" as any }); + await receiver.peekMessages({ maxMessageCount: "somestring" as any }); } catch (error) { caughtError = error; } @@ -387,11 +387,11 @@ describe("invalid parameters", () => { it("PeekBySequenceNumber: Invalid maxMessageCount in SessionReceiver", async function(): Promise< void > { - const browsedMessages = await receiver.browseMessages({ + const peekedMessages = await receiver.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: -100 }); - should.equal(browsedMessages.length, 0); + should.equal(peekedMessages.length, 0); }); it("PeekBySequenceNumber: Wrong type maxMessageCount in SessionReceiver", async function(): Promise< @@ -399,7 +399,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await receiver.browseMessages({ + await receiver.peekMessages({ fromSequenceNumber: Long.ZERO, maxMessageCount: "somestring" as any }); @@ -418,7 +418,7 @@ describe("invalid parameters", () => { > { let caughtError: Error | undefined; try { - await receiver.browseMessages({ fromSequenceNumber: "somestring" as any }); + await receiver.peekMessages({ fromSequenceNumber: "somestring" as any }); } catch (error) { caughtError = error; } @@ -526,7 +526,7 @@ describe("invalid parameters", () => { ); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue!) + serviceBusClient.createSender(entityNames.queue!) ); receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); @@ -668,41 +668,13 @@ describe("invalid parameters", () => { ); // const clients = await getSenderReceiverClients(TestClientType.PartitionedQueue, "peekLock"); - sender = serviceBusClient.test.addToCleanup(await serviceBusClient.createSender(queue!)); + sender = serviceBusClient.test.addToCleanup(serviceBusClient.createSender(queue!)); }); after(() => { return serviceBusClient.test.afterEach(); }); - it("Send: Missing message in Sender", async function(): Promise { - let caughtError: Error | undefined; - try { - await sender.send(undefined as any); - } catch (error) { - caughtError = error; - } - should.equal(caughtError && caughtError.name, "TypeError"); - should.equal( - caughtError && caughtError.message, - `Missing parameter "message, messages or messageBatch"` - ); - }); - - it("Sendbatch: Missing messageBatch in Sender", async function(): Promise { - let caughtError: Error | undefined; - try { - await sender.send(undefined as any); - } catch (error) { - caughtError = error; - } - should.equal(caughtError && caughtError.name, "TypeError"); - should.equal( - caughtError && caughtError.message, - `Missing parameter "message, messages or messageBatch"` - ); - }); - it("ScheduledMessage: Missing date in Sender", async function(): Promise { let caughtError: Error | undefined; try { diff --git a/sdk/servicebus/service-bus/test/managementClient.spec.ts b/sdk/servicebus/service-bus/test/managementClient.spec.ts index d3d9a808c725..c749d87b7dab 100644 --- a/sdk/servicebus/service-bus/test/managementClient.spec.ts +++ b/sdk/servicebus/service-bus/test/managementClient.spec.ts @@ -1,6 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + import chai from "chai"; import chaiAsPromised from "chai-as-promised"; -import { delay, Sender, Receiver, ReceivedMessageWithLock } from "../src"; +import { ReceivedMessageWithLock, Receiver, Sender, delay } from "../src"; import { TestClientType, TestMessage } from "./utils/testUtils"; import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { isNode } from "@azure/core-amqp"; @@ -17,7 +20,7 @@ describe("ManagementClient - disconnects", function(): void { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } before(() => { @@ -52,7 +55,7 @@ describe("ManagementClient - disconnects", function(): void { await sender.send(TestMessage.getSample()); let peekedMessageCount = 0; - let messages = await receiver.browseMessages({ maxMessageCount: 1 }); + let messages = await receiver.peekMessages({ maxMessageCount: 1 }); peekedMessageCount += messages.length; peekedMessageCount.should.equal(1, "Unexpected number of peeked messages."); @@ -73,7 +76,7 @@ describe("ManagementClient - disconnects", function(): void { await delay(2000); // peek additional messages - messages = await receiver.browseMessages({ maxMessageCount: 1 }); + messages = await receiver.peekMessages({ maxMessageCount: 1 }); peekedMessageCount += messages.length; peekedMessageCount.should.equal(2, "Unexpected number of peeked messages."); diff --git a/sdk/servicebus/service-bus/test/perf/rhea-promise/send.ts b/sdk/servicebus/service-bus/test/perf/rhea-promise/send.ts index e36d6dbf0e88..2beed596f33c 100644 --- a/sdk/servicebus/service-bus/test/perf/rhea-promise/send.ts +++ b/sdk/servicebus/service-bus/test/perf/rhea-promise/send.ts @@ -71,7 +71,7 @@ async function RunTest( } as ConnectionOptions); await connection.open(); - const sender = await connection.createSender({ + const sender = connection.createSender({ name: "sender-1", target: { address: entityPath diff --git a/sdk/servicebus/service-bus/test/propsToModify.spec.ts b/sdk/servicebus/service-bus/test/propsToModify.spec.ts index b618add401de..a50e8c129d91 100644 --- a/sdk/servicebus/service-bus/test/propsToModify.spec.ts +++ b/sdk/servicebus/service-bus/test/propsToModify.spec.ts @@ -6,7 +6,7 @@ const should = chai.should(); import { createServiceBusClientForTests } from "./utils/testutils2"; import { TestClientType, TestMessage } from "./utils/testUtils"; -import { Receiver, ReceivedMessage, ReceivedMessageWithLock } from "../src"; +import { ReceivedMessage, ReceivedMessageWithLock, Receiver } from "../src"; describe("dead lettering", () => { let serviceBusClient: ReturnType; @@ -31,7 +31,7 @@ describe("dead lettering", () => { // send a test message with the body being the title of the test (for something unique) const sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue) + serviceBusClient.createSender(entityNames.queue) ); await sender.send({ @@ -181,7 +181,7 @@ describe("abandoning", () => { // send a test message with the body being the title of the test (for something unique) const sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue) + serviceBusClient.createSender(entityNames.queue) ); await sender.send({ @@ -302,7 +302,7 @@ describe("deferring", () => { // send a test message with the body being the title of the test (for something unique) const sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue) + serviceBusClient.createSender(entityNames.queue) ); await sender.send({ diff --git a/sdk/servicebus/service-bus/test/receiveAndDeleteMode.spec.ts b/sdk/servicebus/service-bus/test/receiveAndDeleteMode.spec.ts index 83b9bf6c69cb..f8e302f6fc27 100644 --- a/sdk/servicebus/service-bus/test/receiveAndDeleteMode.spec.ts +++ b/sdk/servicebus/service-bus/test/receiveAndDeleteMode.spec.ts @@ -6,17 +6,17 @@ const should = chai.should(); const expect = chai.expect; import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { ServiceBusMessage, ReceivedMessage, Receiver } from "../src"; +import { ReceivedMessage, Receiver, ServiceBusMessage } from "../src"; -import { TestMessage, TestClientType, checkWithTimeout } from "./utils/testUtils"; +import { TestClientType, TestMessage, checkWithTimeout } from "./utils/testUtils"; import { getErrorMessageNotSupportedInReceiveAndDeleteMode } from "../src/util/errors"; import { Sender } from "../src/sender"; import { + EntityName, ServiceBusClientForTests, createServiceBusClientForTests, - testPeekMsgsLength, - EntityName + testPeekMsgsLength } from "./utils/testutils2"; import { DispositionType, ReceivedMessageWithLock } from "../src/serviceBusMessage"; @@ -42,7 +42,7 @@ describe("receive and delete", () => { const entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); if (receiveMode === "peekLock") { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); diff --git a/sdk/servicebus/service-bus/test/receiverInit.spec.ts b/sdk/servicebus/service-bus/test/receiverInit.spec.ts new file mode 100644 index 000000000000..b62c1c93f7e9 --- /dev/null +++ b/sdk/servicebus/service-bus/test/receiverInit.spec.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +const assert = chai.assert; + +import { ClientEntityContext } from "../src/clientEntityContext"; +import { BatchingReceiver } from "../src/core/batchingReceiver"; +import { MessageReceiver, ReceiverType } from "../src/core/messageReceiver"; + +describe("init() and close() interactions", () => { + function fakeContext(): ClientEntityContext { + return ({ + namespace: { + config: {} + } + } as unknown) as ClientEntityContext; + } + + it("close() called just after init() but before the next step", async () => { + const batchingReceiver = new BatchingReceiver(fakeContext()); + + let initWasCalled = false; + batchingReceiver["_init"] = async () => { + initWasCalled = true; + // ie, pretend that somebody called close() and the + // call happened between .init().then() + batchingReceiver["_receiver"] = undefined; + }; + + // make an init() happen internally. + const emptyArrayOfMessages = await batchingReceiver.receive(1, 1); + + assert.isEmpty(emptyArrayOfMessages); + assert.isTrue(initWasCalled); + }); + + it("message receiver init() bails out early if object is closed()", async () => { + const messageReceiver2 = new MessageReceiver(fakeContext(), ReceiverType.streaming); + + // so our object basically looks like an unopened receiver + messageReceiver2["isOpen"] = () => false; + messageReceiver2["isConnecting"] = false; + + // close() the object. Closed objects should not be able to be reopened. + await messageReceiver2.close(); + + let negotiateClaimWasCalled = false; + + messageReceiver2["_negotiateClaim"] = async () => { + negotiateClaimWasCalled = true; + throw new Error( + "Negotiate claim was called - we should have early exited and never tried to init a close()'d instance." + ); + }; + + await messageReceiver2["_init"](); + + assert.isFalse(negotiateClaimWasCalled); + }); +}); diff --git a/sdk/servicebus/service-bus/test/renewLock.spec.ts b/sdk/servicebus/service-bus/test/renewLock.spec.ts index 8f914f1f5482..d4c7e2083330 100644 --- a/sdk/servicebus/service-bus/test/renewLock.spec.ts +++ b/sdk/servicebus/service-bus/test/renewLock.spec.ts @@ -30,7 +30,7 @@ describe("renew lock", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } diff --git a/sdk/servicebus/service-bus/test/renewLockSessions.spec.ts b/sdk/servicebus/service-bus/test/renewLockSessions.spec.ts index 4813dca2ba45..9c26595fe610 100644 --- a/sdk/servicebus/service-bus/test/renewLockSessions.spec.ts +++ b/sdk/servicebus/service-bus/test/renewLockSessions.spec.ts @@ -5,7 +5,7 @@ import chai from "chai"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { MessagingError, delay, ServiceBusMessage } from "../src"; +import { MessagingError, ServiceBusMessage, delay } from "../src"; import { TestClientType, TestMessage, isMessagingError } from "./utils/testUtils"; import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { Sender } from "../src/sender"; @@ -35,7 +35,7 @@ describe("renew lock sessions", () => { const entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); sessionId = Date.now().toString(); @@ -55,9 +55,9 @@ describe("renew lock sessions", () => { // Hence, commenting the following code since there is no need to purge/peek into a freshly created entity // await purge(receiver); - // const browsedMsgs = await receiver.browseMessages(); + // const peekedMsgs = await receiver.peekMessages(); // const receiverEntityType = receiver.entityType; - // if (browsedMsgs.length) { + // if (peekedMsgs.length) { // chai.assert.fail(`Please use an empty ${receiverEntityType} for integration testing`); // } } diff --git a/sdk/servicebus/service-bus/test/retries.spec.ts b/sdk/servicebus/service-bus/test/retries.spec.ts index dfc17c5b4328..16485c4316a8 100644 --- a/sdk/servicebus/service-bus/test/retries.spec.ts +++ b/sdk/servicebus/service-bus/test/retries.spec.ts @@ -5,7 +5,7 @@ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); const should = chai.should(); -import { Receiver, ReceivedMessageWithLock, SessionReceiver } from "../src"; +import { ReceivedMessageWithLock, Receiver, SessionReceiver } from "../src"; import { TestClientType, TestMessage } from "./utils/testUtils"; import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { Sender, SenderImpl } from "../src/sender"; @@ -41,7 +41,7 @@ describe("Retries - ManagementClient", () => { const entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); // subscriptionRuleManager = serviceBusClient.test.addToCleanup( @@ -137,13 +137,13 @@ describe("Retries - ManagementClient", () => { it("Unpartitioned Queue: peek", async function(): Promise { await mockManagementClientAndVerifyRetries(async () => { - await receiver.browseMessages(); + await receiver.peekMessages(); }); }); it("Unpartitioned Queue: peekBySequenceNumber", async function(): Promise { await mockManagementClientAndVerifyRetries(async () => { - await receiver.browseMessages({ fromSequenceNumber: new Long(0) }); + await receiver.peekMessages({ fromSequenceNumber: new Long(0) }); }); }); }); @@ -161,13 +161,13 @@ describe("Retries - ManagementClient", () => { it("Unpartitioned Queue with Sessions: peek", async function(): Promise { await mockManagementClientAndVerifyRetries(async () => { - await sessionReceiver.browseMessages(); + await sessionReceiver.peekMessages(); }); }); it("Unpartitioned Queue with Sessions: peekBySequenceNumber", async function(): Promise { await mockManagementClientAndVerifyRetries(async () => { - await sessionReceiver.browseMessages({ fromSequenceNumber: new Long(0) }); + await sessionReceiver.peekMessages({ fromSequenceNumber: new Long(0) }); }); }); @@ -252,7 +252,7 @@ describe("Retries - MessageSender", () => { const entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } @@ -308,7 +308,11 @@ describe("Retries - MessageSender", () => { it("Unpartitioned Queue: sendBatch", async function(): Promise { await beforeEachTest(TestClientType.UnpartitionedQueue); await mockInitAndVerifyRetries(async () => { - await sender.send(1 as any); + const batch = await sender.createBatch(); + batch.tryAdd({ + body: "hello" + }); + await sender.send(batch); }); }); @@ -329,7 +333,11 @@ describe("Retries - MessageSender", () => { it("Unpartitioned Queue with Sessions: sendBatch", async function(): Promise { await beforeEachTest(TestClientType.UnpartitionedQueue); await mockInitAndVerifyRetries(async () => { - await sender.send(1 as any); + const batch = await sender.createBatch(); + batch.tryAdd({ + body: "hello" + }); + await sender.send(batch); }); }); }); @@ -453,7 +461,7 @@ describe("Retries - onDetached", () => { const entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); } diff --git a/sdk/servicebus/service-bus/test/sendAndSchedule.spec.ts b/sdk/servicebus/service-bus/test/sendAndSchedule.spec.ts index c2ba13412e20..4ef062644f8c 100644 --- a/sdk/servicebus/service-bus/test/sendAndSchedule.spec.ts +++ b/sdk/servicebus/service-bus/test/sendAndSchedule.spec.ts @@ -6,8 +6,8 @@ import Long from "long"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { delay, ServiceBusMessage } from "../src"; -import { TestMessage, TestClientType } from "./utils/testUtils"; +import { ServiceBusMessage, delay } from "../src"; +import { TestClientType, TestMessage } from "./utils/testUtils"; import { Receiver } from "../src/receivers/receiver"; import { ServiceBusClientForTests, @@ -36,7 +36,7 @@ describe("send scheduled messages", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } @@ -107,80 +107,79 @@ describe("send scheduled messages", () => { }); }); - // sendBatch() - Commented - // describe("Simple Send Batch", function(): void { - // afterEach(async () => { - // await afterEachTest(); - // }); - - // async function testSimpleSendBatch( - // useSessions: boolean, - // usePartitions: boolean - // ): Promise { - // const testMessages = []; - // testMessages.push(useSessions ? TestMessage.getSessionSample() : TestMessage.getSample()); - // testMessages.push(useSessions ? TestMessage.getSessionSample() : TestMessage.getSample()); - - // await sender.sendBatch(testMessages); - // const msgs = await receiver.receiveBatch(2); - - // should.equal(Array.isArray(msgs), true, "`ReceivedMessages` is not an array"); - // should.equal(msgs.length, 2, "Unexpected number of messages"); - - // if (testMessages[0].messageId === msgs[0].messageId) { - // TestMessage.checkMessageContents(testMessages[0], msgs[0], useSessions, usePartitions); - // TestMessage.checkMessageContents(testMessages[1], msgs[1], useSessions, usePartitions); - // } else { - // TestMessage.checkMessageContents(testMessages[1], msgs[0], useSessions, usePartitions); - // TestMessage.checkMessageContents(testMessages[0], msgs[1], useSessions, usePartitions); - // } - - // await msgs[0].complete(); - // await msgs[1].complete(); - - // await testPeekMsgsLength(receiver, 0); - // } - - // it("Partitioned Queue: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedQueue); - // await testSimpleSendBatch(false, true); - // }); - - // it("Partitioned Topic: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedSubscription); - // await testSimpleSendBatch(false, true); - // }); - - // it("Unpartitioned Queue: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.UnpartitionedQueue); - // await testSimpleSendBatch(false, false); - // }); - - // it("Unpartitioned Topic: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.UnpartitionedSubscription); - // await testSimpleSendBatch(false, false); - // }); - - // it("Partitioned Queue with Sessions: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedQueueWithSessions); - // await testSimpleSendBatch(true, true); - // }); - - // it("Partitioned Topic with Sessions: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedSubscriptionWithSessions); - // await testSimpleSendBatch(true, true); - // }); - - // it("Unpartitioned Queue with Sessions: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.UnpartitionedQueueWithSessions); - // await testSimpleSendBatch(true, false); - // }); - - // it("Unpartitioned Topic with Sessions: Simple SendBatch", async function(): Promise { - // await beforeEachTest(TestClientType.UnpartitionedSubscriptionWithSessions); - // await testSimpleSendBatch(true, false); - // }); - // }); + describe("Send array of messages", function(): void { + afterEach(async () => { + await afterEachTest(); + }); + + async function testSimpleSendBatch( + useSessions: boolean, + usePartitions: boolean + ): Promise { + const testMessages = []; + testMessages.push(useSessions ? TestMessage.getSessionSample() : TestMessage.getSample()); + testMessages.push(useSessions ? TestMessage.getSessionSample() : TestMessage.getSample()); + + await sender.send(testMessages); + const msgs = await receiver.receiveBatch(2); + + should.equal(Array.isArray(msgs), true, "`ReceivedMessages` is not an array"); + should.equal(msgs.length, 2, "Unexpected number of messages"); + + if (testMessages[0].messageId === msgs[0].messageId) { + TestMessage.checkMessageContents(testMessages[0], msgs[0], useSessions, usePartitions); + TestMessage.checkMessageContents(testMessages[1], msgs[1], useSessions, usePartitions); + } else { + TestMessage.checkMessageContents(testMessages[1], msgs[0], useSessions, usePartitions); + TestMessage.checkMessageContents(testMessages[0], msgs[1], useSessions, usePartitions); + } + + await msgs[0].complete(); + await msgs[1].complete(); + + await testPeekMsgsLength(receiver, 0); + } + + it("Partitioned Queue: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.PartitionedQueue); + await testSimpleSendBatch(false, true); + }); + + it("Partitioned Topic: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.PartitionedSubscription); + await testSimpleSendBatch(false, true); + }); + + it("Unpartitioned Queue: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedQueue); + await testSimpleSendBatch(false, false); + }); + + it("Unpartitioned Topic: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedSubscription); + await testSimpleSendBatch(false, false); + }); + + it("Partitioned Queue with Sessions: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.PartitionedQueueWithSessions); + await testSimpleSendBatch(true, true); + }); + + it("Partitioned Topic with Sessions: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.PartitionedSubscriptionWithSessions); + await testSimpleSendBatch(true, true); + }); + + it("Unpartitioned Queue with Sessions: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedQueueWithSessions); + await testSimpleSendBatch(true, false); + }); + + it("Unpartitioned Topic with Sessions: Simple SendBatch", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedSubscriptionWithSessions); + await testSimpleSendBatch(true, false); + }); + }); describe("Schedule single message", function(): void { afterEach(async () => { diff --git a/sdk/servicebus/service-bus/test/sendBatch.spec.ts b/sdk/servicebus/service-bus/test/sendBatch.spec.ts index e7b675f7df6f..cc5aa7d152ef 100644 --- a/sdk/servicebus/service-bus/test/sendBatch.spec.ts +++ b/sdk/servicebus/service-bus/test/sendBatch.spec.ts @@ -5,12 +5,12 @@ import chai from "chai"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { ServiceBusMessage, OperationOptions } from "../src"; +import { OperationOptions, ServiceBusMessage } from "../src"; import { TestClientType } from "./utils/testUtils"; import { + EntityName, ServiceBusClientForTests, - createServiceBusClientForTests, - EntityName + createServiceBusClientForTests } from "./utils/testutils2"; import { Sender } from "../src/sender"; import { ConditionErrorNameMapper } from "@azure/core-amqp"; @@ -33,7 +33,7 @@ describe("Send Batch", () => { entityNames = await serviceBusClient.test.createTestEntities(entityType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } diff --git a/sdk/servicebus/service-bus/test/serviceBusClient.spec.ts b/sdk/servicebus/service-bus/test/serviceBusClient.spec.ts index 50c94cdfb6ff..6c7213208117 100644 --- a/sdk/servicebus/service-bus/test/serviceBusClient.spec.ts +++ b/sdk/servicebus/service-bus/test/serviceBusClient.spec.ts @@ -1,34 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { EnvironmentCredential } from "@azure/identity"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; +import * as dotenv from "dotenv"; import Long from "long"; -import { MessagingError, ServiceBusClient, Receiver, SessionReceiver } from "../src"; +import { MessagingError, Receiver, ServiceBusClient, SessionReceiver } from "../src"; import { Sender } from "../src/sender"; -import { getReceiverClosedErrorMsg } from "../src/util/errors"; -import { TestClientType, TestMessage, isMessagingError, checkWithTimeout } from "./utils/testUtils"; import { DispositionType, ReceivedMessageWithLock, ServiceBusMessage } from "../src/serviceBusMessage"; - -const should = chai.should(); -chai.use(chaiAsPromised); - -import { getEnvVars, isNode } from "../test/utils/envVarUtils"; -import * as dotenv from "dotenv"; -dotenv.config(); - -// import { EnvironmentCredential } from "@azure/identity"; +import { getReceiverClosedErrorMsg, getSenderClosedErrorMsg } from "../src/util/errors"; +import { EnvVarNames, getEnvVars, isNode } from "../test/utils/envVarUtils"; +import { checkWithTimeout, isMessagingError, TestClientType, TestMessage } from "./utils/testUtils"; import { createServiceBusClientForTests, - ServiceBusClientForTests, EntityName, + ServiceBusClientForTests, testPeekMsgsLength } from "./utils/testutils2"; +const should = chai.should(); +chai.use(chaiAsPromised); + +dotenv.config(); + describe("Create ServiceBusClient", function(): void { let sbClient: ServiceBusClient; @@ -47,20 +46,6 @@ describe("Create ServiceBusClient", function(): void { "Name of the namespace is different than expected" ); }); - - // it("Creates clients after coercing name to string", function(): void { - // sbClient = new ServiceBusClient( - // "Endpoint=sb://a;SharedAccessKeyName=b;SharedAccessKey=c;EntityPath=d" - // ); - // const queueClient = sbClient.createQueueClient(1 as any); - // should.equal(queueClient.entityPath, "1"); - - // const topicClient = sbClient.createTopicClient(1 as any); - // should.equal(topicClient.entityPath, "1"); - - // const subscriptionClient = sbClient.createSubscriptionClient(1 as any, 2 as any); - // should.equal(subscriptionClient.entityPath, "1/Subscriptions/2"); - // }); }); describe("Random scheme in the endpoint from connection string", function(): void { @@ -77,7 +62,7 @@ describe("Random scheme in the endpoint from connection string", function(): voi sbClientWithRelaxedEndPoint = new ServiceBusClient( getEnvVars().SERVICEBUS_CONNECTION_STRING.replace("sb://", "CheeseBurger://") ); - sender = await sbClientWithRelaxedEndPoint.createSender(entities.queue!); + sender = sbClientWithRelaxedEndPoint.createSender(entities.queue!); receiver = !entities.usesSessions ? sbClientWithRelaxedEndPoint.createReceiver(entities.queue!, "peekLock") : await sbClientWithRelaxedEndPoint.createSessionReceiver(entities.queue!, "peekLock", { @@ -156,19 +141,6 @@ describe("Errors with non existing Namespace", function(): void { } }; - it("throws error when create a sender for a non existing namespace", async function(): Promise< - void - > { - try { - await sbClient.createSender("some-queue"); - should.fail("Should have thrown"); - } catch (err) { - testError(err); - } - - should.equal(errorWasThrown, true, "Error thrown flag must be true"); - }); - it("throws error when receiving batch data to a non existing namespace", async function(): Promise< void > { @@ -222,21 +194,15 @@ describe("Errors with non existing Queue/Topic/Subscription", async function(): "Error code is different than expected" ); should.equal( - // TODO - update this check once sbClient has a `name` property - // err.message.includes(`The messaging entity '${entityPath}' could not be found.`), - err.message.includes(`${entityPath}' could not be found.`), + err.message.includes( + `The messaging entity 'sb://${sbClient.fullyQualifiedNamespace}/${entityPath}' could not be found.` + ), true ); errorWasThrown = true; } }; - it("throws error when opening a sender to a non-existent queue", async function(): Promise { - await sbClient.createSender("some-name").catch((err) => testError(err, "some-name")); - - should.equal(errorWasThrown, true, "Error thrown flag must be true"); - }); - it("throws error when receiving batch data from a non existing queue", async function(): Promise< void > { @@ -316,28 +282,28 @@ describe("Test ServiceBusClient creation", function(): void { "Endpoint=sb://((.*).servicebus.windows.net)" ) || "")[1]; - // /** - // * Utility to create EnvironmentCredential using `@azure/identity` - // */ - // function getDefaultTokenCredential() { - // should.exist( - // env[EnvVarNames.AZURE_CLIENT_ID], - // "define AZURE_CLIENT_ID in your environment before running integration tests." - // ); - // should.exist( - // env[EnvVarNames.AZURE_TENANT_ID], - // "define AZURE_TENANT_ID in your environment before running integration tests." - // ); - // should.exist( - // env[EnvVarNames.AZURE_CLIENT_SECRET], - // "define AZURE_CLIENT_SECRET in your environment before running integration tests." - // ); - // should.exist( - // env[EnvVarNames.SERVICEBUS_CONNECTION_STRING], - // "define SERVICEBUS_CONNECTION_STRING in your environment before running integration tests." - // ); - // return new EnvironmentCredential(); - // } + /** + * Utility to create EnvironmentCredential using `@azure/identity` + */ + function getDefaultTokenCredential() { + should.exist( + env[EnvVarNames.AZURE_CLIENT_ID], + "define AZURE_CLIENT_ID in your environment before running integration tests." + ); + should.exist( + env[EnvVarNames.AZURE_TENANT_ID], + "define AZURE_TENANT_ID in your environment before running integration tests." + ); + should.exist( + env[EnvVarNames.AZURE_CLIENT_SECRET], + "define AZURE_CLIENT_SECRET in your environment before running integration tests." + ); + should.exist( + env[EnvVarNames.SERVICEBUS_CONNECTION_STRING], + "define SERVICEBUS_CONNECTION_STRING in your environment before running integration tests." + ); + return new EnvironmentCredential(); + } it("throws error for invalid tokenCredentials", async function(): Promise { try { @@ -369,39 +335,43 @@ describe("Test ServiceBusClient creation", function(): void { should.equal(errorWasThrown, true, "Error thrown flag must be true"); }); - // if (isNode) { - // it("Coerces input to string for host in credential based constructor", async function(): Promise< - // void - // > { - // const tokenCreds = getDefaultTokenCredential(); - // sbClient = new ServiceBusClient(123 as any, tokenCreds); - // should.equal(sbClient.name, "sb://123/", "Name of the namespace is different than expected"); - // }); - - // it("sends a message to the ServiceBus entity", async function(): Promise { - // const tokenCreds = getDefaultTokenCredential(); - - // const serviceBusClient = createServiceBusClientForTests(); - // const entities = await serviceBusClient.test.createTestEntities( - // TestClientType.UnpartitionedQueue - // ); - // await serviceBusClient.close(); - - // const sbClient = new ServiceBusClient(serviceBusEndpoint, tokenCreds); - // sbClient.should.be.an.instanceof(ServiceBusClient); - - // const sender = sbClient.createSender(entities.queue!); - // const receiver = await sbClient.createReceiver(entities.queue!, "peekLock"); - // const testMessages = TestMessage.getSample(); - // await sender.send(testMessages); - // const msgs = await receiver.receiveBatch(1); - - // should.equal(Array.isArray(msgs), true, "`ReceivedMessages` is not an array"); - // should.equal(msgs[0].body, testMessages.body, "MessageBody is different than expected"); - // should.equal(msgs.length, 1, "Unexpected number of messages"); - // await sbClient.close(); - // }); - // } + if (isNode) { + it("throws error for invalid host name", async function(): Promise { + try { + new ServiceBusClient(123 as any, getDefaultTokenCredential()); + } catch (error) { + errorWasThrown = true; + should.equal( + error.message, + "`host` parameter is not a string", + "ErrorMessage is different than expected" + ); + } + should.equal(errorWasThrown, true, "Error thrown flag must be true"); + }); + + it("sends a message to the ServiceBus entity", async function(): Promise { + const tokenCreds = getDefaultTokenCredential(); + + const serviceBusClient = createServiceBusClientForTests(); + const entities = await serviceBusClient.test.createTestEntities( + TestClientType.UnpartitionedQueue + ); + await serviceBusClient.close(); + + const sbClient = new ServiceBusClient(serviceBusEndpoint, tokenCreds); + const sender = sbClient.createSender(entities.queue!); + const receiver = sbClient.createReceiver(entities.queue!, "peekLock"); + const testMessages = TestMessage.getSample(); + await sender.send(testMessages); + const msgs = await receiver.receiveBatch(1); + + should.equal(Array.isArray(msgs), true, "`ReceivedMessages` is not an array"); + should.equal(msgs[0].body, testMessages.body, "MessageBody is different than expected"); + should.equal(msgs.length, 1, "Unexpected number of messages"); + await sbClient.close(); + }); + } }); describe("Errors after close()", function(): void { @@ -422,7 +392,7 @@ describe("Errors after close()", function(): void { entityName = await sbClient.test.createTestEntities(entityType); sender = sbClient.test.addToCleanup( - await sbClient.createSender(entityName.queue ?? entityName.topic!) + sbClient.createSender(entityName.queue ?? entityName.topic!) ); receiver = await sbClient.test.getPeekLockReceiver(entityName); @@ -456,14 +426,14 @@ describe("Errors after close()", function(): void { } /** - * Tests the error from settling a message after the receiver is closed + * Tests the error from settling a message after the receiver is closed - only valid for sessions. + * For non-sessions, managementLink allows backup message settlement even after the receiver is closed. */ async function testAllDispositions(): Promise { await testDisposition(DispositionType.complete); await testDisposition(DispositionType.abandon); await testDisposition(DispositionType.defer); await testDisposition(DispositionType.deadletter); - // TODO - add test for renewing message lock } async function testDisposition(operation: DispositionType): Promise { @@ -569,7 +539,7 @@ describe("Errors after close()", function(): void { async function testCreateSender(expectedErrorMsg: string): Promise { let errorNewSender: string = ""; try { - await sbClient.createSender(entityName.queue ?? entityName.topic!); + sbClient.createSender(entityName.queue ?? entityName.topic!); } catch (err) { errorNewSender = err.message; } @@ -629,34 +599,15 @@ describe("Errors after close()", function(): void { "Expected error not thrown for receiveDeferredMessages()" ); - // TODO - closing the receiver doesn't matter for peek - // let errorPeek: string = ""; - // await receiver.diagnostics.peek().catch((err) => { - // errorPeek = err.message; - // }); - // should.equal( - // errorPeek, - // expectedErrorMsg, - // "Expected error not thrown for peek() from receiver" - // ); - - // let errorPeekBySequence: string = ""; - // await receiver.diagnostics.peekBySequenceNumber(Long.ZERO).catch((err) => { - // errorPeekBySequence = err.message; - // }); - // should.equal( - // errorPeekBySequence, - // expectedErrorMsg, - // "Expected error not thrown for peekBySequenceNumber() from receiver" - // ); - - // if (!entityName.usesSessions) { - // let errorRenewLock: string = ""; - // await (receiver).renewMessageLock("randomLockToken").catch((err) => { - // errorRenewLock = err.message; - // }); - // should.equal(errorRenewLock, expectedErrorMsg, "Expected error not thrown for renewLock()"); - // } + let errorPeek: string = ""; + await receiver.peekMessages().catch((err) => { + errorPeek = err.message; + }); + should.equal( + errorPeek, + expectedErrorMsg, + "Expected error not thrown for peekMessages() from receiver" + ); } /** @@ -684,7 +635,7 @@ describe("Errors after close()", function(): void { const sessionReceiver = receiver as SessionReceiver; let errorPeek: string = ""; - await sessionReceiver.browseMessages().catch((err) => { + await sessionReceiver.peekMessages().catch((err) => { errorPeek = err.message; }); should.equal( @@ -694,7 +645,7 @@ describe("Errors after close()", function(): void { ); let errorPeekBySequence: string = ""; - await sessionReceiver.browseMessages({ fromSequenceNumber: Long.ZERO }).catch((err) => { + await sessionReceiver.peekMessages({ fromSequenceNumber: Long.ZERO }).catch((err) => { errorPeekBySequence = err.message; }); should.equal( @@ -716,35 +667,6 @@ describe("Errors after close()", function(): void { should.equal(errorSetState, expectedErrorMsg, "Expected error not thrown for setState()"); } - // /** - // * Tests that each feature of the topic filters throws expected error - // */ - // async function testRules(expectedErrorMsg: string): Promise { - // let errorAddRule: string = ""; - // try { - // await subscriptionClient.addRule("myRule", true); - // } catch (error) { - // errorAddRule = error.message; - // } - // should.equal(errorAddRule, expectedErrorMsg, "Expected error not thrown for addRule()"); - - // let errorRemoveRule: string = ""; - // try { - // await subscriptionClient.removeRule("myRule"); - // } catch (err) { - // errorRemoveRule = err.message; - // } - // should.equal(errorRemoveRule, expectedErrorMsg, "Expected error not thrown for removeRule()"); - - // let errorGetRules: string = ""; - // try { - // await subscriptionClient.getRules(); - // } catch (err) { - // errorGetRules = err.message; - // } - // should.equal(errorGetRules, expectedErrorMsg, "Expected error not thrown for getRule()"); - // } - describe("Errors after close() on namespace", function(): void { const entityToClose = "namespace"; const expectedErrorMsg = "The underlying AMQP connection is closed."; @@ -777,7 +699,6 @@ describe("Errors after close()", function(): void { await testCreateSender(expectedErrorMsg); await testReceiver(expectedErrorMsg); await testCreateReceiver(expectedErrorMsg); - // await testRules(expectedErrorMsg); }); it("Unpartitioned Topic/Subscription with sessions: errors after close() on namespace", async function(): Promise< @@ -789,40 +710,9 @@ describe("Errors after close()", function(): void { await testCreateSender(expectedErrorMsg); await testSessionReceiver(expectedErrorMsg); await testCreateReceiver(expectedErrorMsg); - // await testRules(expectedErrorMsg); }); }); - // describe("Errors after close() on sender", function(): void { - // const entityToClose = "sender"; - - // it("Unpartitioned Queue: errors after close() on sender", async function(): Promise< - // void - // > { - // await beforeEachTest(TestClientType.UnpartitionedQueue, entityToClose); - - // await testSender( - // getSenderClosedErrorMsg(sender.entityPath, ClientType.QueueClient, true) - // ); - // await testCreateSender(getClientClosedErrorMsg(sender.entityPath)); - // }); - - // it("Unpartitioned Topic: errors after close() on sender", async function(): Promise< - // void - // > { - // await beforeEachTest( - // TestClientType.UnpartitionedTopic, - // TestClientType.UnpartitionedSubscription, - // entityToClose - // ); - - // await testSender( - // getSenderClosedErrorMsg(sender.entityPath, ClientType.TopicClient, true) - // ); - // await testCreateSender(getClientClosedErrorMsg(sender.entityPath)); - // }); - // }); - describe("Errors after close() on receiver", function(): void { const entityToClose = "receiver"; @@ -848,8 +738,6 @@ describe("Errors after close()", function(): void { await beforeEachTest(TestClientType.UnpartitionedSubscription, entityToClose); await testReceiver(getReceiverClosedErrorMsg(receiver.entityPath, false)); - // TODO - rules are independent of receiver - // await testRules(getClientClosedErrorMsg(receiver.entityPath)); }); it("Unpartitioned Topic/Subscription with sessions: errors after close() on receiver", async function(): Promise< @@ -860,25 +748,22 @@ describe("Errors after close()", function(): void { await testSessionReceiver( getReceiverClosedErrorMsg(receiver.entityPath, false, TestMessage.sessionId) ); - // TODO - rules are independent of receiver - // await testRules(getClientClosedErrorMsg(receiver.entityPath)); }); }); - // TODO - getOpenSenderErrorMsg doesn't exist, make that exist and update the test - // describe("Errors after close() on sender", function(): void { - // const entityToClose = "sender"; + describe("Errors after close() on sender", function(): void { + const entityToClose = "sender"; - // it("Unpartitioned Queue: errors after close() on sender", async function(): Promise< - // void - // > { - // await beforeEachTest(TestClientType.UnpartitionedQueue, entityToClose); + it("Unpartitioned Queue: errors after close() on sender", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedQueue, entityToClose); + await testSender(getSenderClosedErrorMsg(sender.entityPath)); + }); - // await testSender( - // getSenderClosedErrorMsg(sender.entityPath, ClientType.QueueClient, false) - // ); - // }); - // }); + it("Unpartitioned Topic: errors after close() on sender", async function(): Promise { + await beforeEachTest(TestClientType.UnpartitionedSubscription, entityToClose); + await testSender(getSenderClosedErrorMsg(sender.entityPath)); + }); + }); describe("Errors after close() on receiver", function(): void { const entityToClose = "receiver"; @@ -894,85 +779,6 @@ describe("Errors after close()", function(): void { await testAllDispositions(); }); }); - - // TODO - getOpenSenderErrorMsg doesn't exist, make that exist and update the tests - // describe("Errors when creating second sender/receiver with first not closed", function(): void { - // it("Open sender exists on QueueClient", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedQueue, ""); - - // await testCreateSender( - // getOpenSenderErrorMsg(ClientType.QueueClient, sender.entityPath) - // ); - // }); - - // it("Open sender exists on TopicClient", async function(): Promise { - // await beforeEachTest( - // TestClientType.PartitionedTopic, - // TestClientType.PartitionedSubscription, - // "" - // ); - - // await testCreateSender(getOpenSenderErrorMsg("TopicClient", sender.entityPath)); - // }); - - // it("Open receiver exists on QueueClient", async function(): Promise { - // await beforeEachTest(TestClientType.PartitionedQueue, ""); - - // await testCreateReceiver( - // getOpenReceiverErrorMsg(ClientType.QueueClient, receiver.entityPath) - // ); - // }); - - // it("Open receiver exists on SubscriptionClient", async function(): Promise { - // await beforeEachTest( - // TestClientType.PartitionedTopic, - // TestClientType.PartitionedSubscription, - // "" - // ); - - // await testCreateReceiver( - // getOpenReceiverErrorMsg(ClientType.SubscriptionClient, receiver.entityPath) - // ); - // }); - - // it("Open receiver exists for session on QueueClient", async function(): Promise< - // void - // > { - // await beforeEachTest( - // TestClientType.PartitionedQueueWithSessions, - // TestClientType.PartitionedQueueWithSessions, - // "", - // true - // ); - - // await testCreateReceiver( - // getOpenReceiverErrorMsg( - // ClientType.QueueClient, - // receiver.entityPath, - // TestMessage.sessionId - // ), - // true - // ); - // }); - - // it("Open receiver exists for session on SubscriptionClient", async function(): Promise { - // await beforeEachTest( - // TestClientType.PartitionedTopicWithSessions, - // TestClientType.PartitionedSubscriptionWithSessions, - // "", - // true - // ); - - // await testCreateReceiver( - // getOpenReceiverErrorMsg( - // ClientType.SubscriptionClient, - // receiver.entityPath, - // TestMessage.sessionId - // ), - // true - // ); - // }); - // }); }); describe("entityPath on sender and receiver", async () => { @@ -985,7 +791,7 @@ describe("entityPath on sender and receiver", async () => { }); it("UnpartitionedQueue", async () => { const entityName = await sbClient.test.createTestEntities(TestClientType.UnpartitionedQueue); - const sender = sbClient.test.addToCleanup(await sbClient.createSender(entityName.queue!)); + const sender = sbClient.test.addToCleanup(sbClient.createSender(entityName.queue!)); const receiver = sbClient.test.addToCleanup( sbClient.createReceiver(entityName.queue!, "receiveAndDelete") ); @@ -1009,7 +815,7 @@ describe("entityPath on sender and receiver", async () => { const entityName = await sbClient.test.createTestEntities( TestClientType.PartitionedSubscriptionWithSessions ); - const sender = sbClient.test.addToCleanup(await sbClient.createSender(entityName.topic!)); + const sender = sbClient.test.addToCleanup(sbClient.createSender(entityName.topic!)); const receiver = sbClient.test.addToCleanup( await sbClient.createSessionReceiver( entityName.topic!, diff --git a/sdk/servicebus/service-bus/test/sessionsRequiredCleanEntityTests.spec.ts b/sdk/servicebus/service-bus/test/sessionsRequiredCleanEntityTests.spec.ts index 22f785c33174..46d8b72a9d92 100644 --- a/sdk/servicebus/service-bus/test/sessionsRequiredCleanEntityTests.spec.ts +++ b/sdk/servicebus/service-bus/test/sessionsRequiredCleanEntityTests.spec.ts @@ -8,7 +8,7 @@ import { testPeekMsgsLength } from "./utils/testutils2"; import { Sender } from "../src/sender"; -import { SessionReceiver, ServiceBusMessage } from "../src"; +import { ServiceBusMessage, SessionReceiver } from "../src"; import { TestClientType, TestMessage } from "./utils/testUtils"; import { ReceivedMessageWithLock } from "../src/serviceBusMessage"; const should = chai.should(); @@ -29,7 +29,7 @@ describe("sessions tests - requires completely clean entity for each test", () const entityNames = await serviceBusClient.test.createTestEntities(testClientType); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); // Observation - @@ -42,9 +42,9 @@ describe("sessions tests - requires completely clean entity for each test", () // Hence, commenting the following code since there is no need to purge/peek into a freshly created entity // await purge(receiver); - // const browsedMsgs = await receiver.browseMessages(); + // const peekedMsgs = await receiver.peekMessages(); // const receiverEntityType = receiver.entityType; - // if (browsedMsgs.length) { + // if (peekedMsgs.length) { // chai.assert.fail(`Please use an empty ${receiverEntityType} for integration testing`); // } } @@ -80,17 +80,17 @@ describe("sessions tests - requires completely clean entity for each test", () }); // At this point AMQP receiver link has not been established. - // browseMessages() will not establish the link if sessionId was provided - const browsedMsgs = await receiver.browseMessages(); - should.equal(browsedMsgs.length, 1, "Unexpected number of messages browsed"); - should.equal(browsedMsgs[0].body, testMessage.body, "MessageBody is different than expected"); + // peekMessages() will not establish the link if sessionId was provided + const peekedMsgs = await receiver.peekMessages(); + should.equal(peekedMsgs.length, 1, "Unexpected number of messages browsed"); + should.equal(peekedMsgs[0].body, testMessage.body, "MessageBody is different than expected"); should.equal( - browsedMsgs[0].messageId, + peekedMsgs[0].messageId, testMessage.messageId, "MessageId is different than expected" ); should.equal( - browsedMsgs[0].sessionId, + peekedMsgs[0].sessionId, testMessage.sessionId, "SessionId is different than expected" ); @@ -281,8 +281,8 @@ describe("sessions tests - requires completely clean entity for each test", () ); await msgs[0].complete(); - const browsedMsgsInSession = await receiver.browseMessages(); - should.equal(browsedMsgsInSession.length, 0, "Unexpected number of messages browsed"); + const peekedMsgsInSession = await receiver.peekMessages(); + should.equal(peekedMsgsInSession.length, 0, "Unexpected number of messages peeked"); await receiver.close(); } diff --git a/sdk/servicebus/service-bus/test/sessionsTests.spec.ts b/sdk/servicebus/service-bus/test/sessionsTests.spec.ts index 47d1cb935e2a..70b6518ac1ed 100644 --- a/sdk/servicebus/service-bus/test/sessionsTests.spec.ts +++ b/sdk/servicebus/service-bus/test/sessionsTests.spec.ts @@ -6,16 +6,16 @@ import Long from "long"; const should = chai.should(); import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import { delay, ReceivedMessage } from "../src"; +import { ReceivedMessage, delay } from "../src"; -import { TestMessage, TestClientType, checkWithTimeout } from "./utils/testUtils"; +import { TestClientType, TestMessage, checkWithTimeout } from "./utils/testUtils"; import { Sender } from "../src/sender"; import { SessionReceiver } from "../src/receivers/sessionReceiver"; import { - testPeekMsgsLength, + EntityName, ServiceBusClientForTests, createServiceBusClientForTests, - EntityName + testPeekMsgsLength } from "./utils/testutils2"; import { ReceivedMessageWithLock } from "../src/serviceBusMessage"; import { AbortController } from "@azure/abort-controller"; @@ -42,7 +42,7 @@ describe("session tests", () => { }); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); // Observation - @@ -55,9 +55,9 @@ describe("session tests", () => { // Hence, commenting the following code since there is no need to purge/peek into a freshly created entity // await purge(receiver); - // const browsedMsgs = await receiver.browseMessages(); + // const peekedMsgs = await receiver.peekMessages(); // const receiverEntityType = receiver.entityType; - // if (browsedMsgs.length) { + // if (peekedMsgs.length) { // chai.assert.fail(`Please use an empty ${receiverEntityType} for integration testing`); // } } @@ -405,7 +405,7 @@ describe.skip("SessionReceiver - disconnects", function(): void { sessionId: testMessage.sessionId, autoRenewLockDurationInMs: 10000 // Lower this value so that test can complete in time. }); - const sender = await serviceBusClient.createSender(entityName.queue!); + const sender = serviceBusClient.createSender(entityName.queue!); // Send a message so we can be sure when the receiver is open and active. await sender.send(testMessage); const receivedErrors: any[] = []; diff --git a/sdk/servicebus/service-bus/test/smoketest.spec.ts b/sdk/servicebus/service-bus/test/smoketest.spec.ts index cedf4e4547db..933d65db131f 100644 --- a/sdk/servicebus/service-bus/test/smoketest.spec.ts +++ b/sdk/servicebus/service-bus/test/smoketest.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { delay, ServiceBusMessage, ReceivedMessage, Receiver } from "../src"; +import { ReceivedMessage, Receiver, ServiceBusMessage, delay } from "../src"; import { TestClientType } from "./utils/testUtils"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import { getEntityNameFromConnectionString } from "../src/constructorHelpers"; -import { createServiceBusClientForTests, ServiceBusClientForTests } from "./utils/testutils2"; +import { ServiceBusClientForTests, createServiceBusClientForTests } from "./utils/testutils2"; import { Sender } from "../src/sender"; import { ReceivedMessageWithLock } from "../src/serviceBusMessage"; chai.use(chaiAsPromised); @@ -35,7 +35,7 @@ describe("Sample scenarios for track 2", () => { }); beforeEach(async () => { - sender = serviceBusClient.test.addToCleanup(await serviceBusClient.createSender(queueName)); + sender = serviceBusClient.test.addToCleanup(serviceBusClient.createSender(queueName)); }); afterEach(async () => { @@ -47,7 +47,7 @@ describe("Sample scenarios for track 2", () => { serviceBusClient.createReceiver(queueName, "peekLock") ); - await sendSampleMessage(sender, "Queue, peek/lock"); + await sendSampleMessage(sender, "Queue, peek/lock", undefined, "single"); const errors: string[] = []; const receivedBodies: string[] = []; @@ -70,7 +70,7 @@ describe("Sample scenarios for track 2", () => { serviceBusClient.createReceiver(queueName, "receiveAndDelete") ); - await sendSampleMessage(sender, "Queue, peek/lock, receiveBatch"); + await sendSampleMessage(sender, "Queue, peek/lock, receiveBatch", undefined, "array"); const receivedBodies: string[] = []; @@ -87,7 +87,7 @@ describe("Sample scenarios for track 2", () => { serviceBusClient.createReceiver(queueName, "peekLock") ); - await sendSampleMessage(sender, "Queue, peek/lock, iterate messages"); + await sendSampleMessage(sender, "Queue, peek/lock, iterate messages", undefined, "batch"); // etc... // receiver.getRules(); @@ -160,12 +160,8 @@ describe("Sample scenarios for track 2", () => { continue; } - try { - receivedBodies.push(message.body); - break; - } catch (err) { - throw err; - } + receivedBodies.push(message.body); + break; } await waitAndValidate( @@ -192,7 +188,7 @@ describe("Sample scenarios for track 2", () => { }); beforeEach(async () => { - sender = serviceBusClient.test.addToCleanup(await serviceBusClient.createSender(topic)); + sender = serviceBusClient.test.addToCleanup(serviceBusClient.createSender(topic)); }); afterEach(async () => { @@ -306,12 +302,8 @@ describe("Sample scenarios for track 2", () => { continue; } - try { - receivedBodies.push(message.body); - break; - } catch (err) { - throw err; - } + receivedBodies.push(message.body); + break; } await waitAndValidate( @@ -332,7 +324,7 @@ describe("Sample scenarios for track 2", () => { TestClientType.UnpartitionedQueueWithSessions ); queue = entities.queue!; - sender = serviceBusClient.test.addToCleanup(await serviceBusClient.createSender(queue)); + sender = serviceBusClient.test.addToCleanup(serviceBusClient.createSender(queue)); }); it("Queue, next unlocked session, sessions", async () => { @@ -430,7 +422,12 @@ describe("Sample scenarios for track 2", () => { }); }); - async function sendSampleMessage(sender: Sender, body: string, sessionId?: string) { + async function sendSampleMessage( + sender: Sender, + body: string, + sessionId?: string, + method: "single" | "array" | "batch" = "single" + ): Promise { const message: ServiceBusMessage = { body }; @@ -439,7 +436,22 @@ describe("Sample scenarios for track 2", () => { message.sessionId = sessionId; } - await sender.send(message); + switch (method) { + case "single": { + await sender.send(message); + break; + } + case "array": { + await sender.send([message]); + break; + } + case "batch": { + const batch = await sender.createBatch(); + assert.isTrue(batch.tryAdd(message)); + await sender.send(batch); + break; + } + } } }); @@ -461,7 +473,7 @@ async function waitAndValidate( receivedBodies: string[], errors: string[], receiver: Receiver -) { +): Promise { const maxChecks = 20; let numChecks = 0; @@ -472,7 +484,7 @@ async function waitAndValidate( await delay(500); } - const remainingMessages = (await receiver.browseMessages()).map((m) => m.body); + const remainingMessages = (await receiver.peekMessages()).map((m) => m.body); assert.isEmpty(errors); assert.isEmpty(remainingMessages); assert.deepEqual([expectedMessage], receivedBodies); diff --git a/sdk/servicebus/service-bus/test/streamingReceiver.spec.ts b/sdk/servicebus/service-bus/test/streamingReceiver.spec.ts index 246f6385dc21..0639f05fe9b7 100644 --- a/sdk/servicebus/service-bus/test/streamingReceiver.spec.ts +++ b/sdk/servicebus/service-bus/test/streamingReceiver.spec.ts @@ -3,26 +3,29 @@ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; -import { delay, ReceivedMessage } from "../src"; +import { ReceivedMessage, delay } from "../src"; import { getAlreadyReceivingErrorMsg } from "../src/util/errors"; -import { checkWithTimeout, TestClientType, TestMessage } from "./utils/testUtils"; +import { TestClientType, TestMessage, checkWithTimeout } from "./utils/testUtils"; import { StreamingReceiver } from "../src/core/streamingReceiver"; import { DispositionType, - ServiceBusMessageImpl, + ReceiveMode, ReceivedMessageWithLock, - ReceiveMode + ServiceBusMessageImpl } from "../src/serviceBusMessage"; import { Receiver } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; import { + EntityName, ServiceBusClientForTests, createServiceBusClientForTests, + drainReceiveAndDeleteReceiver, testPeekMsgsLength } from "./utils/testutils2"; import { getDeliveryProperty } from "./utils/misc"; -import { translate, MessagingError, isNode } from "@azure/core-amqp"; +import { MessagingError, isNode, translate } from "@azure/core-amqp"; +import { verifyMessageCount } from "./utils/managementUtils"; const should = chai.should(); chai.use(chaiAsPromised); @@ -42,6 +45,7 @@ describe("Streaming", () => { let sender: Sender; let receiver: Receiver | Receiver; let deadLetterReceiver: Receiver; + let entityNames: EntityName; before(() => { serviceBusClient = createServiceBusClientForTests(); @@ -55,7 +59,7 @@ describe("Streaming", () => { testClientType: TestClientType, receiveMode?: "peekLock" | "receiveAndDelete" ): Promise { - const entityNames = await serviceBusClient.test.createTestEntities(testClientType); + entityNames = await serviceBusClient.test.createTestEntities(testClientType); if (receiveMode === "receiveAndDelete") { receiver = await serviceBusClient.test.getReceiveAndDeleteReceiver(entityNames); @@ -63,7 +67,7 @@ describe("Streaming", () => { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); } sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); deadLetterReceiver = serviceBusClient.test.createDeadLetterReceiver(entityNames); @@ -151,8 +155,8 @@ describe("Streaming", () => { should.equal(unexpectedError, undefined, unexpectedError && unexpectedError.message); should.equal(receivedMsgs.length, 1, "Unexpected number of messages"); - const browsedMsgs = await receiver.browseMessages(); - should.equal(browsedMsgs.length, 0, "Unexpected number of msgs found when peeking"); + const peekedMsgs = await receiver.peekMessages(); + should.equal(peekedMsgs.length, 0, "Unexpected number of msgs found when peeking"); } it("Partitioned Queue: AutoComplete removes the message", async function(): Promise { @@ -1093,7 +1097,10 @@ describe("Streaming", () => { 0, `Expected 0 messages, but received ${receivedMsgs.length}` ); + receiver = await serviceBusClient.test.getReceiveAndDeleteReceiver(entityNames); await testPeekMsgsLength(receiver, totalNumOfMessages); + await drainReceiveAndDeleteReceiver(receiver); + await verifyMessageCount(0, entityNames.queue); } it("UnPartitioned Queue: Not receive messages after receiver is closed", async function(): Promise< @@ -1137,7 +1144,7 @@ describe("Streaming - onDetached", function(): void { receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); } sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); errorWasThrown = false; @@ -1317,7 +1324,7 @@ describe("Streaming - disconnects", function(): void { const entityNames = await serviceBusClient.test.createTestEntities(testClientType); receiver = await serviceBusClient.test.getPeekLockReceiver(entityNames); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); } diff --git a/sdk/servicebus/service-bus/test/streamingReceiverSessions.spec.ts b/sdk/servicebus/service-bus/test/streamingReceiverSessions.spec.ts index 4a354b603756..2dc5a9f52016 100644 --- a/sdk/servicebus/service-bus/test/streamingReceiverSessions.spec.ts +++ b/sdk/servicebus/service-bus/test/streamingReceiverSessions.spec.ts @@ -3,18 +3,18 @@ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; -import { delay, ReceivedMessage } from "../src"; +import { ReceivedMessage, delay } from "../src"; import { getAlreadyReceivingErrorMsg } from "../src/util/errors"; -import { checkWithTimeout, TestClientType, TestMessage } from "./utils/testUtils"; +import { TestClientType, TestMessage, checkWithTimeout } from "./utils/testUtils"; import { DispositionType, ReceivedMessageWithLock } from "../src/serviceBusMessage"; import { SessionReceiver } from "../src/receivers/sessionReceiver"; import { Receiver } from "../src/receivers/receiver"; import { Sender } from "../src/sender"; import { - createServiceBusClientForTests, + EntityName, ServiceBusClientForTests, - testPeekMsgsLength, - EntityName + createServiceBusClientForTests, + testPeekMsgsLength } from "./utils/testutils2"; import { getDeliveryProperty } from "./utils/misc"; const should = chai.should(); @@ -52,7 +52,7 @@ describe("Streaming with sessions", () => { const entityNames = await createReceiverForTests(testClientType, receiveMode); sender = serviceBusClient.test.addToCleanup( - await serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) + serviceBusClient.createSender(entityNames.queue ?? entityNames.topic!) ); deadLetterReceiver = serviceBusClient.test.createDeadLetterReceiver(entityNames); @@ -322,7 +322,6 @@ describe("Streaming with sessions", () => { }); }); - // TODO: TEMPORARY describe("Sessions Streaming - Abandon message", function(): void { afterEach(async () => { await afterEachTest(); diff --git a/sdk/servicebus/service-bus/test/topicFilters.spec.ts b/sdk/servicebus/service-bus/test/topicFilters.spec.ts index 0b1837ee7318..95ce412541dd 100644 --- a/sdk/servicebus/service-bus/test/topicFilters.spec.ts +++ b/sdk/servicebus/service-bus/test/topicFilters.spec.ts @@ -47,7 +47,7 @@ // subscriptionClient = await serviceBusClient.test.getPeekLockReceiver(entityNames); // topicClient = serviceBusClient.test.addToCleanup( -// await serviceBusClient.createSender(entityNames.topic!) +// serviceBusClient.createSender(entityNames.topic!) // ); // subscriptionRuleManager = subscriptionRuleManager = serviceBusClient.test.addToCleanup( diff --git a/sdk/servicebus/service-bus/test/utils/abortSignalTestUtils.ts b/sdk/servicebus/service-bus/test/utils/abortSignalTestUtils.ts new file mode 100644 index 000000000000..72ba214f70ad --- /dev/null +++ b/sdk/servicebus/service-bus/test/utils/abortSignalTestUtils.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; + +/** + * Creates an AbortSignal that signals that it's aborted after .aborted is checked a certain + * number of times. + */ +export function createCountdownAbortSignal( + numTimesTillAborted: number +): ReturnType { + const countdownFn = () => { + --numTimesTillAborted; + + if (numTimesTillAborted < 0) { + throw new Error( + "We're checking abortSignal more than we thought. Our count is probably incorrect." + ); + } + + return numTimesTillAborted === 0; + }; + + return createAbortSignalForTest(countdownFn); +} + +/** + * Creates an AbortSignal that is already signalled or can be controlled by a + * custom function passed via isAborted. + */ +export function createAbortSignalForTest( + isAborted: boolean | (() => boolean) = false +): AbortSignalLike & { + removeWasCalled: boolean; + addWasCalled: boolean; +} { + const removeWasCalled = false; + let addWasCalled = false; + + const signal = { + addEventListener(): void { + addWasCalled = true; + }, + removeEventListener(): void { + this.removeWasCalled = true; + }, + removeWasCalled, + addWasCalled, + get aborted(): boolean { + if (typeof isAborted === "function") { + return isAborted(); + } + return isAborted; + } + }; + + return signal; +} diff --git a/sdk/servicebus/service-bus/test/utils/managementUtils.ts b/sdk/servicebus/service-bus/test/utils/managementUtils.ts index 6a3c11e4d3da..4b93ba873d1f 100644 --- a/sdk/servicebus/service-bus/test/utils/managementUtils.ts +++ b/sdk/servicebus/service-bus/test/utils/managementUtils.ts @@ -2,30 +2,32 @@ // Licensed under the MIT license. import { delay } from "../../src"; -import { QueueOptions } from "../../src/serializers/queueResourceSerializer"; -import { TopicOptions } from "../../src/serializers/topicResourceSerializer"; -import { SubscriptionOptions } from "../../src/serializers/subscriptionResourceSerializer"; -import { ServiceBusAtomManagementClient } from "../../src/serviceBusAtomManagementClient"; +import { QueueDescription } from "../../src/serializers/queueResourceSerializer"; +import { TopicDescription } from "../../src/serializers/topicResourceSerializer"; +import { SubscriptionDescription } from "../../src/serializers/subscriptionResourceSerializer"; +import { ServiceBusManagementClient } from "../../src/serviceBusAtomManagementClient"; import { EnvVarNames, getEnvVars } from "./envVarUtils"; +import chai from "chai"; +const should = chai.should(); -let client: ServiceBusAtomManagementClient; +let client: ServiceBusManagementClient; /** * Utility to fetch cached instance of `ServiceBusAtomManagementClient` else creates and returns - * a new instance constructed based on the connection string configured in environmet. + * a new instance constructed based on the connection string configured in environment. */ async function getManagementClient() { if (client == undefined) { const env = getEnvVars(); - client = new ServiceBusAtomManagementClient(env[EnvVarNames.SERVICEBUS_CONNECTION_STRING]); + client = new ServiceBusManagementClient(env[EnvVarNames.SERVICEBUS_CONNECTION_STRING]); } return client; } /** * Utility to apply retries to a given `operationCallBack`. - * Default policy is performing linear retries of upto `5` attempts that are `1000 milliseconds` apart. + * Default policy is performing linear retries of up to `5` attempts that are `1000 milliseconds` apart. * The retries will be preempted if given `breakConditionCallback` evaluates to `true` early on. * @param operationCallback * @param breakConditionCallback @@ -74,7 +76,10 @@ async function retry( * @param queueName * @param parameters */ -export async function recreateQueue(queueName: string, parameters?: QueueOptions): Promise { +export async function recreateQueue( + queueName: string, + parameters?: Omit +): Promise { await getManagementClient(); const deleteQueueOperation = async () => { @@ -82,12 +87,12 @@ export async function recreateQueue(queueName: string, parameters?: QueueOptions }; const createQueueOperation = async () => { - await client.createQueue(queueName, parameters); + await client.createQueue({ name: queueName, ...parameters }); }; const checkIfQueueExistsOperation = async () => { try { - await client.getQueueDetails(queueName); + await client.getQueue(queueName); } catch (err) { return false; } @@ -109,7 +114,10 @@ export async function recreateQueue(queueName: string, parameters?: QueueOptions * @param topicName * @param parameters */ -export async function recreateTopic(topicName: string, parameters?: TopicOptions): Promise { +export async function recreateTopic( + topicName: string, + parameters?: Omit +): Promise { await getManagementClient(); const deleteTopicOperation = async () => { @@ -117,12 +125,12 @@ export async function recreateTopic(topicName: string, parameters?: TopicOptions }; const createTopicOperation = async () => { - await client.createTopic(topicName, parameters); + await client.createTopic({ name: topicName, ...parameters }); }; const checkIfTopicExistsOperation = async () => { try { - await client.getTopicDetails(topicName); + await client.getTopic(topicName); } catch (err) { return false; } @@ -148,7 +156,7 @@ export async function recreateTopic(topicName: string, parameters?: TopicOptions export async function recreateSubscription( topicName: string, subscriptionName: string, - parameters?: SubscriptionOptions + parameters?: Omit ): Promise { await getManagementClient(); /* @@ -158,12 +166,12 @@ export async function recreateSubscription( */ const createSubscriptionOperation = async () => { - await client.createSubscription(topicName, subscriptionName, parameters); + await client.createSubscription({ topicName, subscriptionName, ...parameters }); }; const checkIfSubscriptionExistsOperation = async () => { try { - await client.getSubscriptionDetails(topicName, subscriptionName); + await client.getSubscription(topicName, subscriptionName); } catch (err) { return false; } @@ -177,6 +185,32 @@ export async function recreateSubscription( ); } +/** + * Utility that verifies the message count of an entity. + * + * @export + * @param {number} expectedMessageCount + * @param {string} [queueName] + * @param {string} [topicName] + * @param {string} [subscriptionName] + * @returns {Promise} + */ +export async function verifyMessageCount( + expectedMessageCount: number, + queueName?: string, + topicName?: string, + subscriptionName?: string +): Promise { + await getManagementClient(); + should.equal( + queueName + ? (await client.getQueueRuntimeInfo(queueName)).messageCount + : (await client.getSubscriptionRuntimeInfo(topicName!, subscriptionName!)).messageCount, + expectedMessageCount, + `Unexpected number of messages are present in the entity.` + ); +} + /** * Utility function to get namespace string from given connection string * @param serviceBusConnectionString diff --git a/sdk/servicebus/service-bus/test/utils/misc.ts b/sdk/servicebus/service-bus/test/utils/misc.ts index 9074e4d14c61..b9a26876337a 100644 --- a/sdk/servicebus/service-bus/test/utils/misc.ts +++ b/sdk/servicebus/service-bus/test/utils/misc.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { ReceivedMessage, Delivery } from "../../src"; +import { Delivery, ReceivedMessage } from "../../src"; import { ServiceBusMessageImpl } from "../../src/serviceBusMessage"; // some functions useful as we transition between interfaces and classes. diff --git a/sdk/servicebus/service-bus/test/utils/testUtils.ts b/sdk/servicebus/service-bus/test/utils/testUtils.ts index a85077615c86..e36900cb9907 100644 --- a/sdk/servicebus/service-bus/test/utils/testUtils.ts +++ b/sdk/servicebus/service-bus/test/utils/testUtils.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import chai from "chai"; -import { ServiceBusMessage, delay, MessagingError, ReceivedMessage } from "../../src"; +import { MessagingError, ReceivedMessage, ServiceBusMessage, delay } from "../../src"; import * as dotenv from "dotenv"; dotenv.config(); diff --git a/sdk/servicebus/service-bus/test/utils/testutils2.ts b/sdk/servicebus/service-bus/test/utils/testutils2.ts index bff9d8d0ccf6..1d27c8f39fc3 100644 --- a/sdk/servicebus/service-bus/test/utils/testutils2.ts +++ b/sdk/servicebus/service-bus/test/utils/testutils2.ts @@ -4,21 +4,26 @@ // Anything we expect to be available to users should come from this import // as a simple sanity check that we've exported things properly. import { - ServiceBusClient, - SessionReceiver, + CreateSessionReceiverOptions, Receiver, - CreateSessionReceiverOptions + ServiceBusClient, + SessionReceiver } from "../../src"; import { TestClientType, TestMessage } from "./testUtils"; -import { getEnvVars, EnvVarNames } from "./envVarUtils"; +import { EnvVarNames, getEnvVars } from "./envVarUtils"; import * as dotenv from "dotenv"; -import { recreateQueue, recreateTopic, recreateSubscription } from "./managementUtils"; +import { + recreateQueue, + recreateSubscription, + recreateTopic, + verifyMessageCount +} from "./managementUtils"; import { ServiceBusClientOptions } from "../../src"; import chai from "chai"; import { - ReceivedMessageWithLock, ReceivedMessage, + ReceivedMessageWithLock, ServiceBusMessage } from "../../src/serviceBusMessage"; @@ -166,8 +171,7 @@ export class ServiceBusTestHelpers { usesSessions: false }); receivedMsgs = await receiver.receiveBatch(sentMessages.length, { - // To Do - Maybe change the maxWaitTime - // Currently set same as numberOfMessages being received + // maxWaitTime is set same as numberOfMessages being received maxWaitTimeInMs: sentMessages.length * 1000 }); await receiver.close(); @@ -211,15 +215,20 @@ export class ServiceBusTestHelpers { "Unexpected number of messages received." ); receivedMsgs!.forEach((receivedMessage) => { - sentMessages = sentMessages.filter( - (sentMessage) => - sentMessage.messageId !== receivedMessage.messageId && - sentMessage.body !== receivedMessage.body - // To Do - Can check more properties here other than just messageId and body - ); + sentMessages = sentMessages.filter((sentMessage) => { + try { + TestMessage.checkMessageContents(sentMessage, receivedMessage, useSessions); + return true; + } catch (err) { + return false; + } + }); }); should.equal(sentMessages.length, 0, "Unexpected messages received."); - // To Do - Maybe peek into the entity to make sure there are no messages left in the entity + // Relying on Atom mgmt client for the message count verification instead of the `testPeekMsgsLength` + // because creating the session receivers might encounter timeouts or + // "MessagingError: No unlocked sessions were available" when there are no available sessions + await verifyMessageCount(0, entityNames.queue, entityNames.topic, entityNames.subscription); } async after(): Promise { @@ -265,7 +274,7 @@ export class ServiceBusTestHelpers { * The receiver created by this method will be cleaned up by `afterEach()` */ async getPeekLockReceiver( - entityNames: ReturnType + entityNames: Omit, "isPartitioned"> ): Promise> { try { // if you're creating a receiver this way then you'll just use the default @@ -293,7 +302,7 @@ export class ServiceBusTestHelpers { } async getSessionPeekLockReceiver( - entityNames: ReturnType, + entityNames: Omit, "isPartitioned">, getSessionReceiverOptions?: CreateSessionReceiverOptions ): Promise> { if (!entityNames.usesSessions) { @@ -459,12 +468,12 @@ export async function testPeekMsgsLength( peekableReceiver: Receiver, expectedPeekLength: number ): Promise { - const browsedMsgs = await peekableReceiver.browseMessages({ + const peekedMsgs = await peekableReceiver.peekMessages({ maxMessageCount: expectedPeekLength + 1 }); should.equal( - browsedMsgs.length, + peekedMsgs.length, expectedPeekLength, "Unexpected number of msgs found when peeking" ); diff --git a/sdk/servicebus/service-bus/tests.yml b/sdk/servicebus/service-bus/tests.yml index 12a2055baa53..f85c81abacb2 100644 --- a/sdk/servicebus/service-bus/tests.yml +++ b/sdk/servicebus/service-bus/tests.yml @@ -1,24 +1,14 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/service-bus" - ResourceServiceDirectory: servicebus - TimeoutInMinutes: 180 - TestSamples: false - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_SUBSCRIPTION_ID: $(test-subscription-id) +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/service-bus" + ResourceServiceDirectory: servicebus + TimeoutInMinutes: 180 + TestSamples: false + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + AZURE_SUBSCRIPTION_ID: $(test-subscription-id) diff --git a/sdk/servicebus/service-bus/tsconfig.json b/sdk/servicebus/service-bus/tsconfig.json index 8a4cfb29135e..e4c6af88963d 100644 --- a/sdk/servicebus/service-bus/tsconfig.json +++ b/sdk/servicebus/service-bus/tsconfig.json @@ -1,38 +1,17 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - /* Basic Options */ - "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - "declaration": true /* Generates corresponding '.d.ts' file. */, - "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, - "sourceMap": true /* Generates corresponding '.map' file. */, - "inlineSources": true, - "outDir": "./dist-esm" /* Redirect output structure to the directory. */, - "stripInternal": true /* Do not emit declarations for code with @internal annotation*/, - "declarationDir": "./types" /* Output directory for generated declaration files.*/, - "importHelpers": true /* Import emit helpers from 'tslib'. */, - - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - - /* Additional Checks */ - "noUnusedLocals": true /* Report errors on unused locals. */, - - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - - /* Experimental Options */ - "forceConsistentCasingInFileNames": true, - - /* Other options */ - "newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, - "allowJs": false /* Don't allow JavaScript files to be compiled.*/, - "resolveJsonModule": true + "declarationDir": "./types", + "outDir": "./dist-esm", + "lib": ["dom"], + "downlevelIteration": true }, - "compileOnSave": true, - "exclude": ["node_modules", "types/**", "./samples/**/*.ts", "test/perf/*", "test/stress/*"], + "exclude": [ + "node_modules", + "./types/**/*.d.ts", + "./samples/**/*.ts", + "test/perf/*", + "test/stress/*" + ], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/servicefabric/ci.yml b/sdk/servicefabric/ci.yml deleted file mode 100644 index 6c83e073469c..000000000000 --- a/sdk/servicefabric/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - -trigger: - branches: - include: - - master - - release/* - - hotfix/* - paths: - include: - - sdk/servicefabric/ - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - paths: - include: - - sdk/servicefabric/ - -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: servicefabric - Artifacts: - - name: azure-servicefabric - safeName: azureservicefabric diff --git a/sdk/signalr/arm-signalr/LICENSE.txt b/sdk/signalr/arm-signalr/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/signalr/arm-signalr/LICENSE.txt +++ b/sdk/signalr/arm-signalr/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/signalr/arm-signalr/README.md b/sdk/signalr/arm-signalr/README.md index df41fe4e858d..f0888a1ce19b 100644 --- a/sdk/signalr/arm-signalr/README.md +++ b/sdk/signalr/arm-signalr/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-signalr ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -95,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fsignalr%2Farm-signalr%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/signalr/arm-signalr/README.png) diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index d8c5b5b63f84..a7771a534ad8 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -2,11 +2,11 @@ "name": "@azure/arm-signalr", "author": "Microsoft Corporation", "description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/signalRManagementClient.js", "types": "./esm/signalRManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/signalr/arm-signalr", "repository": { diff --git a/sdk/signalr/arm-signalr/rollup.config.js b/sdk/signalr/arm-signalr/rollup.config.js index 7ee4e27aa63f..476685b5d0d8 100644 --- a/sdk/signalr/arm-signalr/rollup.config.js +++ b/sdk/signalr/arm-signalr/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/signalr/arm-signalr/src/models/index.ts b/sdk/signalr/arm-signalr/src/models/index.ts index 7f27a39bbd18..b5cab3e82b91 100644 --- a/sdk/signalr/arm-signalr/src/models/index.ts +++ b/sdk/signalr/arm-signalr/src/models/index.ts @@ -100,6 +100,20 @@ export interface MetricSpecification { dimensions?: Dimension[]; } +/** + * Specifications of the Logs for Azure Monitoring. + */ +export interface LogSpecification { + /** + * Name of the log. + */ + name?: string; + /** + * Localized friendly display name of the log. + */ + displayName?: string; +} + /** * An object that describes a specification. */ @@ -108,6 +122,10 @@ export interface ServiceSpecification { * Specifications of the Metrics for Azure Monitoring. */ metricSpecifications?: MetricSpecification[]; + /** + * Specifications of the Logs for Azure Monitoring. + */ + logSpecifications?: LogSpecification[]; } /** @@ -128,6 +146,10 @@ export interface Operation { * Name of the operation with format: {provider}/{resource}/{operation} */ name?: string; + /** + * If the operation is a data action. (for data plane rbac) + */ + isDataAction?: boolean; /** * The object that describes the operation. */ @@ -143,6 +165,39 @@ export interface Operation { properties?: OperationProperties; } +/** + * Describes a particular API error with an error code and a message. + */ +export interface ErrorResponseBody { + /** + * An error code that describes the error condition more precisely than an HTTP status code. + * Can be used to programmatically handle specific error cases. + */ + code: string; + /** + * A message that describes the error in detail and provides debugging information. + */ + message: string; + /** + * The target of the particular error (for example, the name of the property in error). + */ + target?: string; + /** + * Contains nested errors that are related to this error. + */ + details?: ErrorResponseBody[]; +} + +/** + * Contains information about an API error. + */ +export interface ErrorResponse { + /** + * Describes a particular API error with an error code and a message. + */ + error?: ErrorResponseBody; +} + /** * Data POST-ed to the nameAvailability action */ @@ -211,6 +266,35 @@ export interface ResourceSku { capacity?: number; } +/** + * Private endpoint + */ +export interface PrivateEndpoint { + /** + * Full qualified Id of the private endpoint + */ + id?: string; +} + +/** + * Connection state of the private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: PrivateLinkServiceConnectionStatus; + /** + * 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; +} + /** * The core properties of ARM resources. */ @@ -226,12 +310,39 @@ export interface Resource extends BaseResource { */ readonly name?: string; /** - * The type of the service - e.g. "Microsoft.SignalRService/SignalR" + * The type of the resource - e.g. "Microsoft.SignalRService/SignalR" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * A private endpoint connection to SignalR resource + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Unknown', + * 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Private endpoint associated with the private endpoint connection + */ + privateEndpoint?: PrivateEndpoint; + /** + * Connection state + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + /** * The resource model definition for a ARM tracked top level resource. */ @@ -252,7 +363,7 @@ export interface TrackedResource extends Resource { */ export interface SignalRResource extends TrackedResource { /** - * SKU of the service. + * The billing information of the resource.(e.g. Free, Standard) */ sku?: ResourceSku; /** @@ -275,6 +386,14 @@ export interface SignalRResource extends TrackedResource { * Cross-Origin Resource Sharing (CORS) settings. */ cors?: SignalRCorsSettings; + /** + * Upstream settings when the Azure SignalR is in server-less mode. + */ + upstream?: ServerlessUpstreamSettings; + /** + * Network ACLs + */ + networkACLs?: SignalRNetworkACLs; /** * Provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', * 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' @@ -305,17 +424,39 @@ export interface SignalRResource extends TrackedResource { readonly serverPort?: number; /** * Version of the SignalR resource. Probably you need the same or higher version of client SDKs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * Private endpoint connections to the SignalR resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - version?: string; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The kind of the service - e.g. "SignalR", or "RawWebSockets" for + * "Microsoft.SignalRService/SignalR". Possible values include: 'SignalR', 'RawWebSockets' + */ + kind?: ServiceKind; } /** * Feature of a SignalR resource, which controls the SignalR runtime behavior. */ export interface SignalRFeature { + /** + * FeatureFlags is the supported features of Azure SignalR service. + * - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have + * your own backend server; "Serverless": your application doesn't have a backend server; + * "Classic": for backward compatibility. Support both Default and Serverless mode but not + * recommended; "PredefinedOnly": for future use. + * - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category + * respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs', + * 'EnableMessagingLogs' + */ + flag: FeatureFlags; /** * Value of the feature flag. See Azure SignalR service document - * https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + * https://docs.microsoft.com/azure/azure-signalr/ for allowed values. */ value: string; /** @@ -335,6 +476,104 @@ export interface SignalRCorsSettings { allowedOrigins?: string[]; } +/** + * Upstream template item settings. It defines the Upstream URL of the incoming requests. + * The template defines the pattern of the event, the hub or the category of the incoming request + * that matches current URL template. + */ +export interface UpstreamTemplate { + /** + * Gets or sets the matching pattern for hub names. If not set, it matches any hub. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any hub name + * 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2" + * 3. The single hub name, for example, "hub1", it matches "hub1" + */ + hubPattern?: string; + /** + * Gets or sets the matching pattern for event names. If not set, it matches any event. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any event name + * 2. Combine multiple events with ",", for example "connect,disconnect", it matches event + * "connect" and "disconnect" + * 3. The single event name, for example, "connect", it matches "connect" + */ + eventPattern?: string; + /** + * Gets or sets the matching pattern for category names. If not set, it matches any category. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any category name + * 2. Combine multiple categories with ",", for example "connections,messages", it matches + * category "connections" and "messages" + * 3. The single category name, for example, "connections", it matches the category "connections" + */ + categoryPattern?: string; + /** + * Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} + * {event} inside the template, the value of the Upstream URL is dynamically calculated when the + * client request comes in. + * For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, with a client + * request from hub `chat` connects, it will first POST to this URL: + * `http://example.com/chat/api/connect`. + */ + urlTemplate: string; +} + +/** + * The settings for the Upstream when the Azure SignalR is in server-less mode. + */ +export interface ServerlessUpstreamSettings { + /** + * Gets or sets the list of Upstream URL templates. Order matters, and the first matching + * template takes effects. + */ + templates?: UpstreamTemplate[]; +} + +/** + * Network ACL + */ +export interface NetworkACL { + /** + * Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, + * RESTAPI. + */ + allow?: SignalRRequestType[]; + /** + * Denied request types. The value can be one or more of: ClientConnection, ServerConnection, + * RESTAPI. + */ + deny?: SignalRRequestType[]; +} + +/** + * ACL for a private endpoint + */ +export interface PrivateEndpointACL extends NetworkACL { + /** + * Name of the private endpoint connection + */ + name: string; +} + +/** + * Network ACLs for SignalR + */ +export interface SignalRNetworkACLs { + /** + * Default action when no other rule matches. Possible values include: 'Allow', 'Deny' + */ + defaultAction?: ACLAction; + /** + * ACL for requests from public network + */ + publicNetwork?: NetworkACL; + /** + * ACLs for requests from private endpoints + */ + privateEndpoints?: PrivateEndpointACL[]; +} + /** * Settings used to provision or configure the resource. */ @@ -359,6 +598,32 @@ export interface SignalRCreateOrUpdateProperties { * Cross-Origin Resource Sharing (CORS) settings. */ cors?: SignalRCorsSettings; + /** + * Upstream settings when the Azure SignalR is in server-less mode. + */ + upstream?: ServerlessUpstreamSettings; + /** + * Network ACLs + */ + networkACLs?: SignalRNetworkACLs; +} + +/** + * Private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * Group Id of the private link resource + */ + groupId?: string; + /** + * Required members of the private link resource + */ + requiredMembers?: string[]; + /** + * Required private DNS zone names + */ + requiredZoneNames?: string[]; } /** @@ -394,38 +659,6 @@ export interface RegenerateKeyParameters { keyType?: KeyType; } -/** - * Parameters for SignalR service update operation - */ -export interface SignalRUpdateParameters { - /** - * A list of key value pairs that describe the resource. - */ - tags?: { [propertyName: string]: string }; - /** - * The billing information of the resource.(e.g. basic vs. standard) - */ - sku?: ResourceSku; - /** - * Settings used to provision or configure the resource - */ - properties?: SignalRCreateOrUpdateProperties; -} - -/** - * Parameters for SignalR service create/update operation. - * - * Keep the same schema as AzSignalR.Models.SignalRResource - */ -export interface SignalRCreateParameters extends SignalRUpdateParameters { - /** - * Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | - * North Europe | East Asia | Southeast Asia | etc. - * The geo region of a resource never changes after it is created. - */ - location: string; -} - /** * Localizable String object containing the name and a localized value. */ @@ -494,7 +727,7 @@ export interface SignalRCreateOrUpdateOptionalParams extends msRest.RequestOptio /** * Parameters for the create or update operation */ - parameters?: SignalRCreateParameters; + parameters?: SignalRResource; } /** @@ -504,7 +737,7 @@ export interface SignalRUpdateOptionalParams extends msRest.RequestOptionsBase { /** * Parameters for the update operation */ - parameters?: SignalRUpdateParameters; + parameters?: SignalRResource; } /** @@ -524,7 +757,7 @@ export interface SignalRBeginCreateOrUpdateOptionalParams extends msRest.Request /** * Parameters for the create or update operation */ - parameters?: SignalRCreateParameters; + parameters?: SignalRResource; } /** @@ -534,7 +767,17 @@ export interface SignalRBeginUpdateOptionalParams extends msRest.RequestOptionsB /** * Parameters for the update operation */ - parameters?: SignalRUpdateParameters; + parameters?: SignalRResource; +} + +/** + * Optional Parameters. + */ +export interface SignalRPrivateEndpointConnectionsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The resource of private endpoint and its properties. + */ + parameters?: PrivateEndpointConnection; } /** @@ -570,6 +813,20 @@ export interface SignalRResourceList extends Array { nextLink?: string; } +/** + * @interface + * Contains a list of AzSignalR.Models.Response.PrivateLink.PrivateLinkResource and a possible link + * to query more results + * @extends Array + */ +export interface PrivateLinkResourceList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + /** * @interface * Object that includes an array of SignalR resource usages and a possible link for next set. @@ -600,6 +857,46 @@ export type SignalRSkuTier = 'Free' | 'Basic' | 'Standard' | 'Premium'; */ export type ProvisioningState = 'Unknown' | 'Succeeded' | 'Failed' | 'Canceled' | 'Running' | 'Creating' | 'Updating' | 'Deleting' | 'Moving'; +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for ServiceKind. + * Possible values include: 'SignalR', 'RawWebSockets' + * @readonly + * @enum {string} + */ +export type ServiceKind = 'SignalR' | 'RawWebSockets'; + +/** + * Defines values for FeatureFlags. + * Possible values include: 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs' + * @readonly + * @enum {string} + */ +export type FeatureFlags = 'ServiceMode' | 'EnableConnectivityLogs' | 'EnableMessagingLogs'; + +/** + * Defines values for ACLAction. + * Possible values include: 'Allow', 'Deny' + * @readonly + * @enum {string} + */ +export type ACLAction = 'Allow' | 'Deny'; + +/** + * Defines values for SignalRRequestType. + * Possible values include: 'ClientConnection', 'ServerConnection', 'RESTAPI' + * @readonly + * @enum {string} + */ +export type SignalRRequestType = 'ClientConnection' | 'ServerConnection' | 'RESTAPI'; + /** * Defines values for KeyType. * Possible values include: 'Primary', 'Secondary' @@ -908,6 +1205,86 @@ export type SignalRListByResourceGroupNextResponse = SignalRResourceList & { }; }; +/** + * Contains response data for the get operation. + */ +export type SignalRPrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SignalRPrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SignalRPrivateLinkResourcesListResponse = PrivateLinkResourceList & { + /** + * 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: PrivateLinkResourceList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SignalRPrivateLinkResourcesListNextResponse = PrivateLinkResourceList & { + /** + * 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: PrivateLinkResourceList; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/signalr/arm-signalr/src/models/mappers.ts b/sdk/signalr/arm-signalr/src/models/mappers.ts index cfd0174cb50a..d3370fa5d0bb 100644 --- a/sdk/signalr/arm-signalr/src/models/mappers.ts +++ b/sdk/signalr/arm-signalr/src/models/mappers.ts @@ -144,6 +144,28 @@ export const MetricSpecification: msRest.CompositeMapper = { } }; +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + export const ServiceSpecification: msRest.CompositeMapper = { serializedName: "ServiceSpecification", type: { @@ -161,6 +183,18 @@ export const ServiceSpecification: msRest.CompositeMapper = { } } } + }, + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } } } } @@ -195,6 +229,12 @@ export const Operation: msRest.CompositeMapper = { name: "String" } }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, display: { serializedName: "display", type: { @@ -219,6 +259,65 @@ export const Operation: msRest.CompositeMapper = { } }; +export const ErrorResponseBody: msRest.CompositeMapper = { + serializedName: "ErrorResponseBody", + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponseBody" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + } + } + } +}; + export const NameAvailabilityParameters: msRest.CompositeMapper = { serializedName: "NameAvailabilityParameters", type: { @@ -312,6 +411,50 @@ export const ResourceSku: msRest.CompositeMapper = { } }; +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -343,6 +486,49 @@ export const Resource: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } + } + } +}; + export const TrackedResource: msRest.CompositeMapper = { serializedName: "TrackedResource", type: { @@ -410,6 +596,20 @@ export const SignalRResource: msRest.CompositeMapper = { className: "SignalRCorsSettings" } }, + upstream: { + serializedName: "properties.upstream", + type: { + name: "Composite", + className: "ServerlessUpstreamSettings" + } + }, + networkACLs: { + serializedName: "properties.networkACLs", + type: { + name: "Composite", + className: "SignalRNetworkACLs" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -446,10 +646,30 @@ export const SignalRResource: msRest.CompositeMapper = { } }, version: { + readOnly: true, serializedName: "properties.version", type: { name: "String" } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } } } } @@ -463,9 +683,7 @@ export const SignalRFeature: msRest.CompositeMapper = { modelProperties: { flag: { required: true, - isConstant: true, serializedName: "flag", - defaultValue: 'ServiceMode', type: { name: "String" } @@ -517,136 +735,278 @@ export const SignalRCorsSettings: msRest.CompositeMapper = { } }; -export const SignalRCreateOrUpdateProperties: msRest.CompositeMapper = { - serializedName: "SignalRCreateOrUpdateProperties", +export const UpstreamTemplate: msRest.CompositeMapper = { + serializedName: "UpstreamTemplate", type: { name: "Composite", - className: "SignalRCreateOrUpdateProperties", + className: "UpstreamTemplate", modelProperties: { - hostNamePrefix: { - serializedName: "hostNamePrefix", + hubPattern: { + serializedName: "hubPattern", type: { name: "String" } }, - features: { - serializedName: "features", + eventPattern: { + serializedName: "eventPattern", + type: { + name: "String" + } + }, + categoryPattern: { + serializedName: "categoryPattern", + type: { + name: "String" + } + }, + urlTemplate: { + required: true, + serializedName: "urlTemplate", + type: { + name: "String" + } + } + } + } +}; + +export const ServerlessUpstreamSettings: msRest.CompositeMapper = { + serializedName: "ServerlessUpstreamSettings", + type: { + name: "Composite", + className: "ServerlessUpstreamSettings", + modelProperties: { + templates: { + serializedName: "templates", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SignalRFeature" + className: "UpstreamTemplate" + } + } + } + } + } + } +}; + +export const NetworkACL: msRest.CompositeMapper = { + serializedName: "NetworkACL", + type: { + name: "Composite", + className: "NetworkACL", + modelProperties: { + allow: { + serializedName: "allow", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } }, - cors: { - serializedName: "cors", + deny: { + serializedName: "deny", type: { - name: "Composite", - className: "SignalRCorsSettings" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const SignalRKeys: msRest.CompositeMapper = { - serializedName: "SignalRKeys", +export const PrivateEndpointACL: msRest.CompositeMapper = { + serializedName: "PrivateEndpointACL", type: { name: "Composite", - className: "SignalRKeys", + className: "PrivateEndpointACL", modelProperties: { - primaryKey: { - serializedName: "primaryKey", + ...NetworkACL.type.modelProperties, + name: { + required: true, + serializedName: "name", type: { name: "String" } - }, - secondaryKey: { - serializedName: "secondaryKey", + } + } + } +}; + +export const SignalRNetworkACLs: msRest.CompositeMapper = { + serializedName: "SignalRNetworkACLs", + type: { + name: "Composite", + className: "SignalRNetworkACLs", + modelProperties: { + defaultAction: { + serializedName: "defaultAction", type: { name: "String" } }, - primaryConnectionString: { - serializedName: "primaryConnectionString", + publicNetwork: { + serializedName: "publicNetwork", type: { - name: "String" + name: "Composite", + className: "NetworkACL" } }, - secondaryConnectionString: { - serializedName: "secondaryConnectionString", + privateEndpoints: { + serializedName: "privateEndpoints", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointACL" + } + } } } } } }; -export const RegenerateKeyParameters: msRest.CompositeMapper = { - serializedName: "RegenerateKeyParameters", +export const SignalRCreateOrUpdateProperties: msRest.CompositeMapper = { + serializedName: "SignalRCreateOrUpdateProperties", type: { name: "Composite", - className: "RegenerateKeyParameters", + className: "SignalRCreateOrUpdateProperties", modelProperties: { - keyType: { - serializedName: "keyType", + hostNamePrefix: { + serializedName: "hostNamePrefix", type: { name: "String" } + }, + features: { + serializedName: "features", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignalRFeature" + } + } + } + }, + cors: { + serializedName: "cors", + type: { + name: "Composite", + className: "SignalRCorsSettings" + } + }, + upstream: { + serializedName: "upstream", + type: { + name: "Composite", + className: "ServerlessUpstreamSettings" + } + }, + networkACLs: { + serializedName: "networkACLs", + type: { + name: "Composite", + className: "SignalRNetworkACLs" + } } } } }; -export const SignalRUpdateParameters: msRest.CompositeMapper = { - serializedName: "SignalRUpdateParameters", +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", type: { name: "Composite", - className: "SignalRUpdateParameters", + className: "PrivateLinkResource", modelProperties: { - tags: { - serializedName: "tags", + ...ProxyResource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", type: { - name: "Dictionary", - value: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { type: { name: "String" } } } }, - sku: { - serializedName: "sku", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "Composite", - className: "ResourceSku" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SignalRKeys: msRest.CompositeMapper = { + serializedName: "SignalRKeys", + type: { + name: "Composite", + className: "SignalRKeys", + modelProperties: { + primaryKey: { + serializedName: "primaryKey", + type: { + name: "String" } }, - properties: { - serializedName: "properties", + secondaryKey: { + serializedName: "secondaryKey", type: { - name: "Composite", - className: "SignalRCreateOrUpdateProperties" + name: "String" + } + }, + primaryConnectionString: { + serializedName: "primaryConnectionString", + type: { + name: "String" + } + }, + secondaryConnectionString: { + serializedName: "secondaryConnectionString", + type: { + name: "String" } } } } }; -export const SignalRCreateParameters: msRest.CompositeMapper = { - serializedName: "SignalRCreateParameters", +export const RegenerateKeyParameters: msRest.CompositeMapper = { + serializedName: "RegenerateKeyParameters", type: { name: "Composite", - className: "SignalRCreateParameters", + className: "RegenerateKeyParameters", modelProperties: { - ...SignalRUpdateParameters.type.modelProperties, - location: { - required: true, - serializedName: "location", + keyType: { + serializedName: "keyType", type: { name: "String" } @@ -774,6 +1134,34 @@ export const SignalRResourceList: msRest.CompositeMapper = { } }; +export const PrivateLinkResourceList: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceList", + type: { + name: "Composite", + className: "PrivateLinkResourceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const SignalRUsageList: msRest.CompositeMapper = { serializedName: "SignalRUsageList", type: { diff --git a/sdk/signalr/arm-signalr/src/models/operationsMappers.ts b/sdk/signalr/arm-signalr/src/models/operationsMappers.ts index 0c08e4126240..cbabd104412b 100644 --- a/sdk/signalr/arm-signalr/src/models/operationsMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/operationsMappers.ts @@ -7,8 +7,10 @@ */ export { - CloudError, Dimension, + ErrorResponse, + ErrorResponseBody, + LogSpecification, MetricSpecification, Operation, OperationDisplay, diff --git a/sdk/signalr/arm-signalr/src/models/parameters.ts b/sdk/signalr/arm-signalr/src/models/parameters.ts index ec86d0d978e4..21d86c35fadf 100644 --- a/sdk/signalr/arm-signalr/src/models/parameters.ts +++ b/sdk/signalr/arm-signalr/src/models/parameters.ts @@ -51,6 +51,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/signalr/arm-signalr/src/models/signalRMappers.ts b/sdk/signalr/arm-signalr/src/models/signalRMappers.ts index ab52ff22bc82..1dc9a2c17d74 100644 --- a/sdk/signalr/arm-signalr/src/models/signalRMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/signalRMappers.ts @@ -8,19 +8,27 @@ export { BaseResource, - CloudError, + ErrorResponse, + ErrorResponseBody, NameAvailability, NameAvailabilityParameters, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, RegenerateKeyParameters, Resource, ResourceSku, + ServerlessUpstreamSettings, SignalRCorsSettings, - SignalRCreateOrUpdateProperties, - SignalRCreateParameters, SignalRFeature, SignalRKeys, + SignalRNetworkACLs, SignalRResource, SignalRResourceList, - SignalRUpdateParameters, - TrackedResource + TrackedResource, + UpstreamTemplate } from "../models/mappers"; diff --git a/sdk/signalr/arm-signalr/src/models/signalRPrivateEndpointConnectionsMappers.ts b/sdk/signalr/arm-signalr/src/models/signalRPrivateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..aca05d6160ef --- /dev/null +++ b/sdk/signalr/arm-signalr/src/models/signalRPrivateEndpointConnectionsMappers.ts @@ -0,0 +1,29 @@ +/* + * 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, + ErrorResponse, + ErrorResponseBody, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceSku, + ServerlessUpstreamSettings, + SignalRCorsSettings, + SignalRFeature, + SignalRNetworkACLs, + SignalRResource, + TrackedResource, + UpstreamTemplate +} from "../models/mappers"; diff --git a/sdk/signalr/arm-signalr/src/models/signalRPrivateLinkResourcesMappers.ts b/sdk/signalr/arm-signalr/src/models/signalRPrivateLinkResourcesMappers.ts new file mode 100644 index 000000000000..d3e7746fca4a --- /dev/null +++ b/sdk/signalr/arm-signalr/src/models/signalRPrivateLinkResourcesMappers.ts @@ -0,0 +1,30 @@ +/* + * 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, + ErrorResponse, + ErrorResponseBody, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceList, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceSku, + ServerlessUpstreamSettings, + SignalRCorsSettings, + SignalRFeature, + SignalRNetworkACLs, + SignalRResource, + TrackedResource, + UpstreamTemplate +} from "../models/mappers"; diff --git a/sdk/signalr/arm-signalr/src/models/usagesMappers.ts b/sdk/signalr/arm-signalr/src/models/usagesMappers.ts index eb4103f06fe6..1bfca1391509 100644 --- a/sdk/signalr/arm-signalr/src/models/usagesMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/usagesMappers.ts @@ -7,7 +7,8 @@ */ export { - CloudError, + ErrorResponse, + ErrorResponseBody, SignalRUsage, SignalRUsageList, SignalRUsageName diff --git a/sdk/signalr/arm-signalr/src/operations/index.ts b/sdk/signalr/arm-signalr/src/operations/index.ts index 1e9f2c2dc3dc..c39628af041e 100644 --- a/sdk/signalr/arm-signalr/src/operations/index.ts +++ b/sdk/signalr/arm-signalr/src/operations/index.ts @@ -10,4 +10,6 @@ export * from "./operations"; export * from "./signalR"; +export * from "./signalRPrivateEndpointConnections"; +export * from "./signalRPrivateLinkResources"; export * from "./usages"; diff --git a/sdk/signalr/arm-signalr/src/operations/operations.ts b/sdk/signalr/arm-signalr/src/operations/operations.ts index b2828462ae65..f71f913e310b 100644 --- a/sdk/signalr/arm-signalr/src/operations/operations.ts +++ b/sdk/signalr/arm-signalr/src/operations/operations.ts @@ -95,7 +95,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -116,7 +116,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/signalr/arm-signalr/src/operations/signalR.ts b/sdk/signalr/arm-signalr/src/operations/signalR.ts index acb3200beeba..8dd4294249f3 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalR.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalR.ts @@ -426,7 +426,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.NameAvailability }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -434,7 +434,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR", + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/signalR", urlParameters: [ Parameters.subscriptionId ], @@ -449,7 +449,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -457,7 +457,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName @@ -473,7 +473,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -481,7 +481,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -498,7 +498,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -523,7 +523,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -531,7 +531,7 @@ const getOperationSpec: msRest.OperationSpec = { const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -555,7 +555,7 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -580,15 +580,18 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { "options", "parameters" ], - mapper: Mappers.SignalRCreateParameters + mapper: Mappers.SignalRResource }, responses: { + 200: { + bodyMapper: Mappers.SignalRResource + }, 201: { bodyMapper: Mappers.SignalRResource }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -612,7 +615,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -637,7 +640,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { "options", "parameters" ], - mapper: Mappers.SignalRUpdateParameters + mapper: Mappers.SignalRResource }, responses: { 200: { @@ -645,7 +648,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -669,7 +672,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -690,7 +693,7 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -711,7 +714,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts new file mode 100644 index 000000000000..59f78ac2c8df --- /dev/null +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateEndpointConnections.ts @@ -0,0 +1,236 @@ +/* + * 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. + */ + +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/signalRPrivateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { SignalRManagementClientContext } from "../signalRManagementClientContext"; + +/** Class representing a SignalRPrivateEndpointConnections. */ +export class SignalRPrivateEndpointConnections { + private readonly client: SignalRManagementClientContext; + + /** + * Create a SignalRPrivateEndpointConnections. + * @param {SignalRManagementClientContext} client Reference to the service client. + */ + constructor(client: SignalRManagementClientContext) { + this.client = client; + } + + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param callback The callback + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param options The optional parameters + * @param callback The callback + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateEndpointConnectionName, + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + update(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: Models.SignalRPrivateEndpointConnectionsUpdateOptionalParams): Promise; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param callback The callback + */ + update(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param options The optional parameters + * @param callback The callback + */ + update(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options: Models.SignalRPrivateEndpointConnectionsUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: Models.SignalRPrivateEndpointConnectionsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateEndpointConnectionName, + resourceGroupName, + resourceName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(privateEndpointConnectionName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + privateEndpointConnectionName, + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.PrivateEndpointConnection + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts new file mode 100644 index 000000000000..588b23f11534 --- /dev/null +++ b/sdk/signalr/arm-signalr/src/operations/signalRPrivateLinkResources.ts @@ -0,0 +1,139 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/signalRPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { SignalRManagementClientContext } from "../signalRManagementClientContext"; + +/** Class representing a SignalRPrivateLinkResources. */ +export class SignalRPrivateLinkResources { + private readonly client: SignalRManagementClientContext; + + /** + * Create a SignalRPrivateLinkResources. + * @param {SignalRManagementClientContext} client Reference to the service client. + */ + constructor(client: SignalRManagementClientContext) { + this.client = client; + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * @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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/signalr/arm-signalr/src/operations/usages.ts b/sdk/signalr/arm-signalr/src/operations/usages.ts index e7fab0c70031..ac88a23c5717 100644 --- a/sdk/signalr/arm-signalr/src/operations/usages.ts +++ b/sdk/signalr/arm-signalr/src/operations/usages.ts @@ -103,7 +103,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRUsageList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -124,7 +124,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SignalRUsageList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts index f83378e7b55b..014292692df5 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClient.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClient.ts @@ -19,6 +19,8 @@ class SignalRManagementClient extends SignalRManagementClientContext { // Operation groups operations: operations.Operations; signalR: operations.SignalR; + signalRPrivateEndpointConnections: operations.SignalRPrivateEndpointConnections; + signalRPrivateLinkResources: operations.SignalRPrivateLinkResources; usages: operations.Usages; /** @@ -32,6 +34,8 @@ class SignalRManagementClient extends SignalRManagementClientContext { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.signalR = new operations.SignalR(this); + this.signalRPrivateEndpointConnections = new operations.SignalRPrivateEndpointConnections(this); + this.signalRPrivateLinkResources = new operations.SignalRPrivateLinkResources(this); this.usages = new operations.Usages(this); } } diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index 989f634e26e2..8fb233b8113d 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-signalr"; -const packageVersion = "2.0.0"; +const packageVersion = "3.0.0"; export class SignalRManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -38,14 +38,14 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2018-10-01'; + this.apiVersion = '2020-05-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -53,10 +53,10 @@ export class SignalRManagementClientContext extends msRestAzure.AzureServiceClie this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/signalr/arm-signalr/tsconfig.json b/sdk/signalr/arm-signalr/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/signalr/arm-signalr/tsconfig.json +++ b/sdk/signalr/arm-signalr/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 79fe89228eb4..9759da7a4191 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,16 +22,16 @@ pr: include: - sdk/storage/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: storage - Artifacts: - - name: azure-storage-blob - safeName: azurestorageblob - - name: azure-storage-file-share - safeName: azurestoragefileshare - - name: azure-storage-file-datalake - safeName: azurestoragefiledatalake - - name: azure-storage-queue - safeName: azurestoragequeue +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: storage + Artifacts: + - name: azure-storage-blob + safeName: azurestorageblob + - name: azure-storage-file-share + safeName: azurestoragefileshare + - name: azure-storage-file-datalake + safeName: azurestoragefiledatalake + - name: azure-storage-queue + safeName: azurestoragequeue diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index 79f80e115b68..88ab22f6117e 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -251,7 +251,7 @@ - `downloadToFile()` is added to `BlobClient`. - Exported `HttpRequestBody` type to allow implementation of a customized HTTP client. -For release notes and more information please visit https://aka.ms/azure-sdk-preview1-js +For release notes and more information please visit https://aka.ms/azsdk/releases/july2019preview ## 10.5.0 (2019.09) diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index a1118efa7b50..4dbe141bfe90 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -106,7 +106,7 @@ "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/identity": "^1.1.0-preview", @@ -119,7 +119,7 @@ "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "es6-promise": "^4.2.5", @@ -147,18 +147,18 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "source-map-support": "^0.5.9", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index 3892902ee438..a6aedcf41455 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -472,6 +472,8 @@ export function padStart( targetLength: number, padString: string = " " ): string { + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } diff --git a/sdk/storage/storage-blob/test/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/pageblobclient.spec.ts index 2c93e19c9534..043c83f0c9c5 100644 --- a/sdk/storage/storage-blob/test/pageblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/pageblobclient.spec.ts @@ -185,7 +185,7 @@ describe("PageBlobClient", () => { assert.equal(rangesDiff.clearRange![0].count, 511); }); - it("getPageRangesDiffForManagedDisks", async function() { + it("getPageRangesDiffForManagedDisks", async function(): Promise { let mdBlobServiceClient: BlobServiceClient; try { mdBlobServiceClient = getGenericBSU("MD_", ""); diff --git a/sdk/storage/storage-blob/test/retrypolicy.spec.ts b/sdk/storage/storage-blob/test/retrypolicy.spec.ts index 9f7aac42fda0..734dead3dc32 100644 --- a/sdk/storage/storage-blob/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-blob/test/retrypolicy.spec.ts @@ -38,6 +38,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (containerClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); @@ -62,6 +63,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (containerClient as any).pipeline.factories.slice(); // clone factories array @@ -123,6 +125,7 @@ describe("RetryPolicy", () => { if (injectCounter++ < 1) { return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const url = blobServiceClient.url; diff --git a/sdk/storage/storage-blob/tests.yml b/sdk/storage/storage-blob/tests.yml index 993fee02590a..548228e18af3 100644 --- a/sdk/storage/storage-blob/tests.yml +++ b/sdk/storage/storage-blob/tests.yml @@ -1,20 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/storage-blob" - ResourceServiceDirectory: storage - TimeoutInMinutes: 90 - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/storage-blob" + ResourceServiceDirectory: storage + TimeoutInMinutes: 90 + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/storage/storage-blob/tsconfig.json b/sdk/storage/storage-blob/tsconfig.json index 7d0f438f54f6..6e93555f95cd 100644 --- a/sdk/storage/storage-blob/tsconfig.json +++ b/sdk/storage/storage-blob/tsconfig.json @@ -1,26 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./typings/latest", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true + "outDir": "./dist-esm", + "lib": ["dom", "es5", "es6", "es7", "esnext"] }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/**"], + "exclude": ["node_modules", "./typings/**/*.d.ts", "./samples/**"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index 629856eeab91..8b5b15ff3a8d 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -101,7 +101,7 @@ "@azure/logger": "^1.0.0", "@azure/storage-blob": "^12.1.2", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/identity": "^1.1.0-preview", @@ -110,17 +110,16 @@ "@opentelemetry/api": "^0.6.1", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/fs-extra": "^8.0.0", "@types/mocha": "^7.0.2", - "@types/nise": "^1.4.0", "@types/node": "^8.0.0", "@types/query-string": "6.2.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "es6-promise": "^4.2.5", @@ -148,21 +147,19 @@ "karma-remap-istanbul": "^0.6.0", "mocha": "^7.1.1", "mocha-junit-reporter": "^1.18.0", - "nise": "^1.4.10", - "nock": "^11.7.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "query-string": "^5.0.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "source-map-support": "^0.5.9", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-file-datalake/src/utils/utils.common.ts b/sdk/storage/storage-file-datalake/src/utils/utils.common.ts index 544d68163827..ace1439f22dd 100644 --- a/sdk/storage/storage-file-datalake/src/utils/utils.common.ts +++ b/sdk/storage/storage-file-datalake/src/utils/utils.common.ts @@ -486,6 +486,8 @@ export function padStart( targetLength: number, padString: string = " " ): string { + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } diff --git a/sdk/storage/storage-file-datalake/test/retrypolicy.spec.ts b/sdk/storage/storage-file-datalake/test/retrypolicy.spec.ts index faa8c177a92b..376f42bb7d50 100644 --- a/sdk/storage/storage-file-datalake/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-file-datalake/test/retrypolicy.spec.ts @@ -37,6 +37,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (dataLakeFileSystemClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); @@ -64,6 +65,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (dataLakeFileSystemClient as any).pipeline.factories.slice(); // clone factories array @@ -131,6 +133,7 @@ describe("RetryPolicy", () => { if (injectCounter++ < 1) { return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const url = serviceClient.url; diff --git a/sdk/storage/storage-file-datalake/tests.yml b/sdk/storage/storage-file-datalake/tests.yml index 439d8478009a..07442d215f75 100644 --- a/sdk/storage/storage-file-datalake/tests.yml +++ b/sdk/storage/storage-file-datalake/tests.yml @@ -1,15 +1,7 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/storage-file-datalake" - TestSamples: false + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/storage-file-datalake" + TestSamples: false diff --git a/sdk/storage/storage-file-datalake/tsconfig.json b/sdk/storage/storage-file-datalake/tsconfig.json index ebafcd4607a2..6e93555f95cd 100644 --- a/sdk/storage/storage-file-datalake/tsconfig.json +++ b/sdk/storage/storage-file-datalake/tsconfig.json @@ -1,26 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./typings/latest", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true + "outDir": "./dist-esm", + "lib": ["dom", "es5", "es6", "es7", "esnext"] }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/*"], + "exclude": ["node_modules", "./typings/**/*.d.ts", "./samples/**"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/storage/storage-file-share/CHANGELOG.md b/sdk/storage/storage-file-share/CHANGELOG.md index 519a96a676fc..f6f3c7f1b115 100644 --- a/sdk/storage/storage-file-share/CHANGELOG.md +++ b/sdk/storage/storage-file-share/CHANGELOG.md @@ -185,7 +185,7 @@ - Request and response headers are now logged at INFO level, with sensitive data redacted. - `downloadToFile()` is added to `FileClient`. -For release notes and more information please visit https://aka.ms/azure-sdk-preview1-js +For release notes and more information please visit https://aka.ms/azsdk/releases/july2019preview ## 10.3.0 (2019.09) diff --git a/sdk/storage/storage-file-share/package.json b/sdk/storage/storage-file-share/package.json index 5ab4be39e7fa..5b5318726dcf 100644 --- a/sdk/storage/storage-file-share/package.json +++ b/sdk/storage/storage-file-share/package.json @@ -108,21 +108,21 @@ "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/test-utils-recorder": "^1.0.0", "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "es6-promise": "^4.2.5", @@ -150,16 +150,16 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "source-map-support": "^0.5.9", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-file-share/src/utils/utils.common.ts b/sdk/storage/storage-file-share/src/utils/utils.common.ts index 1d32f72d05c5..8d48620ce474 100644 --- a/sdk/storage/storage-file-share/src/utils/utils.common.ts +++ b/sdk/storage/storage-file-share/src/utils/utils.common.ts @@ -384,6 +384,8 @@ export function padStart( targetLength: number, padString: string = " " ): string { + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } diff --git a/sdk/storage/storage-file-share/test/retrypolicy.spec.ts b/sdk/storage/storage-file-share/test/retrypolicy.spec.ts index 7aee27c080f6..9bdcf416d3fb 100644 --- a/sdk/storage/storage-file-share/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-file-share/test/retrypolicy.spec.ts @@ -35,6 +35,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (shareClient as any).pipeline.factories.slice(); // clone factories array factories.push(injector); @@ -59,6 +60,7 @@ describe("RetryPolicy", () => { injectCounter++; return new RestError("Server Internal Error", "ServerInternalError", 500); } + return; }); const factories = (shareClient as any).pipeline.factories.slice(); // clone factories array diff --git a/sdk/storage/storage-file-share/tests.yml b/sdk/storage/storage-file-share/tests.yml index d4193ceab49a..adb6bce8f675 100644 --- a/sdk/storage/storage-file-share/tests.yml +++ b/sdk/storage/storage-file-share/tests.yml @@ -1,20 +1,12 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/storage-file-share" - ResourceServiceDirectory: storage - TimeoutInMinutes: 90 - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/storage-file-share" + ResourceServiceDirectory: storage + TimeoutInMinutes: 90 + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/storage/storage-file-share/tsconfig.json b/sdk/storage/storage-file-share/tsconfig.json index ebafcd4607a2..6e93555f95cd 100644 --- a/sdk/storage/storage-file-share/tsconfig.json +++ b/sdk/storage/storage-file-share/tsconfig.json @@ -1,26 +1,11 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "inlineSources": true, - "newLine": "LF", "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./typings/latest", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true + "outDir": "./dist-esm", + "lib": ["dom", "es5", "es6", "es7", "esnext"] }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/*"], + "exclude": ["node_modules", "./typings/**/*.d.ts", "./samples/**"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/storage/storage-queue/CHANGELOG.md b/sdk/storage/storage-queue/CHANGELOG.md index 2eb062a5e947..2461684c430f 100644 --- a/sdk/storage/storage-queue/CHANGELOG.md +++ b/sdk/storage/storage-queue/CHANGELOG.md @@ -167,7 +167,7 @@ - Please refer to the `proxyAuth.ts` sample in the `samples/typescript` folder. - Request and response headers are now logged at INFO level, with sensitive data redacted. -For release notes and more information please visit https://aka.ms/azure-sdk-preview1-js +For release notes and more information please visit https://aka.ms/azsdk/releases/july2019preview ## 10.3.0 (2019.09) diff --git a/sdk/storage/storage-queue/package.json b/sdk/storage/storage-queue/package.json index d24560a4d54d..4e34ae991a57 100644 --- a/sdk/storage/storage-queue/package.json +++ b/sdk/storage/storage-queue/package.json @@ -104,7 +104,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/identity": "^1.1.0-preview", @@ -112,14 +112,14 @@ "@microsoft/api-extractor": "7.7.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "downlevel-dts": "~0.4.0", "es6-promise": "^4.2.5", @@ -147,16 +147,16 @@ "mocha-junit-reporter": "^1.18.0", "nyc": "^14.0.0", "prettier": "^1.16.4", - "puppeteer": "^2.0.0", + "puppeteer": "^3.3.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", + "rollup-plugin-visualizer": "^4.0.4", "source-map-support": "^0.5.9", "ts-node": "^8.3.0", - "typescript": "~3.8.3", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/storage/storage-queue/src/utils/utils.common.ts b/sdk/storage/storage-queue/src/utils/utils.common.ts index 87d2f8278661..e44a3d833b43 100644 --- a/sdk/storage/storage-queue/src/utils/utils.common.ts +++ b/sdk/storage/storage-queue/src/utils/utils.common.ts @@ -315,6 +315,8 @@ export function padStart( targetLength: number, padString: string = " " ): string { + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } diff --git a/sdk/storage/storage-queue/tests.yml b/sdk/storage/storage-queue/tests.yml index 645b9f9e8d97..8fd7a8bc31f4 100644 --- a/sdk/storage/storage-queue/tests.yml +++ b/sdk/storage/storage-queue/tests.yml @@ -1,15 +1,7 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/storage-queue" - ResourceServiceDirectory: storage + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/storage-queue" + ResourceServiceDirectory: storage diff --git a/sdk/storage/storage-queue/tsconfig.json b/sdk/storage/storage-queue/tsconfig.json index ebafcd4607a2..7cb54efc5738 100644 --- a/sdk/storage/storage-queue/tsconfig.json +++ b/sdk/storage/storage-queue/tsconfig.json @@ -20,7 +20,6 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "exclude": ["node_modules", "./samples/*"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/synapse/arm-synapse/package.json b/sdk/synapse/arm-synapse/package.json index e3520a2da419..d7189e5e61d7 100644 --- a/sdk/synapse/arm-synapse/package.json +++ b/sdk/synapse/arm-synapse/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-synapse", "author": "Microsoft Corporation", "description": "SynapseManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/synapse/arm-synapse/src/models/bigDataPoolsMappers.ts b/sdk/synapse/arm-synapse/src/models/bigDataPoolsMappers.ts index 4b5d1aed61cd..7c8c1688ea13 100644 --- a/sdk/synapse/arm-synapse/src/models/bigDataPoolsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/bigDataPoolsMappers.ts @@ -48,6 +48,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/index.ts b/sdk/synapse/arm-synapse/src/models/index.ts index 5d76a3138a2b..fc3f06e05b3f 100644 --- a/sdk/synapse/arm-synapse/src/models/index.ts +++ b/sdk/synapse/arm-synapse/src/models/index.ts @@ -3078,6 +3078,27 @@ export interface PrivateLinkResource extends ProxyResource { readonly properties?: PrivateLinkResourceProperties; } +/** + * A privateLinkHub + */ +export interface PrivateLinkHub extends TrackedResource { + /** + * PrivateLinkHub provisioning state. Possible values include: 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState1; +} + +/** + * PrivateLinkHub patch details + */ +export interface PrivateLinkHubPatchInfo { + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + /** * Optional Parameters. */ @@ -3413,6 +3434,18 @@ export interface PrivateEndpointConnectionList extends Array + */ +export interface PrivateLinkHubInfoListResult extends Array { + /** + * Link to the next page of results + */ + nextLink?: string; +} + /** * Defines values for NodeSize. * Possible values include: 'None', 'Small', 'Medium', 'Large' @@ -3724,6 +3757,14 @@ export type DesiredState = 'Enabled' | 'Disabled'; */ export type ActualState = 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Unknown'; +/** + * Defines values for ProvisioningState1. + * Possible values include: 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type ProvisioningState1 = 'Succeeded' | 'Failed'; + /** * Contains response data for the get operation. */ @@ -6093,3 +6134,143 @@ export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnecti parsedBody: PrivateEndpointConnectionList; }; }; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type PrivateLinkHubsListByResourceGroupResponse = PrivateLinkHubInfoListResult & { + /** + * 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: PrivateLinkHubInfoListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkHubsGetResponse = PrivateLinkHub & { + /** + * 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: PrivateLinkHub; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PrivateLinkHubsUpdateResponse = PrivateLinkHub & { + /** + * 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: PrivateLinkHub; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateLinkHubsCreateOrUpdateResponse = PrivateLinkHub & { + /** + * 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: PrivateLinkHub; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PrivateLinkHubsListResponse = PrivateLinkHubInfoListResult & { + /** + * 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: PrivateLinkHubInfoListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type PrivateLinkHubsListByResourceGroupNextResponse = PrivateLinkHubInfoListResult & { + /** + * 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: PrivateLinkHubInfoListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateLinkHubsListNextResponse = PrivateLinkHubInfoListResult & { + /** + * 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: PrivateLinkHubInfoListResult; + }; +}; diff --git a/sdk/synapse/arm-synapse/src/models/integrationRuntimesMappers.ts b/sdk/synapse/arm-synapse/src/models/integrationRuntimesMappers.ts index 7c04c476c834..366ead1389f3 100644 --- a/sdk/synapse/arm-synapse/src/models/integrationRuntimesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/integrationRuntimesMappers.ts @@ -51,6 +51,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/ipFirewallRulesMappers.ts b/sdk/synapse/arm-synapse/src/models/ipFirewallRulesMappers.ts index a59741ea503e..c7f8771d0db7 100644 --- a/sdk/synapse/arm-synapse/src/models/ipFirewallRulesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/ipFirewallRulesMappers.ts @@ -48,6 +48,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/mappers.ts b/sdk/synapse/arm-synapse/src/models/mappers.ts index e81ae26bedab..7bc91eecb190 100644 --- a/sdk/synapse/arm-synapse/src/models/mappers.ts +++ b/sdk/synapse/arm-synapse/src/models/mappers.ts @@ -192,10 +192,6 @@ export const BigDataPoolResourceInfo: msRest.CompositeMapper = { }, nodeCount: { serializedName: "properties.nodeCount", - constraints: { - InclusiveMaximum: 200, - InclusiveMinimum: 3 - }, type: { name: "Number" } @@ -4702,6 +4698,45 @@ export const PrivateLinkResource: msRest.CompositeMapper = { } }; +export const PrivateLinkHub: msRest.CompositeMapper = { + serializedName: "PrivateLinkHub", + type: { + name: "Composite", + className: "PrivateLinkHub", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkHubPatchInfo: msRest.CompositeMapper = { + serializedName: "PrivateLinkHubPatchInfo", + type: { + name: "Composite", + className: "PrivateLinkHubPatchInfo", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const BigDataPoolResourceInfoListResult: msRest.CompositeMapper = { serializedName: "BigDataPoolResourceInfoListResult", type: { @@ -5202,6 +5237,34 @@ export const PrivateEndpointConnectionList: msRest.CompositeMapper = { } }; +export const PrivateLinkHubInfoListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkHubInfoListResult", + type: { + name: "Composite", + className: "PrivateLinkHubInfoListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkHub" + } + } + } + } + } + } +}; + export const discriminators = { 'IntegrationRuntime' : IntegrationRuntime, 'SecretBase.SecureString' : SecureString, diff --git a/sdk/synapse/arm-synapse/src/models/parameters.ts b/sdk/synapse/arm-synapse/src/models/parameters.ts index 8d670dfe2f0c..0dd981eac51a 100644 --- a/sdk/synapse/arm-synapse/src/models/parameters.ts +++ b/sdk/synapse/arm-synapse/src/models/parameters.ts @@ -227,6 +227,16 @@ export const privateEndpointConnectionName: msRest.OperationURLParameter = { } } }; +export const privateLinkHubName: msRest.OperationURLParameter = { + parameterPath: "privateLinkHubName", + mapper: { + required: true, + serializedName: "privateLinkHubName", + type: { + name: "String" + } + } +}; export const privateLinkResourceName: msRest.OperationURLParameter = { parameterPath: "privateLinkResourceName", mapper: { diff --git a/sdk/synapse/arm-synapse/src/models/privateEndpointConnectionsMappers.ts b/sdk/synapse/arm-synapse/src/models/privateEndpointConnectionsMappers.ts index 919c4131c867..2de0c2955f9f 100644 --- a/sdk/synapse/arm-synapse/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/privateEndpointConnectionsMappers.ts @@ -48,6 +48,7 @@ export { PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionList, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/privateLinkHubsMappers.ts b/sdk/synapse/arm-synapse/src/models/privateLinkHubsMappers.ts new file mode 100644 index 000000000000..3d66c23b5fa0 --- /dev/null +++ b/sdk/synapse/arm-synapse/src/models/privateLinkHubsMappers.ts @@ -0,0 +1,85 @@ +/* + * 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 { + discriminators, + AutoPauseProperties, + AutoScaleProperties, + AzureEntityResource, + BaseResource, + BigDataPoolResourceInfo, + CloudError, + CmdkeySetup, + ComponentSetup, + CustomSetupBase, + DataLakeStorageAccountDetails, + DataWarehouseUserActivities, + EntityReference, + EnvironmentVariableSetup, + ErrorAdditionalInfo, + ErrorContract, + ErrorResponse, + GeoBackupPolicy, + IntegrationRuntime, + IntegrationRuntimeComputeProperties, + IntegrationRuntimeCustomSetupScriptProperties, + IntegrationRuntimeDataFlowProperties, + IntegrationRuntimeDataProxyProperties, + IntegrationRuntimeResource, + IntegrationRuntimeSsisCatalogInfo, + IntegrationRuntimeSsisProperties, + IntegrationRuntimeVNetProperties, + IpFirewallRuleInfo, + LibraryRequirements, + LinkedIntegrationRuntimeKeyAuthorization, + LinkedIntegrationRuntimeRbacAuthorization, + LinkedIntegrationRuntimeType, + ManagedIdentity, + ManagedIdentitySqlControlSettingsModel, + ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity, + ManagedIntegrationRuntime, + MetadataSyncConfig, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkHub, + PrivateLinkHubInfoListResult, + PrivateLinkHubPatchInfo, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionState, + ProxyResource, + ReplicationLink, + Resource, + RestorePoint, + SecretBase, + SecureString, + SelfHostedIntegrationRuntime, + SensitivityLabel, + Sku, + SqlPool, + SqlPoolBlobAuditingPolicy, + SqlPoolColumn, + SqlPoolConnectionPolicy, + SqlPoolOperation, + SqlPoolSchema, + SqlPoolSecurityAlertPolicy, + SqlPoolTable, + SqlPoolVulnerabilityAssessment, + SqlPoolVulnerabilityAssessmentRuleBaseline, + SqlPoolVulnerabilityAssessmentRuleBaselineItem, + SqlPoolVulnerabilityAssessmentScansExport, + SubResource, + TrackedResource, + TransparentDataEncryption, + VirtualNetworkProfile, + VulnerabilityAssessmentRecurringScansProperties, + VulnerabilityAssessmentScanError, + VulnerabilityAssessmentScanRecord, + Workspace, + WorkspaceAadAdminInfo +} from "../models/mappers"; diff --git a/sdk/synapse/arm-synapse/src/models/privateLinkResourcesMappers.ts b/sdk/synapse/arm-synapse/src/models/privateLinkResourcesMappers.ts index b4352483b11f..ab6170d0a453 100644 --- a/sdk/synapse/arm-synapse/src/models/privateLinkResourcesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/privateLinkResourcesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceListResult, PrivateLinkResourceProperties, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolBlobAuditingPoliciesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolBlobAuditingPoliciesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolBlobAuditingPoliciesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolBlobAuditingPoliciesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolConnectionPoliciesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolConnectionPoliciesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolConnectionPoliciesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolConnectionPoliciesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolDataWarehouseUserActivitiesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolDataWarehouseUserActivitiesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolDataWarehouseUserActivitiesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolDataWarehouseUserActivitiesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolGeoBackupPoliciesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolGeoBackupPoliciesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolGeoBackupPoliciesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolGeoBackupPoliciesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolMetadataSyncConfigsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolMetadataSyncConfigsMappers.ts index 58585518e7e8..13d72f5d5cea 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolMetadataSyncConfigsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolMetadataSyncConfigsMappers.ts @@ -45,6 +45,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolOperationsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolOperationsMappers.ts index f8d1cc381431..a6542954d3c6 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolOperationsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolOperationsMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolReplicationLinksMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolReplicationLinksMappers.ts index bf987352e894..1ba27fefd430 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolReplicationLinksMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolReplicationLinksMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolRestorePointsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolRestorePointsMappers.ts index e7ef839c5257..e4cd1d6bfde5 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolRestorePointsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolRestorePointsMappers.ts @@ -44,6 +44,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolSchemasMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolSchemasMappers.ts index fd4ef7114fa0..6841809faae5 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolSchemasMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolSchemasMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolSecurityAlertPoliciesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolSecurityAlertPoliciesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolSecurityAlertPoliciesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolSecurityAlertPoliciesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolSensitivityLabelsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolSensitivityLabelsMappers.ts index a216210167c1..e686153f196c 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolSensitivityLabelsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolSensitivityLabelsMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolTableColumnsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolTableColumnsMappers.ts index fcf578f916d0..6e1cca804695 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolTableColumnsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolTableColumnsMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolTablesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolTablesMappers.ts index 01e48cf346e6..07c2ef8dd23b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolTablesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolTablesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolTransparentDataEncryptionsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolTransparentDataEncryptionsMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolTransparentDataEncryptionsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolTransparentDataEncryptionsMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentRuleBaselinesMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentRuleBaselinesMappers.ts index 647df7fe0245..fb61cb78574b 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentRuleBaselinesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentRuleBaselinesMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentScansMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentScansMappers.ts index 9c068d704b7a..4bbca08d25b0 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentScansMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentScansMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentsMappers.ts index 2a13b7374de4..761eb9db111d 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolVulnerabilityAssessmentsMappers.ts @@ -43,6 +43,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/sqlPoolsMappers.ts b/sdk/synapse/arm-synapse/src/models/sqlPoolsMappers.ts index 96c10d56ee9d..59a9481cc5fe 100644 --- a/sdk/synapse/arm-synapse/src/models/sqlPoolsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/sqlPoolsMappers.ts @@ -46,6 +46,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/workspaceAadAdminsMappers.ts b/sdk/synapse/arm-synapse/src/models/workspaceAadAdminsMappers.ts index 8d19aa391ec7..a521be300354 100644 --- a/sdk/synapse/arm-synapse/src/models/workspaceAadAdminsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/workspaceAadAdminsMappers.ts @@ -46,6 +46,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/workspaceManagedIdentitySqlControlSettingsMappers.ts b/sdk/synapse/arm-synapse/src/models/workspaceManagedIdentitySqlControlSettingsMappers.ts index 58585518e7e8..13d72f5d5cea 100644 --- a/sdk/synapse/arm-synapse/src/models/workspaceManagedIdentitySqlControlSettingsMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/workspaceManagedIdentitySqlControlSettingsMappers.ts @@ -45,6 +45,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/models/workspacesMappers.ts b/sdk/synapse/arm-synapse/src/models/workspacesMappers.ts index 8b1b4b2439df..400002e0c610 100644 --- a/sdk/synapse/arm-synapse/src/models/workspacesMappers.ts +++ b/sdk/synapse/arm-synapse/src/models/workspacesMappers.ts @@ -46,6 +46,7 @@ export { MetadataSyncConfig, PrivateEndpoint, PrivateEndpointConnection, + PrivateLinkHub, PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, diff --git a/sdk/synapse/arm-synapse/src/operations/index.ts b/sdk/synapse/arm-synapse/src/operations/index.ts index 488113b915f1..7261342670cb 100644 --- a/sdk/synapse/arm-synapse/src/operations/index.ts +++ b/sdk/synapse/arm-synapse/src/operations/index.ts @@ -45,3 +45,4 @@ export * from "./integrationRuntimeMonitoringDataOperations"; export * from "./integrationRuntimeStatusOperations"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; +export * from "./privateLinkHubs"; diff --git a/sdk/synapse/arm-synapse/src/operations/privateLinkHubs.ts b/sdk/synapse/arm-synapse/src/operations/privateLinkHubs.ts new file mode 100644 index 000000000000..8f0c47cd1bcb --- /dev/null +++ b/sdk/synapse/arm-synapse/src/operations/privateLinkHubs.ts @@ -0,0 +1,482 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkHubsMappers"; +import * as Parameters from "../models/parameters"; +import { SynapseManagementClientContext } from "../synapseManagementClientContext"; + +/** Class representing a PrivateLinkHubs. */ +export class PrivateLinkHubs { + private readonly client: SynapseManagementClientContext; + + /** + * Create a PrivateLinkHubs. + * @param {SynapseManagementClientContext} client Reference to the service client. + */ + constructor(client: SynapseManagementClientContext) { + this.client = client; + } + + /** + * Returns a list of privateLinkHubs in a resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a privateLinkHub + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateLinkHubName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param callback The callback + */ + get(resourceGroupName: string, privateLinkHubName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateLinkHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateLinkHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateLinkHubName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates a privateLinkHub + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubPatchInfo PrivateLinkHub patch request properties + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, privateLinkHubName: string, privateLinkHubPatchInfo: Models.PrivateLinkHubPatchInfo, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubPatchInfo PrivateLinkHub patch request properties + * @param callback The callback + */ + update(resourceGroupName: string, privateLinkHubName: string, privateLinkHubPatchInfo: Models.PrivateLinkHubPatchInfo, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubPatchInfo PrivateLinkHub patch request properties + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, privateLinkHubName: string, privateLinkHubPatchInfo: Models.PrivateLinkHubPatchInfo, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, privateLinkHubName: string, privateLinkHubPatchInfo: Models.PrivateLinkHubPatchInfo, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateLinkHubName, + privateLinkHubPatchInfo, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a privateLinkHub + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubInfo PrivateLinkHub create or update request properties + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateLinkHubName: string, privateLinkHubInfo: Models.PrivateLinkHub, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubInfo PrivateLinkHub create or update request properties + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, privateLinkHubName: string, privateLinkHubInfo: Models.PrivateLinkHub, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param privateLinkHubInfo PrivateLinkHub create or update request properties + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, privateLinkHubName: string, privateLinkHubInfo: Models.PrivateLinkHub, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, privateLinkHubName: string, privateLinkHubInfo: Models.PrivateLinkHub, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateLinkHubName, + privateLinkHubInfo, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a privateLinkHub + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateLinkHubName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, privateLinkHubName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateLinkHubName The name of the privateLinkHub + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, privateLinkHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, privateLinkHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateLinkHubName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Returns a list of privateLinkHubs in a subscription + * @param [options] The optional parameters + * @returns Promise + */ + 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 + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of privateLinkHubs 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of privateLinkHubs in a 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 + */ + 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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHub", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHubInfoListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateLinkHubName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHub + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateLinkHubName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateLinkHubPatchInfo", + mapper: { + ...Mappers.PrivateLinkHubPatchInfo, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHub + }, + 201: { + bodyMapper: Mappers.PrivateLinkHub + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateLinkHubName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateLinkHubInfo", + mapper: { + ...Mappers.PrivateLinkHub, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHub + }, + 201: { + bodyMapper: Mappers.PrivateLinkHub + }, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateLinkHubName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Synapse/privateLinkHubs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHubInfoListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHubInfoListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkHubInfoListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts index e23420f4a99c..c30de81d36df 100644 --- a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts +++ b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts @@ -54,6 +54,7 @@ class SynapseManagementClient extends SynapseManagementClientContext { integrationRuntimeStatus: operations.IntegrationRuntimeStatusOperations; privateLinkResources: operations.PrivateLinkResources; privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkHubs: operations.PrivateLinkHubs; /** * Initializes a new instance of the SynapseManagementClient class. @@ -100,6 +101,7 @@ class SynapseManagementClient extends SynapseManagementClientContext { this.integrationRuntimeStatus = new operations.IntegrationRuntimeStatusOperations(this); this.privateLinkResources = new operations.PrivateLinkResources(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkHubs = new operations.PrivateLinkHubs(this); } } diff --git a/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts b/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts index 93723ae7b075..c2f60a1b458b 100644 --- a/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts +++ b/sdk/synapse/arm-synapse/src/synapseManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-synapse"; -const packageVersion = "1.1.0"; +const packageVersion = "1.2.0"; export class SynapseManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/template/ci.yml b/sdk/template/ci.yml index cccb4b4d26da..0e8c7b11bb87 100644 --- a/sdk/template/ci.yml +++ b/sdk/template/ci.yml @@ -1,17 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -33,10 +22,10 @@ pr: include: - sdk/template/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: template - Artifacts: - - name: azure-template - safeName: azuretemplate +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: template + Artifacts: + - name: azure-template + safeName: azuretemplate diff --git a/sdk/template/template/README-TEMPLATE.md b/sdk/template/template/README-TEMPLATE.md index 1de2920bcb20..d77bdad7a5c3 100644 --- a/sdk/template/template/README-TEMPLATE.md +++ b/sdk/template/template/README-TEMPLATE.md @@ -17,7 +17,7 @@ Use the client library to: [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/textanalytics/ai-text-analytics/) | [Package (NPM)](https://www.npmjs.com/package/@azure/ai-text-analytics) | -[API reference documentation](https://aka.ms/azsdk-js-textanalytics-ref-docs) | +[API reference documentation](https://aka.ms/azsdk/js/textanalytics/docs) | [Product documentation](https://docs.microsoft.com/azure/cognitive-services/text-analytics/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/textanalytics/ai-text-analytics/samples) diff --git a/sdk/template/template/package.json b/sdk/template/template/package.json index 620a71acdffb..f75981488c5a 100644 --- a/sdk/template/template/package.json +++ b/sdk/template/template/package.json @@ -64,14 +64,14 @@ "@azure/core-http": "^1.1.1", "@opentelemetry/api": "^0.6.1", "events": "^3.0.0", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@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": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", @@ -79,7 +79,7 @@ "@typescript-eslint/parser": "^2.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "assert": "^1.4.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-no-null": "^1.0.2", @@ -104,8 +104,8 @@ "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", "util": "^0.12.1" } } diff --git a/sdk/test-utils/ci.yml b/sdk/test-utils/ci.yml index f2c30c0d8ce8..af58909a1c6e 100644 --- a/sdk/test-utils/ci.yml +++ b/sdk/test-utils/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,11 +22,11 @@ pr: include: - sdk/test-utils/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: test-utils - IncludeRelease: false - Artifacts: - - name: azure-test-utils-recorder - safeName: azuretestutilsrecorder +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: test-utils + IncludeRelease: false + Artifacts: + - name: azure-test-utils-recorder + safeName: azuretestutilsrecorder diff --git a/sdk/test-utils/perfstress/package.json b/sdk/test-utils/perfstress/package.json index c08f400c1363..cd026badc606 100644 --- a/sdk/test-utils/perfstress/package.json +++ b/sdk/test-utils/perfstress/package.json @@ -65,7 +65,7 @@ "@azure/abort-controller": "^1.0.0", "@azure/core-http": "^1.1.1", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0", + "tslib": "^2.0.0", "node-fetch": "^2.6.0", "minimist": "~1.2.5", "@types/minimist": "~1.2.0" @@ -84,6 +84,6 @@ "karma-env-preprocessor": "^0.1.1", "prettier": "^1.16.4", "rimraf": "^3.0.0", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/test-utils/perfstress/tsconfig.json b/sdk/test-utils/perfstress/tsconfig.json index 4d8f6a0b159f..c6b0f5331211 100644 --- a/sdk/test-utils/perfstress/tsconfig.json +++ b/sdk/test-utils/perfstress/tsconfig.json @@ -19,7 +19,6 @@ "lib": ["dom", "es5", "es6", "es7", "esnext"], "esModuleInterop": true }, - "compileOnSave": true, "exclude": ["node_modules", "./samples/*"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/test-utils/recorder/package.json b/sdk/test-utils/recorder/package.json index 8462156e542e..e969490cfdf2 100644 --- a/sdk/test-utils/recorder/package.json +++ b/sdk/test-utils/recorder/package.json @@ -60,19 +60,19 @@ "@azure/core-http": "^1.1.1", "@opentelemetry/api": "^0.6.1", "fs-extra": "^8.1.0", - "nise": "^1.4.10", - "nock": "^11.7.0", - "tslib": "^1.10.0", + "nise": "^4.0.3", + "nock": "^12.0.3", + "tslib": "^2.0.0", "md5": "^2.2.1" }, "devDependencies": { "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/fs-extra": "^8.0.0", "@types/chai": "^4.1.6", - "@types/md5": "~2.1.33", + "@types/md5": "^2.2.0", "@types/mocha": "^7.0.2", "@types/nise": "^1.4.0", "@types/node": "^8.0.0", @@ -109,8 +109,8 @@ "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "typescript": "~3.8.3", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", "xhr-mock": "^2.4.1" } } diff --git a/sdk/test-utils/recorder/src/basekarma.conf.ts b/sdk/test-utils/recorder/src/basekarma.conf.ts index 72455fcf7a9b..66fb4fd3a5a0 100644 --- a/sdk/test-utils/recorder/src/basekarma.conf.ts +++ b/sdk/test-utils/recorder/src/basekarma.conf.ts @@ -53,6 +53,5 @@ export const jsonRecordingFilterFunction = function(browserRecordingJsonObject: } else { console.log(browserRecordingJsonObject); } - return false; } }; diff --git a/sdk/test-utils/recorder/src/utils.ts b/sdk/test-utils/recorder/src/utils.ts index 83fe2fdcb8d9..5ffd2c99263a 100644 --- a/sdk/test-utils/recorder/src/utils.ts +++ b/sdk/test-utils/recorder/src/utils.ts @@ -249,6 +249,8 @@ export async function blobToString(blob: Blob): Promise { * @returns {string} */ function padStart(currentString: string, targetLength: number, padString: string = " "): string { + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } diff --git a/sdk/test-utils/recorder/test/node/utils.spec.ts b/sdk/test-utils/recorder/test/node/utils.spec.ts index 148355aa2122..b073935dec5c 100644 --- a/sdk/test-utils/recorder/test/node/utils.spec.ts +++ b/sdk/test-utils/recorder/test/node/utils.spec.ts @@ -45,7 +45,10 @@ describe("NodeJS utils", () => { }); it("should throw if the file at a given recording path doesn't exist", function() { - if (isBrowser()) return this.skip(); + if (isBrowser()) { + this.skip(); + return + } // Require shouldn't be mocked in this test since we should be preventing require from being reached. diff --git a/sdk/test-utils/recorder/tsconfig.json b/sdk/test-utils/recorder/tsconfig.json index e271ee388662..c80657434a7e 100644 --- a/sdk/test-utils/recorder/tsconfig.json +++ b/sdk/test-utils/recorder/tsconfig.json @@ -1,25 +1,10 @@ { + "extends": "../../../tsconfig.package", "compilerOptions": { - "alwaysStrict": true, - "noImplicitAny": true, - "preserveConstEnums": true, - "sourceMap": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "strict": true, - "module": "esNext", - "outDir": "./dist-esm", - "declaration": true, - "declarationMap": true, - "importHelpers": true, "declarationDir": "./typings", - "lib": ["dom", "es5", "es6", "es7", "esnext"], - "esModuleInterop": true + "outDir": "./dist-esm", + "lib": ["dom", "es5", "es6", "es7", "esnext"] }, - "compileOnSave": true, - "exclude": ["node_modules", "./samples/*"], + "exclude": ["node_modules", "./typings/**/*.d.ts", "./samples/**/*.ts"], "include": ["./src/**/*.ts", "./test/**/*.ts"] } diff --git a/sdk/textanalytics/ai-text-analytics/CHANGELOG.md b/sdk/textanalytics/ai-text-analytics/CHANGELOG.md index e71da276e008..50acd68471fd 100644 --- a/sdk/textanalytics/ai-text-analytics/CHANGELOG.md +++ b/sdk/textanalytics/ai-text-analytics/CHANGELOG.md @@ -1,6 +1,18 @@ # Release History -## 1.0.0-preview.5 (Unreleased) +## 1.0.0 (2020-06-09) + +- This release marks the general availability of the `@azure/ai-text-analytics` package. + +## 1.0.0-preview.5 (2020-05-26) +- [Breaking] Renamed all result array types that extend JavaScript's base `Array` class to end with the word `Array` instead of `Collection` (e.g. `AnalyzeSentimentResultCollection` is now `AnalyzeSentimentResultArray`) +- [Breaking] Renamed `score` to `confidenceScore` in the `Match`, `Entity`, and `DetectedLanguage` types. +- [Breaking] Removed the `graphemeOffset` and `graphemeLength` properties of the `Match`, `Entity`, and `SentenceSentiment` types. +- [Breaking] Renamed the `graphemeCount` property of `TextDocumentStatistics` back to `characterCount` +- Added a `text` property to `SentenceSentiment` that contains the sentence text +- [Breaking] Removed the `warnings` property of `SentenceSentiment`. +- Added `warnings` property to every document response object containing a list of `TextAnalyticsWarning` objects relevant to the corresponding document. +- Migrated to using the Text Analytics v3.0 (General Availability) service endpoint. ## 1.0.0-preview.4 (2020-04-07) @@ -33,7 +45,7 @@ - This release is a preview of our efforts to create a client library that is user friendly and idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the - [Azure SDK Design Guidelines for TypeScript](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html). + [Azure SDK Design Guidelines for TypeScript](https://azure.github.io/azure-sdk/typescript_introduction.html). - Differences from previous public package `@azure/cognitiveservices-textanalytics` - Package name changed from `@azure/cognitiveservices-textanalytics` to `@azure/ai-text-analytics`. - Package targets version `3.0` of the service API. diff --git a/sdk/textanalytics/ai-text-analytics/README.md b/sdk/textanalytics/ai-text-analytics/README.md index a59ee1532a56..74566efa51a0 100644 --- a/sdk/textanalytics/ai-text-analytics/README.md +++ b/sdk/textanalytics/ai-text-analytics/README.md @@ -2,6 +2,8 @@ [Azure TextAnalytics](https://azure.microsoft.com/services/cognitive-services/text-analytics/) is a cloud-based service that provides advanced natural language processing over raw text, and includes six main functions: +__Note:__ This SDK targets Azure Text Analytics service API version 3.0. + - Language Detection - Sentiment Analysis - Key Phrase Extraction @@ -17,7 +19,7 @@ Use the client library to: [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/textanalytics/ai-text-analytics/) | [Package (NPM)](https://www.npmjs.com/package/@azure/ai-text-analytics) | -[API reference documentation](https://aka.ms/azsdk-js-textanalytics-ref-docs) | +[API reference documentation](https://aka.ms/azsdk/js/textanalytics/docs) | [Product documentation](https://docs.microsoft.com/azure/cognitive-services/text-analytics/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/textanalytics/ai-text-analytics/samples) @@ -35,7 +37,7 @@ Use the client library to: If you use the Azure CLI, replace `` and `` with your own unique names: ```PowerShell -az cognitiveservices account create --kind TextAnalytics --resource-group --name +az cognitiveservices account create --kind TextAnalytics --resource-group --name --sku --location ``` ### Install the `@azure/ai-text-analytics` package @@ -71,10 +73,7 @@ Once you have an API key and endpoint, you can use the `AzureKeyCredential` clas ```js const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); ``` #### Using an Azure Active Directory Credential @@ -113,7 +112,7 @@ For example, each document can be passed as a string in an array, e.g. const documents = [ "I hated the movie. It was so slow!", "The movie made it into my top ten favorites.", - "What a great movie!" + "What a great movie!", ]; ``` @@ -133,9 +132,9 @@ See [service limiations][data_limits] for the input, including document length l The return value corresponding to a single document is either a successful result or an error object. Each `TextAnalyticsClient` method returns a heterogeneous array of results and errors that correspond to the inputs by index. A text input and its result will have the same index in the input and result collections. The collection may also optionally include information about the input batch and how it was processed in the `statistics` field. -An __result__, such as `AnalyzeSentimentResult`, is the result of a Text Analytics operation, containing a prediction or predictions about a single text input. An operation's result type also may optionally include information about the input document and how it was processed. +An **result**, such as `AnalyzeSentimentResult`, is the result of a Text Analytics operation, containing a prediction or predictions about a single text input. An operation's result type also may optionally include information about the input document and how it was processed. -The __error__ object, `TextAnalyticsErrorResult`, indicates that the service encountered an error while processing the document and contains information about the error. +The **error** object, `TextAnalyticsErrorResult`, indicates that the service encountered an error while processing the document and contains information about the error. ### Document Error Handling @@ -148,7 +147,7 @@ const results = await client.analyzeSentiment(documents); const onlySuccessful = results.filter((result) => result.error === undefined); ``` -__Note__: TypeScript users can benefit from better type-checking of result and error objects if `compilerOptions.strictNullChecks` is set to `true` in their `tsconfig.json` configuration. For example: +**Note**: TypeScript users can benefit from better type-checking of result and error objects if `compilerOptions.strictNullChecks` is set to `true` in the `tsconfig.json` configuration. For example: ```typescript const [result] = await client.analyzeSentiment(["Hello world!"]); @@ -162,6 +161,16 @@ if (result.error !== undefined) { } ``` +This capability was introduced in TypeScript 3.2, so users of TypeScript 3.1 must cast result values to their corresponding success variant as follows: + +```typescript +const [result] = await client.detectLanguage(["Hello world!"]); + +if (result.error === undefined) { + const { primaryLanguage } = result as DetectLanguageSuccessResult; +} +``` + ## Examples ### Analyze Sentiment @@ -171,16 +180,13 @@ Analyze sentiment of text to determine if it is positive, negative, neutral, or ```javascript const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); const documents = [ "I did not like the restaurant. The food was too spicy.", "The restaurant was decorated beautifully. The atmosphere was unlike any other restaurant I've been to.", - "The food was yummy. :)" -] + "The food was yummy. :)", +]; async function main() { const results = await client.analyzeSentiment(documents); @@ -188,7 +194,7 @@ async function main() { for (const result of results) { if (result.error === undefined) { console.log("Overall sentiment:", result.sentiment); - console.log("Scores:", result.confidenceScores); + console.log("Scores:", result.confidenceScores); } else { console.error("Encountered an error:", result.error); } @@ -207,15 +213,12 @@ The `language` parameter is optional. If it is not specified, the default Englis ```javascript const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); const documents = [ "Microsoft was founded by Bill Gates and Paul Allen.", "Redmond is a city in King County, Washington, United States, located 15 miles east of Seattle.", - "Jeff bought three dozen eggs because there was a 50% discount." + "Jeff bought three dozen eggs because there was a 50% discount.", ]; async function main() { @@ -225,7 +228,7 @@ async function main() { if (result.error === undefined) { console.log(" -- Recognized entities for input", result.id, "--"); for (const entity of result.entities) { - console.log(entity.text, ":", entity.category, "(Score:", entity.score, ")"); + console.log(entity.text, ":", entity.category, "(Score:", entity.confidenceScore, ")"); } } else { console.error("Encountered an error:", result.error); @@ -243,15 +246,12 @@ A "Linked" entity is one that exists in a knowledge base (such as Wikipedia). Th ```javascript const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); const documents = [ "Microsoft was founded by Bill Gates and Paul Allen.", "Easter Island, a Chilean territory, is a remote volcanic island in Polynesia.", - "I use Azure Functions to develop my product." + "I use Azure Functions to develop my product.", ]; async function main() { @@ -263,7 +263,7 @@ async function main() { for (const entity of result.entities) { console.log(entity.name, "(URL:", entity.url, ", Source:", entity.dataSource, ")"); for (const match of entity.matches) { - console.log(" Occurrence:", "\"" + match.text + "\"", "(Score:", match.score, ")"); + console.log(" Occurrence:", "\"" + match.text + "\"", "(Score:", match.confidenceScore, ")"); } } } else { @@ -282,15 +282,12 @@ Key Phrase extraction identifies the main talking points in a document. For exam ```javascript const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); const documents = [ "Redmond is a city in King County, Washington, United States, located 15 miles east of Seattle.", "I need to take my cat to the veterinarian.", - "I will travel to South America in the summer." + "I will travel to South America in the summer.", ]; async function main() { @@ -299,7 +296,7 @@ async function main() { for (const result of results) { if (result.error === undefined) { console.log(" -- Extracted key phrases for input", result.id, "--"); - console.log(result.keyPhrases) + console.log(result.keyPhrases); } else { console.error("Encountered an error:", result.error); } @@ -318,23 +315,20 @@ The `countryHint` parameter is optional, but can assist the service in providing ```javascript const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics"); -const client = new TextAnalyticsClient( - "", - new AzureKeyCredential("") -); +const client = new TextAnalyticsClient("", new AzureKeyCredential("")); const documents = [ "This is written in English.", "Il documento scritto in italiano.", - "Dies ist in englischer Sprache verfasst." + "Dies ist in deutscher Sprache verfasst." ]; async function main() { const results = await client.detectLanguage(documents, "none"); for (const result of results) { - const { primaryLanguage } = result; if (result.error === undefined) { + const { primaryLanguage } = result; console.log( "Input #", result.id, @@ -343,7 +337,7 @@ async function main() { "( ISO6391:", primaryLanguage.iso6391Name, ", Score:", - primaryLanguage.score, + primaryLanguage.confidenceScore, ")" ); } else { @@ -369,8 +363,6 @@ export AZURE_LOG_LEVEL=verbose 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/master/sdk/core/logger). -``` - ## Next steps Please take a look at the @@ -389,10 +381,11 @@ If you'd like to contribute to this library, please read the [contributing guide [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ -[cognitive_resource]: https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account +[cognitive_resource]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity [cognitive_auth]: https://docs.microsoft.com/azure/cognitive-services/authentication [register_aad_app]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential [data_limits]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview#data-limits + diff --git a/sdk/textanalytics/ai-text-analytics/package.json b/sdk/textanalytics/ai-text-analytics/package.json index 83da60c3021b..f242f887ce2a 100644 --- a/sdk/textanalytics/ai-text-analytics/package.json +++ b/sdk/textanalytics/ai-text-analytics/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "description": "An isomorphic client library for the Azure Text Analytics service.", - "version": "1.0.0-preview.5", + "version": "1.0.0", "keywords": [ "node", "azure", @@ -78,7 +78,7 @@ "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^0.6.1", - "tslib": "^1.10.0" + "tslib": "^2.0.0" }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", @@ -88,18 +88,18 @@ "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", "@types/mocha": "^7.0.2", "@types/node": "^8.0.0", - "@types/sinon": "^7.0.13", + "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "cross-env": "^6.0.3", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", @@ -128,9 +128,9 @@ "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^3.1.1", - "sinon": "^7.1.0", + "rollup-plugin-visualizer": "^4.0.4", + "sinon": "^9.0.2", "source-map-support": "^0.5.9", - "typescript": "~3.8.3" + "typescript": "~3.9.3" } } diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.json index c3487af9fdac..43e3225e21cc 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "218e0c25-37d5-4c66-8cd2-ede34c793300" + "x-ms-ests-server": "2.1.10620.9 - WUS2 ProdSlices", + "x-ms-request-id": "cf8208fd-ec0c-4f01-86bd-5ccbc4d17a00" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86}]},{\"id\":\"1\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43}]},{\"id\":\"2\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101}]},{\"id\":\"3\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86,\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58,\"text\":\"Unfortunately, it rained during my entire trip to Seattle.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43,\"text\":\"I didn't even get to visit the Space Needle\"}],\"warnings\":[]},{\"id\":\"2\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101,\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"}],\"warnings\":[]},{\"id\":\"3\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42,\"text\":\"I didn't like the last book I read at all.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "c16986d3-deff-43c1-8b6e-aa0557de324f", + "apim-request-id": "52139ae6-b866-4a9d-96cd-3129accebd73", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "76" + "x-envoy-upstream-service-time": "85" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "22da5b11ec0860848bba6eeaa99e41c1" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.json index 4a78724b19e2..74162a1039c1 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:46 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "6fb02ad4-1265-4616-984c-191854901d00" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "c3cb7de1-34c5-401e-83d1-ccd6291eda00" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86}]},{\"id\":\"1\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43}]},{\"id\":\"2\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101}]},{\"id\":\"3\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86,\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58,\"text\":\"Unfortunately, it rained during my entire trip to Seattle.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43,\"text\":\"I didn't even get to visit the Space Needle\"}],\"warnings\":[]},{\"id\":\"2\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101,\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"}],\"warnings\":[]},{\"id\":\"3\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42,\"text\":\"I didn't like the last book I read at all.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "fc4d64a9-a1a2-4291-883c-b25c0437b6fd", + "apim-request-id": "537dce60-b62b-44da-a3c6-fda7e67925ca", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:46 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "79" + "x-envoy-upstream-service-time": "100" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "d4c3167b9da0f000590244edd2331f88" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.json index 565a7fb78c97..af1d1d39e1f3 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:46 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "fdc3b785-edff-4540-8c7c-639de4db3400" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "0d280f27-276e-43cc-a7bb-ca4393041b02" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86}]},{\"id\":\"2\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43}]},{\"id\":\"3\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101}]},{\"id\":\"4\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42}]},{\"id\":\"5\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.89,\"neutral\":0.08,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.89,\"neutral\":0.08,\"negative\":0.03},\"offset\":0,\"length\":73}]},{\"id\":\"6\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.11,\"neutral\":0.29,\"negative\":0.6},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.11,\"neutral\":0.29,\"negative\":0.6},\"offset\":0,\"length\":29},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.09,\"neutral\":0.58,\"negative\":0.33},\"offset\":30,\"length\":35}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86,\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"}],\"warnings\":[]},{\"id\":\"2\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58,\"text\":\"Unfortunately, it rained during my entire trip to Seattle.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43,\"text\":\"I didn't even get to visit the Space Needle\"}],\"warnings\":[]},{\"id\":\"3\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101,\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"}],\"warnings\":[]},{\"id\":\"4\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42,\"text\":\"I didn't like the last book I read at all.\"}],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.89,\"neutral\":0.08,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.89,\"neutral\":0.08,\"negative\":0.03},\"offset\":0,\"length\":73,\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\"}],\"warnings\":[]},{\"id\":\"6\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.11,\"neutral\":0.29,\"negative\":0.6},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.11,\"neutral\":0.29,\"negative\":0.6},\"offset\":0,\"length\":29,\"text\":\"La carretera estaba atascada.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.09,\"neutral\":0.58,\"negative\":0.33},\"offset\":30,\"length\":35,\"text\":\"Había mucho tráfico el día de ayer.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "dcf6534f-441c-4a94-b3f4-b59bb8e6ec5e", + "apim-request-id": "971159a1-db5e-49ae-8f61-7cc0af2c2f13", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Wed, 05 Feb 2020 23:15:46 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "79" + "x-envoy-upstream-service-time": "108" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "f77a044c28d9a74e699207adbcd84e6f" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.json index 04a39f0e0ca8..302c1c66939e 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.json @@ -1,49 +1,8 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "f3f0fd64-5c10-4c7c-a895-0c1ffc421c00" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", - "query": {}, - "requestBody": "{\"documents\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"InvalidRequest\",\"innerError\":{\"code\":\"MissingInputRecords\",\"message\":\"Missing input records.\"},\"message\":\"Invalid Request.\"}}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "e1146d09-05c1-48f6-a8cd-cc3b705e58b5", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" - } - } - ], + "recordings": [], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "84ddaf1941daa8ab56711327a38f4aa8" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.json index 8249b121cb5c..c4adc62b7b0d 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:22 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.16 - WST ProdSlices", - "x-ms-request-id": "fc65c9ce-af61-458c-a243-46f1f91f3400" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "eb119cf5-cf0c-4191-82bc-0e7f91ea1701" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86}]},{\"id\":\"2\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43}]},{\"id\":\"3\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101}]},{\"id\":\"4\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42}]}],\"errors\":[{\"id\":\"1\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86,\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"}],\"warnings\":[]},{\"id\":\"2\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58,\"text\":\"Unfortunately, it rained during my entire trip to Seattle.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43,\"text\":\"I didn't even get to visit the Space Needle\"}],\"warnings\":[]},{\"id\":\"3\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101,\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"}],\"warnings\":[]},{\"id\":\"4\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42,\"text\":\"I didn't like the last book I read at all.\"}],\"warnings\":[]}],\"errors\":[{\"id\":\"1\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "f5f5a21d-98e6-49bd-a5d9-905cebfd5bab", + "apim-request-id": "5adac2a7-b30d-4d2e-929a-21f8b86ba42b", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "111" + "x-envoy-upstream-service-time": "95" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "729da5b8ba63415852e7f60be81ef902" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.json index b64146c87372..aad87dca0baa 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.json @@ -11,39 +11,40 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:22 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.16 - WST ProdSlices", - "x-ms-request-id": "7dcad05a-7d99-4eb8-b7ce-d8dae3823500" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "3a5d29a4-2237-4002-bb9d-4a32e976db01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"Hello world!\",\"language\":\"notalanguage\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innerError\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant\"}}}],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innererror\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant\"}}}],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "70cc3528-2802-4b0f-87d5-d056e6413f96", + "apim-request-id": "47ec180a-413e-422e-aac3-4cea01459a18", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" + "x-envoy-upstream-service-time": "2" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "7adc0332b21b4048254bbc4785ef4fdb" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.json index 5a6403782f49..2376fdcc0ce1 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "6fb02ad4-1265-4616-984c-1918b8402100" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "93869a83-384e-466f-830a-541efd3c2c01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"impossible\",\"countryHint\":\"fr\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"French\",\"iso6391Name\":\"fr\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"French\",\"iso6391Name\":\"fr\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "4788c2e3-c4d4-4c03-8157-02db8c63bf17", + "apim-request-id": "94180870-cb54-4910-8bca-7809b347f6d5", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5" + "x-envoy-upstream-service-time": "9" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "0549c5e3bcae9d6ccfff981059c03eee" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.json index 878b2c2d5e36..3628ff178f4c 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "914780c5-e0af-48b9-a267-88c940bf1d00" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "53302778-a78a-41c6-8dd4-8afe467f3d01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"countryHint\":\"mx\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"countryHint\":\"mx\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"2\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"3\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"4\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"5\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}]},{\"id\":\"6\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"3\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"4\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"5\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"6\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "f474a64d-6bca-4307-8070-a8c423e35630", + "apim-request-id": "bb20c05c-6c94-4149-b1b0-c1831d835a4e", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "7" + "x-envoy-upstream-service-time": "8" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "1ff3a46a729f9d9cfa5a1309e3ddd636" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.json index 128f9935baca..1fc26346d2b2 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "d2c599f9-a9f3-457f-bbd9-5131173e3600" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "104e0fba-e008-4312-839c-662b9f5a1d01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"countryHint\":\"us\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"countryHint\":\"us\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"countryHint\":\"us\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"countryHint\":\"us\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"1\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"2\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"3\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"3\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "8cacfe13-72ae-489f-990b-5fd8ac958d76", + "apim-request-id": "efccdcd6-e655-4c03-b0c0-29c31bda6164", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:50:59 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "7" + "x-envoy-upstream-service-time": "8" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "e301fa55ac2f8618d8bf8ba969e9d0c6" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.json index 1d9fd6e51fd1..7284620c24c4 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.json @@ -11,35 +11,35 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Fri, 28 Feb 2020 23:51:09 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10104.13 - WST ProdSlices", - "x-ms-request-id": "693152ae-d2e8-483b-bf50-a716890b8500" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "7e54ffea-1a22-4647-8af5-d2908cca1801" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"countryHint\":\"\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"countryHint\":\"\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"countryHint\":\"\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"countryHint\":\"\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"countryHint\":\"\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"countryHint\":\"\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"2\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"3\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"4\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"5\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}]},{\"id\":\"6\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"3\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"4\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"5\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"6\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "3c8af150-0669-40d7-b78a-f9e3fce00457", + "apim-request-id": "aabc3fda-3567-4233-a279-3f4291f6044c", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Fri, 28 Feb 2020 23:51:10 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" + "x-envoy-upstream-service-time": "8" } } ], diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.json index 93b7acc880da..3f02b83db0de 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.json @@ -11,35 +11,35 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Fri, 28 Feb 2020 23:51:09 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.10104.13 - SAN ProdSlices", - "x-ms-request-id": "fbbb3371-88f9-4d59-8ffc-2c3de95de300" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "89b0d59a-95df-4cb1-b102-8cff9843c101" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I use Azure Functions to develop my service.\",\"countryHint\":\"\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "68661d7b-c474-4a4f-b449-585e17066d24", + "apim-request-id": "e3d3b109-c7a5-40c3-826d-b1368b451def", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Fri, 28 Feb 2020 23:51:10 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "3" + "x-envoy-upstream-service-time": "7" } } ], diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.json index 527924bc4a8d..51e2dfa5acd5 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.json @@ -1,49 +1,8 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:50:59 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "73e53a21-494e-4cd3-9781-8720db241e00" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", - "query": {}, - "requestBody": "{\"documents\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"InvalidRequest\",\"innerError\":{\"code\":\"MissingInputRecords\",\"message\":\"Missing input records.\"},\"message\":\"Invalid Request.\"}}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "eeb1d2ea-cd71-42c0-b969-393757cf6955", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:50:59 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "3" - } - } - ], + "recordings": [], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "cd1053d7e9c26f78bcbd10804df935d8" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.json index 4eef7b70ec61..719d96778126 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.json @@ -11,40 +11,40 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.16 - WST ProdSlices", - "x-ms-request-id": "02579615-a650-447f-81e9-4a74a8b53700" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "8d287ff7-720b-4e03-90ec-6fa2b6b02401" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"hello\",\"countryHint\":\"invalidcountry\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Country Hint.\",\"innerError\":{\"code\":\"InvalidCountryHint\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"}}}],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Country Hint.\",\"innererror\":{\"code\":\"InvalidCountryHint\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"}}}],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "0d694cef-8bd7-45bf-ac27-48c8edcdb1d4", + "apim-request-id": "605b70ee-bb3a-439a-ba4b-c242cd6fc3f5", "content-type": "application/json; charset=utf-8", - "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=0", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:25 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "3" + "x-envoy-upstream-service-time": "2" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "4511b0789af9b3dc704836f6b83fd147" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.json index f95d23c88a4a..aca588be39a6 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:49 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "6c598315-f4a9-40fc-9522-c5c3fdc43100" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "6d766152-21a9-4fb3-ab81-6a328b530f02" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"]},{\"id\":\"2\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"]},{\"id\":\"3\",\"keyPhrases\":[\"movie\"]},{\"id\":\"4\",\"keyPhrases\":[\"book\"]},{\"id\":\"5\",\"keyPhrases\":[\"Monte Rainier\",\"caminos\"]},{\"id\":\"6\",\"keyPhrases\":[\"carretera\",\"tráfico\",\"día\"]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"movie\"],\"warnings\":[]},{\"id\":\"4\",\"keyPhrases\":[\"book\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Monte Rainier\",\"caminos\"],\"warnings\":[]},{\"id\":\"6\",\"keyPhrases\":[\"carretera\",\"tráfico\",\"día\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "ad1e2e0d-2e91-49b8-909e-dc2dd1989afa", + "apim-request-id": "61d904e0-b1e8-46bc-831d-4573d353af2e", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "8" + "x-envoy-upstream-service-time": "10" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "c80f93bb47da1550c6f03999b4b50524" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.json index c2ea69f61712..0e31dcb3fc8f 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:49 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "7f0480ee-70c5-43a7-b271-8c7349441a00" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "8249ae96-48d5-4ef1-a82c-7282458f0f02" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"]},{\"id\":\"1\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"]},{\"id\":\"2\",\"keyPhrases\":[\"movie\"]},{\"id\":\"3\",\"keyPhrases\":[\"book\"]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"movie\"],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"book\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "a1f3d537-4863-46f3-8a91-d2a45ba03abf", + "apim-request-id": "5a4324e0-c00c-4ae4-9f7a-357d79302711", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "9" + "x-envoy-upstream-service-time": "12" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "64614cc95f9c09328d17a854308c3248" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.json index 53c5a6ad4584..08e5556ec21e 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "8fc3852e-472b-4455-aba9-3a4a30dc3200" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "e690edc1-6c51-4382-8f3e-ac4137de2501" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"]},{\"id\":\"1\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"]},{\"id\":\"2\",\"keyPhrases\":[\"movie\"]},{\"id\":\"3\",\"keyPhrases\":[\"book\"]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"week\",\"Space Needle\",\"wonderful trip\",\"Seattle\",\"times\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"entire trip\",\"Seattle\",\"Space Needle\"],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"movie\"],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"book\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "55a0d961-838f-4bfa-81af-296f354e2305", + "apim-request-id": "97199414-3463-4fab-b3e6-e509442369bc", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "15" + "x-envoy-upstream-service-time": "9" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "507fd240972e76fe7347de2a14527d2d" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.json index 0ed4079ab52c..8c375cf9ca64 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.json @@ -1,49 +1,8 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "6fb02ad4-1265-4616-984c-1918d1911d00" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", - "query": {}, - "requestBody": "{\"documents\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"InvalidRequest\",\"innerError\":{\"code\":\"MissingInputRecords\",\"message\":\"Missing input records.\"},\"message\":\"Invalid Request.\"}}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "703e7827-b27b-406f-9335-20fcbc26bbea", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "6" - } - } - ], + "recordings": [], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "7dbbac86592b663de9d54430ebfead0f" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.json index 45997e425171..ae8c5a420b53 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "914780c5-e0af-48b9-a267-88c9361a8a00" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "2f43f112-08b6-415a-97bf-94cb05612601" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"This is some text, but it doesn't matter.\",\"language\":\"notalanguage\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innerError\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv\"}}}],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innererror\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv\"}}}],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "2b4884ff-8db5-4521-8d80-cf43e50f704b", + "apim-request-id": "8b8cc0a1-2cef-4319-b055-e6c64657d143", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=0", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "22" + "x-envoy-upstream-service-time": "3" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "19af30cd037d130f8da7765e4c73f718" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.json similarity index 58% rename from sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json rename to sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.json index d60d765be962..6c6bf250b034 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "182c1c08-935c-465a-96df-e9c9aa102000" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "8249ae96-48d5-4ef1-a82c-72826d8f0f02" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, - "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"hello\",\"countryHint\":\"invalidcountry\"}]}", + "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"Hello world, thisisanextremelymassivesequenceoflettersthatislongerthansixtyfourcharacters.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"},\"message\":\"Invalid Country Hint.\"}}],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"world\",\"thisisanextremelymassivesequenceoflettersthatislongerthansixtyfo\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "c58ae0d9-4b57-4c94-89be-004eeb43f248", + "apim-request-id": "c4c8bbc2-64d5-4334-9b65-727fd3e9b084", "content-type": "application/json; charset=utf-8", - "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=0", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", + "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" + "x-envoy-upstream-service-time": "23" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "247e53f0dcd52a23b1ac23f0e5976bd7" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.json index 2c65021f5ed7..d335e3f58b95 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "81c04908-ca7e-47ad-b478-54c3b4363100" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "3a5d29a4-2237-4002-bb9d-4a327477db01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", "query": {}, - "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", + "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"5\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":26,\"length\":7,\"score\":0.82074707746505737},{\"text\":\"last week\",\"type\":\"DateTime\",\"subtype\":\"DateRange\",\"offset\":34,\"length\":9,\"score\":0.8},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":65,\"length\":12,\"score\":0.94183868169784546},{\"text\":\"2\",\"type\":\"Quantity\",\"subtype\":\"Number\",\"offset\":78,\"length\":1,\"score\":0.8}]},{\"id\":\"2\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":50,\"length\":7,\"score\":0.93755143880844116},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":90,\"length\":12,\"score\":0.79052209854125977}]},{\"id\":\"3\",\"entities\":[{\"text\":\"Saturday\",\"type\":\"DateTime\",\"subtype\":\"Date\",\"offset\":25,\"length\":8,\"score\":0.8}]},{\"id\":\"4\",\"entities\":[]},{\"id\":\"5\",\"entities\":[]},{\"id\":\"6\",\"entities\":[{\"text\":\"el día\",\"type\":\"DateTime\",\"subtype\":\"Date\",\"offset\":50,\"length\":6,\"score\":0.8},{\"text\":\"ayer\",\"type\":\"DateTime\",\"subtype\":\"Date\",\"offset\":60,\"length\":4,\"score\":0.8}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.75},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"2\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":78,\"length\":1,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":50,\"length\":7,\"confidenceScore\":0.74},{\"text\":\"Space Needle\",\"category\":\"Skill\",\"offset\":90,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"Saturday\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":25,\"length\":8,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[{\"text\":\"Monte Rainier\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":29,\"length\":13,\"confidenceScore\":0.43}],\"warnings\":[]},{\"id\":\"5\",\"entities\":[{\"text\":\"el día\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":50,\"length\":6,\"confidenceScore\":0.8},{\"text\":\"ayer\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":60,\"length\":4,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "92eeb260-7a40-4068-8ed6-fcd55add1e0b", + "apim-request-id": "b562b5f9-793e-4680-ab03-6ec1fd409504", "content-type": "application/json; charset=utf-8", - "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=5", + "date": "Tue, 26 May 2020 18:16:26 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "15" + "x-envoy-upstream-service-time": "148" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "a2ca6d997ea25abdd43d8555949fb0a5" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.json index be6e36b4860b..b079af905087 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "35bb5e0c-03bc-4408-8e9f-e729e9e13000" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "bf6ad1c0-b49f-479c-8b98-7ee76f86ed01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":26,\"length\":7,\"score\":0.82074707746505737},{\"text\":\"last week\",\"type\":\"DateTime\",\"subtype\":\"DateRange\",\"offset\":34,\"length\":9,\"score\":0.8},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":65,\"length\":12,\"score\":0.94183868169784546},{\"text\":\"2\",\"type\":\"Quantity\",\"subtype\":\"Number\",\"offset\":78,\"length\":1,\"score\":0.8}]},{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":50,\"length\":7,\"score\":0.93755143880844116},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":90,\"length\":12,\"score\":0.79052209854125977}]},{\"id\":\"2\",\"entities\":[{\"text\":\"Saturday\",\"type\":\"DateTime\",\"subtype\":\"Date\",\"offset\":25,\"length\":8,\"score\":0.8}]},{\"id\":\"3\",\"entities\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.75},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"2\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":78,\"length\":1,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":50,\"length\":7,\"confidenceScore\":0.74},{\"text\":\"Space Needle\",\"category\":\"Skill\",\"offset\":90,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"Saturday\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":25,\"length\":8,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "35298ecc-4f7e-4b2d-88c5-23132c083e74", + "apim-request-id": "3f08d435-68a0-4521-adce-20c7be0af530", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:47 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "14" + "x-envoy-upstream-service-time": "100" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "629a43c9c671479faaa1c0e921d0d443" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.json index 8e026c07a9a5..c9cf0cf1546d 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:48 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "218e0c25-37d5-4c66-8cd2-ede3e2793300" + "x-ms-ests-server": "2.1.10620.9 - WUS2 ProdSlices", + "x-ms-request-id": "cf8208fd-ec0c-4f01-86bd-5ccb2ed27a00" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":26,\"length\":7,\"score\":0.82074707746505737},{\"text\":\"last week\",\"type\":\"DateTime\",\"subtype\":\"DateRange\",\"offset\":34,\"length\":9,\"score\":0.8},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":65,\"length\":12,\"score\":0.94183868169784546},{\"text\":\"2\",\"type\":\"Quantity\",\"subtype\":\"Number\",\"offset\":78,\"length\":1,\"score\":0.8}]},{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":50,\"length\":7,\"score\":0.93755143880844116},{\"text\":\"Space Needle\",\"type\":\"Organization\",\"offset\":90,\"length\":12,\"score\":0.79052209854125977}]},{\"id\":\"2\",\"entities\":[{\"text\":\"Saturday\",\"type\":\"DateTime\",\"subtype\":\"Date\",\"offset\":25,\"length\":8,\"score\":0.8}]},{\"id\":\"3\",\"entities\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.75},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"2\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":78,\"length\":1,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":50,\"length\":7,\"confidenceScore\":0.74},{\"text\":\"Space Needle\",\"category\":\"Skill\",\"offset\":90,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"Saturday\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":25,\"length\":8,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "e6b4d397-9a5b-474a-85e6-9ee155e1c249", + "apim-request-id": "2b1d96c8-da79-44aa-8fab-ceb619c3d083", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:47 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "15" + "x-envoy-upstream-service-time": "134" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "454785cb842962f62490423cf8ec175c" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.json new file mode 100644 index 000000000000..8dc8102bcc5f --- /dev/null +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1417", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 18:16:27 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "6d766152-21a9-4fb3-ab81-6a3229530f02" + } + }, + { + "method": "POST", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", + "query": {}, + "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", + "status": 200, + "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.75},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"2\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":78,\"length\":1,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":50,\"length\":7,\"confidenceScore\":0.74},{\"text\":\"Space Needle\",\"category\":\"Skill\",\"offset\":90,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"Saturday\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":25,\"length\":8,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[],\"warnings\":[]},{\"id\":\"5\",\"entities\":[{\"text\":\"Monte Rainier\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":29,\"length\":13,\"confidenceScore\":0.43}],\"warnings\":[]},{\"id\":\"6\",\"entities\":[{\"text\":\"el día\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":50,\"length\":6,\"confidenceScore\":0.8},{\"text\":\"ayer\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":60,\"length\":4,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[{\"id\":\"\",\"error\":{\"code\":\"InvalidRequest\",\"message\":\"The request has exceeded the allowed document limits.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information\"}}}],\"modelVersion\":\"2020-04-01\"}", + "responseHeaders": { + "access-control-allow-origin": "*", + "access-control-expose-headers": "Operation-Location", + "apim-request-id": "fc2947e1-8fef-47b7-82ec-2484dc3b73cd", + "content-type": "application/json; charset=utf-8", + "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", + "date": "Tue, 26 May 2020 18:16:26 GMT", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "138" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "23e5ace90c301ea28319c332d2b44e2c" +} \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.json index 0aa910b2c822..36461f251656 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.json @@ -1,49 +1,8 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:47 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "f3f0fd64-5c10-4c7c-a895-0c1f60441c00" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", - "query": {}, - "requestBody": "{\"documents\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"InvalidRequest\",\"innerError\":{\"code\":\"MissingInputRecords\",\"message\":\"Missing input records.\"},\"message\":\"Invalid Request.\"}}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "fb93fc6e-3465-408b-b1b8-8fc2fbff32fe", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:47 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" - } - } - ], + "recordings": [], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "0f3fec6a23fdacd7133569055fc71689" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.json index 1d596d9febde..80dde40a7c40 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.json @@ -11,39 +11,40 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.16 - WST ProdSlices", - "x-ms-request-id": "863a500b-a5ff-4b03-be12-42020f863300" + "x-ms-ests-server": "2.1.10620.9 - WUS2 ProdSlices", + "x-ms-request-id": "af1cf933-efd0-4248-8459-2c4310f80600" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"This is some text, but it doesn't matter.\",\"language\":\"notalanguage\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innerError\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans\"}}}],\"modelVersion\":\"2020-02-01\"}", + "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innererror\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans\"}}}],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "aa58de43-b2e6-4408-92c8-2aec99c394a2", + "apim-request-id": "33e4b2e4-3b9c-4319-87c7-4458b4a4be80", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:26 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "2" + "x-envoy-upstream-service-time": "3" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "11ce48ddaac87536c27d5843d8234f65" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.json index 8ba32de6fbe5..e58f8719568b 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "182c1c08-935c-465a-96df-e9c9c7401c00" + "x-ms-ests-server": "2.1.10620.9 - WUS2 ProdSlices", + "x-ms-request-id": "37c5711e-50d9-437c-86bc-98d223470500" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", + "url": "https://endpoint/text/analytics/v3.0/entities/linking", "query": {}, - "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", + "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"5\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"score\":0.78051341207948344}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"score\":0.17662735414636144}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"2\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"score\":0.74912543879603755}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"score\":0.15581376791353607}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"3\",\"entities\":[]},{\"id\":\"4\",\"entities\":[]},{\"id\":\"5\",\"entities\":[]},{\"id\":\"6\",\"entities\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"confidenceScore\":0.42}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.21}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"confidenceScore\":0.36}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"confidenceScore\":0.2}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"name\":\"Saturday\",\"matches\":[{\"text\":\"Saturday\",\"offset\":25,\"length\":8,\"confidenceScore\":0.05}],\"language\":\"en\",\"id\":\"Saturday\",\"url\":\"https://en.wikipedia.org/wiki/Saturday\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[{\"name\":\"Monte Rainier\",\"matches\":[{\"text\":\"Monte Rainier\",\"offset\":29,\"length\":13,\"confidenceScore\":0.81}],\"language\":\"es\",\"id\":\"Monte Rainier\",\"url\":\"https://es.wikipedia.org/wiki/Monte_Rainier\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "b8632a18-a6fa-4299-8d15-545aab299d37", + "apim-request-id": "ff660494-bfa4-4ecd-82e0-b363c273b4c9", "content-type": "application/json; charset=utf-8", - "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", + "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=5", + "date": "Tue, 26 May 2020 18:16:28 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "18" + "x-envoy-upstream-service-time": "31" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "3722c5d43e9a6c9abab7b509128fe2ef" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.json index 29691e2ffd73..992c6f18a374 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "914780c5-e0af-48b9-a267-88c921321a00" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "6ba37946-8e5b-4e6a-934f-e22432986a01" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", + "url": "https://endpoint/text/analytics/v3.0/entities/linking", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"score\":0.78051341207948344}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"score\":0.17662735414636144}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"score\":0.74912543879603755}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"score\":0.15581376791353607}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"2\",\"entities\":[]},{\"id\":\"3\",\"entities\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"confidenceScore\":0.42}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.21}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"confidenceScore\":0.36}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"confidenceScore\":0.2}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"name\":\"Saturday\",\"matches\":[{\"text\":\"Saturday\",\"offset\":25,\"length\":8,\"confidenceScore\":0.05}],\"language\":\"en\",\"id\":\"Saturday\",\"url\":\"https://en.wikipedia.org/wiki/Saturday\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "97266aae-88dd-4687-81d4-9677df81ec6c", + "apim-request-id": "460d7a2b-3ddd-4981-922d-e78922d48d22", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "18" + "x-envoy-upstream-service-time": "45" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "38884340c7ec68c159416f476ba71fbf" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.json index 78ba807b6c07..bafdaee8013b 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.json @@ -11,40 +11,41 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "d9727768-de08-4f7a-bfa0-f6fd5ee23400" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "8249ae96-48d5-4ef1-a82c-72828c8f0f02" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", + "url": "https://endpoint/text/analytics/v3.0/entities/linking", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"score\":0.78051341207948344}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"score\":0.17662735414636144}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"score\":0.74912543879603755}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"score\":0.15581376791353607}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}]},{\"id\":\"2\",\"entities\":[]},{\"id\":\"3\",\"entities\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":65,\"length\":12,\"confidenceScore\":0.42}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.21}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Space Needle\",\"matches\":[{\"text\":\"Space Needle\",\"offset\":90,\"length\":12,\"confidenceScore\":0.36}],\"language\":\"en\",\"id\":\"Space Needle\",\"url\":\"https://en.wikipedia.org/wiki/Space_Needle\",\"dataSource\":\"Wikipedia\"},{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":50,\"length\":7,\"confidenceScore\":0.2}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"name\":\"Saturday\",\"matches\":[{\"text\":\"Saturday\",\"offset\":25,\"length\":8,\"confidenceScore\":0.05}],\"language\":\"en\",\"id\":\"Saturday\",\"url\":\"https://en.wikipedia.org/wiki/Saturday\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "7e977ddf-17a9-4485-aab8-cb43699c8003", + "apim-request-id": "93b450c6-a02a-4494-9594-a2a9ff44f7bb", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:49 GMT", + "date": "Tue, 26 May 2020 18:16:27 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "15" + "x-envoy-upstream-service-time": "32" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "2be31af9af172728b2aef70877c4607b" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.json new file mode 100644 index 000000000000..332bb78f9fb4 --- /dev/null +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-cache, no-store", + "content-length": "1417", + "content-type": "application/json; charset=utf-8", + "date": "Tue, 26 May 2020 18:16:28 GMT", + "expires": "-1", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "7e54ffea-1a22-4647-8af5-d29024cb1801" + } + }, + { + "method": "POST", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", + "query": {}, + "requestBody": "{\"documents\":[{\"id\":\"1\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"4\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"},{\"id\":\"5\",\"text\":\"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.\",\"language\":\"es\"},{\"id\":\"6\",\"text\":\"La carretera estaba atascada. Había mucho tráfico el día de ayer.\",\"language\":\"es\"}]}", + "status": 200, + "response": "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.75},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8},{\"text\":\"2\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":78,\"length\":1,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":50,\"length\":7,\"confidenceScore\":0.74},{\"text\":\"Space Needle\",\"category\":\"Skill\",\"offset\":90,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"Saturday\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":25,\"length\":8,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[],\"warnings\":[]},{\"id\":\"5\",\"entities\":[{\"text\":\"Monte Rainier\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":29,\"length\":13,\"confidenceScore\":0.43}],\"warnings\":[]},{\"id\":\"6\",\"entities\":[{\"text\":\"el día\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":50,\"length\":6,\"confidenceScore\":0.8},{\"text\":\"ayer\",\"category\":\"DateTime\",\"subcategory\":\"Date\",\"offset\":60,\"length\":4,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[{\"id\":\"\",\"error\":{\"code\":\"InvalidRequest\",\"message\":\"The request has exceeded the allowed document limits.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information\"}}}],\"modelVersion\":\"2020-04-01\"}", + "responseHeaders": { + "access-control-allow-origin": "*", + "access-control-expose-headers": "Operation-Location", + "apim-request-id": "1815f357-3848-4225-a1bd-c9adab5de239", + "content-type": "application/json; charset=utf-8", + "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=6", + "date": "Tue, 26 May 2020 18:16:28 GMT", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "144" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "23e5ace90c301ea28319c332d2b44e2c" +} \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.json index ecdf8b4e6d25..09298914cbba 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.json @@ -1,49 +1,8 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:50 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - WST ProdSlices", - "x-ms-request-id": "218e0c25-37d5-4c66-8cd2-ede3ba7a3300" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", - "query": {}, - "requestBody": "{\"documents\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"InvalidRequest\",\"innerError\":{\"code\":\"MissingInputRecords\",\"message\":\"Missing input records.\"},\"message\":\"Invalid Request.\"}}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "ad90982d-96b5-4f19-89ea-9ddc85247df6", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:15:49 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "3" - } - } - ], + "recordings": [], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "f1dd79f51945f556e8e2ac9b6e914979" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.json index daf185794903..6fa109a26290 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.json @@ -11,39 +11,40 @@ "cache-control": "no-cache, no-store", "content-length": "1417", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:23 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "expires": "-1", "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "pragma": "no-cache", "referrer-policy": "strict-origin-when-cross-origin", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "e5ce71fb-f038-4bf8-9c7c-abcf3fc74300" + "x-ms-ests-server": "2.1.10571.11 - WUS2 ProdSlices", + "x-ms-request-id": "4eed527d-6794-4faa-8b14-2666811c0802" } }, { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", + "url": "https://endpoint/text/analytics/v3.0/entities/linking", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"This is some text, but it doesn't matter.\",\"language\":\"notalanguage\"}]}", "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innerError\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: en,es\"}}}],\"modelVersion\":\"2020-02-01\"}", + "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Language Code.\",\"innererror\":{\"code\":\"UnsupportedLanguageCode\",\"message\":\"Supplied language not supported. Pass in one of: en,es\"}}}],\"modelVersion\":\"2020-02-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location", - "apim-request-id": "abcaa353-009d-471a-8c0a-228e661dcab3", + "apim-request-id": "f72b9295-4b75-485b-948a-a7b0bf53c9d5", "content-type": "application/json; charset=utf-8", - "date": "Thu, 06 Feb 2020 23:49:24 GMT", + "date": "Tue, 26 May 2020 18:16:28 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "3" + "x-envoy-upstream-service-time": "2" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "be725313ad937425f2f414addae4fdf7" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_analyzesentiment.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_analyzesentiment.json index 955341e42bd2..a3d5bbdd738e 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_analyzesentiment.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_analyzesentiment.json @@ -2,27 +2,28 @@ "recordings": [ { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/sentiment", + "url": "https://endpoint/text/analytics/v3.0/sentiment", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\",\"language\":\"en\"},{\"id\":\"1\",\"text\":\"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle\",\"language\":\"en\"},{\"id\":\"2\",\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\",\"language\":\"en\"},{\"id\":\"3\",\"text\":\"I didn't like the last book I read at all.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86}]},{\"id\":\"1\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58},{\"sentiment\":\"neutral\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43}]},{\"id\":\"2\",\"sentiment\":\"positive\",\"documentScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"sentenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101}]},{\"id\":\"3\",\"sentiment\":\"negative\",\"documentScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"sentenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":0.99,\"neutral\":0.01,\"negative\":0.0},\"offset\":0,\"length\":86,\"text\":\"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":58,\"text\":\"Unfortunately, it rained during my entire trip to Seattle.\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.7,\"negative\":0.29},\"offset\":59,\"length\":43,\"text\":\"I didn't even get to visit the Space Needle\"}],\"warnings\":[]},{\"id\":\"2\",\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":101,\"text\":\"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.\"}],\"warnings\":[]},{\"id\":\"3\",\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.01,\"neutral\":0.03,\"negative\":0.96},\"offset\":0,\"length\":42,\"text\":\"I didn't like the last book I read at all.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location,Location", - "apim-request-id": "f705b7f2-774d-4548-a843-8eb5e5e847f1", + "apim-request-id": "742596e5-9014-41c0-ae0b-646233776a5e", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=4", - "date": "Wed, 05 Feb 2020 23:15:44 GMT", + "date": "Tue, 26 May 2020 18:16:23 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "81" + "x-envoy-upstream-service-time": "97" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "8360a78575f05d634db92ca06fc30890" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_detectlanguage.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_detectlanguage.json index 9654d6d232cc..7cdcccbc461a 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_detectlanguage.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_detectlanguage.json @@ -2,27 +2,28 @@ "recordings": [ { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", + "url": "https://endpoint/text/analytics/v3.0/languages", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"impossible\",\"countryHint\":\"fr\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"French\",\"iso6391Name\":\"fr\",\"score\":1.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"French\",\"iso6391Name\":\"fr\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location,Location", - "apim-request-id": "496570e0-9e0e-4b26-8dd0-f05446adc457", + "apim-request-id": "36827089-58a5-4c33-8bbf-8290904a1920", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Wed, 05 Feb 2020 23:50:59 GMT", + "date": "Tue, 26 May 2020 18:16:23 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" + "x-envoy-upstream-service-time": "8" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "e10cad7ccffa9b44e28d7cfb6057f472" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_extractkeyphrases.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_extractkeyphrases.json index 9f16216a4f50..ce0c6ad88111 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_extractkeyphrases.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_extractkeyphrases.json @@ -2,18 +2,18 @@ "recordings": [ { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/keyPhrases", + "url": "https://endpoint/text/analytics/v3.0/keyPhrases", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last weekend\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"wonderful trip\",\"Seattle\",\"weekend\"]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"wonderful trip\",\"Seattle\",\"weekend\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location,Location", - "apim-request-id": "78817bd6-c39b-4580-8944-d3519602e9db", + "apim-request-id": "2c98a650-d07c-4060-820b-de0109ec34ad", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Wed, 05 Feb 2020 23:15:44 GMT", + "date": "Tue, 26 May 2020 18:16:23 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", @@ -24,5 +24,6 @@ "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "4de919145f207001f2d5fb5efebc9f4e" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizeentities.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizeentities.json index e07f14e5a692..29623f9c494b 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizeentities.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizeentities.json @@ -2,27 +2,28 @@ "recordings": [ { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/recognition/general", + "url": "https://endpoint/text/analytics/v3.0/entities/recognition/general", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"I had a wonderful trip to Seattle last weekend.\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"Seattle\",\"type\":\"Location\",\"offset\":26,\"length\":7,\"score\":0.92937570810317993},{\"text\":\"last weekend\",\"type\":\"DateTime\",\"subtype\":\"DateRange\",\"offset\":34,\"length\":12,\"score\":0.8}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.6},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.83},{\"text\":\"last weekend\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":12,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location,Location", - "apim-request-id": "9951c8fb-099e-4d21-87eb-68e147394f09", + "apim-request-id": "a95ebc70-4231-42bc-9fbc-943b9fd8df5d", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", + "date": "Tue, 26 May 2020 18:16:23 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "15" + "x-envoy-upstream-service-time": "82" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "3a16346d62b4aa1fba3ef756a686ead2" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizelinkedentities.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizelinkedentities.json index 85d1281d04b6..b2ceda95e9df 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizelinkedentities.json +++ b/sdk/textanalytics/ai-text-analytics/recordings/browsers/api_key_textanalyticsclient/recording_recognizelinkedentities.json @@ -2,27 +2,28 @@ "recordings": [ { "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/entities/linking", + "url": "https://endpoint/text/analytics/v3.0/entities/linking", "query": {}, "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"the Roman god Mars\",\"language\":\"en\"}]}", "status": 200, - "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Roman mythology\",\"matches\":[{\"text\":\"Roman god\",\"offset\":4,\"length\":9,\"score\":0.14383482284582527}],\"language\":\"en\",\"id\":\"Roman mythology\",\"url\":\"https://en.wikipedia.org/wiki/Roman_mythology\",\"dataSource\":\"Wikipedia\"}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", + "response": "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Roman mythology\",\"matches\":[{\"text\":\"Roman god\",\"offset\":4,\"length\":9,\"confidenceScore\":0.18}],\"language\":\"en\",\"id\":\"Roman mythology\",\"url\":\"https://en.wikipedia.org/wiki/Roman_mythology\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", "responseHeaders": { "access-control-allow-origin": "*", "access-control-expose-headers": "Operation-Location,Location", - "apim-request-id": "8e7cabbe-d7cb-4e82-91b2-ebf329b7b59d", + "apim-request-id": "089b1376-451a-4633-b181-1199d1f53e86", "content-type": "application/json; charset=utf-8", "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=1", - "date": "Wed, 05 Feb 2020 23:15:45 GMT", + "date": "Tue, 26 May 2020 18:16:24 GMT", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "9" + "x-envoy-upstream-service-time": "18" } } ], "uniqueTestInfo": { "uniqueName": {}, "newDate": {} - } + }, + "hash": "2cfdb39a7ef3ca01ad4dd37432f80673" } \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.js index 2687fdaa225b..a87c5b784473 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_and_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "76cb6436671fc39d15f903a4598a7567"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'fb183bf6-1653-484a-bbb2-42b404e52f00', + '7cdc0117-79ff-4ad1-8d27-93afd1dc5602', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AtWoshJ-UiBKkg-38J8Gnhb0CyfMAQAAAIhDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:21 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AgsR_UtPAG1EjVxaUdUJts70CyfMAQAAAO1TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:14 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT', + 'Tue, 26 May 2020 18:16:14 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","sentiment":"positive","documentScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86}]},{"id":"1","sentiment":"negative","documentScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58},{"sentiment":"neutral","sentenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43}]},{"id":"2","sentiment":"positive","documentScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101}]},{"id":"3","sentiment":"negative","documentScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86,"text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"}],"warnings":[]},{"id":"1","sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58,"text":"Unfortunately, it rained during my entire trip to Seattle."},{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43,"text":"I didn't even get to visit the Space Needle"}],"warnings":[]},{"id":"2","sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101,"text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."}],"warnings":[]},{"id":"3","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42,"text":"I didn't like the last book I read at all."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '86', + '99', 'apim-request-id', - '977b8c11-9143-4082-906d-15762bc83f57', + '80a2ff3c-0051-4457-8eea-dc2ccd1dc3ca', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT' + 'Tue, 26 May 2020 18:16:14 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.js index 9ee88366a994..e51c74ac3335 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_string_with_no_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "e0ed889302d1274a23ac0bff6be15e5b"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '218e0c25-37d5-4c66-8cd2-ede35c733300', + 'f77095c9-ea9d-4131-a25d-cbe2b42d2b01', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=ApTDLUtRruJAj-05v5vfb9H0CyfMAQAAAIlDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:22 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhtLQrMpcI1Bh_hgzv7MUuf0CyfMAQAAAO5TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:14 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT', + 'Tue, 26 May 2020 18:16:14 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","sentiment":"positive","documentScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86}]},{"id":"1","sentiment":"negative","documentScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58},{"sentiment":"neutral","sentenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43}]},{"id":"2","sentiment":"positive","documentScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101}]},{"id":"3","sentiment":"negative","documentScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86,"text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"}],"warnings":[]},{"id":"1","sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58,"text":"Unfortunately, it rained during my entire trip to Seattle."},{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43,"text":"I didn't even get to visit the Space Needle"}],"warnings":[]},{"id":"2","sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101,"text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."}],"warnings":[]},{"id":"3","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42,"text":"I didn't like the last book I read at all."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '73', + '87', 'apim-request-id', - 'bf0017ef-ff8e-404e-9573-21ac819050c1', + 'f54b38c3-4a22-4326-875b-4fa25c9991e1', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:22 GMT' + 'Tue, 26 May 2020 18:16:14 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.js index abc29e9ea2f2..c6ce63306b8e 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_accepts_textdocumentinput.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "5865e1fa81324ea752e95462e0fe69dc"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '73e53a21-494e-4cd3-9781-872022611a00', + 'f552ab20-7594-458a-b0a5-36cd71723701', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=An1hKfBB849Bj-wc1Y46TaD0CyfMAQAAAIpDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:22 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhN4UpVyY6pLkd-_qGQUOVn0CyfMAQAAAO9TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:15 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT', + 'Tue, 26 May 2020 18:16:15 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) - .reply(200, {"documents":[{"id":"1","sentiment":"positive","documentScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86}]},{"id":"2","sentiment":"negative","documentScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58},{"sentiment":"neutral","sentenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43}]},{"id":"3","sentiment":"positive","documentScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101}]},{"id":"4","sentiment":"negative","documentScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42}]},{"id":"5","sentiment":"positive","documentScores":{"positive":0.89,"neutral":0.08,"negative":0.03},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.89,"neutral":0.08,"negative":0.03},"offset":0,"length":73}]},{"id":"6","sentiment":"negative","documentScores":{"positive":0.11,"neutral":0.29,"negative":0.6},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.11,"neutral":0.29,"negative":0.6},"offset":0,"length":29},{"sentiment":"neutral","sentenceScores":{"positive":0.09,"neutral":0.58,"negative":0.33},"offset":30,"length":35}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86,"text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58,"text":"Unfortunately, it rained during my entire trip to Seattle."},{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43,"text":"I didn't even get to visit the Space Needle"}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101,"text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."}],"warnings":[]},{"id":"4","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42,"text":"I didn't like the last book I read at all."}],"warnings":[]},{"id":"5","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.08,"negative":0.03},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.08,"negative":0.03},"offset":0,"length":73,"text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos."}],"warnings":[]},{"id":"6","sentiment":"negative","confidenceScores":{"positive":0.11,"neutral":0.29,"negative":0.6},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.11,"neutral":0.29,"negative":0.6},"offset":0,"length":29,"text":"La carretera estaba atascada."},{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.58,"negative":0.33},"offset":30,"length":35,"text":"Había mucho tráfico el día de ayer."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=6', 'x-envoy-upstream-service-time', - '97', + '360', 'apim-request-id', - '50b07fde-4aed-4a9c-9c25-885348ef871f', + '2e948419-ab38-48b1-b383-443b97e50e3f', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT' + 'Tue, 26 May 2020 18:16:15 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.js index 1782ba71d5be..6f25dad5425e 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_client_throws_on_empty_list.js @@ -1,55 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - '2144572a-8b8b-4a70-976f-0cae2a912f00', - 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=Ah4JQPgBbE9GlTmsNWFxyOr0CyfMAQAAAIhDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:21 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT', - 'Content-Length', - '1417' -]); +module.exports.hash = "9fe884a21566124b78ecd7862106d778"; -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[]}) - .reply(400, {"error":{"code":"InvalidRequest","innerError":{"code":"MissingInputRecords","message":"Missing input records."},"message":"Invalid Request."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '4', - 'apim-request-id', - '7a31035e-ffc1-41cd-98e4-bdc7af6a029e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:15:21 GMT' -]); +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.js index 12b02b186463..59e901eeccae 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_an_error_for_an_empty_document.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "36aed7ef0345bd55309d4c4cb6a01bb3"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '7f0480ee-70c5-43a7-b271-8c73e2788c00', + '09353836-58be-4b96-9788-b46b1f473d01', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Aqw9zXY9gJJCnz6hmvCZFST0CyfMAQAAAP-cztUOAAAA; expires=Sat, 07-Mar-2020 23:49:19 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AtkdcRjcD-9JoA0ne0k9hvP0CyfMAQAAAO5TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:15 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT', + 'Tue, 26 May 2020 18:16:14 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","sentiment":"positive","documentScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86}]},{"id":"2","sentiment":"negative","documentScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58},{"sentiment":"neutral","sentenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43}]},{"id":"3","sentiment":"positive","documentScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101}]},{"id":"4","sentiment":"negative","documentScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42}]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innerError":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86,"text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58,"text":"Unfortunately, it rained during my entire trip to Seattle."},{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43,"text":"I didn't even get to visit the Space Needle"}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101,"text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."}],"warnings":[]},{"id":"4","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42,"text":"I didn't like the last book I read at all."}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '117', + '97', 'apim-request-id', - 'ea3ae3c5-a99f-4bc0-93ca-168ecd20ad2d', + '9a7883a4-4af9-459f-ba1b-8cc283b32d76', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT' + 'Tue, 26 May 2020 18:16:15 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.js index ca74b46a9d63..4997583f0dbe 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_analyzesentiment/recording_service_returns_error_for_invalid_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "12e2b3b67f3a691671585c0eef389371"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '182c1c08-935c-465a-96df-e9c940059600', + '00617ba3-827d-49e4-a275-3d62316d3802', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AsZDUUqF_glNimNhKtg1vnD0CyfMAQAAAP-cztUOAAAA; expires=Sat, 07-Mar-2020 23:49:19 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AkqCBV7rEQhHtuC71ckWBuT0CyfMAQAAAO5TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:15 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:18 GMT', + 'Tue, 26 May 2020 18:16:15 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"0","text":"Hello world!","language":"notalanguage"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innerError":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"0","text":"Hello world!","language":"notalanguage"}]}) + .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,11 +47,11 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'x-envoy-upstream-service-time', '3', 'apim-request-id', - '55dee208-f7a2-490a-ba08-7626b278637e', + '944dbd71-2261-47f9-bb68-8fde4191173a', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT' + 'Tue, 26 May 2020 18:16:15 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.js index 7cf0cd4b5809..ef3622c9e0a5 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_a_countryhint.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "0b2bb12bfdc76d2de2636713fc0b161c"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '297e8c0d-aa02-464f-8763-848bcbb31e00', + 'd8d6af8f-2671-4bf6-84dd-cd781c012502', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AucWf9M0j7lMoYbcb5YivSj0CyfMAQAAAOBLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:57 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=Atnb0ki0y4RKsJLUz4_9Cf30CyfMAQAAAO9TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:16 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT', + 'Tue, 26 May 2020 18:16:16 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"impossible","countryHint":"fr"}]}) - .reply(200, {"documents":[{"id":"0","detectedLanguages":[{"name":"French","iso6391Name":"fr","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"0","text":"impossible","countryHint":"fr"}]}) + .reply(200, {"documents":[{"id":"0","detectedLanguage":{"name":"French","iso6391Name":"fr","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '4', + '6', 'apim-request-id', - '33c6e083-10f9-4300-b9d9-2967385b2445', + '0a4e32f2-35c0-4ceb-9fb3-862a04f3490f', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT' + 'Tue, 26 May 2020 18:16:15 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.js index 68e515c61603..6533385eddb3 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_mixedcountry_detectlanguageinput.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "19d463bf24294c0722d9b50c8847d7b1"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '73e53a21-494e-4cd3-9781-872018241e00', + 'da0bb8ec-b806-48b9-9f75-07a2e4512902', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Anlf9xMWqoRNjvo-z676eVz0CyfMAQAAAOFLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:58 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AviHyfIlTEJBoXfE9U4bFw_0CyfMAQAAAPFTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:17 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT', + 'Tue, 26 May 2020 18:16:17 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."},{"id":"4","text":"I didn't like the last book I read at all."},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","countryHint":"mx"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","countryHint":"mx"}]}) - .reply(200, {"documents":[{"id":"1","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"2","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"3","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"4","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"5","detectedLanguages":[{"name":"Spanish","iso6391Name":"es","score":1}]},{"id":"6","detectedLanguages":[{"name":"Spanish","iso6391Name":"es","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."},{"id":"4","text":"I didn't like the last book I read at all."},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","countryHint":"mx"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","countryHint":"mx"}]}) + .reply(200, {"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"5","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1},"warnings":[]},{"id":"6","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=6', 'x-envoy-upstream-service-time', - '8', + '9', 'apim-request-id', - '95ebc391-b6fa-48af-889b-8e285c2e1467', + 'aa8454e4-df84-4214-8b2c-96162f0b3388', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT' + 'Tue, 26 May 2020 18:16:17 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.js index dc8499697c42..3d2fda8e460a 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_no_countryhint.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "0d9fd78345ab8e17c9f5cfd8421adc82"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'c6e0b9e7-86c9-4c7b-a482-88ede9613400', + 'ad89ae97-05e5-40bf-97c2-739959892c01', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AqFHT0_LkWBNkfSKZdwM4cP0CyfMAQAAAOFLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:57 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AkI-vytq9ChOiXeywZCoDXb0CyfMAQAAAO9TX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:16 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT', + 'Tue, 26 May 2020 18:16:15 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","countryHint":"us"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","countryHint":"us"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","countryHint":"us"},{"id":"3","text":"I didn't like the last book I read at all.","countryHint":"us"}]}) - .reply(200, {"documents":[{"id":"0","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"1","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"2","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"3","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","countryHint":"us"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","countryHint":"us"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","countryHint":"us"},{"id":"3","text":"I didn't like the last book I read at all.","countryHint":"us"}]}) + .reply(200, {"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '6', + '7', 'apim-request-id', - 'b48c8ed8-73a3-4e26-a1b4-f29e6005b392', + 'fd11042f-3869-4857-826e-e98b74b7e49b', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:50:56 GMT' + 'Tue, 26 May 2020 18:16:16 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.js index d93149b58f10..1a26e39d78c2 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_detectlanguageinput_input.js @@ -20,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '12212c07-3b6f-4abf-b810-5b3676f00f01', + '5ef31b46-1219-435f-9eb0-fba174810600', 'x-ms-ests-server', - '2.1.10104.13 - SAN ProdSlices', + '2.1.10620.9 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Agg1gYJnBeRPjltof7Vl8_v0CyfMAQAAAGye69UOAAAA; expires=Sun, 29-Mar-2020 23:51:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AnrQjzNY_5lFuznw4Pg9ilv0CyfMAQAAAPBTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:17 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Fri, 28 Feb 2020 23:51:07 GMT', + 'Tue, 26 May 2020 18:16:16 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","countryHint":""},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","countryHint":""},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","countryHint":""},{"id":"4","text":"I didn't like the last book I read at all.","countryHint":""},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","countryHint":""},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","countryHint":""}]}) - .reply(200, {"documents":[{"id":"1","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"2","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"3","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"4","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]},{"id":"5","detectedLanguages":[{"name":"Spanish","iso6391Name":"es","score":1}]},{"id":"6","detectedLanguages":[{"name":"Spanish","iso6391Name":"es","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","countryHint":""},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","countryHint":""},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","countryHint":""},{"id":"4","text":"I didn't like the last book I read at all.","countryHint":""},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","countryHint":""},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","countryHint":""}]}) + .reply(200, {"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]},{"id":"5","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1},"warnings":[]},{"id":"6","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -47,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=6', 'x-envoy-upstream-service-time', - '3', + '8', 'apim-request-id', - '3687ae63-0fed-4952-acbb-9f2c07a4b006', + '0cc1b905-580c-46a8-8f3b-44115082a543', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 28 Feb 2020 23:51:07 GMT' + 'Tue, 26 May 2020 18:16:17 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.js index e44851eec5d0..0d0c5ef77e90 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_accepts_none_country_hint_with_string_input.js @@ -20,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '79f7f077-f5e5-472d-85ef-201ff6858400', + 'cfc71d7d-75a2-4d19-8989-71a00016fa01', 'x-ms-ests-server', - '2.1.10104.13 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AvMk9c85w21NndsU_YwTaun0CyfMAQAAAGue69UOAAAA; expires=Sun, 29-Mar-2020 23:51:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AtELdDDVSt5KuE72otInIN_0CyfMAQAAAPBTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:16 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Fri, 28 Feb 2020 23:51:07 GMT', + 'Tue, 26 May 2020 18:16:16 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"I use Azure Functions to develop my service.","countryHint":""}]}) - .reply(200, {"documents":[{"id":"0","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"0","text":"I use Azure Functions to develop my service.","countryHint":""}]}) + .reply(200, {"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -47,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '3', + '7', 'apim-request-id', - '82d661ae-5fe9-40dd-9fbd-9f9fb05d27b4', + 'eabef592-3e92-4e72-84ce-6e3a1bd61a97', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 28 Feb 2020 23:51:07 GMT' + 'Tue, 26 May 2020 18:16:16 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.js index 28f4c7bacc09..30f3b6bf2c36 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_throws_on_empty_list.js @@ -1,55 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - '7f0480ee-70c5-43a7-b271-8c73b6de1d00', - 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=AiRv9V4Ae-VNmx-VfNAXGXf0CyfMAQAAAOBLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:50:56 GMT', - 'Content-Length', - '1417' -]); +module.exports.hash = "8c2b25f282aa5b82f245c2ec2df3fee8"; -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[]}) - .reply(400, {"error":{"code":"InvalidRequest","innerError":{"code":"MissingInputRecords","message":"Missing input records."},"message":"Invalid Request."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '3', - 'apim-request-id', - 'a4f6c484-2925-4ff9-b831-bed64b1008e5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:50:56 GMT' -]); +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.js index 3c54bd640938..883563acf09b 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_service_errors_on_invalid_country_hint.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "88f5650f723e208e3d0d91db849996fa"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,40 +20,38 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '863a500b-a5ff-4b03-be12-420266853300', + 'cb7c5eec-fa33-4de7-8c27-4e1bc618ac00', 'x-ms-ests-server', - '2.1.9987.16 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AuG666ngVytCmUvwPh9Q2i_0CyfMAQAAAP-cztUOAAAA; expires=Sat, 07-Mar-2020 23:49:20 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhTwLH-mXnRIu4OLEgw5wi_0CyfMAQAAAPFTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:17 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT', + 'Tue, 26 May 2020 18:16:17 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"hello","countryHint":"invalidcountry"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innerError":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}}],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"0","text":"hello","countryHint":"invalidcountry"}]}) + .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innererror":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}}],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', - 'csp-billing-usage', - 'CognitiveServices.TextAnalytics.BatchScoring=0', 'x-envoy-upstream-service-time', - '4', + '1', 'apim-request-id', - '49813230-7cf9-4bcc-900c-fb49efce756e', + 'a0417790-14f0-47fc-89c6-ff8ff41f4cde', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT' + 'Tue, 26 May 2020 18:16:17 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.js index d6a05211b0a0..e344e8b41c26 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_mixedlanguage_textdocumentinput.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "aca0020df32a3f512c0fab5aece01369"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '9471cb60-6a88-4fd5-ba3c-f99c72b83000', + 'b075580b-0a29-4acd-befb-c8fd66551d02', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AsCw2PvgiAFNvblJTihK7ZL0CyfMAQAAAJxDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:40 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AgqPHWagQftDrt58Vj1pUXf0CyfMAQAAAPRTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:21 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:40 GMT', + 'Tue, 26 May 2020 18:16:20 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) - .reply(200, {"documents":[{"id":"1","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"]},{"id":"2","keyPhrases":["entire trip","Seattle","Space Needle"]},{"id":"3","keyPhrases":["movie"]},{"id":"4","keyPhrases":["book"]},{"id":"5","keyPhrases":["Monte Rainier","caminos"]},{"id":"6","keyPhrases":["carretera","tráfico","día"]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"],"warnings":[]},{"id":"2","keyPhrases":["entire trip","Seattle","Space Needle"],"warnings":[]},{"id":"3","keyPhrases":["movie"],"warnings":[]},{"id":"4","keyPhrases":["book"],"warnings":[]},{"id":"5","keyPhrases":["Monte Rainier","caminos"],"warnings":[]},{"id":"6","keyPhrases":["carretera","tráfico","día"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=6', 'x-envoy-upstream-service-time', - '15', + '12', 'apim-request-id', - 'a4cd00df-fd91-4f7b-8f34-03e408479d09', + '6c11ef48-707d-4d7d-96d5-eaaaaa2fcf9d', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT' + 'Tue, 26 May 2020 18:16:21 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.js index 09647a026816..e46172be0d5a 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_a_language_specified.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "a31d8ffdea5a6f96ea5b105ddd85e2ff"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'f3f0fd64-5c10-4c7c-a895-0c1f27401c00', + 'c12d1a28-eba5-4fa9-ac49-f9fabd972e02', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AsIVbgfrQahMjAlArbvsU8D0CyfMAQAAAJtDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:40 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AuKBtbGGL3hHsn9f66G21ab0CyfMAQAAAPNTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:20 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT', + 'Tue, 26 May 2020 18:16:19 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"]},{"id":"1","keyPhrases":["entire trip","Seattle","Space Needle"]},{"id":"2","keyPhrases":["movie"]},{"id":"3","keyPhrases":["book"]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"],"warnings":[]},{"id":"1","keyPhrases":["entire trip","Seattle","Space Needle"],"warnings":[]},{"id":"2","keyPhrases":["movie"],"warnings":[]},{"id":"3","keyPhrases":["book"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '17', + '9', 'apim-request-id', - 'f4acd862-5cc2-4fd5-87c3-807fdb60ae26', + 'b03972e6-b2ea-4058-948d-899926e43afe', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT' + 'Tue, 26 May 2020 18:16:20 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.js index b3b26e4ce680..a2b6ec62d526 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_accepts_string_with_no_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "cfcbb1a7a8e6bf0cb7f273ad39d40329"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'fb183bf6-1653-484a-bbb2-42b446e92f00', + '4ebb50d1-18e3-4b1a-a9ed-dfda318d8200', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Ahfu-jVuhgZOhoPAHukT09z0CyfMAQAAAJtDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:39 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=Ar_ci-5rlS5Jge7WQW3TY1f0CyfMAQAAAPNTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:19 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT', + 'Tue, 26 May 2020 18:16:19 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"]},{"id":"1","keyPhrases":["entire trip","Seattle","Space Needle"]},{"id":"2","keyPhrases":["movie"]},{"id":"3","keyPhrases":["book"]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","keyPhrases":["week","Space Needle","wonderful trip","Seattle","times"],"warnings":[]},{"id":"1","keyPhrases":["entire trip","Seattle","Space Needle"],"warnings":[]},{"id":"2","keyPhrases":["movie"],"warnings":[]},{"id":"3","keyPhrases":["book"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -47,11 +49,11 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'x-envoy-upstream-service-time', '13', 'apim-request-id', - '3cb42ae3-3b91-4dfe-ab4b-0be16a495e8a', + '0d40374f-e9c9-435b-b62a-225df5d6c497', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT' + 'Tue, 26 May 2020 18:16:19 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.js index ac8023668d76..847722080102 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_client_throws_on_empty_list.js @@ -1,55 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - 'b608e4e8-41f3-4977-a07f-8bbf3e2c1e00', - 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=ArttDnxS7AxNrxvRXXEddL70CyfMAQAAAJpDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:39 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT', - 'Content-Length', - '1417' -]); +module.exports.hash = "5959155c1d992dad9935e9b316cf3482"; -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[]}) - .reply(400, {"error":{"code":"InvalidRequest","innerError":{"code":"MissingInputRecords","message":"Missing input records."},"message":"Invalid Request."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '9', - 'apim-request-id', - 'dde19ad6-2b25-4487-b4e7-757a0672d779', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT' -]); +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.js index be18b3986b3f..bab3e861f2dd 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_errors_on_unsupported_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "7bbf70230103e271b4ad20bf8b34ad89"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '7f0480ee-70c5-43a7-b271-8c7357798c00', + 'c12d1a28-eba5-4fa9-ac49-f9fae5972e02', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=ArWxb3FMikhFkgl4P-yigaD0CyfMAQAAAACdztUOAAAA; expires=Sat, 07-Mar-2020 23:49:20 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AlpkPTBu0k9Juwr3tLHowEn0CyfMAQAAAPNTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:20 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:20 GMT', + 'Tue, 26 May 2020 18:16:19 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innerError":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) + .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=0', 'x-envoy-upstream-service-time', - '30', + '4', 'apim-request-id', - '9999228c-a034-4d17-bb56-ef7f56bd43e5', + 'dc43a11b-9a75-45db-a087-e1528a7c1e01', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:20 GMT' + 'Tue, 26 May 2020 18:16:20 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.js similarity index 51% rename from sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js rename to sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.js index fe14cab8fdb2..205bd73501b0 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_extractkeyphrases/recording_service_reports_warning_for_long_words.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "140acec4cbb6fbb1a6e70ddfbb6e21df"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,40 +20,40 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '73e53a21-494e-4cd3-9781-8720f6231e00', + 'aa90e1b2-316f-4eb6-a3e5-076ff3f89b00', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10620.9 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AvQvOKkmbEJFh1E_pN3OZ-f0CyfMAQAAAOFLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:58 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AtsGiMwq2-hOtDABlDw9Onn0CyfMAQAAAPRTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:20 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT', + 'Tue, 26 May 2020 18:16:20 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"hello","countryHint":"invalidcountry"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","innerError":{"code":"InvalidDocument","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."},"message":"Invalid Country Hint."}}],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"0","text":"Hello world, thisisanextremelymassivesequenceoflettersthatislongerthansixtyfourcharacters.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","keyPhrases":["world","thisisanextremelymassivesequenceoflettersthatislongerthansixtyfo"],"warnings":[{"code":"LongWordsInDocument","message":"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'csp-billing-usage', - 'CognitiveServices.TextAnalytics.BatchScoring=0', + 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '6', + '7', 'apim-request-id', - '6d9cf140-0c79-4e40-b836-d7c2f40cf8ee', + '97037803-1eab-47e4-b4d0-f7db9d53c70f', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT' + 'Tue, 26 May 2020 18:16:20 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.js index c4d9ecf4951f..458a585cf478 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_mixedlanguage_textdocumentinput.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "904cbbd4332b47bcfd8b095dc3f81670"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,40 +20,40 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '73e53a21-494e-4cd3-9781-87206f671a00', + '99507494-f48c-4fbd-8aa8-6fb067911302', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AuIrWI54soxJrPmCo9b8UI70CyfMAQAAAJVDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:34 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AnfTTfzexbJKn5rBvPPpTYv0CyfMAQAAAPJTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:19 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:33 GMT', + 'Tue, 26 May 2020 18:16:18 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) - .reply(200, {"documents":[{"id":"1","entities":[{"text":"Seattle","type":"Location","offset":26,"length":7,"score":0.8207470774650574},{"text":"last week","type":"DateTime","subtype":"DateRange","offset":34,"length":9,"score":0.8},{"text":"Space Needle","type":"Organization","offset":65,"length":12,"score":0.9418386816978455},{"text":"2","type":"Quantity","subtype":"Number","offset":78,"length":1,"score":0.8}]},{"id":"2","entities":[{"text":"Seattle","type":"Location","offset":50,"length":7,"score":0.9375514388084412},{"text":"Space Needle","type":"Organization","offset":90,"length":12,"score":0.7905220985412598}]},{"id":"3","entities":[{"text":"Saturday","type":"DateTime","subtype":"Date","offset":25,"length":8,"score":0.8}]},{"id":"4","entities":[]},{"id":"5","entities":[]},{"id":"6","entities":[{"text":"el día","type":"DateTime","subtype":"Date","offset":50,"length":6,"score":0.8},{"text":"ayer","type":"DateTime","subtype":"Date","offset":60,"length":4,"score":0.8}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"5","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.75},{"text":"last week","category":"DateTime","subcategory":"DateRange","offset":34,"length":9,"confidenceScore":0.8},{"text":"2","category":"Quantity","subcategory":"Number","offset":78,"length":1,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":50,"length":7,"confidenceScore":0.74},{"text":"Space Needle","category":"Skill","offset":90,"length":12,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"Saturday","category":"DateTime","subcategory":"Date","offset":25,"length":8,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[{"text":"Monte Rainier","category":"Location","subcategory":"GPE","offset":29,"length":13,"confidenceScore":0.43}],"warnings":[]},{"id":"5","entities":[{"text":"el día","category":"DateTime","subcategory":"Date","offset":50,"length":6,"confidenceScore":0.8},{"text":"ayer","category":"DateTime","subcategory":"Date","offset":60,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'csp-billing-usage', - 'CognitiveServices.TextAnalytics.BatchScoring=6', + 'CognitiveServices.TextAnalytics.BatchScoring=5', 'x-envoy-upstream-service-time', - '5036', + '108', 'apim-request-id', - '834ec67e-7573-4dc5-823e-292b458350b7', + 'b185b21d-0d13-4083-8534-bf91bb451cdd', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:39 GMT' + 'Tue, 26 May 2020 18:16:19 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.js index 20f239b138a0..e6fa69dd338f 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_a_language_specified.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "2d7bcc39f892755d3840f414ad2ae80a"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'c6e0b9e7-86c9-4c7b-a482-88ed04b43200', + 'f7b0558a-70d7-423f-bb23-4d5b8ab50502', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AuF5p9p0VqtGnLAWd1jDd270CyfMAQAAAJBDzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:28 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=ApkJXVadtGZDla0bGuUjccf0CyfMAQAAAPFTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:18 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:28 GMT', + 'Tue, 26 May 2020 18:16:18 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"text":"Seattle","type":"Location","offset":26,"length":7,"score":0.8207470774650574},{"text":"last week","type":"DateTime","subtype":"DateRange","offset":34,"length":9,"score":0.8},{"text":"Space Needle","type":"Organization","offset":65,"length":12,"score":0.9418386816978455},{"text":"2","type":"Quantity","subtype":"Number","offset":78,"length":1,"score":0.8}]},{"id":"1","entities":[{"text":"Seattle","type":"Location","offset":50,"length":7,"score":0.9375514388084412},{"text":"Space Needle","type":"Organization","offset":90,"length":12,"score":0.7905220985412598}]},{"id":"2","entities":[{"text":"Saturday","type":"DateTime","subtype":"Date","offset":25,"length":8,"score":0.8}]},{"id":"3","entities":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.75},{"text":"last week","category":"DateTime","subcategory":"DateRange","offset":34,"length":9,"confidenceScore":0.8},{"text":"2","category":"Quantity","subcategory":"Number","offset":78,"length":1,"confidenceScore":0.8}],"warnings":[]},{"id":"1","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":50,"length":7,"confidenceScore":0.74},{"text":"Space Needle","category":"Skill","offset":90,"length":12,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"Saturday","category":"DateTime","subcategory":"Date","offset":25,"length":8,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '5024', + '136', 'apim-request-id', - 'd0b49ec0-5da0-437c-8691-eccd9a541a60', + '8e428f09-4000-4e45-ac97-c17f76e2063d', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:33 GMT' + 'Tue, 26 May 2020 18:16:18 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.js index 9cab0d100728..03f21a198e64 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_accepts_string_with_no_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "1feca963fcb514f34a3814b259872e7f"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '6fb02ad4-1265-4616-984c-19184b871d00', + '3314701c-4977-4860-aa05-8ee08fd43d01', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Ahb53dmahalGvTySjGO7Uef0CyfMAQAAAI9DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:28 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=Anmg3H1b8C5GsbgHMy5FoVX0CyfMAQAAAPFTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:18 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:27 GMT', + 'Tue, 26 May 2020 18:16:17 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"text":"Seattle","type":"Location","offset":26,"length":7,"score":0.8207470774650574},{"text":"last week","type":"DateTime","subtype":"DateRange","offset":34,"length":9,"score":0.8},{"text":"Space Needle","type":"Organization","offset":65,"length":12,"score":0.9418386816978455},{"text":"2","type":"Quantity","subtype":"Number","offset":78,"length":1,"score":0.8}]},{"id":"1","entities":[{"text":"Seattle","type":"Location","offset":50,"length":7,"score":0.9375514388084412},{"text":"Space Needle","type":"Organization","offset":90,"length":12,"score":0.7905220985412598}]},{"id":"2","entities":[{"text":"Saturday","type":"DateTime","subtype":"Date","offset":25,"length":8,"score":0.8}]},{"id":"3","entities":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.75},{"text":"last week","category":"DateTime","subcategory":"DateRange","offset":34,"length":9,"confidenceScore":0.8},{"text":"2","category":"Quantity","subcategory":"Number","offset":78,"length":1,"confidenceScore":0.8}],"warnings":[]},{"id":"1","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":50,"length":7,"confidenceScore":0.74},{"text":"Space Needle","category":"Skill","offset":90,"length":12,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"Saturday","category":"DateTime","subcategory":"Date","offset":25,"length":8,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '21', + '146', 'apim-request-id', - '7999e17f-4f0c-4dca-922e-5876c04ea60a', + '535bcd7e-5df9-4cfb-9a6a-c6cd3143234b', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:28 GMT' + 'Tue, 26 May 2020 18:16:18 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.js new file mode 100644 index 000000000000..9cf89263cffc --- /dev/null +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_exception_for_too_many_inputs.js @@ -0,0 +1,59 @@ +let nock = require('nock'); + +module.exports.hash = "d8ffea2089af2c1563340bf6bda64839"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + 'eebf8868-f154-47be-9c03-db42e7dc0a01', + 'x-ms-ests-server', + '2.1.10571.11 - WUS2 ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=ArsDzkTkQT1EtgtIHbMJLEr0CyfMAQAAAPNTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:19 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 18:16:19 GMT', + 'Content-Length', + '1417' +]); + +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.75},{"text":"last week","category":"DateTime","subcategory":"DateRange","offset":34,"length":9,"confidenceScore":0.8},{"text":"2","category":"Quantity","subcategory":"Number","offset":78,"length":1,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":50,"length":7,"confidenceScore":0.74},{"text":"Space Needle","category":"Skill","offset":90,"length":12,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"Saturday","category":"DateTime","subcategory":"Date","offset":25,"length":8,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[{"text":"Monte Rainier","category":"Location","subcategory":"GPE","offset":29,"length":13,"confidenceScore":0.43}],"warnings":[]},{"id":"6","entities":[{"text":"el día","category":"DateTime","subcategory":"Date","offset":50,"length":6,"confidenceScore":0.8},{"text":"ayer","category":"DateTime","subcategory":"Date","offset":60,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[{"id":"","error":{"code":"InvalidRequest","message":"The request has exceeded the allowed document limits.","innererror":{"code":"InvalidDocumentBatch","message":"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'csp-billing-usage', + 'CognitiveServices.TextAnalytics.BatchScoring=6', + 'x-envoy-upstream-service-time', + '134', + 'apim-request-id', + '223dcb78-52fb-4983-ad51-1be0ea4c5d30', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 18:16:19 GMT' +]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.js index ce462f9822f4..0763433c2a05 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_client_throws_on_empty_list.js @@ -1,55 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - '833d8cdd-0db8-40c9-9b33-87bf5ea21c00', - 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=Aq_nwrJP5TtJmqRDtSS8zo30CyfMAQAAAI9DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:27 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:15:27 GMT', - 'Content-Length', - '1417' -]); +module.exports.hash = "2a16881961055dff82e010ce1390aea3"; -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[]}) - .reply(400, {"error":{"code":"InvalidRequest","innerError":{"code":"MissingInputRecords","message":"Missing input records."},"message":"Invalid Request."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '4', - 'apim-request-id', - '5a3663f7-a1f0-4a37-8628-220090834fab', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:15:27 GMT' -]); +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.js index cd600232a608..bf5b8be2ad8c 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizeentities/recording_service_errors_on_unsupported_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "5b533e1460031861f3f700fff315937f"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,38 +20,38 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '6fb02ad4-1265-4616-984c-19188bca9300', + '7db35822-af11-4d48-bacf-6a3fa2fdc701', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Aj-mvp-DValNv7JDW0ob_ef0CyfMAQAAAACdztUOAAAA; expires=Sat, 07-Mar-2020 23:49:20 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AkCbpa0ByCtAjcaBLTT1YlH0CyfMAQAAAPJTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:18 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT', + 'Tue, 26 May 2020 18:16:18 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innerError":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-02-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) + .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '7', + '2', 'apim-request-id', - 'e4a2f9de-8143-4ea8-8b35-fe35a319965e', + '932c30ee-0b70-47ed-8ab0-e18c7cb66ae1', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:19 GMT' + 'Tue, 26 May 2020 18:16:18 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.js index d824f689e9c9..f3b2f3d6473a 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_mixedlanguage_textdocumentinput.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "9e7c72c89c4a0f738a15d093224a04e2"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,40 +20,40 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - 'c1bdbea0-6fd4-4667-aea7-120ac9c23600', + 'ea2fb06e-f17c-4a6d-b578-856bf49c6100', 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Als9VHCRNYdIjgC5YVDGtFz0CyfMAQAAAJ9DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:43 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AnHRIdUhOItKgHf8lsf0tEn0CyfMAQAAAPZTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:22 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:43 GMT', + 'Tue, 26 May 2020 18:16:21 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) - .reply(200, {"documents":[{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"score":0.7805134120794834}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"score":0.17662735414636144}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"2","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"score":0.7491254387960375}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"score":0.15581376791353607}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"3","entities":[]},{"id":"4","entities":[]},{"id":"5","entities":[]},{"id":"6","entities":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/linking', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"5","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"confidenceScore":0.42}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"confidenceScore":0.21}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"2","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"confidenceScore":0.36}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"confidenceScore":0.2}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"3","entities":[{"name":"Saturday","matches":[{"text":"Saturday","offset":25,"length":8,"confidenceScore":0.05}],"language":"en","id":"Saturday","url":"https://en.wikipedia.org/wiki/Saturday","dataSource":"Wikipedia"}],"warnings":[]},{"id":"4","entities":[{"name":"Monte Rainier","matches":[{"text":"Monte Rainier","offset":29,"length":13,"confidenceScore":0.81}],"language":"es","id":"Monte Rainier","url":"https://es.wikipedia.org/wiki/Monte_Rainier","dataSource":"Wikipedia"}],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'csp-billing-usage', - 'CognitiveServices.TextAnalytics.BatchScoring=6', + 'CognitiveServices.TextAnalytics.BatchScoring=5', 'x-envoy-upstream-service-time', - '19', + '30', 'apim-request-id', - '64d0c262-5af8-46dc-88bf-6dd7b9175972', + '0d36e181-07a0-4b46-b45e-a948a0d1a24b', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT' + 'Tue, 26 May 2020 18:16:22 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.js index 2c52a081e596..c1208af9973f 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_a_language_specified.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "478153a23d876107580922f28fbb0568"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '182c1c08-935c-465a-96df-e9c9ea3b1c00', + '82c001a5-8280-4356-9ea6-f330636a3d01', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AuJTSWXEYTBDjTxrR8sMMbT0CyfMAQAAAJ5DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:43 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=ArEGPJU7qStNslmZc0wZACH0CyfMAQAAAPVTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:21 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT', + 'Tue, 26 May 2020 18:16:21 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"score":0.7805134120794834}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"score":0.17662735414636144}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"score":0.7491254387960375}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"score":0.15581376791353607}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"2","entities":[]},{"id":"3","entities":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/linking', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"confidenceScore":0.42}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"confidenceScore":0.21}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"confidenceScore":0.36}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"confidenceScore":0.2}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"2","entities":[{"name":"Saturday","matches":[{"text":"Saturday","offset":25,"length":8,"confidenceScore":0.05}],"language":"en","id":"Saturday","url":"https://en.wikipedia.org/wiki/Saturday","dataSource":"Wikipedia"}],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '17', + '37', 'apim-request-id', - '35031a7a-1fe4-46bc-b4af-4320f44eb5b6', + 'b6b999a1-8175-4d81-be49-bcd5b72f20e5', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT' + 'Tue, 26 May 2020 18:16:21 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.js index 0da7d0f8bbe8..7a361e18e8ee 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_accepts_string_with_no_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "8a99aecd2b65c9b124c722a31c4ae251"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,26 +20,26 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '914780c5-e0af-48b9-a267-88c9b62d1a00', + '0c1aab6d-dd1b-469c-a65a-d4f28e1d1a01', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10571.11 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=AjK6qQyX7c5NtPN42zP9Irv0CyfMAQAAAJ5DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:42 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AtsgnivfynpLq7Rvdu3a0jP0CyfMAQAAAPVTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:21 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT', + 'Tue, 26 May 2020 18:16:21 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"score":0.7805134120794834}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"score":0.17662735414636144}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"score":0.7491254387960375}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"score":0.15581376791353607}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}]},{"id":"2","entities":[]},{"id":"3","entities":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/linking', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":65,"length":12,"confidenceScore":0.42}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":26,"length":7,"confidenceScore":0.21}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"1","entities":[{"name":"Space Needle","matches":[{"text":"Space Needle","offset":90,"length":12,"confidenceScore":0.36}],"language":"en","id":"Space Needle","url":"https://en.wikipedia.org/wiki/Space_Needle","dataSource":"Wikipedia"},{"name":"Seattle","matches":[{"text":"Seattle","offset":50,"length":7,"confidenceScore":0.2}],"language":"en","id":"Seattle","url":"https://en.wikipedia.org/wiki/Seattle","dataSource":"Wikipedia"}],"warnings":[]},{"id":"2","entities":[{"name":"Saturday","matches":[{"text":"Saturday","offset":25,"length":8,"confidenceScore":0.05}],"language":"en","id":"Saturday","url":"https://en.wikipedia.org/wiki/Saturday","dataSource":"Wikipedia"}],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -45,13 +47,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '13', + '30', 'apim-request-id', - '6924c227-3ad1-4344-bff9-1b2d735a8b2b', + 'fb8f1f7a-42fc-43b2-a487-5edd3752bf94', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT' + 'Tue, 26 May 2020 18:16:21 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.js new file mode 100644 index 000000000000..81af463f30cc --- /dev/null +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_exception_for_too_many_inputs.js @@ -0,0 +1,59 @@ +let nock = require('nock'); + +module.exports.hash = "d8ffea2089af2c1563340bf6bda64839"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") + .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-cache, no-store', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'x-ms-request-id', + '5b0a9db3-6110-42ed-873e-10b1afd67702', + 'x-ms-ests-server', + '2.1.10571.11 - WUS2 ProdSlices', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'Set-Cookie', + 'fpc=AjIEAC7EZHBItNtY8hmYmsL0CyfMAQAAAPVTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:22 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', + 'Set-Cookie', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', + 'Date', + 'Tue, 26 May 2020 18:16:22 GMT', + 'Content-Length', + '1417' +]); + +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"1","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"2","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"3","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"4","text":"I didn't like the last book I read at all.","language":"en"},{"id":"5","text":"Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.","language":"es"},{"id":"6","text":"La carretera estaba atascada. Había mucho tráfico el día de ayer.","language":"es"}]}) + .reply(200, {"documents":[{"id":"1","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.75},{"text":"last week","category":"DateTime","subcategory":"DateRange","offset":34,"length":9,"confidenceScore":0.8},{"text":"2","category":"Quantity","subcategory":"Number","offset":78,"length":1,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"Seattle","category":"Location","subcategory":"GPE","offset":50,"length":7,"confidenceScore":0.74},{"text":"Space Needle","category":"Skill","offset":90,"length":12,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"Saturday","category":"DateTime","subcategory":"Date","offset":25,"length":8,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[{"text":"Monte Rainier","category":"Location","subcategory":"GPE","offset":29,"length":13,"confidenceScore":0.43}],"warnings":[]},{"id":"6","entities":[{"text":"el día","category":"DateTime","subcategory":"Date","offset":50,"length":6,"confidenceScore":0.8},{"text":"ayer","category":"DateTime","subcategory":"Date","offset":60,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[{"id":"","error":{"code":"InvalidRequest","message":"The request has exceeded the allowed document limits.","innererror":{"code":"InvalidDocumentBatch","message":"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'csp-billing-usage', + 'CognitiveServices.TextAnalytics.BatchScoring=6', + 'x-envoy-upstream-service-time', + '169', + 'apim-request-id', + '300b99e6-3a24-4e00-9eab-17304d5e6037', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Tue, 26 May 2020 18:16:22 GMT' +]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.js index 6cf8d11ba954..c7bd256b0005 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_client_throws_on_empty_list.js @@ -1,55 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - 'fb183bf6-1653-484a-bbb2-42b4bae92f00', - 'x-ms-ests-server', - '2.1.9987.14 - WST ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=AvIr71v-TPJHjX0149PGRM_0CyfMAQAAAJ5DzdUOAAAA; expires=Fri, 06-Mar-2020 23:15:42 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT', - 'Content-Length', - '1417' -]); +module.exports.hash = "148be15a32e5ca1cfb6e3981109aa6c7"; -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[]}) - .reply(400, {"error":{"code":"InvalidRequest","innerError":{"code":"MissingInputRecords","message":"Missing input records."},"message":"Invalid Request."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '6', - 'apim-request-id', - '25b6bdce-e1fb-4970-9378-cf8cdced8f2e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:15:42 GMT' -]); +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.js index e68473f073bb..e92f496cfee3 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_recognizelinkedentities/recording_service_errors_on_unsupported_language.js @@ -1,5 +1,7 @@ let nock = require('nock'); +module.exports.hash = "a2c2a7456f8978cb792feaa6d0b71211"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) @@ -18,38 +20,38 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) 'X-Content-Type-Options', 'nosniff', 'x-ms-request-id', - '182c1c08-935c-465a-96df-e9c919069600', + '92077267-fb62-41dc-90bf-5eb57a5b0600', 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', + '2.1.10620.9 - WUS2 ProdSlices', 'P3P', 'CP="DSP CUR OTPi IND OTRi ONL FIN"', 'Set-Cookie', - 'fpc=Aj7KTnTKfMVBt4i9puu9B2D0CyfMAQAAAAGdztUOAAAA; expires=Sat, 07-Mar-2020 23:49:21 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AnnlBZXLzGpLm3uPalQ5zqD0CyfMAQAAAPVTX9YOAAAA; expires=Thu, 25-Jun-2020 18:16:22 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', + 'x-ms-gateway-slice=prod; path=/; SameSite=None; secure; HttpOnly', 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', + 'stsservicecookie=ests; path=/; SameSite=None; secure; HttpOnly', 'Date', - 'Thu, 06 Feb 2020 23:49:21 GMT', + 'Tue, 26 May 2020 18:16:21 GMT', 'Content-Length', '1417' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innerError":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: en,es"}}}],"modelVersion":"2020-02-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/linking', {"documents":[{"id":"0","text":"This is some text, but it doesn't matter.","language":"notalanguage"}]}) + .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Supplied language not supported. Pass in one of: en,es"}}}],"modelVersion":"2020-02-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '4', + '2', 'apim-request-id', - '31c23057-1b0f-41fa-8477-8f4b8c2575cb', + '6488bd9f-430d-470c-88d9-f215d6e29c00', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Thu, 06 Feb 2020 23:49:21 GMT' + 'Tue, 26 May 2020 18:16:22 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_analyzesentiment.js b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_analyzesentiment.js index 402abceb2a54..93b64a3e59e3 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_analyzesentiment.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_analyzesentiment.js @@ -1,10 +1,12 @@ let nock = require('nock'); +module.exports.hash = "9d27f60746f6129dfd2fc9f47733cd39"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","sentiment":"positive","documentScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86}]},{"id":"1","sentiment":"negative","documentScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58},{"sentiment":"neutral","sentenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43}]},{"id":"2","sentiment":"positive","documentScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","sentenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101}]},{"id":"3","sentiment":"negative","documentScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","sentenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/sentiment', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!","language":"en"},{"id":"1","text":"Unfortunately, it rained during my entire trip to Seattle. I didn't even get to visit the Space Needle","language":"en"},{"id":"2","text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected.","language":"en"},{"id":"3","text":"I didn't like the last book I read at all.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.01,"negative":0},"offset":0,"length":86,"text":"I had a wonderful trip to Seattle last week and even visited the Space Needle 2 times!"}],"warnings":[]},{"id":"1","sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0,"neutral":0,"negative":1},"offset":0,"length":58,"text":"Unfortunately, it rained during my entire trip to Seattle."},{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.7,"negative":0.29},"offset":59,"length":43,"text":"I didn't even get to visit the Space Needle"}],"warnings":[]},{"id":"2","sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1,"neutral":0,"negative":0},"offset":0,"length":101,"text":"I went to see a movie on Saturday and it was perfectly average, nothing more or less than I expected."}],"warnings":[]},{"id":"3","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.03,"negative":0.96},"offset":0,"length":42,"text":"I didn't like the last book I read at all."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -12,13 +14,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=4', 'x-envoy-upstream-service-time', - '80', + '113', 'apim-request-id', - 'c5219dd5-0f6d-43de-8f5d-0e60f17bac77', + '47d5888c-bb94-403c-b063-6b083ba70429', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:19 GMT' + 'Tue, 26 May 2020 18:16:13 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_detectlanguage.js b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_detectlanguage.js index 5ffeabd1bc39..94f54808333a 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_detectlanguage.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_detectlanguage.js @@ -1,10 +1,12 @@ let nock = require('nock'); +module.exports.hash = "83fb13a50e9969bc99022f3b3572b0c4"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"impossible","countryHint":"fr"}]}) - .reply(200, {"documents":[{"id":"0","detectedLanguages":[{"name":"French","iso6391Name":"fr","score":1}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/languages', {"documents":[{"id":"0","text":"impossible","countryHint":"fr"}]}) + .reply(200, {"documents":[{"id":"0","detectedLanguage":{"name":"French","iso6391Name":"fr","confidenceScore":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -12,13 +14,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '4', + '7', 'apim-request-id', - 'd6ad6fb7-3e7e-4036-8fd3-6d4ebc6527f6', + '6cbe7db7-49e6-4aad-8c97-2565eb7f2bea', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:50:56 GMT' + 'Tue, 26 May 2020 18:16:12 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_extractkeyphrases.js b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_extractkeyphrases.js index 9e121dd07eee..309e4ca90806 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_extractkeyphrases.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_extractkeyphrases.js @@ -1,10 +1,12 @@ let nock = require('nock'); +module.exports.hash = "176bc355ed9fbe09af6fd6793ec4c4ca"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last weekend","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","keyPhrases":["wonderful trip","Seattle","weekend"]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/keyPhrases', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last weekend","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","keyPhrases":["wonderful trip","Seattle","weekend"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -12,13 +14,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '10', + '7', 'apim-request-id', - 'e476e93d-1451-41f5-93f8-c736686afe48', + 'd638cd94-3afd-46cf-9e18-78351fbe98fd', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:20 GMT' + 'Tue, 26 May 2020 18:16:13 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizeentities.js b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizeentities.js index 4a39739d46f9..e747e5f958d1 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizeentities.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizeentities.js @@ -1,10 +1,12 @@ let nock = require('nock'); +module.exports.hash = "b5ff1979a37a8b5600f92fe42a4ceba6"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last weekend.","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"text":"Seattle","type":"Location","offset":26,"length":7,"score":0.9293757081031799},{"text":"last weekend","type":"DateTime","subtype":"DateRange","offset":34,"length":12,"score":0.8}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/recognition/general', {"documents":[{"id":"0","text":"I had a wonderful trip to Seattle last weekend.","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"text":"trip","category":"Event","offset":18,"length":4,"confidenceScore":0.6},{"text":"Seattle","category":"Location","subcategory":"GPE","offset":26,"length":7,"confidenceScore":0.83},{"text":"last weekend","category":"DateTime","subcategory":"DateRange","offset":34,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -12,13 +14,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '20', + '92', 'apim-request-id', - '91a80846-9851-447d-9fe2-1ec7022f9673', + 'bf5053d5-324a-4685-b4cf-f0448e69e623', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:19 GMT' + 'Tue, 26 May 2020 18:16:13 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizelinkedentities.js b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizelinkedentities.js index 3719e6d3c6af..39f1de7a6402 100644 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizelinkedentities.js +++ b/sdk/textanalytics/ai-text-analytics/recordings/node/api_key_textanalyticsclient/recording_recognizelinkedentities.js @@ -1,10 +1,12 @@ let nock = require('nock'); +module.exports.hash = "37a5833d6d3fbed2e520e6fb38e85096"; + module.exports.testInfo = {"uniqueName":{},"newDate":{}} -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/entities/linking', {"documents":[{"id":"0","text":"the Roman god Mars","language":"en"}]}) - .reply(200, {"documents":[{"id":"0","entities":[{"name":"Roman mythology","matches":[{"text":"Roman god","offset":4,"length":9,"score":0.14383482284582527}],"language":"en","id":"Roman mythology","url":"https://en.wikipedia.org/wiki/Roman_mythology","dataSource":"Wikipedia"}]}],"errors":[],"modelVersion":"2019-10-01"}, [ +nock('https://endpoint', {"encodedQueryParams":true}) + .post('/text/analytics/v3.0/entities/linking', {"documents":[{"id":"0","text":"the Roman god Mars","language":"en"}]}) + .reply(200, {"documents":[{"id":"0","entities":[{"name":"Roman mythology","matches":[{"text":"Roman god","offset":4,"length":9,"confidenceScore":0.18}],"language":"en","id":"Roman mythology","url":"https://en.wikipedia.org/wiki/Roman_mythology","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -12,13 +14,13 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'csp-billing-usage', 'CognitiveServices.TextAnalytics.BatchScoring=1', 'x-envoy-upstream-service-time', - '13', + '16', 'apim-request-id', - '20106bb5-9ace-442c-b415-96f88b28ffd2', + '15147914-5209-4464-a8b5-ba87ea4d6cd9', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Wed, 05 Feb 2020 23:15:20 GMT' + 'Tue, 26 May 2020 18:16:14 GMT' ]); diff --git a/sdk/textanalytics/ai-text-analytics/review/ai-text-analytics.api.md b/sdk/textanalytics/ai-text-analytics/review/ai-text-analytics.api.md index 0fb820156acd..8e6dea1ffbf4 100644 --- a/sdk/textanalytics/ai-text-analytics/review/ai-text-analytics.api.md +++ b/sdk/textanalytics/ai-text-analytics/review/ai-text-analytics.api.md @@ -20,7 +20,7 @@ export type AnalyzeSentimentOptions = TextAnalyticsOperationOptions; export type AnalyzeSentimentResult = AnalyzeSentimentSuccessResult | AnalyzeSentimentErrorResult; // @public -export interface AnalyzeSentimentResultCollection extends Array { +export interface AnalyzeSentimentResultArray extends Array { modelVersion: string; statistics?: TextDocumentBatchStatistics; } @@ -40,9 +40,9 @@ export interface CategorizedEntity extends Entity { // @public export interface DetectedLanguage { + confidenceScore: number; iso6391Name: string; name: string; - score: number; } // @public @@ -64,7 +64,7 @@ export type DetectLanguageOptions = TextAnalyticsOperationOptions; export type DetectLanguageResult = DetectLanguageSuccessResult | DetectLanguageErrorResult; // @public -export interface DetectLanguageResultCollection extends Array { +export interface DetectLanguageResultArray extends Array { modelVersion: string; statistics?: TextDocumentBatchStatistics; } @@ -80,9 +80,7 @@ export type DocumentSentimentLabel = 'positive' | 'neutral' | 'negative' | 'mixe // @public export interface Entity { category: string; - graphemeLength: number; - graphemeOffset: number; - score: number; + confidenceScore: number; subCategory?: string; text: string; } @@ -103,7 +101,7 @@ export type ExtractKeyPhrasesOptions = TextAnalyticsOperationOptions; export type ExtractKeyPhrasesResult = ExtractKeyPhrasesSuccessResult | ExtractKeyPhrasesErrorResult; // @public -export interface ExtractKeyPhrasesResultCollection extends Array { +export interface ExtractKeyPhrasesResultArray extends Array { modelVersion: string; statistics?: TextDocumentBatchStatistics; } @@ -128,9 +126,7 @@ export interface LinkedEntity { // @public export interface Match { - graphemeLength: number; - graphemeOffset: number; - score: number; + confidenceScore: number; text: string; } @@ -144,7 +140,7 @@ export type RecognizeCategorizedEntitiesOptions = TextAnalyticsOperationOptions; export type RecognizeCategorizedEntitiesResult = RecognizeCategorizedEntitiesSuccessResult | RecognizeCategorizedEntitiesErrorResult; // @public -export interface RecognizeCategorizedEntitiesResultCollection extends Array { +export interface RecognizeCategorizedEntitiesResultArray extends Array { modelVersion: string; statistics?: TextDocumentBatchStatistics; } @@ -164,7 +160,7 @@ export type RecognizeLinkedEntitiesOptions = TextAnalyticsOperationOptions; export type RecognizeLinkedEntitiesResult = RecognizeLinkedEntitiesSuccessResult | RecognizeLinkedEntitiesErrorResult; // @public -export interface RecognizeLinkedEntitiesResultCollection extends Array { +export interface RecognizeLinkedEntitiesResultArray extends Array { modelVersion: string; statistics?: TextDocumentBatchStatistics; } @@ -177,10 +173,8 @@ export interface RecognizeLinkedEntitiesSuccessResult extends TextAnalyticsSucce // @public export interface SentenceSentiment { confidenceScores: SentimentConfidenceScores; - graphemeLength: number; - graphemeOffset: number; sentiment: SentenceSentimentLabel; - warnings?: string[]; + text?: string; } // @public @@ -199,19 +193,19 @@ export interface SentimentConfidenceScores { // @public export class TextAnalyticsClient { constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: TextAnalyticsClientOptions); - analyzeSentiment(documents: string[], language?: string, options?: AnalyzeSentimentOptions): Promise; - analyzeSentiment(documents: TextDocumentInput[], options?: AnalyzeSentimentOptions): Promise; + analyzeSentiment(documents: string[], language?: string, options?: AnalyzeSentimentOptions): Promise; + analyzeSentiment(documents: TextDocumentInput[], options?: AnalyzeSentimentOptions): Promise; defaultCountryHint: string; defaultLanguage: string; - detectLanguage(documents: string[], countryHint?: string, options?: DetectLanguageOptions): Promise; - detectLanguage(documents: DetectLanguageInput[], options?: DetectLanguageOptions): Promise; + detectLanguage(documents: string[], countryHint?: string, options?: DetectLanguageOptions): Promise; + detectLanguage(documents: DetectLanguageInput[], options?: DetectLanguageOptions): Promise; readonly endpointUrl: string; - extractKeyPhrases(documents: string[], language?: string, options?: ExtractKeyPhrasesOptions): Promise; - extractKeyPhrases(documents: TextDocumentInput[], options?: ExtractKeyPhrasesOptions): Promise; - recognizeEntities(documents: string[], language?: string, options?: RecognizeCategorizedEntitiesOptions): Promise; - recognizeEntities(documents: TextDocumentInput[], options?: RecognizeCategorizedEntitiesOptions): Promise; - recognizeLinkedEntities(documents: string[], language?: string, options?: RecognizeLinkedEntitiesOptions): Promise; - recognizeLinkedEntities(documents: TextDocumentInput[], options?: RecognizeLinkedEntitiesOptions): Promise; + extractKeyPhrases(documents: string[], language?: string, options?: ExtractKeyPhrasesOptions): Promise; + extractKeyPhrases(documents: TextDocumentInput[], options?: ExtractKeyPhrasesOptions): Promise; + recognizeEntities(documents: string[], language?: string, options?: RecognizeCategorizedEntitiesOptions): Promise; + recognizeEntities(documents: TextDocumentInput[], options?: RecognizeCategorizedEntitiesOptions): Promise; + recognizeLinkedEntities(documents: string[], language?: string, options?: RecognizeLinkedEntitiesOptions): Promise; + recognizeLinkedEntities(documents: TextDocumentInput[], options?: RecognizeLinkedEntitiesOptions): Promise; } // @public @@ -247,6 +241,13 @@ export interface TextAnalyticsSuccessResult { readonly error?: undefined; readonly id: string; readonly statistics?: TextDocumentStatistics; + readonly warnings: TextAnalyticsWarning[]; +} + +// @public +export interface TextAnalyticsWarning { + code: WarningCode; + message: string; } // @public @@ -266,10 +267,13 @@ export interface TextDocumentInput { // @public export interface TextDocumentStatistics { - graphemeCount: number; + characterCount: number; transactionCount: number; } +// @public +export type WarningCode = 'LongWordsInDocument' | 'DocumentTruncated'; + // (No @packageDocumentation comment for this package) diff --git a/sdk/textanalytics/ai-text-analytics/samples/javascript/README.md b/sdk/textanalytics/ai-text-analytics/samples/javascript/README.md index 24c2f7ec1837..18cc4e0c9647 100644 --- a/sdk/textanalytics/ai-text-analytics/samples/javascript/README.md +++ b/sdk/textanalytics/ai-text-analytics/samples/javascript/README.md @@ -5,6 +5,7 @@ languages: products: - azure - azure-cognitive-services + - azure-text-analytics urlFragment: ai-text-analytics-javascript --- diff --git a/sdk/textanalytics/ai-text-analytics/samples/javascript/recognizeLinkedEntities.js b/sdk/textanalytics/ai-text-analytics/samples/javascript/recognizeLinkedEntities.js index 95a1543fae2e..8d36beca9fd2 100644 --- a/sdk/textanalytics/ai-text-analytics/samples/javascript/recognizeLinkedEntities.js +++ b/sdk/textanalytics/ai-text-analytics/samples/javascript/recognizeLinkedEntities.js @@ -17,7 +17,7 @@ const apiKey = process.env["TEXT_ANALYTICS_API_KEY"] || ""; const documents = [ "Microsoft moved its headquarters to Bellevue, Washington in January 1979.", - "Steve Ballmer stepped down as CEO of Microsoft and was succeeded by Satya Nadella.", + "Steve Ballmer stepped down as CEO of Microsoft and was succeeded by Satya Nadella." ]; async function main() { @@ -37,7 +37,9 @@ async function main() { ); console.log(" Matches:"); for (const match of entity.matches) { - console.log(` - Entity appears as "${match.text}" (confidence: ${match.score}`); + console.log( + ` - Entity appears as "${match.text}" (confidence: ${match.confidenceScore}` + ); } } } else { diff --git a/sdk/textanalytics/ai-text-analytics/samples/typescript/README.md b/sdk/textanalytics/ai-text-analytics/samples/typescript/README.md index 1cdf35507ca8..623852962227 100644 --- a/sdk/textanalytics/ai-text-analytics/samples/typescript/README.md +++ b/sdk/textanalytics/ai-text-analytics/samples/typescript/README.md @@ -5,6 +5,7 @@ languages: products: - azure - azure-cognitive-services + - azure-text-analytics urlFragment: ai-text-analytics-typescript --- diff --git a/sdk/textanalytics/ai-text-analytics/samples/typescript/src/recognizeLinkedEntities.ts b/sdk/textanalytics/ai-text-analytics/samples/typescript/src/recognizeLinkedEntities.ts index 2e3d83dad4e5..000a255cfd93 100644 --- a/sdk/textanalytics/ai-text-analytics/samples/typescript/src/recognizeLinkedEntities.ts +++ b/sdk/textanalytics/ai-text-analytics/samples/typescript/src/recognizeLinkedEntities.ts @@ -17,7 +17,7 @@ const apiKey = process.env["TEXT_ANALYTICS_API_KEY"] || ""; const documents = [ "Microsoft moved its headquarters to Bellevue, Washington in January 1979.", - "Steve Ballmer stepped down as CEO of Microsoft and was succeeded by Satya Nadella.", + "Steve Ballmer stepped down as CEO of Microsoft and was succeeded by Satya Nadella." ]; export async function main() { @@ -37,7 +37,9 @@ export async function main() { ); console.log(" Matches:"); for (const match of entity.matches) { - console.log(` - Entity appears as "${match.text}" (confidence: ${match.score}`); + console.log( + ` - Entity appears as "${match.text}" (confidence: ${match.confidenceScore}` + ); } } } else { diff --git a/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResult.ts b/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResult.ts index 7d9136477e62..efc29763d48d 100644 --- a/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResult.ts @@ -12,7 +12,8 @@ import { TextAnalyticsError, DocumentSentimentLabel, SentenceSentiment, - SentimentConfidenceScores + SentimentConfidenceScores, + TextAnalyticsWarning } from "./generated/models"; /** @@ -50,10 +51,11 @@ export function makeAnalyzeSentimentResult( sentiment: DocumentSentimentLabel, confidenceScores: SentimentConfidenceScores, sentences: SentenceSentiment[], + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): AnalyzeSentimentSuccessResult { return { - ...makeTextAnalyticsSuccessResult(id, statistics), + ...makeTextAnalyticsSuccessResult(id, warnings, statistics), sentiment, confidenceScores, sentences diff --git a/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultCollection.ts b/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultArray.ts similarity index 74% rename from sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultCollection.ts rename to sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultArray.ts index 3f70478f0638..9c58fda15573 100644 --- a/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultCollection.ts +++ b/sdk/textanalytics/ai-text-analytics/src/analyzeSentimentResultArray.ts @@ -5,20 +5,20 @@ import { TextDocumentBatchStatistics, DocumentError, DocumentSentiment, - MultiLanguageInput + TextDocumentInput } from "./generated/models"; import { AnalyzeSentimentResult, makeAnalyzeSentimentResult, makeAnalyzeSentimentErrorResult } from "./analyzeSentimentResult"; -import { sortByPreviousIdOrder } from "./util"; +import { sortResponseIdObjects } from "./util"; /** - * Collection of `AnalyzeSentimentResult` objects corresponding to a batch of input documents, and + * Array of `AnalyzeSentimentResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ -export interface AnalyzeSentimentResultCollection extends Array { +export interface AnalyzeSentimentResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true @@ -32,21 +32,22 @@ export interface AnalyzeSentimentResultCollection extends Array { return makeAnalyzeSentimentResult( document.id, document.sentiment, - document.documentScores, + document.confidenceScores, document.sentenceSentiments, + document.warnings, document.statistics ); } @@ -58,7 +59,7 @@ export function makeAnalyzeSentimentResultCollection( } ) ); - const result = sortByPreviousIdOrder(input, unsortedResult); + const result = sortResponseIdObjects(input, unsortedResult); return Object.assign(result, { statistics, modelVersion diff --git a/sdk/textanalytics/ai-text-analytics/src/constants.ts b/sdk/textanalytics/ai-text-analytics/src/constants.ts index 0ce59c1d5d93..74649cd0dec9 100644 --- a/sdk/textanalytics/ai-text-analytics/src/constants.ts +++ b/sdk/textanalytics/ai-text-analytics/src/constants.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "1.0.0-preview.5"; +export const SDK_VERSION: string = "1.0.0"; diff --git a/sdk/textanalytics/ai-text-analytics/src/detectLanguageResult.ts b/sdk/textanalytics/ai-text-analytics/src/detectLanguageResult.ts index 858398a1b188..e60168661fee 100644 --- a/sdk/textanalytics/ai-text-analytics/src/detectLanguageResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/detectLanguageResult.ts @@ -7,7 +7,12 @@ import { TextAnalyticsErrorResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult"; -import { DetectedLanguage, TextDocumentStatistics, TextAnalyticsError } from "./generated/models"; +import { + DetectedLanguage, + TextDocumentStatistics, + TextAnalyticsError, + TextAnalyticsWarning +} from "./generated/models"; /** * The result of the detect language operation on a single document. @@ -32,12 +37,13 @@ export type DetectLanguageErrorResult = TextAnalyticsErrorResult; export function makeDetectLanguageResult( id: string, - detectedLanguages: DetectedLanguage[], + detectedLanguage: DetectedLanguage, + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): DetectLanguageSuccessResult { return { - ...makeTextAnalyticsSuccessResult(id, statistics), - primaryLanguage: primaryLanguage(detectedLanguages) + ...makeTextAnalyticsSuccessResult(id, warnings, statistics), + primaryLanguage: detectedLanguage }; } @@ -48,9 +54,3 @@ export function makeDetectLanguageErrorResult( return makeTextAnalyticsErrorResult(id, error); } -function primaryLanguage(languages: DetectedLanguage[]): DetectedLanguage { - const sorted = languages.slice(0).sort((a, b) => { - return a.score - b.score; - }); - return sorted[0]; -} diff --git a/sdk/textanalytics/ai-text-analytics/src/detectLanguageResultCollection.ts b/sdk/textanalytics/ai-text-analytics/src/detectLanguageResultArray.ts similarity index 73% rename from sdk/textanalytics/ai-text-analytics/src/detectLanguageResultCollection.ts rename to sdk/textanalytics/ai-text-analytics/src/detectLanguageResultArray.ts index c93242e77264..86d3bfb25cb2 100644 --- a/sdk/textanalytics/ai-text-analytics/src/detectLanguageResultCollection.ts +++ b/sdk/textanalytics/ai-text-analytics/src/detectLanguageResultArray.ts @@ -5,20 +5,20 @@ import { TextDocumentBatchStatistics, DocumentLanguage, DocumentError, - LanguageInput + DetectLanguageInput } from "./generated/models"; import { DetectLanguageResult, makeDetectLanguageResult, makeDetectLanguageErrorResult } from "./detectLanguageResult"; -import { sortByPreviousIdOrder } from "./util"; +import { sortResponseIdObjects } from "./util"; /** - * Collection of `DetectLanguageResult` objects corresponding to a batch of input documents, and + * Array of `DetectLanguageResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ -export interface DetectLanguageResultCollection extends Array { +export interface DetectLanguageResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true @@ -32,19 +32,20 @@ export interface DetectLanguageResultCollection extends Array { return makeDetectLanguageResult( document.id, - document.detectedLanguages, + document.detectedLanguage, + document.warnings, document.statistics ); } @@ -56,7 +57,7 @@ export function makeDetectLanguageResultCollection( } ) ); - const result = sortByPreviousIdOrder(input, unsortedResult); + const result = sortResponseIdObjects(input, unsortedResult); return Object.assign(result, { statistics, modelVersion diff --git a/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResult.ts b/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResult.ts index 27feb060d750..cedf95de6ccc 100644 --- a/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResult.ts @@ -7,7 +7,11 @@ import { TextAnalyticsErrorResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult"; -import { TextDocumentStatistics, TextAnalyticsError } from "./generated/models"; +import { + TextDocumentStatistics, + TextAnalyticsError, + TextAnalyticsWarning +} from "./generated/models"; /** * The result of the extract key phrases operation on a single document. @@ -34,10 +38,11 @@ export type ExtractKeyPhrasesErrorResult = TextAnalyticsErrorResult; export function makeExtractKeyPhrasesResult( id: string, keyPhrases: string[], + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): ExtractKeyPhrasesSuccessResult { return { - ...makeTextAnalyticsSuccessResult(id, statistics), + ...makeTextAnalyticsSuccessResult(id, warnings, statistics), keyPhrases }; } diff --git a/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultCollection.ts b/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultArray.ts similarity index 67% rename from sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultCollection.ts rename to sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultArray.ts index 4ef15387a774..4260a04e8b91 100644 --- a/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultCollection.ts +++ b/sdk/textanalytics/ai-text-analytics/src/extractKeyPhrasesResultArray.ts @@ -5,20 +5,20 @@ import { TextDocumentBatchStatistics, DocumentError, DocumentKeyPhrases, - MultiLanguageInput + TextDocumentInput } from "./generated/models"; import { ExtractKeyPhrasesResult, makeExtractKeyPhrasesResult, makeExtractKeyPhrasesErrorResult } from "./extractKeyPhrasesResult"; -import { sortByPreviousIdOrder } from "./util"; +import { sortResponseIdObjects } from "./util"; /** - * Collection of `ExtractKeyPhrasesResult` objects corresponding to a batch of input documents, and + * Array of `ExtractKeyPhrasesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ -export interface ExtractKeyPhrasesResultCollection extends Array { +export interface ExtractKeyPhrasesResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true @@ -32,17 +32,22 @@ export interface ExtractKeyPhrasesResultCollection extends Array { - return makeExtractKeyPhrasesResult(document.id, document.keyPhrases, document.statistics); + return makeExtractKeyPhrasesResult( + document.id, + document.keyPhrases, + document.warnings, + document.statistics + ); } ) .concat( @@ -52,7 +57,7 @@ export function makeExtractKeyPhrasesResultCollection( } ) ); - const result = sortByPreviousIdOrder(input, unsortedResult); + const result = sortResponseIdObjects(input, unsortedResult); return Object.assign(result, { statistics, modelVersion diff --git a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClient.ts b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClient.ts index acf85e2f1acc..41e7b71e2414 100644 --- a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClient.ts +++ b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClient.ts @@ -58,39 +58,6 @@ class GeneratedClient extends GeneratedClientContext { callback) as Promise; } - /** - * The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in - * the document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of - * enabled languages. - * @summary Entities containing personal information - * @param input Collection of documents to analyze. - * @param [options] The optional parameters - * @returns Promise - */ - entitiesRecognitionPii(input: Models.MultiLanguageBatchInput, options?: Models.GeneratedClientEntitiesRecognitionPiiOptionalParams): Promise; - /** - * @param input Collection of documents to analyze. - * @param callback The callback - */ - entitiesRecognitionPii(input: Models.MultiLanguageBatchInput, callback: coreHttp.ServiceCallback): void; - /** - * @param input Collection of documents to analyze. - * @param options The optional parameters - * @param callback The callback - */ - entitiesRecognitionPii(input: Models.MultiLanguageBatchInput, options: Models.GeneratedClientEntitiesRecognitionPiiOptionalParams, callback: coreHttp.ServiceCallback): void; - entitiesRecognitionPii(input: Models.MultiLanguageBatchInput, options?: Models.GeneratedClientEntitiesRecognitionPiiOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { - return this.sendOperationRequest( - { - input, - options - }, - entitiesRecognitionPiiOperationSpec, - callback) as Promise; - } - /** * The API returns a list of recognized entities with links to a well-known knowledge base. See the * Supported languages in Text Analytics API for the list of @@ -251,34 +218,6 @@ const entitiesRecognitionGeneralOperationSpec: coreHttp.OperationSpec = { serializer }; -const entitiesRecognitionPiiOperationSpec: coreHttp.OperationSpec = { - httpMethod: "POST", - path: "entities/recognition/pii", - urlParameters: [ - Parameters.endpoint - ], - queryParameters: [ - Parameters.modelVersion, - Parameters.includeStatistics - ], - requestBody: { - parameterPath: "input", - mapper: { - ...Mappers.MultiLanguageBatchInput, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EntitiesResult - }, - default: { - bodyMapper: Mappers.TextAnalyticsError - } - }, - serializer -}; - const entitiesLinkingOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", path: "entities/linking", diff --git a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts index 779fb2cd141b..43d8a601793e 100644 --- a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts +++ b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts @@ -11,7 +11,7 @@ import * as coreHttp from "@azure/core-http"; const packageName = "@azure/ai-text-analytics"; -const packageVersion = "1.0.0-preview.5"; +const packageVersion = "1.0.0"; export class GeneratedClientContext extends coreHttp.ServiceClient { endpoint: string; @@ -24,7 +24,11 @@ export class GeneratedClientContext extends coreHttp.ServiceClient { * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ - constructor(credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, endpoint: string, options?: coreHttp.ServiceClientOptions) { + constructor( + credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, + endpoint: string, + options?: coreHttp.ServiceClientOptions + ) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); } @@ -43,7 +47,7 @@ export class GeneratedClientContext extends coreHttp.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/text/analytics/v3.0-preview.1"; + this.baseUri = "{Endpoint}/text/analytics/v3.0"; this.requestContentType = "application/json; charset=utf-8"; this.endpoint = endpoint; this.credentials = credentials; diff --git a/sdk/textanalytics/ai-text-analytics/src/generated/models/index.ts b/sdk/textanalytics/ai-text-analytics/src/generated/models/index.ts index f7662e62de3e..8adc7320de99 100644 --- a/sdk/textanalytics/ai-text-analytics/src/generated/models/index.ts +++ b/sdk/textanalytics/ai-text-analytics/src/generated/models/index.ts @@ -10,9 +10,11 @@ import * as coreHttp from "@azure/core-http"; /** - * Contains an input document to be analyzed by the service. + * An object representing an individual text document to be analyzed by the Text Analytics service. + * The document contains a unique document ID, the full text of the document, and the language of + * the document's text. */ -export interface MultiLanguageInput { +export interface TextDocumentInput { /** * A unique, non-empty document identifier. */ @@ -35,7 +37,7 @@ export interface MultiLanguageBatchInput { /** * The set of documents to process as part of this batch. */ - documents: MultiLanguageInput[]; + documents: TextDocumentInput[]; } /** @@ -108,14 +110,28 @@ export interface DocumentError { } /** - * if showStats=true was specified in the request this field will contain information about the - * document payload. + * Represents a warning encountered while processing a document. + */ +export interface TextAnalyticsWarning { + /** + * Error code. Possible values include: 'LongWordsInDocument', 'DocumentTruncated' + */ + code: WarningCode; + /** + * Warning message. + */ + message: string; +} + +/** + * if includeStatistics=true was specified in the request this field will contain information about + * the document payload. */ export interface TextDocumentStatistics { /** * Number of text elements recognized in the document. */ - graphemeCount: number; + characterCount: number; /** * Number of transactions for the document. */ @@ -133,9 +149,15 @@ export interface SentimentConfidenceScores { } /** - * An interface representing SentenceSentiment. + * The predicted sentiment for a given span of text. For more information regarding text sentiment, + * see + * https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-sentiment-analysis. */ export interface SentenceSentiment { + /** + * The sentence text. + */ + text?: string; /** * The predicted Sentiment for the sentence. Possible values include: 'positive', 'neutral', * 'negative' @@ -145,18 +167,6 @@ export interface SentenceSentiment { * The sentiment confidence score between 0 and 1 for the sentence for all classes. */ confidenceScores: SentimentConfidenceScores; - /** - * The sentence offset from the start of the document. - */ - graphemeOffset: number; - /** - * The length of the sentence by Unicode standard. - */ - graphemeLength: number; - /** - * The warnings generated for the sentence. - */ - warnings?: string[]; } /** @@ -176,16 +186,20 @@ export interface DocumentSentiment { /** * Document level sentiment confidence scores between 0 and 1 for each sentiment class. */ - documentScores: SentimentConfidenceScores; + confidenceScores: SentimentConfidenceScores; /** * Sentence level sentiment analysis. */ sentenceSentiments: SentenceSentiment[]; + /** + * Warnings encountered while processing document. + */ + warnings: TextAnalyticsWarning[]; } /** - * if showStats=true was specified in the request this field will contain information about the - * request payload. + * if includeStatistics=true was specified in the request this field will contain information about + * the request payload. */ export interface TextDocumentBatchStatistics { /** @@ -228,7 +242,9 @@ export interface SentimentResponse { } /** - * An interface representing Entity. + * A word or phrase identified as an entity that is categorized within a taxonomy of types. The set + * of categories recognized by the Text Analytics service is described at + * https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types . */ export interface Entity { /** @@ -243,18 +259,10 @@ export interface Entity { * Entity sub type, such as Age/Year/TimeRange etc */ subCategory?: string; - /** - * Start position (in Unicode graphemes) for the entity text. - */ - graphemeOffset: number; - /** - * Length (in Unicode graphemes) for the entity text. - */ - graphemeLength: number; /** * Confidence score between 0 and 1 of the extracted entity. */ - score: number; + confidenceScore: number; } /** @@ -269,6 +277,10 @@ export interface DocumentEntities { * Recognized entities in the document. */ entities: Entity[]; + /** + * Warnings encountered while processing document. + */ + warnings: TextAnalyticsWarning[]; /** * if showStats=true was specified in the request this field will contain information about the * document payload. @@ -296,30 +308,24 @@ export interface EntitiesResult { } /** - * An interface representing Match. + * Details about the specific substring in a document that refers to a linked entity identified by + * the Text Analytics model. */ export interface Match { /** * If a well-known item is recognized, a decimal number denoting the confidence level between 0 * and 1 will be returned. */ - score: number; + confidenceScore: number; /** * Entity text as appears in the request. */ text: string; - /** - * Start position (in Unicode graphemes) for the entity match text. - */ - graphemeOffset: number; - /** - * Length (in Unicode graphemes) for the entity match text. - */ - graphemeLength: number; } /** - * An interface representing LinkedEntity. + * A word or phrase identified as a well-known entity within a database, including its formal + * (disambiguated) name and a link to the entity information within the source database. */ export interface LinkedEntity { /** @@ -360,6 +366,10 @@ export interface DocumentLinkedEntities { * Recognized well-known entities in the document. */ entities: LinkedEntity[]; + /** + * Warnings encountered while processing document. + */ + warnings: TextAnalyticsWarning[]; /** * if showStats=true was specified in the request this field will contain information about the * document payload. @@ -399,6 +409,10 @@ export interface DocumentKeyPhrases { * to the number of words in the input document. */ keyPhrases: string[]; + /** + * Warnings encountered while processing document. + */ + warnings: TextAnalyticsWarning[]; /** * if showStats=true was specified in the request this field will contain information about the * document payload. @@ -426,9 +440,11 @@ export interface KeyPhraseResult { } /** - * An interface representing LanguageInput. + * An input to the language detection operation. This object specifies a unique document id, as + * well as the full text of a document and a hint indicating the document's country of origin to + * assist the text analytics predictive model in detecting the document's language. */ -export interface LanguageInput { +export interface DetectLanguageInput { /** * Unique, non-empty document identifier. */ @@ -441,11 +457,11 @@ export interface LanguageInput { * An interface representing LanguageBatchInput. */ export interface LanguageBatchInput { - documents: LanguageInput[]; + documents: DetectLanguageInput[]; } /** - * An interface representing DetectedLanguage. + * Information about the language of a document as identified by the Text Analytics service. */ export interface DetectedLanguage { /** @@ -461,7 +477,7 @@ export interface DetectedLanguage { * A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the * identified language is true. */ - score: number; + confidenceScore: number; } /** @@ -473,9 +489,13 @@ export interface DocumentLanguage { */ id: string; /** - * A list of extracted languages. + * Detected Language. + */ + detectedLanguage: DetectedLanguage; + /** + * Warnings encountered while processing document. */ - detectedLanguages: DetectedLanguage[]; + warnings: TextAnalyticsWarning[]; /** * if showStats=true was specified in the request this field will contain information about the * document payload. @@ -517,21 +537,6 @@ export interface GeneratedClientEntitiesRecognitionGeneralOptionalParams extends includeStatistics?: boolean; } -/** - * Optional Parameters. - */ -export interface GeneratedClientEntitiesRecognitionPiiOptionalParams extends coreHttp.RequestOptionsBase { - /** - * (Optional) This value indicates which model will be used for scoring. If a model-version is - * not specified, the API should default to the latest, non-preview version. - */ - modelVersion?: string; - /** - * (Optional) if set to true, response will contain input and document level statistics. - */ - includeStatistics?: boolean; -} - /** * Optional Parameters. */ @@ -611,6 +616,14 @@ export type ErrorCodeValue = 'InvalidRequest' | 'InvalidArgument' | 'InternalSer */ export type InnerErrorCodeValue = 'InvalidParameterValue' | 'InvalidRequestBodyFormat' | 'EmptyRequest' | 'MissingInputRecords' | 'InvalidDocument' | 'ModelVersionIncorrect' | 'InvalidDocumentBatch' | 'UnsupportedLanguageCode' | 'InvalidCountryHint'; +/** + * Defines values for WarningCode. + * Possible values include: 'LongWordsInDocument', 'DocumentTruncated' + * @readonly + * @enum {string} + */ +export type WarningCode = 'LongWordsInDocument' | 'DocumentTruncated'; + /** * Defines values for DocumentSentimentLabel. * Possible values include: 'positive', 'neutral', 'negative', 'mixed' @@ -647,26 +660,6 @@ export type EntitiesRecognitionGeneralResponse = EntitiesResult & { }; }; -/** - * Contains response data for the entitiesRecognitionPii operation. - */ -export type EntitiesRecognitionPiiResponse = EntitiesResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntitiesResult; - }; -}; - /** * Contains response data for the entitiesLinking operation. */ diff --git a/sdk/textanalytics/ai-text-analytics/src/generated/models/mappers.ts b/sdk/textanalytics/ai-text-analytics/src/generated/models/mappers.ts index 4eaaa46c840d..27dbadfff4fc 100644 --- a/sdk/textanalytics/ai-text-analytics/src/generated/models/mappers.ts +++ b/sdk/textanalytics/ai-text-analytics/src/generated/models/mappers.ts @@ -9,11 +9,11 @@ import * as coreHttp from "@azure/core-http"; -export const MultiLanguageInput: coreHttp.CompositeMapper = { - serializedName: "MultiLanguageInput", +export const TextDocumentInput: coreHttp.CompositeMapper = { + serializedName: "TextDocumentInput", type: { name: "Composite", - className: "MultiLanguageInput", + className: "TextDocumentInput", modelProperties: { id: { required: true, @@ -53,7 +53,7 @@ export const MultiLanguageBatchInput: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "MultiLanguageInput" + className: "TextDocumentInput" } } } @@ -111,7 +111,7 @@ export const InnerError: coreHttp.CompositeMapper = { } }, innerError: { - serializedName: "innerError", + serializedName: "innererror", type: { name: "Composite", className: "InnerError" @@ -154,7 +154,7 @@ export const TextAnalyticsError: coreHttp.CompositeMapper = { } }, innerError: { - serializedName: "innerError", + serializedName: "innererror", type: { name: "Composite", className: "InnerError" @@ -201,13 +201,41 @@ export const DocumentError: coreHttp.CompositeMapper = { } }; +export const TextAnalyticsWarning: coreHttp.CompositeMapper = { + serializedName: "TextAnalyticsWarning", + type: { + name: "Composite", + className: "TextAnalyticsWarning", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "Enum", + allowedValues: [ + "LongWordsInDocument", + "DocumentTruncated" + ] + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + export const TextDocumentStatistics: coreHttp.CompositeMapper = { serializedName: "TextDocumentStatistics", type: { name: "Composite", className: "TextDocumentStatistics", modelProperties: { - graphemeCount: { + characterCount: { required: true, serializedName: "charactersCount", type: { @@ -262,6 +290,12 @@ export const SentenceSentiment: coreHttp.CompositeMapper = { name: "Composite", className: "SentenceSentiment", modelProperties: { + text: { + serializedName: "text", + type: { + name: "String" + } + }, sentiment: { required: true, serializedName: "sentiment", @@ -276,36 +310,11 @@ export const SentenceSentiment: coreHttp.CompositeMapper = { }, confidenceScores: { required: true, - serializedName: "sentenceScores", + serializedName: "confidenceScores", type: { name: "Composite", className: "SentimentConfidenceScores" } - }, - graphemeOffset: { - required: true, - serializedName: "offset", - type: { - name: "Number" - } - }, - graphemeLength: { - required: true, - serializedName: "length", - type: { - name: "Number" - } - }, - warnings: { - serializedName: "warnings", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } } } } @@ -344,9 +353,9 @@ export const DocumentSentiment: coreHttp.CompositeMapper = { className: "TextDocumentStatistics" } }, - documentScores: { + confidenceScores: { required: true, - serializedName: "documentScores", + serializedName: "confidenceScores", type: { name: "Composite", className: "SentimentConfidenceScores" @@ -364,6 +373,19 @@ export const DocumentSentiment: coreHttp.CompositeMapper = { } } } + }, + warnings: { + required: true, + serializedName: "warnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TextAnalyticsWarning" + } + } + } } } } @@ -472,34 +494,20 @@ export const Entity: coreHttp.CompositeMapper = { }, category: { required: true, - serializedName: "type", + serializedName: "category", type: { name: "String" } }, subCategory: { - serializedName: "subtype", + serializedName: "subcategory", type: { name: "String" } }, - graphemeOffset: { + confidenceScore: { required: true, - serializedName: "offset", - type: { - name: "Number" - } - }, - graphemeLength: { - required: true, - serializedName: "length", - type: { - name: "Number" - } - }, - score: { - required: true, - serializedName: "score", + serializedName: "confidenceScore", type: { name: "Number" } @@ -534,6 +542,19 @@ export const DocumentEntities: coreHttp.CompositeMapper = { } } }, + warnings: { + required: true, + serializedName: "warnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TextAnalyticsWarning" + } + } + } + }, statistics: { serializedName: "statistics", type: { @@ -601,9 +622,9 @@ export const Match: coreHttp.CompositeMapper = { name: "Composite", className: "Match", modelProperties: { - score: { + confidenceScore: { required: true, - serializedName: "score", + serializedName: "confidenceScore", type: { name: "Number" } @@ -614,20 +635,6 @@ export const Match: coreHttp.CompositeMapper = { type: { name: "String" } - }, - graphemeOffset: { - required: true, - serializedName: "offset", - type: { - name: "Number" - } - }, - graphemeLength: { - required: true, - serializedName: "length", - type: { - name: "Number" - } } } } @@ -716,6 +723,19 @@ export const DocumentLinkedEntities: coreHttp.CompositeMapper = { } } }, + warnings: { + required: true, + serializedName: "warnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TextAnalyticsWarning" + } + } + } + }, statistics: { serializedName: "statistics", type: { @@ -802,6 +822,19 @@ export const DocumentKeyPhrases: coreHttp.CompositeMapper = { } } }, + warnings: { + required: true, + serializedName: "warnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TextAnalyticsWarning" + } + } + } + }, statistics: { serializedName: "statistics", type: { @@ -863,11 +896,11 @@ export const KeyPhraseResult: coreHttp.CompositeMapper = { } }; -export const LanguageInput: coreHttp.CompositeMapper = { - serializedName: "LanguageInput", +export const DetectLanguageInput: coreHttp.CompositeMapper = { + serializedName: "DetectLanguageInput", type: { name: "Composite", - className: "LanguageInput", + className: "DetectLanguageInput", modelProperties: { id: { required: true, @@ -907,7 +940,7 @@ export const LanguageBatchInput: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "LanguageInput" + className: "DetectLanguageInput" } } } @@ -936,9 +969,9 @@ export const DetectedLanguage: coreHttp.CompositeMapper = { name: "String" } }, - score: { + confidenceScore: { required: true, - serializedName: "score", + serializedName: "confidenceScore", type: { name: "Number" } @@ -960,15 +993,23 @@ export const DocumentLanguage: coreHttp.CompositeMapper = { name: "String" } }, - detectedLanguages: { + detectedLanguage: { required: true, - serializedName: "detectedLanguages", + serializedName: "detectedLanguage", + type: { + name: "Composite", + className: "DetectedLanguage" + } + }, + warnings: { + required: true, + serializedName: "warnings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DetectedLanguage" + className: "TextAnalyticsWarning" } } } diff --git a/sdk/textanalytics/ai-text-analytics/src/index.ts b/sdk/textanalytics/ai-text-analytics/src/index.ts index 9e2baca6cb81..aacc13314d18 100644 --- a/sdk/textanalytics/ai-text-analytics/src/index.ts +++ b/sdk/textanalytics/ai-text-analytics/src/index.ts @@ -18,32 +18,32 @@ export { DetectLanguageErrorResult, DetectLanguageSuccessResult } from "./detectLanguageResult"; -export { DetectLanguageResultCollection } from "./detectLanguageResultCollection"; +export { DetectLanguageResultArray } from "./detectLanguageResultArray"; export { CategorizedEntity, RecognizeCategorizedEntitiesResult, RecognizeCategorizedEntitiesErrorResult, RecognizeCategorizedEntitiesSuccessResult } from "./recognizeCategorizedEntitiesResult"; -export { RecognizeCategorizedEntitiesResultCollection } from "./recognizeCategorizedEntitiesResultCollection"; +export { RecognizeCategorizedEntitiesResultArray } from "./recognizeCategorizedEntitiesResultArray"; export { AnalyzeSentimentResult, AnalyzeSentimentErrorResult, AnalyzeSentimentSuccessResult } from "./analyzeSentimentResult"; -export { AnalyzeSentimentResultCollection } from "./analyzeSentimentResultCollection"; +export { AnalyzeSentimentResultArray } from "./analyzeSentimentResultArray"; export { ExtractKeyPhrasesResult, ExtractKeyPhrasesErrorResult, ExtractKeyPhrasesSuccessResult } from "./extractKeyPhrasesResult"; -export { ExtractKeyPhrasesResultCollection } from "./extractKeyPhrasesResultCollection"; +export { ExtractKeyPhrasesResultArray } from "./extractKeyPhrasesResultArray"; export { RecognizeLinkedEntitiesResult, RecognizeLinkedEntitiesErrorResult, RecognizeLinkedEntitiesSuccessResult } from "./recognizeLinkedEntitiesResult"; -export { RecognizeLinkedEntitiesResultCollection } from "./recognizeLinkedEntitiesResultCollection"; +export { RecognizeLinkedEntitiesResultArray } from "./recognizeLinkedEntitiesResultArray"; export { TextAnalyticsResult, ErrorCode, @@ -57,8 +57,8 @@ export { DetectedLanguage, TextDocumentStatistics, SentimentConfidenceScores, - MultiLanguageInput as TextDocumentInput, - LanguageInput as DetectLanguageInput, + TextDocumentInput, + DetectLanguageInput, TextDocumentBatchStatistics, Entity, SentenceSentiment, @@ -66,6 +66,8 @@ export { SentenceSentimentLabel, ErrorCodeValue, InnerErrorCodeValue, + WarningCode, LinkedEntity, - Match + Match, + TextAnalyticsWarning } from "./generated/models"; diff --git a/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResult.ts b/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResult.ts index 788756844fa1..5a91f67a144a 100644 --- a/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResult.ts @@ -7,7 +7,12 @@ import { TextAnalyticsErrorResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult"; -import { Entity, TextDocumentStatistics, TextAnalyticsError } from "./generated/models"; +import { + Entity, + TextDocumentStatistics, + TextAnalyticsError, + TextAnalyticsWarning +} from "./generated/models"; /** * An entity from text analysis with information about its categorical @@ -41,10 +46,11 @@ export type RecognizeCategorizedEntitiesErrorResult = TextAnalyticsErrorResult; export function makeRecognizeCategorizedEntitiesResult( id: string, entities: CategorizedEntity[], + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): RecognizeCategorizedEntitiesSuccessResult { return { - ...makeTextAnalyticsSuccessResult(id, statistics), + ...makeTextAnalyticsSuccessResult(id, warnings, statistics), entities }; } diff --git a/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultCollection.ts b/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultArray.ts similarity index 77% rename from sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultCollection.ts rename to sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultArray.ts index 6eea146641bf..bff7f80cf889 100644 --- a/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultCollection.ts +++ b/sdk/textanalytics/ai-text-analytics/src/recognizeCategorizedEntitiesResultArray.ts @@ -5,20 +5,20 @@ import { TextDocumentBatchStatistics, DocumentError, DocumentEntities, - MultiLanguageInput + TextDocumentInput } from "./generated/models"; import { RecognizeCategorizedEntitiesResult, makeRecognizeCategorizedEntitiesResult, makeRecognizeCategorizedEntitiesErrorResult } from "./recognizeCategorizedEntitiesResult"; -import { sortByPreviousIdOrder } from "./util"; +import { sortResponseIdObjects } from "./util"; /** - * Collection of `RecognizeCategorizedEntitiesResult` objects corresponding to a batch of input documents, and + * Array of `RecognizeCategorizedEntitiesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ -export interface RecognizeCategorizedEntitiesResultCollection +export interface RecognizeCategorizedEntitiesResultArray extends Array { /** * Statistics about the input document batch and how it was processed @@ -33,19 +33,20 @@ export interface RecognizeCategorizedEntitiesResultCollection modelVersion: string; } -export function makeRecognizeCategorizedEntitiesResultCollection( - input: MultiLanguageInput[], +export function makeRecognizeCategorizedEntitiesResultArray( + input: TextDocumentInput[], documents: DocumentEntities[], errors: DocumentError[], modelVersion: string, statistics?: TextDocumentBatchStatistics -): RecognizeCategorizedEntitiesResultCollection { +): RecognizeCategorizedEntitiesResultArray { const unsortedResult = documents .map( (document): RecognizeCategorizedEntitiesResult => { return makeRecognizeCategorizedEntitiesResult( document.id, document.entities, + document.warnings, document.statistics ); } @@ -57,7 +58,7 @@ export function makeRecognizeCategorizedEntitiesResultCollection( } ) ); - const result = sortByPreviousIdOrder(input, unsortedResult); + const result = sortResponseIdObjects(input, unsortedResult); return Object.assign(result, { statistics, modelVersion diff --git a/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResult.ts b/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResult.ts index 5d8014a8c9c1..0c9dcd48f007 100644 --- a/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResult.ts @@ -7,7 +7,12 @@ import { TextAnalyticsErrorResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult"; -import { TextDocumentStatistics, TextAnalyticsError, LinkedEntity } from "./generated/models"; +import { + TextDocumentStatistics, + TextAnalyticsError, + LinkedEntity, + TextAnalyticsWarning +} from "./generated/models"; /** * The result of the recognize linked entities operation on a single document. @@ -35,10 +40,11 @@ export type RecognizeLinkedEntitiesErrorResult = TextAnalyticsErrorResult; export function makeRecognizeLinkedEntitiesResult( id: string, entities: LinkedEntity[], + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): RecognizeLinkedEntitiesSuccessResult { return { - ...makeTextAnalyticsSuccessResult(id, statistics), + ...makeTextAnalyticsSuccessResult(id, warnings, statistics), entities }; } diff --git a/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultCollection.ts b/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultArray.ts similarity index 77% rename from sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultCollection.ts rename to sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultArray.ts index ae84415e8043..498f163323de 100644 --- a/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultCollection.ts +++ b/sdk/textanalytics/ai-text-analytics/src/recognizeLinkedEntitiesResultArray.ts @@ -5,20 +5,20 @@ import { TextDocumentBatchStatistics, DocumentError, DocumentLinkedEntities, - MultiLanguageInput + TextDocumentInput } from "./generated/models"; import { RecognizeLinkedEntitiesResult, makeRecognizeLinkedEntitiesResult, makeRecognizeLinkedEntitiesErrorResult } from "./recognizeLinkedEntitiesResult"; -import { sortByPreviousIdOrder } from "./util"; +import { sortResponseIdObjects } from "./util"; /** - * Collection of `RecognizeLinkedEntitiesResult` objects corresponding to a batch of input documents, and + * Array of `RecognizeLinkedEntitiesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ -export interface RecognizeLinkedEntitiesResultCollection +export interface RecognizeLinkedEntitiesResultArray extends Array { /** * Statistics about the input document batch and how it was processed @@ -33,19 +33,20 @@ export interface RecognizeLinkedEntitiesResultCollection modelVersion: string; } -export function makeRecognizeLinkedEntitiesResultCollection( - input: MultiLanguageInput[], +export function makeRecognizeLinkedEntitiesResultArray( + input: TextDocumentInput[], documents: DocumentLinkedEntities[], errors: DocumentError[], modelVersion: string, statistics?: TextDocumentBatchStatistics -): RecognizeLinkedEntitiesResultCollection { +): RecognizeLinkedEntitiesResultArray { const unsortedResult = documents .map( (document): RecognizeLinkedEntitiesResult => { return makeRecognizeLinkedEntitiesResult( document.id, document.entities, + document.warnings, document.statistics ); } @@ -57,7 +58,7 @@ export function makeRecognizeLinkedEntitiesResultCollection( } ) ); - const result = sortByPreviousIdOrder(input, unsortedResult); + const result = sortResponseIdObjects(input, unsortedResult); return Object.assign(result, { statistics, modelVersion diff --git a/sdk/textanalytics/ai-text-analytics/src/textAnalyticsClient.ts b/sdk/textanalytics/ai-text-analytics/src/textAnalyticsClient.ts index a39b2d3f4801..e609fd5fedd1 100644 --- a/sdk/textanalytics/ai-text-analytics/src/textAnalyticsClient.ts +++ b/sdk/textanalytics/ai-text-analytics/src/textAnalyticsClient.ts @@ -15,30 +15,27 @@ import { TokenCredential, KeyCredential } from "@azure/core-auth"; import { SDK_VERSION } from "./constants"; import { GeneratedClient } from "./generated/generatedClient"; import { logger } from "./logger"; +import { DetectLanguageInput, TextDocumentInput } from "./generated/models"; import { - LanguageInput as DetectLanguageInput, - MultiLanguageInput as TextDocumentInput -} from "./generated/models"; + DetectLanguageResultArray, + makeDetectLanguageResultArray +} from "./detectLanguageResultArray"; import { - DetectLanguageResultCollection, - makeDetectLanguageResultCollection -} from "./detectLanguageResultCollection"; + RecognizeCategorizedEntitiesResultArray, + makeRecognizeCategorizedEntitiesResultArray +} from "./recognizeCategorizedEntitiesResultArray"; import { - RecognizeCategorizedEntitiesResultCollection, - makeRecognizeCategorizedEntitiesResultCollection -} from "./recognizeCategorizedEntitiesResultCollection"; + AnalyzeSentimentResultArray, + makeAnalyzeSentimentResultArray +} from "./analyzeSentimentResultArray"; import { - AnalyzeSentimentResultCollection, - makeAnalyzeSentimentResultCollection -} from "./analyzeSentimentResultCollection"; + makeExtractKeyPhrasesResultArray, + ExtractKeyPhrasesResultArray +} from "./extractKeyPhrasesResultArray"; import { - makeExtractKeyPhrasesResultCollection, - ExtractKeyPhrasesResultCollection -} from "./extractKeyPhrasesResultCollection"; -import { - RecognizeLinkedEntitiesResultCollection, - makeRecognizeLinkedEntitiesResultCollection -} from "./recognizeLinkedEntitiesResultCollection"; + RecognizeLinkedEntitiesResultArray, + makeRecognizeLinkedEntitiesResultArray +} from "./recognizeLinkedEntitiesResultArray"; import { createSpan } from "./tracing"; import { CanonicalCode } from "@opentelemetry/api"; import { createTextAnalyticsAzureKeyCredentialPolicy } from "./azureKeyCredentialPolicy"; @@ -68,7 +65,7 @@ export interface TextAnalyticsOperationOptions extends OperationOptions { * This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. * For supported model versions, see operation-specific documentation, for example: - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis#model-versioning + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis#model-versioning */ modelVersion?: string; /** @@ -214,7 +211,7 @@ export class TextAnalyticsClient { documents: string[], countryHint?: string, options?: DetectLanguageOptions - ): Promise; + ): Promise; /** * Runs a predictive model to determine the language that the passed-in * input document are written in, and returns, for each one, the detected @@ -227,12 +224,12 @@ export class TextAnalyticsClient { public async detectLanguage( documents: DetectLanguageInput[], options?: DetectLanguageOptions - ): Promise; + ): Promise; public async detectLanguage( documents: string[] | DetectLanguageInput[], countryHintOrOptions?: string | DetectLanguageOptions, options?: DetectLanguageOptions - ): Promise { + ): Promise { let realOptions: DetectLanguageOptions; let realInputs: DetectLanguageInput[]; @@ -266,7 +263,7 @@ export class TextAnalyticsClient { operationOptionsToRequestOptionsBase(finalOptions) ); - return makeDetectLanguageResultCollection( + return makeDetectLanguageResultArray( realInputs, result.documents, result.errors, @@ -289,9 +286,9 @@ export class TextAnalyticsClient { * in the passed-in input strings, and categorize those entities into types * such as person, location, or organization. For more information on * available categories, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/Text-Analytics/named-entity-types. + * https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input strings to analyze. * @param language The language that all the input strings are written in. If unspecified, this value will be set to the default @@ -305,15 +302,15 @@ export class TextAnalyticsClient { language?: string, // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options?: RecognizeCategorizedEntitiesOptions - ): Promise; + ): Promise; /** * Runs a predictive model to identify a collection of named entities * in the passed-in input documents, and categorize those entities into types * such as person, location, or organization. For more information on * available categories, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/Text-Analytics/named-entity-types. + * https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input documents to analyze. * @param options Optional parameters for the operation. */ @@ -321,13 +318,13 @@ export class TextAnalyticsClient { documents: TextDocumentInput[], // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options?: RecognizeCategorizedEntitiesOptions - ): Promise; + ): Promise; public async recognizeEntities( documents: string[] | TextDocumentInput[], languageOrOptions?: string | RecognizeCategorizedEntitiesOptions, // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options?: RecognizeCategorizedEntitiesOptions - ): Promise { + ): Promise { let realOptions: RecognizeCategorizedEntitiesOptions; let realInputs: TextDocumentInput[]; @@ -357,7 +354,7 @@ export class TextAnalyticsClient { operationOptionsToRequestOptionsBase(finalOptions) ); - return makeRecognizeCategorizedEntitiesResultCollection( + return makeRecognizeCategorizedEntitiesResultArray( realInputs, result.documents, result.errors, @@ -380,7 +377,7 @@ export class TextAnalyticsClient { * sentiment contained in the input strings, as well as scores indicating * the model's confidence in each of the predicted sentiments. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input strings to analyze. * @param language The language that all the input strings are written in. If unspecified, this value will be set to the default @@ -393,25 +390,25 @@ export class TextAnalyticsClient { documents: string[], language?: string, options?: AnalyzeSentimentOptions - ): Promise; + ): Promise; /** * Runs a predictive model to identify the positive, negative or neutral, or mixed * sentiment contained in the input documents, as well as scores indicating * the model's confidence in each of the predicted sentiments. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input documents to analyze. * @param options Optional parameters for the operation. */ public async analyzeSentiment( documents: TextDocumentInput[], options?: AnalyzeSentimentOptions - ): Promise; + ): Promise; public async analyzeSentiment( documents: string[] | TextDocumentInput[], languageOrOptions?: string | AnalyzeSentimentOptions, options?: AnalyzeSentimentOptions - ): Promise { + ): Promise { let realOptions: AnalyzeSentimentOptions; let realInputs: TextDocumentInput[]; @@ -441,7 +438,7 @@ export class TextAnalyticsClient { operationOptionsToRequestOptionsBase(finalOptions) ); - return makeAnalyzeSentimentResultCollection( + return makeAnalyzeSentimentResultArray( realInputs, result.documents, result.errors, @@ -463,7 +460,7 @@ export class TextAnalyticsClient { * Runs a model to identify a collection of significant phrases * found in the passed-in input strings. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input strings to analyze. * @param language The language that all the input strings are written in. If unspecified, this value will be set to the default @@ -476,24 +473,24 @@ export class TextAnalyticsClient { documents: string[], language?: string, options?: ExtractKeyPhrasesOptions - ): Promise; + ): Promise; /** * Runs a model to identify a collection of significant phrases * found in the passed-in input documents. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input documents to analyze. * @param options Optional parameters for the operation. */ public async extractKeyPhrases( documents: TextDocumentInput[], options?: ExtractKeyPhrasesOptions - ): Promise; + ): Promise; public async extractKeyPhrases( documents: string[] | TextDocumentInput[], languageOrOptions?: string | ExtractKeyPhrasesOptions, options?: ExtractKeyPhrasesOptions - ): Promise { + ): Promise { let realOptions: ExtractKeyPhrasesOptions; let realInputs: TextDocumentInput[]; @@ -523,7 +520,7 @@ export class TextAnalyticsClient { operationOptionsToRequestOptionsBase(finalOptions) ); - return makeExtractKeyPhrasesResultCollection( + return makeExtractKeyPhrasesResultArray( realInputs, result.documents, result.errors, @@ -546,7 +543,7 @@ export class TextAnalyticsClient { * found in the passed-in input strings, and include information linking the * entities to their corresponding entries in a well-known knowledge base. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input strings to analyze. * @param language The language that all the input strings are written in. If unspecified, this value will be set to the default @@ -559,25 +556,25 @@ export class TextAnalyticsClient { documents: string[], language?: string, options?: RecognizeLinkedEntitiesOptions - ): Promise; + ): Promise; /** * Runs a predictive model to identify a collection of entities * found in the passed-in input documents, and include information linking the * entities to their corresponding entries in a well-known knowledge base. * For a list of languages supported by this operation, see - * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support. + * https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support. * @param documents The input documents to analyze. * @param options Optional parameters for the operation. */ public async recognizeLinkedEntities( documents: TextDocumentInput[], options?: RecognizeLinkedEntitiesOptions - ): Promise; + ): Promise; public async recognizeLinkedEntities( documents: string[] | TextDocumentInput[], languageOrOptions?: string | RecognizeLinkedEntitiesOptions, options?: RecognizeLinkedEntitiesOptions - ): Promise { + ): Promise { let realOptions: RecognizeLinkedEntitiesOptions; let realInputs: TextDocumentInput[]; @@ -607,7 +604,7 @@ export class TextAnalyticsClient { operationOptionsToRequestOptionsBase(finalOptions) ); - return makeRecognizeLinkedEntitiesResultCollection( + return makeRecognizeLinkedEntitiesResultArray( realInputs, result.documents, result.errors, diff --git a/sdk/textanalytics/ai-text-analytics/src/textAnalyticsResult.ts b/sdk/textanalytics/ai-text-analytics/src/textAnalyticsResult.ts index 0f2079fd6d4a..08d29a9a028a 100644 --- a/sdk/textanalytics/ai-text-analytics/src/textAnalyticsResult.ts +++ b/sdk/textanalytics/ai-text-analytics/src/textAnalyticsResult.ts @@ -6,7 +6,8 @@ import { TextAnalyticsError as GeneratedTextAnalyticsErrorModel, InnerError, ErrorCodeValue, - InnerErrorCodeValue + InnerErrorCodeValue, + TextAnalyticsWarning } from "./generated/models"; /** @@ -57,6 +58,13 @@ export interface TextAnalyticsSuccessResult { */ readonly statistics?: TextDocumentStatistics; + /** + * An array of warning data corresponding to this document. + * + * If no warnings were returned, this array will be empty. + */ + readonly warnings: TextAnalyticsWarning[]; + /** * Discriminant to determine if that this is an error result. */ @@ -101,11 +109,13 @@ function intoTextAnalyticsError( export function makeTextAnalyticsSuccessResult( id: string, + warnings: TextAnalyticsWarning[], statistics?: TextDocumentStatistics ): TextAnalyticsSuccessResult { return { id, - statistics + statistics, + warnings }; } diff --git a/sdk/textanalytics/ai-text-analytics/src/util.ts b/sdk/textanalytics/ai-text-analytics/src/util.ts index e7f7339ac6f4..5ba16f9273e3 100644 --- a/sdk/textanalytics/ai-text-analytics/src/util.ts +++ b/sdk/textanalytics/ai-text-analytics/src/util.ts @@ -1,29 +1,48 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { TextAnalyticsError } from "./generated/models"; + +import { logger } from "./logger"; +import { RestError } from "@azure/core-http"; + export interface IdObject { id: string; } +function isGenericError(o: IdObject): o is IdObject & { error: TextAnalyticsError } { + return o.id === ""; +} + /** * Given a sorted array of input objects (with a unique ID) and an unsorted array of results, * return a sorted array of results. + * + * If a generic error (id = "") occurred in the response, this function will throw it + * as an exception. + * * @ignore * @param sortedArray An array of entries sorted by `id` * @param unsortedArray An array of entries that contain `id` but are not sorted */ -export function sortByPreviousIdOrder( +export function sortResponseIdObjects( sortedArray: T[], unsortedArray: U[] ): U[] { - if (sortedArray.length !== unsortedArray.length) { - throw new Error("Can't use this sort unless you have two arrays with the same length!"); - } - const unsortedMap = new Map(); for (const item of unsortedArray) { + if (isGenericError(item)) { + throw new RestError(item.error.message, item.error.code, 400); + } unsortedMap.set(item.id, item); } + if (unsortedArray.length !== sortedArray.length) { + const ordinal = unsortedArray.length > sortedArray.length ? "more" : "fewer"; + logger.warning( + `The service returned ${ordinal} responses than inputs. Some errors may be treated as fatal.` + ); + } + return sortedArray.map((item) => unsortedMap.get(item.id)!); } diff --git a/sdk/textanalytics/ai-text-analytics/swagger/README.md b/sdk/textanalytics/ai-text-analytics/swagger/README.md index b2b5ee11960a..82bca2e0d5e7 100644 --- a/sdk/textanalytics/ai-text-analytics/swagger/README.md +++ b/sdk/textanalytics/ai-text-analytics/swagger/README.md @@ -12,7 +12,7 @@ generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src/generated -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json add-credentials: true use-extension: "@microsoft.azure/autorest.typescript": "5.0.1" @@ -30,7 +30,7 @@ directive: - from: swagger-document where: $.definitions.DocumentStatistics.properties.charactersCount transform: > - $["x-ms-client-name"] = "graphemeCount"; + $["x-ms-client-name"] = "characterCount"; ``` ```yaml @@ -121,27 +121,12 @@ directive: if ($.name === "showStats") { $["x-ms-client-name"] = "includeStatistics"; } -``` - -### Rename type, subtype -> category, subCategory - -```yaml -directive: - - from: swagger-document - where: $.definitions.Entity.properties - transform: > - $.type["x-ms-client-name"] = "category"; - $.subtype["x-ms-client-name"] = "subCategory"; -``` - -### Rename sentenceScores -> confidenceScores - -```yaml -directive: - from: swagger-document - where: $.definitions.SentenceSentiment.properties.sentenceScores + where: $.definitions[*] transform: > - $["x-ms-client-name"] = "confidenceScores"; + if ($.description && $.description.includes("showStats")) { + $.description = $.description.replace("showStats", "includeStatistics"); + } ``` ### Rename {Document,Sentence}SentimentValue -> Label @@ -178,20 +163,17 @@ directive: $["x-ms-client-name"] = "dataSourceEntityId"; ``` -### Rename Entity/Match offset -> graphemeOffset +### Remove Entity/Match offset/length ```yaml directive: - from: swagger-document - where: $.definitions..properties.offset + where: $.definitions..properties transform: > - $["x-ms-client-name"] = "graphemeOffset"; - $.description = $.description.replace("Unicode characters", "Unicode graphemes"); - - from: swagger-document - where: $.definitions..properties.length - transform: > - $["x-ms-client-name"] = "graphemeLength"; - $.description = $.description.replace("Unicode characters", "Unicode graphemes"); + if ($.length !== undefined && $.offset !== undefined) { + $.length = undefined; + $.offset = undefined; + } ``` ### Rename SentimentConfidenceScorePerLabel -> SentimentConfidenceScores @@ -213,3 +195,99 @@ directive: } ``` +### Change some casing to use camelCase + +```yaml +directive: + - from: swagger-document + where: $.definitions.Entity.properties.subcategory + transform: > + $["x-ms-client-name"] = "subCategory"; + - from: swagger-document + where: $.definitions.TextAnalyticsError.properties.innererror + transform: > + $["x-ms-client-name"] = "innerError"; + - from: swagger-document + where: $.definitions.InnerError.properties.innererror + transform: > + $["x-ms-client-name"] = "innerError"; +``` + +### WarningCodeValue => WarningCode + +```yaml +directive: + - from: swagger-document + where: $.definitions.TextAnalyticsWarning.properties.code + transform: > + $["x-ms-enum"].name = "WarningCode"; +``` + +### Remove targetRef + +```yaml +directive: + - from: swagger-document + where: $.definitions.TextAnalyticsWarning.properties + transform: > + delete $["targetRef"]; +``` + +### Rename text input objects to avoid "export as" + +```yaml +directive: + - from: swagger-document + where: $.definitions + transform: > + if (!$.TextDocumentInput) { + $.TextDocumentInput = $.MultiLanguageInput; + delete $.MultiLanguageInput; + } + - from: swagger-document + where: $.definitions.MultiLanguageBatchInput.properties.documents.items + transform: > + $["$ref"] = "#/definitions/TextDocumentInput"; + - from: swagger-document + where: $.definitions + transform: > + if (!$.DetectLanguageInput) { + $.DetectLanguageInput = $.LanguageInput; + delete $.LanguageInput; + } + - from: swagger-document + where: $.definitions.LanguageBatchInput.properties.documents.items + transform: > + $["$ref"] = "#/definitions/DetectLanguageInput"; +``` + +### Enhance documentation strings for some exported swagger types + +```yaml +directive: + - from: swagger-document + where: $.definitions.TextAnalyticsWarning + transform: $.description = "Represents a warning encountered while processing a document." + - from: swagger-document + where: $.definitions.SentenceSentiment + transform: $.description = "The predicted sentiment for a given span of text. For more information regarding text sentiment, see https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-sentiment-analysis." + - from: swagger-document + where: $.definitions.Match + transform: $.description = "Details about the specific substring in a document that refers to a linked entity identified by the Text Analytics model." + - from: swagger-document + where: $.definitions.Entity + transform: $.description = "A word or phrase identified as an entity that is categorized within a taxonomy of types. The set of categories recognized by the Text Analytics service is described at https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types ." + - from: swagger-document + where: $.definitions.LinkedEntity + transform: $.description = "A word or phrase identified as a well-known entity within a database, including its formal (disambiguated) name and a link to the entity information within the source database." + - from: swagger-document + where: $.definitions.DetectLanguageInput + transform: $.description = "An input to the language detection operation. This object specifies a unique document id, as well as the full text of a document and a hint indicating the document's country of origin to assist the text analytics predictive model in detecting the document's language." + - from: swagger-document + where: $.definitions.TextDocumentInput + transform: $.description = "An object representing an individual text document to be analyzed by the Text Analytics service. The document contains a unique document ID, the full text of the document, and the language of the document's text." + - from: swagger-document + where: $.definitions.DetectedLanguage + transform: $.description = "Information about the language of a document as identified by the Text Analytics service." +``` + diff --git a/sdk/textanalytics/ai-text-analytics/test/README.md b/sdk/textanalytics/ai-text-analytics/test/README.md index 75bcd284053d..1c363132a072 100644 --- a/sdk/textanalytics/ai-text-analytics/test/README.md +++ b/sdk/textanalytics/ai-text-analytics/test/README.md @@ -6,7 +6,7 @@ You can use existing Azure resources for the live tests, or generate new ones by The Azure resource that is used by the tests in this project is: -- An [Azure Cognitive Services](https://azure.microsoft.com/en-us/services/cognitive-services/) account of the Text Analytics type. +- An [Azure Cognitive Services](https://azure.microsoft.com/services/cognitive-services/) account of the Text Analytics type. To run the live tests, you will also need to set the below environment variables: @@ -15,6 +15,36 @@ To run the live tests, you will also need to set the below environment variables - `TEXT_ANALYTICS_API_KEY_ALT` (optional): The secondary API key of the Text Analytics API in your Azure Cognitive Services account. - `ENDPOINT`: The endpoint of your Text Analytics API in your Azure Cognitive Services account. -The live tests in this project will create collections in the provided Azure Cognitive Services account. +In addition to the environment variables above, an Azure Active Directory identity configuration is required. See the [README file for the @azure/identity package](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity) for more details on how to configure an identity for local testing. The test configuration uses the `DefaultAzureCredential` to request an authentication token, so any authentication method that is exposed by `DefaultAzureCredential` will be sufficient to run the tests. The next section will explain how to grant access to your Cognitive Services account to the user or application you wish to use for testing. + +## AAD-based Authentication + +In order to use Azure Active Directory to run the live tests, you will need to configure a role assignment within your AAD tenant. + +### Using an App Registration (Service Principal) + +- Follow [Documentation to register a new application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) in the Azure Active Directory (in the Azure portal). +- Note the Client ID and Tenant ID. +- In the "Certificates & Secrets" tab, create a secret and note that down. +- Ensure the following environment variables are set: + - `AZURE_TENANT_ID=""` + - `AZURE_CLIENT_ID=""` + - `AZURE_CLIENT_SECRET=""` + +### Using a User Account + +As an alternative to creating a service principal, you can use a simple user account. This is not recommended for production, but may be useful for development and testing. Using a User Account requires either the Azure CLI or Visual Studio Code with the [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account). + +- Create an account in your Azure Active Directory tenant (or use the default account associated with your Microsoft account) +- Log in to the account, either using the Azure CLI (`az login` command) or though the VS Code Azure Account extension. + +Once you are logged in, the `DefaultAzureCredential` will use the identity of the account when communicating with the Cognitive Services endpoint. + +### Assign the Cognitive Services User role to your user + +- In the Azure portal, go to your Cognitive Services resource and assign the **Cognitive Services User** role to the registered application (if using an Application Service Principal) or to your user account. + - This can be done from `Role assignment` section of `Access control (IAM)` tab (in the left-side-navbar of your Cognitive Services resource in the Azure portal)
_Doing this will allow anyone with your application or user's credentials and/or access token to utilize the endpoint resources._ + +After configuring your account's permissions and setting up the authenticated environment, you should be able to run the live tests. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftextanalytics%2Fai-text-analytics%2Ftest%2FREADME.png) diff --git a/sdk/textanalytics/ai-text-analytics/test/collections.spec.ts b/sdk/textanalytics/ai-text-analytics/test/collections.spec.ts index 11a0b20c0a68..a9d8b6fa3d76 100644 --- a/sdk/textanalytics/ai-text-analytics/test/collections.spec.ts +++ b/sdk/textanalytics/ai-text-analytics/test/collections.spec.ts @@ -3,16 +3,16 @@ import { assert } from "chai"; -import { makeAnalyzeSentimentResultCollection } from "../src/analyzeSentimentResultCollection"; -import { makeDetectLanguageResultCollection } from "../src/detectLanguageResultCollection"; -import { makeExtractKeyPhrasesResultCollection } from "../src/extractKeyPhrasesResultCollection"; -import { makeRecognizeLinkedEntitiesResultCollection } from "../src/recognizeLinkedEntitiesResultCollection"; -import { makeRecognizeCategorizedEntitiesResultCollection } from "../src/recognizeCategorizedEntitiesResultCollection"; -import { LanguageInput, MultiLanguageInput } from "../src/generated/models"; +import { makeAnalyzeSentimentResultArray } from "../src/analyzeSentimentResultArray"; +import { makeDetectLanguageResultArray } from "../src/detectLanguageResultArray"; +import { makeExtractKeyPhrasesResultArray } from "../src/extractKeyPhrasesResultArray"; +import { makeRecognizeLinkedEntitiesResultArray } from "../src/recognizeLinkedEntitiesResultArray"; +import { makeRecognizeCategorizedEntitiesResultArray } from "../src/recognizeCategorizedEntitiesResultArray"; +import { DetectLanguageInput, TextDocumentInput } from "../src/generated/models"; -describe("SentimentResultCollection", () => { +describe("SentimentResultArray", () => { it("merges items in order", () => { - const input: MultiLanguageInput[] = [ + const input: TextDocumentInput[] = [ { id: "A", text: "test" @@ -26,28 +26,30 @@ describe("SentimentResultCollection", () => { text: "test3" } ]; - const result = makeAnalyzeSentimentResultCollection( + const result = makeAnalyzeSentimentResultArray( input, [ { id: "A", - documentScores: { + confidenceScores: { positive: 1, negative: 0, neutral: 0 }, sentenceSentiments: [], - sentiment: "positive" + sentiment: "positive", + warnings: [] }, { id: "C", - documentScores: { + confidenceScores: { positive: 0, negative: 1, neutral: 0 }, sentenceSentiments: [], - sentiment: "negative" + sentiment: "negative", + warnings: [] } ], [ @@ -68,9 +70,9 @@ describe("SentimentResultCollection", () => { }); }); -describe("DetectLanguageResultCollection", () => { +describe("DetectLanguageResultArray", () => { it("merges items in order", () => { - const input: LanguageInput[] = [ + const input: DetectLanguageInput[] = [ { id: "A", text: "test" @@ -84,33 +86,26 @@ describe("DetectLanguageResultCollection", () => { text: "test3" } ]; - const result = makeDetectLanguageResultCollection( + const result = makeDetectLanguageResultArray( input, [ { id: "A", - detectedLanguages: [ - { - name: "English", - iso6391Name: "en", - score: 1 - } - ] + detectedLanguage: { + name: "English", + iso6391Name: "en", + confidenceScore: 1 + }, + warnings: [] }, { id: "C", - detectedLanguages: [ - { - name: "French", - iso6391Name: "fr", - score: 1 - }, - { - name: "English", - iso6391Name: "en", - score: 0.5 - } - ] + detectedLanguage: { + name: "French", + iso6391Name: "fr", + confidenceScore: 1 + }, + warnings: [] } ], [ @@ -131,9 +126,9 @@ describe("DetectLanguageResultCollection", () => { }); }); -describe("ExtractKeyPhrasesResultCollection", () => { +describe("ExtractKeyPhrasesResultArray", () => { it("merges items in order", () => { - const input: MultiLanguageInput[] = [ + const input: TextDocumentInput[] = [ { id: "A", text: "test" @@ -147,16 +142,18 @@ describe("ExtractKeyPhrasesResultCollection", () => { text: "test3" } ]; - const result = makeExtractKeyPhrasesResultCollection( + const result = makeExtractKeyPhrasesResultArray( input, [ { id: "A", - keyPhrases: ["test", "test2"] + keyPhrases: ["test", "test2"], + warnings: [] }, { id: "C", - keyPhrases: ["awesome"] + keyPhrases: ["awesome"], + warnings: [] } ], [ @@ -177,9 +174,9 @@ describe("ExtractKeyPhrasesResultCollection", () => { }); }); -describe("RecognizeCategorizedEntitiesResultCollection", () => { +describe("RecognizeCategorizedEntitiesResultArray", () => { it("merges items in order", () => { - const input: MultiLanguageInput[] = [ + const input: TextDocumentInput[] = [ { id: "A", text: "test" @@ -193,7 +190,7 @@ describe("RecognizeCategorizedEntitiesResultCollection", () => { text: "test3" } ]; - const result = makeRecognizeCategorizedEntitiesResultCollection( + const result = makeRecognizeCategorizedEntitiesResultArray( input, [ { @@ -202,11 +199,10 @@ describe("RecognizeCategorizedEntitiesResultCollection", () => { { text: "Microsoft", category: "Organization", - graphemeOffset: 10, - graphemeLength: 9, - score: 0.9989 + confidenceScore: 0.9989 } - ] + ], + warnings: [] }, { id: "C", @@ -215,11 +211,10 @@ describe("RecognizeCategorizedEntitiesResultCollection", () => { text: "last week", category: "DateTime", subCategory: "DateRange", - graphemeOffset: 34, - graphemeLength: 9, - score: 0.8 + confidenceScore: 0.8 } - ] + ], + warnings: [] } ], [ @@ -240,9 +235,9 @@ describe("RecognizeCategorizedEntitiesResultCollection", () => { }); }); -describe("RecognizeLinkedEntitiesResultCollection", () => { +describe("RecognizeLinkedEntitiesResultArray", () => { it("merges items in order", () => { - const input: MultiLanguageInput[] = [ + const input: TextDocumentInput[] = [ { id: "A", text: "test" @@ -256,7 +251,7 @@ describe("RecognizeLinkedEntitiesResultCollection", () => { text: "test3" } ]; - const result = makeRecognizeLinkedEntitiesResultCollection( + const result = makeRecognizeLinkedEntitiesResultArray( input, [ { @@ -267,9 +262,7 @@ describe("RecognizeLinkedEntitiesResultCollection", () => { matches: [ { text: "Seattle", - graphemeOffset: 26, - graphemeLength: 7, - score: 0.15046201222847677 + confidenceScore: 0.15046201222847677 } ], language: "en", @@ -277,7 +270,8 @@ describe("RecognizeLinkedEntitiesResultCollection", () => { url: "https://en.wikipedia.org/wiki/Seattle", dataSource: "Wikipedia" } - ] + ], + warnings: [] }, { id: "C", @@ -287,9 +281,7 @@ describe("RecognizeLinkedEntitiesResultCollection", () => { matches: [ { text: "Microsoft", - graphemeOffset: 10, - graphemeLength: 9, - score: 0.1869365971673207 + confidenceScore: 0.1869365971673207 } ], language: "en", @@ -297,7 +289,8 @@ describe("RecognizeLinkedEntitiesResultCollection", () => { url: "https://en.wikipedia.org/wiki/Microsoft", dataSource: "Wikipedia" } - ] + ], + warnings: [] } ], [ diff --git a/sdk/textanalytics/ai-text-analytics/test/pipelineOptions.spec.ts b/sdk/textanalytics/ai-text-analytics/test/pipelineOptions.spec.ts index 2a51a38b391a..aa2bdcec51b8 100644 --- a/sdk/textanalytics/ai-text-analytics/test/pipelineOptions.spec.ts +++ b/sdk/textanalytics/ai-text-analytics/test/pipelineOptions.spec.ts @@ -5,7 +5,7 @@ import { assert } from "chai"; import { TextAnalyticsClient, - DetectLanguageResultCollection, + DetectLanguageResultArray, DetectLanguageSuccessResult, AzureKeyCredential } from "../src"; @@ -17,7 +17,7 @@ describe("TextAnalyticsClient Custom PipelineOptions", function() { let credential = new AzureKeyCredential(testEnv.TEXT_ANALYTICS_API_KEY); it("use custom HTTPClient", async () => { - const pipelineTester = new Promise((resolve) => { + const pipelineTester = new Promise((resolve) => { const client = new TextAnalyticsClient(testEnv.ENDPOINT, credential, { httpClient: { sendRequest: async (request: WebResource): Promise => ({ @@ -25,7 +25,7 @@ describe("TextAnalyticsClient Custom PipelineOptions", function() { request, bodyAsText: JSON.stringify({ documents: [ - { id: "0", detectedLanguages: [{ name: "English", iso6391Name: "en", score: 1.0 }] } + { id: "0", detectedLanguage: { name: "English", iso6391Name: "en", score: 1.0 } } ], errors: [], modelVersion: "2019-10-01" diff --git a/sdk/textanalytics/ai-text-analytics/test/textAnalyticsClient.spec.ts b/sdk/textanalytics/ai-text-analytics/test/textAnalyticsClient.spec.ts index bf4a121bc219..a1bc720ffb0a 100644 --- a/sdk/textanalytics/ai-text-analytics/test/textAnalyticsClient.spec.ts +++ b/sdk/textanalytics/ai-text-analytics/test/textAnalyticsClient.spec.ts @@ -10,7 +10,8 @@ import { TextAnalyticsClient, TextDocumentInput, DetectLanguageInput, - DetectLanguageSuccessResult + DetectLanguageSuccessResult, + ExtractKeyPhrasesSuccessResult } from "../src/index"; import { assertAllSuccess } from "./utils/resultHelper"; @@ -25,7 +26,6 @@ const testDataEs = [ "Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.", "La carretera estaba atascada. Había mucho tráfico el día de ayer." ]; - describe("[AAD] TextAnalyticsClient", function() { let recorder: Recorder; let client: TextAnalyticsClient; @@ -68,7 +68,6 @@ describe("[AAD] TextAnalyticsClient", function() { const [result] = await client.analyzeSentiment(["Hello world!"], "notalanguage"); if (result.error === undefined) { assert.fail("Expected an error from the service."); - return; } assert.equal(result.error.code, "UnsupportedLanguageCode"); }); @@ -80,7 +79,6 @@ describe("[AAD] TextAnalyticsClient", function() { const errorResult = results[1]; if (errorResult.error === undefined) { assert.fail("Expected an error from the service"); - return; } assert.equal( results.filter((result) => result.error === undefined).length, @@ -157,7 +155,6 @@ describe("[AAD] TextAnalyticsClient", function() { const [result] = await client.detectLanguage(["hello"], "invalidcountry"); if (result.error === undefined) { assert.fail("Expected an error from the service"); - return; } assert.equal(result.error.code, "InvalidCountryHint"); @@ -210,14 +207,13 @@ describe("[AAD] TextAnalyticsClient", function() { if (result.error === undefined) { assert.fail("Expected an error from the service"); - return; } assert.equal(result.error.code, "UnsupportedLanguageCode"); }); it("client accepts mixed-language TextDocumentInput[]", async () => { - const enInputs = testDataEn.map( + const enInputs = testDataEn.slice(0, -1).map( (text): TextDocumentInput => ({ id: getId(), text, @@ -234,9 +230,36 @@ describe("[AAD] TextAnalyticsClient", function() { const allInputs = enInputs.concat(esInputs); const results = await client.recognizeEntities(allInputs); - assert.equal(results.length, testDataEn.length + testDataEs.length); + assert.equal(results.length, testDataEn.length - 1 + testDataEs.length); assertAllSuccess(results); }); + + it("client throws exception for too many inputs", async () => { + const enInputs = testDataEn.map( + (text): TextDocumentInput => ({ + id: getId(), + text, + language: "en" + }) + ); + const esInputs = testDataEs.map( + (text): TextDocumentInput => ({ + id: getId(), + text, + language: "es" + }) + ); + const allInputs = enInputs.concat(esInputs); + + try { + await client.recognizeEntities(allInputs); + assert.fail("Oops, an exception didn't happen."); + } catch (e) { + assert.equal(e.statusCode, 400); + assert.equal(e.code, "InvalidDocumentBatch"); + assert.match(e.message, /exceeded the data limitations/); + } + }); }); describe("#extractKeyPhrases", () => { @@ -264,12 +287,20 @@ describe("[AAD] TextAnalyticsClient", function() { if (result.error === undefined) { assert.fail("Expected an error from the service"); - return; } assert.equal(result.error.code, "UnsupportedLanguageCode"); }); + it("service reports warning for long words", async () => { + const results = await client.extractKeyPhrases([ + "Hello world, thisisanextremelymassivesequenceoflettersthatislongerthansixtyfourcharacters." + ]); + assertAllSuccess(results); + const result = results[0] as ExtractKeyPhrasesSuccessResult; + assert.equal(result.warnings[0].code, "LongWordsInDocument"); + }); + it("client accepts mixed-language TextDocumentInput[]", async () => { const enInputs = testDataEn.map( (text): TextDocumentInput => ({ @@ -318,14 +349,13 @@ describe("[AAD] TextAnalyticsClient", function() { if (result.error === undefined) { assert.fail("Expected an error from the service"); - return; } assert.equal(result.error.code, "UnsupportedLanguageCode"); }); it("client accepts mixed-language TextDocumentInput[]", async () => { - const enInputs = testDataEn.map( + const enInputs = testDataEn.slice(0, -1).map( (text): TextDocumentInput => ({ id: getId(), text, @@ -342,8 +372,35 @@ describe("[AAD] TextAnalyticsClient", function() { const allInputs = enInputs.concat(esInputs); const results = await client.recognizeLinkedEntities(allInputs); - assert.equal(results.length, testDataEn.length + testDataEs.length); + assert.equal(results.length, testDataEn.length - 1 + testDataEs.length); assertAllSuccess(results); }); + + it("client throws exception for too many inputs", async () => { + const enInputs = testDataEn.map( + (text): TextDocumentInput => ({ + id: getId(), + text, + language: "en" + }) + ); + const esInputs = testDataEs.map( + (text): TextDocumentInput => ({ + id: getId(), + text, + language: "es" + }) + ); + const allInputs = enInputs.concat(esInputs); + + try { + await client.recognizeEntities(allInputs); + assert.fail("Oops, an exception didn't happen."); + } catch (e) { + assert.equal(e.statusCode, 400); + assert.equal(e.code, "InvalidDocumentBatch"); + assert.match(e.message, /exceeded the data limitations/); + } + }); }); }); diff --git a/sdk/textanalytics/ai-text-analytics/test/util.spec.ts b/sdk/textanalytics/ai-text-analytics/test/util.spec.ts index 928ca1146b54..02a4c83fe541 100644 --- a/sdk/textanalytics/ai-text-analytics/test/util.spec.ts +++ b/sdk/textanalytics/ai-text-analytics/test/util.spec.ts @@ -2,21 +2,26 @@ // Licensed under the MIT license. import { assert } from "chai"; -import { sortByPreviousIdOrder } from "../src/util"; +import { sortResponseIdObjects } from "../src/util"; describe("util.sortByPreviousOrder", () => { it("should sort outputs correctly", () => { const input = [{ id: "1" }, { id: "2" }, { id: "3" }]; const output = [{ id: "3" }, { id: "1" }, { id: "2" }]; - const result = sortByPreviousIdOrder(input, output); + const result = sortResponseIdObjects(input, output); assert.deepEqual(result, input); }); - it("should throw when input/output lengths do not match", () => { + it('should throw when id: "" is present', () => { const input = [{ id: "1" }, { id: "2" }, { id: "3" }]; - const output = [{ id: "3" }, { id: "1" }]; + const output = [ + { id: "3" }, + { id: "1" }, + { id: "2" }, + { id: "", error: { code: "Oops", message: "A fatal error!" } } + ]; assert.throws(() => { - sortByPreviousIdOrder(input, output); - }, /same length/); + sortResponseIdObjects(input, output); + }, /^A fatal error\!$/); }); }); diff --git a/sdk/textanalytics/ai-text-analytics/test/utils/recordedClient.ts b/sdk/textanalytics/ai-text-analytics/test/utils/recordedClient.ts index 2dc534b2c5fb..cf299e2fa895 100644 --- a/sdk/textanalytics/ai-text-analytics/test/utils/recordedClient.ts +++ b/sdk/textanalytics/ai-text-analytics/test/utils/recordedClient.ts @@ -45,8 +45,8 @@ export const environmentSetup: RecorderEnvironmentSetup = { // https://:443/ and therefore will not match, so we have to do // this instead. (recording: string): string => { - const match = testEnv.ENDPOINT.replace(/^https:\/\//, "").replace(/\/$/, ""); - return recording.replace(match, "endpoint"); + const replaced = recording.replace("endpoint:443", "endpoint"); + return replaced; } ], queryParametersToSkip: [] diff --git a/sdk/textanalytics/ai-text-analytics/tests.yml b/sdk/textanalytics/ai-text-analytics/tests.yml index 8dfdf22bbe83..89c075895282 100644 --- a/sdk/textanalytics/ai-text-analytics/tests.yml +++ b/sdk/textanalytics/ai-text-analytics/tests.yml @@ -1,19 +1,11 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure -jobs: - - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml - parameters: - PackageName: "@azure/ai-text-analytics" - ResourceServiceDirectory: textanalytics - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + +extends: + template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml + parameters: + PackageName: "@azure/ai-text-analytics" + ResourceServiceDirectory: textanalytics + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/textanalytics/ci.yml b/sdk/textanalytics/ci.yml index 96d58ffa60a2..414d42096f3b 100644 --- a/sdk/textanalytics/ci.yml +++ b/sdk/textanalytics/ci.yml @@ -1,16 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated automatically and any changes will be lost. -resources: - repositories: - - repository: azure-sdk-build-tools - type: git - name: internal/azure-sdk-build-tools - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - trigger: branches: include: @@ -32,10 +22,10 @@ pr: include: - sdk/textanalytics/ -stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: textanalytics - Artifacts: - - name: azure-ai-text-analytics - safeName: azureaitextanalytics +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: textanalytics + Artifacts: + - name: azure-ai-text-analytics + safeName: azureaitextanalytics diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 54f2832b8a98..720a73b16905 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,7 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", - "use": "@microsoft.azure/autorest.typescript@4.2.2" + "use": "@microsoft.azure/autorest.typescript@4.4.1" }, "advanced_options": { "clone_dir": "./azure-sdk-for-js",