diff --git a/.docsettings.yml b/.docsettings.yml index 7c295d83269..196128c2e5f 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -1,5 +1,6 @@ omitted_paths: - documentation/ServicePrincipal/* + - eng/tools/analyze-deps/** - eng/tools/select-packages/** - "sdk/*/arm-*" - "sdk/cognitiveservices/*" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 633227e8a25..e60239aab3a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,22 +9,23 @@ /sdk/ @ramya-rao-a # Core -/sdk/core/abort-controller/ @daviwil -/sdk/core/core-amqp/ @ramya-rao-a +/sdk/core/abort-controller/ @chradek +/sdk/core/core-amqp/ @ramya-rao-a @chradek @shivangireja /sdk/core/core-auth/ @daviwil /sdk/core/core-http/ @daviwil /sdk/core/core-paging/ @daviwil # Service teams -/sdk/eventhub/ @chradek @shivangireja -/sdk/servicebus/ @ramya-rao-a @shivangireja +/sdk/eventhub/ @ramya-rao-a @chradek @shivangireja +/sdk/servicebus/ @ramya-rao-a @chradek @shivangireja -/sdk/identity/ @daviwil +/sdk/identity/ @daviwil @jonathandturner /sdk/keyvault/ @jonathandturner @sadasant /sdk/storage/ @XiaoningLiu @jeremymeng @HarshaNalluru @vinjiang @jiacfan # Management Plane /**/*Management*.ts @michaeljqzq +/**/arm-*/ @michaeljqzq ########### # Eng Sys diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c370c82b77..90c79ee45c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -168,7 +168,7 @@ Generally speaking, the following commands are roughly equivalent: | NPM command | Rush command | Rush command effect | | ------------------------------------ | ------------------------------------ | ---------------------------------------------------------------- | | `npm install` | `rush update` | Install dependencies for all projects in the Rush workspace | -| `npm install --save[-dev] ` | `rush add -p [--dev]` | Add or update a dependency in the current project | +| `npm install --save[-dev] ` | `rush add -p --caret [--dev]` | Add or update a dependency in the current project | | `npm build` | `rush [re]build` | Build all projects in the Rush workspace | | | `rush [re]build -t ` | Build named project and any projects it depends on | | | `rushx build` | Build the current project only | diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b5afb9526bb..8cb4cb66451 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3,9 +3,11 @@ dependencies: '@azure/amqp-common': 1.0.0-preview.6_rhea-promise@0.1.15 '@azure/arm-servicebus': 3.2.0 '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 '@azure/event-hubs': 2.1.1 '@azure/logger-js': 1.3.2 + '@azure/ms-rest-js': 2.0.4 '@azure/ms-rest-nodeauth': 0.9.3 '@microsoft/api-extractor': 7.3.4 '@rush-temp/abort-controller': 'file:projects/abort-controller.tgz' @@ -35,7 +37,7 @@ dependencies: '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 '@types/express': 4.17.0 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/glob': 7.1.1 '@types/is-buffer': 2.0.0 '@types/jssha': 2.0.0 @@ -51,9 +53,9 @@ dependencies: '@types/query-string': 6.2.0 '@types/semaphore': 1.1.0 '@types/semver': 5.5.0 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@types/tough-cookie': 2.3.5 - '@types/tunnel': 0.0.0 + '@types/tunnel': 0.0.1 '@types/underscore': 1.9.2 '@types/uuid': 3.4.5 '@types/webpack': 4.32.1 @@ -79,7 +81,7 @@ dependencies: death: 1.1.0 debug: 3.2.6 delay: 4.3.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -91,10 +93,10 @@ dependencies: execa: 1.0.0 express: 4.17.1 form-data: 2.5.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 glob: 7.1.4 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 https-proxy-agent: 2.2.2 inherits: 2.0.4 is-buffer: 2.0.3 @@ -131,7 +133,6 @@ dependencies: nock: 10.0.6 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 path-browserify: 1.0.0 prettier: 1.18.2 priorityqueuejs: 1.0.0 @@ -163,11 +164,11 @@ dependencies: semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 - source-map-support: 0.5.12 + source-map-support: 0.5.13 stream-browserify: 2.0.2 stream-http: 2.8.3 - tough-cookie: 2.5.0 - ts-loader: 5.4.5_typescript@3.5.3 + tough-cookie: 3.0.1 + ts-loader: 6.0.4_typescript@3.5.3 ts-mocha: 6.0.0_mocha@5.2.0 ts-node: 7.0.1 tslib: 1.10.0 @@ -175,7 +176,7 @@ dependencies: typescript: 3.5.3 uglify-js: 3.6.0 url: 0.11.0 - util: 0.11.1 + util: 0.12.1 uuid: 3.3.2 webpack: 4.38.0_webpack@4.38.0 webpack-cli: 3.3.6_webpack@4.38.0 @@ -227,6 +228,12 @@ packages: dev: false resolution: integrity: sha512-hMp0y+j/odkAyTa5TYewn4hUlFdEe3sR9uTd2Oq+se61RtuDsqM7UWrNNlyylPyjIENSZHJVWN7jte/jvvMN2Q== + /@azure/core-auth/1.0.0-preview.1: + dependencies: + tslib: 1.10.0 + dev: false + resolution: + integrity: sha512-47pHpL+9g4m/cwi1+SplZ0eZfIevwt4F6peD7/t3kK4wa8Q8fOMKcQX967vZ3gpRPvon7/ox8EM+tm1l4UiXbg== /@azure/core-paging/1.0.0-preview.1: dependencies: '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 @@ -277,7 +284,7 @@ packages: dev: false resolution: integrity: sha512-jAa6Y2XrvwbEqkaEXDHK+ReNo0WnCPS+LgQ1dRAJUUNxK4CghF5u+SXsVtPENritilVE7FVteqsLOtlhTk+haA== - /@azure/ms-rest-js/2.0.3: + /@azure/ms-rest-js/2.0.4: dependencies: '@types/node-fetch': 2.5.0 '@types/tunnel': 0.0.1 @@ -291,7 +298,7 @@ packages: xml2js: 0.4.19 dev: false resolution: - integrity: sha512-Lcgs/a6H1srWyLKHF/OaoP8j7/i7RuNHehhXMNH5hb2Nnk5Wq0WK3z9DqF2oBMw3QPicAHFb/3nZxCRKNdXy/g== + integrity: sha512-nSOPt6st0RtxclYBQV65qXZpvMDqiDQssktvB/SMTAJ5bIytSPtBmlttTTigO5qHvwQcfzzpQE0sMceK+dJ/IQ== /@azure/ms-rest-nodeauth/0.9.3: dependencies: '@azure/ms-rest-azure-env': 1.1.2 @@ -339,7 +346,7 @@ packages: /@babel/highlight/7.5.0: dependencies: chalk: 2.4.2 - esutils: 2.0.2 + esutils: 2.0.3 js-tokens: 4.0.0 dev: false resolution: @@ -375,7 +382,7 @@ packages: integrity: sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== /@babel/types/7.5.5: dependencies: - esutils: 2.0.2 + esutils: 2.0.3 lodash: 4.17.15 to-fast-properties: 2.0.0 dev: false @@ -543,12 +550,12 @@ packages: dev: false resolution: integrity: sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g== - /@types/fs-extra/7.0.0: + /@types/fs-extra/8.0.0: dependencies: '@types/node': 8.10.51 dev: false resolution: - integrity: sha512-ndoMMbGyuToTy4qB6Lex/inR98nPiNHacsgMPvy+zqMLgSxbt8VtWpDArpGp69h1fEDQHn1KB+9DWD++wgbwYA== + integrity: sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q== /@types/glob/7.1.1: dependencies: '@types/events': 3.0.0 @@ -681,10 +688,10 @@ packages: dev: false resolution: integrity: sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q== - /@types/sinon/5.0.7: + /@types/sinon/7.0.13: dev: false resolution: - integrity: sha512-opwMHufhUwkn/UUDk35LDbKJpA2VBsZT8WLU8NjayvRLGPxQkN+8XmfC2Xl35MAscBE8469koLLBjaI3XLEIww== + integrity: sha512-d7c/C/+H/knZ3L8/cxhicHUiTDxdgap0b/aNJfsmLwFu/iOP17mdgbQsbHA3SJmrzsjD0l3UEE5SN4xxuz5ung== /@types/tapable/1.0.4: dev: false resolution: @@ -1489,7 +1496,7 @@ packages: /babel-code-frame/6.26.0: dependencies: chalk: 1.1.3 - esutils: 2.0.2 + esutils: 2.0.3 js-tokens: 3.0.2 dev: false resolution: @@ -1942,7 +1949,7 @@ packages: /babel-types/6.26.0: dependencies: babel-runtime: 6.26.0 - esutils: 2.0.2 + esutils: 2.0.3 lodash: 4.17.15 to-fast-properties: 1.0.3 dev: false @@ -2167,8 +2174,8 @@ packages: integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /browserslist/3.2.8: dependencies: - caniuse-lite: 1.0.30000985 - electron-to-chromium: 1.3.201 + caniuse-lite: 1.0.30000988 + electron-to-chromium: 1.3.208 dev: false hasBin: true resolution: @@ -2245,13 +2252,14 @@ packages: node: '>= 0.8' resolution: integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - /cacache/11.3.3: + /cacache/12.0.2: dependencies: bluebird: 3.5.5 chownr: 1.1.2 figgy-pudding: 3.5.1 glob: 7.1.4 graceful-fs: 4.2.0 + infer-owner: 1.0.4 lru-cache: 5.1.1 mississippi: 3.0.0 mkdirp: 0.5.1 @@ -2263,7 +2271,7 @@ packages: y18n: 4.0.0 dev: false resolution: - integrity: sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== + integrity: sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== /cache-base/1.0.1: dependencies: collection-visit: 1.0.0 @@ -2344,10 +2352,10 @@ packages: node: '>=6' resolution: integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - /caniuse-lite/1.0.30000985: + /caniuse-lite/1.0.30000988: dev: false resolution: - integrity: sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w== + integrity: sha512-lPj3T8poYrRc/bniW5SQPND3GRtSrQdUM/R4mCYTbZxyi3jQiggLvZH4+BYUuX0t4TXjU+vMM7KFDQg+rSzZUQ== /caseless/0.12.0: dev: false resolution: @@ -3144,7 +3152,7 @@ packages: integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== /doctrine/3.0.0: dependencies: - esutils: 2.0.2 + esutils: 2.0.3 dev: false engines: node: '>=6.0.0' @@ -3170,12 +3178,12 @@ packages: npm: '>=1.2' resolution: integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - /dotenv/7.0.0: + /dotenv/8.0.0: dev: false engines: - node: '>=6' + node: '>=8' resolution: - integrity: sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== + integrity: sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg== /duplexer/0.1.1: dev: false resolution: @@ -3217,10 +3225,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.201: + /electron-to-chromium/1.3.208: dev: false resolution: - integrity: sha512-aCTPIfY1Jvuam5b6vuWRjt1F8i4kY7zX0Qtpu5SNd6l1zjuxU9fDNpbM4o6+oJsra+TMD2o7D20GnkSIgpTr9w== + integrity: sha512-ljgZXaKSfRg32jEl1V8zRJaT3u653jxfZRztKQWM/I1kE+ifBCQKRY+jOPzb4JS48a4czvT/LQfjdiDq5qjU4g== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -3412,7 +3420,7 @@ packages: dependencies: esprima: 2.7.3 estraverse: 1.9.3 - esutils: 2.0.2 + esutils: 2.0.3 optionator: 0.8.2 dev: false engines: @@ -3499,7 +3507,7 @@ packages: eslint-visitor-keys: 1.0.0 espree: 5.0.1 esquery: 1.0.1 - esutils: 2.0.2 + esutils: 2.0.3 file-entry-cache: 5.0.1 functional-red-black-tree: 1.0.1 glob: 7.1.4 @@ -3522,7 +3530,7 @@ packages: semver: 5.7.0 strip-ansi: 4.0.0 strip-json-comments: 2.0.1 - table: 5.4.4 + table: 5.4.5 text-table: 0.2.0 dev: false engines: @@ -3590,12 +3598,12 @@ packages: dev: false resolution: integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - /esutils/2.0.2: + /esutils/2.0.3: dev: false engines: node: '>=0.10.0' resolution: - integrity: sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== /etag/1.8.1: dev: false engines: @@ -3837,12 +3845,6 @@ packages: node: '>=4' resolution: integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== - /file-type/10.11.0: - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== /fill-range/4.0.0: dependencies: extend-shallow: 2.0.1 @@ -4078,7 +4080,7 @@ packages: node: '>=6 <7 || >=8' resolution: integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - /fs-extra/8.0.1: + /fs-extra/8.1.0: dependencies: graceful-fs: 4.2.0 jsonfile: 4.0.0 @@ -4087,7 +4089,7 @@ packages: engines: node: '>=6 <7 || >=8' resolution: - integrity: sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A== + integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== /fs-mkdirp-stream/1.0.0: dependencies: graceful-fs: 4.2.0 @@ -4177,6 +4179,14 @@ packages: node: '>=6' resolution: integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + /get-stream/5.1.0: + dependencies: + pump: 3.0.0 + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== /get-value/2.0.6: dev: false engines: @@ -4369,18 +4379,21 @@ packages: hasBin: true resolution: integrity: sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA== - /gulp-zip/4.2.0: + /gulp-zip/5.0.0_gulp@4.0.2: dependencies: - get-stream: 3.0.0 - plugin-error: 0.1.2 - through2: 2.0.5 + get-stream: 5.1.0 + gulp: 4.0.2 + plugin-error: 1.0.1 + through2: 3.0.1 vinyl: 2.2.0 yazl: 2.5.1 dev: false engines: - node: '>=4' + node: '>=8' + peerDependencies: + gulp: '>=4' resolution: - integrity: sha512-I+697f6jf+PncdTrqfuwoauxgnLG1yHRg3vlmvDgmJuEnlEHy4meBktJ/oHgfyg4tp6X25wuZqUOraVeVg97wQ== + integrity: sha512-oR3t8kn+ccHkSyRcBV5kBLPXrhqTh5d6wBAR7r7wqjNQNBhYvOwPedCwlAaGcNl1qSeXNDn6qOk1Qyxvx9Wrow== /gulp/4.0.2: dependencies: glob-watcher: 5.0.3 @@ -4707,6 +4720,10 @@ packages: dev: false resolution: integrity: sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= + /infer-owner/1.0.4: + dev: false + resolution: + integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== /inflight/1.0.6: dependencies: once: 1.4.0 @@ -4811,6 +4828,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + /is-arguments/1.0.4: + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== /is-arrayish/0.2.1: dev: false resolution: @@ -4931,6 +4954,12 @@ packages: node: '>=4' resolution: integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + /is-generator-function/1.0.7: + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== /is-glob/3.1.0: dependencies: is-extglob: 2.1.1 @@ -5813,14 +5842,6 @@ packages: dev: false resolution: integrity: sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== - /make-dir/1.3.0: - dependencies: - pify: 3.0.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== /make-dir/2.1.0: dependencies: pify: 4.0.1 @@ -6001,22 +6022,6 @@ packages: node: '>=4' resolution: integrity: sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== - /meow/5.0.0: - dependencies: - camelcase-keys: 4.2.0 - decamelize-keys: 1.1.0 - loud-rejection: 1.6.0 - minimist-options: 3.0.2 - normalize-package-data: 2.5.0 - read-pkg-up: 3.0.0 - redent: 2.0.0 - trim-newlines: 2.0.0 - yargs-parser: 10.1.0 - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== /merge-descriptors/1.0.1: dev: false resolution: @@ -6059,6 +6064,15 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + /micromatch/4.0.2: + dependencies: + braces: 3.0.2 + picomatch: 2.0.7 + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== /miller-rabin/4.0.1: dependencies: bn.js: 4.11.8 @@ -6621,6 +6635,17 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= + /object.entries/1.1.0: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.13.0 + function-bind: 1.1.1 + has: 1.0.3 + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== /object.map/1.0.1: dependencies: for-own: 1.0.0 @@ -6677,19 +6702,6 @@ packages: node: '>=8' resolution: integrity: sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== - /opn-cli/4.1.0: - dependencies: - file-type: 10.11.0 - get-stdin: 6.0.0 - meow: 5.0.0 - open: 6.4.0 - temp-write: 3.4.0 - dev: false - engines: - node: '>=8' - hasBin: true - resolution: - integrity: sha512-nVJ9dVb4fEKtmACWxUql+hhQxVWMt7BSRT+6TnB85W3xs5Pgk9sKW3icYeCIwOtOKALBw/6WUCoNmI1+ADfAow== /optimist/0.6.1: dependencies: minimist: 0.0.10 @@ -7112,6 +7124,17 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= + /plugin-error/1.0.1: + dependencies: + ansi-colors: 1.1.0 + arr-diff: 4.0.0 + arr-union: 3.1.0 + extend-shallow: 3.0.2 + dev: false + engines: + node: '>= 0.10' + resolution: + integrity: sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== /posix-character-classes/0.1.1: dev: false engines: @@ -7259,14 +7282,14 @@ packages: node: '>=6' resolution: integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - /pupa/2.0.0: + /pupa/2.0.1: dependencies: escape-goat: 2.1.0 dev: false engines: node: '>=8' resolution: - integrity: sha512-xxy6mj9KTirR7fpsdXrIaC4oUb/uvFfchrC4K3RFxYLQ/G05RlhJIKFF2ayCQnNaFI+fOxGWzEVUhYMXHNljeQ== + integrity: sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== /puppeteer/1.19.0: dependencies: debug: 4.1.1 @@ -7429,6 +7452,16 @@ packages: dev: false resolution: integrity: sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + /readable-stream/3.4.0: + dependencies: + inherits: 2.0.4 + string_decoder: 1.2.0 + util-deprecate: 1.0.2 + dev: false + engines: + node: '>= 6' + resolution: + integrity: sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== /readdirp/2.2.1: dependencies: graceful-fs: 4.2.0 @@ -7894,7 +7927,7 @@ packages: dependencies: mkdirp: 0.5.1 open: 6.4.0 - pupa: 2.0.0 + pupa: 2.0.1 rollup: 1.17.0 source-map: 0.7.3 dev: false @@ -8258,13 +8291,13 @@ packages: dev: false resolution: integrity: sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - /source-map-support/0.5.12: + /source-map-support/0.5.13: dependencies: buffer-from: 1.1.1 source-map: 0.6.1 dev: false resolution: - integrity: sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== /source-map-url/0.4.0: dev: false resolution: @@ -8619,7 +8652,7 @@ packages: dev: false resolution: integrity: sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= - /table/5.4.4: + /table/5.4.5: dependencies: ajv: 6.10.2 lodash: 4.17.15 @@ -8629,44 +8662,24 @@ packages: engines: node: '>=6.0.0' resolution: - integrity: sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg== + integrity: sha512-oGa2Hl7CQjfoaogtrOHEJroOcYILTx7BZWLGsJIlzoWmB2zmguhNfPJZsWPKYek/MgCxfco54gEi31d1uN2hFA== /tapable/1.1.3: dev: false engines: node: '>=6' resolution: integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - /temp-dir/1.0.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - /temp-write/3.4.0: + /terser-webpack-plugin/1.4.1_webpack@4.38.0: dependencies: - graceful-fs: 4.2.0 - is-stream: 1.1.0 - make-dir: 1.3.0 - pify: 3.0.0 - temp-dir: 1.0.0 - uuid: 3.3.2 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - /terser-webpack-plugin/1.3.0_webpack@4.38.0: - dependencies: - cacache: 11.3.3 + cacache: 12.0.2 find-cache-dir: 2.1.0 is-wsl: 1.1.0 - loader-utils: 1.2.3 schema-utils: 1.0.0 serialize-javascript: 1.7.0 source-map: 0.6.1 terser: 4.1.2 webpack: 4.38.0_webpack@4.38.0 - webpack-sources: 1.3.0 + webpack-sources: 1.4.1 worker-farm: 1.7.0 dev: false engines: @@ -8674,12 +8687,12 @@ packages: peerDependencies: webpack: ^4.0.0 resolution: - integrity: sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg== + integrity: sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== /terser/4.1.2: dependencies: commander: 2.20.0 source-map: 0.6.1 - source-map-support: 0.5.12 + source-map-support: 0.5.13 dev: false engines: node: '>=6.0.0' @@ -8726,6 +8739,12 @@ packages: dev: false resolution: integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + /through2/3.0.1: + dependencies: + readable-stream: 3.4.0 + dev: false + resolution: + integrity: sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== /time-stamp/1.1.0: dev: false engines: @@ -8873,21 +8892,21 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - /ts-loader/5.4.5_typescript@3.5.3: + /ts-loader/6.0.4_typescript@3.5.3: dependencies: chalk: 2.4.2 enhanced-resolve: 4.1.0 loader-utils: 1.2.3 - micromatch: 3.1.10 - semver: 5.7.0 + micromatch: 4.0.2 + semver: 6.3.0 typescript: 3.5.3 dev: false engines: - node: '>=6.11.5' + node: '>=8.6' peerDependencies: typescript: '*' resolution: - integrity: sha512-XYsjfnRQCBum9AMRZpk2rTYSVpdZBpZK+kDh0TeT3kxmQNBDVIeUjdPjY5RZry4eIAb8XHc4gYSUiUWPYvzSRw== + integrity: sha512-p2zJYe7OtwR+49kv4gs7v4dMrfYD1IPpOtqiSPCbe8oR+4zEBtdHwzM7A7M91F+suReqgzZrlClk4LRSSp882g== /ts-mocha/6.0.0_mocha@5.2.0: dependencies: mocha: 5.2.0 @@ -8910,7 +8929,7 @@ packages: make-error: 1.3.5 minimist: 1.2.0 mkdirp: 0.5.1 - source-map-support: 0.5.12 + source-map-support: 0.5.13 yn: 2.0.0 dev: false engines: @@ -9161,6 +9180,16 @@ packages: dev: false resolution: integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + /util/0.12.1: + dependencies: + inherits: 2.0.4 + is-arguments: 1.0.4 + is-generator-function: 1.0.7 + object.entries: 1.1.0 + safe-buffer: 5.2.0 + dev: false + resolution: + integrity: sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ== /utils-merge/1.0.1: dev: false engines: @@ -9343,13 +9372,13 @@ packages: node: '>= 6' resolution: integrity: sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - /webpack-sources/1.3.0: + /webpack-sources/1.4.1: dependencies: source-list-map: 2.0.1 source-map: 0.6.1 dev: false resolution: - integrity: sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== + integrity: sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q== /webpack/4.38.0_webpack@4.38.0: dependencies: '@webassemblyjs/ast': 1.8.5 @@ -9372,9 +9401,9 @@ packages: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.3.0_webpack@4.38.0 + terser-webpack-plugin: 1.4.1_webpack@4.38.0 watchpack: 1.6.0 - webpack-sources: 1.3.0 + webpack-sources: 1.4.1 dev: false engines: node: '>=6.11.5' @@ -9543,12 +9572,6 @@ packages: dev: false resolution: integrity: sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - /yargs-parser/10.1.0: - dependencies: - camelcase: 4.1.0 - dev: false - resolution: - integrity: sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== /yargs-parser/13.1.1: dependencies: camelcase: 5.3.1 @@ -9719,12 +9742,13 @@ packages: dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-+6kIsx32k7nlN6uAwPS4JOrdVH8CuciXwOqL6DFCDjBdaJhMZ85z/WxMlAtLl/rNxgXlU41Ev3roYTR6U4g+Sw== + integrity: sha512-2+IDAPkc8w6F7v+Qtv+0QlKup7BbSj9/FJRqus2Fv6lv4Qwfhhl1dII2Ttv0Y3D1jF0IlqOecuzEef9zxLc/jA== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.0 @@ -9734,7 +9758,7 @@ packages: '@types/jssha': 2.0.0 '@types/mocha': 5.2.7 '@types/node': 8.10.51 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 @@ -9744,7 +9768,7 @@ packages: chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -9784,12 +9808,12 @@ packages: tslib: 1.10.0 typescript: 3.5.3 url: 0.11.0 - util: 0.11.1 + util: 0.12.1 ws: 6.2.1 dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-VsY0rKG2P16oVijIPCijrhFz7hYGkc7lL/CEXM6RTJ3ls/LGs/E5b8wJuiGiWl1daDPGtc4SPQYBCh9m9VMbPg== + integrity: sha512-5ARKdRpu7sUJLZquQZ7Dw9pBq+yA8U/S32ECIsKXgHb7bbRcJIBanfbiF0YqSVt9uIX8xHeyPA3SUFJdm6PtUg== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': @@ -9811,14 +9835,12 @@ packages: mocha-multi-reporters: 1.1.7 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 rimraf: 2.6.3 rollup: 1.17.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 shx: 0.3.2 - ts-loader: 5.4.5_typescript@3.5.3 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -9827,7 +9849,7 @@ packages: dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-9YUKGvAJqpqJ1OBnZ80TGWf2k5LwlQAWgBpcaxHxAIJ+z3Bb1ZoZFZOMqon7EIRsVNpdAt4M1KVqZSnRv6N2SQ== + integrity: sha512-h+mpJ/FL0Zt3ea/pGEwnk+ZaqwoeXh9W2tWOPMnjCSzrH7GSHnbaLl/dU+svMeag5MdoeBmiUppFdBWPtuu9eQ== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': @@ -9846,7 +9868,7 @@ packages: dev: false name: '@rush-temp/core-asynciterator-polyfill' resolution: - integrity: sha512-v2OkkGp4BscubKnr7qikdSqLJttDTy5skuwpX+KeQv9H5aMDtfGU4CKUmqdwGsI/+vnXlPU57ZBVJ0BtucQBng== + integrity: sha512-oJErNaXrpCzEEVyYVvv8gcBRnv36c76LBxalfW/l4wlABmUh9u+EuvwI46ig0V3m1bmIluW4S/9O08nO18uyGw== tarball: 'file:projects/core-asynciterator-polyfill.tgz' version: 0.0.0 'file:projects/core-auth.tgz': @@ -9882,15 +9904,16 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-oIG+pWtdToJ12ubczgGEAYEOBnE88rHXfw4CpDaPYV1DOhdRQ95ZCvcZ1LXAU0ov2OsyOTUrzXq7cl06hmCWUg== + integrity: sha512-3A4yvJDci4zsEaNhc5KDCr0gAwjKpH9EWw+pU1s6orOqh4RcEpssVPmUFoNKPk7+qDMRqS/IhAvWAjIgiI+Dag== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': dependencies: + '@azure/core-auth': 1.0.0-preview.1 '@azure/logger-js': 1.3.2 '@types/chai': 4.1.7 '@types/express': 4.17.0 @@ -9899,9 +9922,9 @@ packages: '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@types/semver': 5.5.0 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@types/tough-cookie': 2.3.5 - '@types/tunnel': 0.0.0 + '@types/tunnel': 0.0.1 '@types/uuid': 3.4.5 '@types/webpack': 4.32.1 '@types/webpack-dev-middleware': 2.0.3 @@ -9935,7 +9958,6 @@ packages: mocha-multi-reporters: 1.1.7 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 process: 0.11.10 puppeteer: 1.19.0 rimraf: 2.6.3 @@ -9951,8 +9973,8 @@ packages: semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 - tough-cookie: 2.5.0 - ts-loader: 5.4.5_typescript@3.5.3 + tough-cookie: 3.0.1 + ts-loader: 6.0.4_typescript@3.5.3 ts-node: 7.0.1 tslib: 1.10.0 tunnel: 0.0.6 @@ -9968,7 +9990,7 @@ packages: dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-Fycn4IMExj6fHlcivPijmzjgNVpZb3IYFrAHGgrIHOCKi+4Z36IQaI2YsakxKwFmMqFvb2iHX7H2m3gSsp/xcQ== + integrity: sha512-N/NX4ok47ug/na0c62L9AVo+0MdHr7R9q16LPYHcxCo63EcciMnGi8GUfFIFWK5fTtECdB+ZSISisOZMhEg6dA== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-paging.tgz': @@ -9988,7 +10010,7 @@ packages: dev: false name: '@rush-temp/core-paging' resolution: - integrity: sha512-2u4fno6260w1XLYISrBU+SlPSNrMlY9/Au3oQxjk4EzkWkZXOuDrC9WKNu5w0EHEktYtOi8eX9lAU9+JtZR3Hg== + integrity: sha512-MTsl2eG0FXkUyouQVkSEpgLuG6tNUKE8ckhH8y4B3VUevh/MOS/ghpCqXFRKEAMF7jVfB1s2BSSorGYFuWlcDg== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -9997,8 +10019,8 @@ packages: '@types/node': 8.10.51 '@types/priorityqueuejs': 1.0.1 '@types/semaphore': 1.1.0 - '@types/sinon': 5.0.7 - '@types/tunnel': 0.0.0 + '@types/sinon': 7.0.13 + '@types/tunnel': 0.0.1 '@types/underscore': 1.9.2 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 @@ -10030,7 +10052,7 @@ packages: dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-f7IyBbSYkZZ+guO7QopSGUb/7d5QYQiotA3hWoIvC0iUo4XhGa+DqlnQ/yn5zx+p8ogWU8pvIixA8GQU4nMUfA== + integrity: sha512-RgTQjcsHb4jzSrt1mYXxJpL8JPGHMExoXAJSGtLIPN4Vj+S9vxuqdgf/vPBqr+vNl2otvdEMasEX0/F5hhY/GA== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/event-hubs.tgz': @@ -10058,7 +10080,7 @@ packages: chai-string: 1.5.0_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10106,7 +10128,7 @@ packages: dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-EZIDJEYo9XVXr67t/WXgRq5lTzd3MTHb9QWJh4W1gSs00mYjvECsUBLR1gaLFUKKgUbxD5LhHCF3RncAnSmwAA== + integrity: sha512-YI3xKLnd3MkrHU3jKg0o9hwRWqxr7Rrie5irJpZIc/WbTOZxugllxYKOo44LmCkLgaw1/dUHm4k5kr8fgXPq8A== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -10133,7 +10155,7 @@ packages: chai-string: 1.5.0_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10164,7 +10186,7 @@ packages: dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-61Ultc6G27j08ScxQ+P74F49NcOdbgfBBYDyohrr50iQ8TxGI6GX661E6ryHllObZB0NM+r96aChe2W9P/WyCg== + integrity: sha512-pCHa7gfFwSGhUdYTEOTi29ju3u19hchXhPvyKVCuY5PXrYUEd2U6XikvFs5QCdcDNT4417vO3P7fBQdNnppbpw== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/identity.tgz': @@ -10210,12 +10232,12 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 uuid: 3.3.2 dev: false name: '@rush-temp/identity' resolution: - integrity: sha512-Jo3h3GHu1DGCFEz+zAYytqJfH+CqJGOQJETkQS3KfQeT1zFLHEPA5XEMnczQ4WAqsfYI2d7aJiis57NkuiZUFA== + integrity: sha512-OCuCwMq/7z9NlL+LSZk4XXQ5HOkaafysxr4cEwmsn5lS5cEeGjotLokWr6AawJXfkC32jo9qLdLEYSMKQQ0KcQ== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': @@ -10244,7 +10266,7 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-0Rr3TCScxlCMTaQ42DE3wAzan3NPSnborTqYIH8v/tJnxaFbjfD15Z0x2qGdmpn6Rs+45kG26uwKeG14AxtNPA== + integrity: sha512-QXnSrcEl4SWcc1wYPRy2BeupDtio52G/miaEJAgse04u88EeU5YoZpQNtZ9l2rzpd/wuJmB2GMkVgUXRnB6zgg== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-keys.tgz': @@ -10254,7 +10276,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10265,14 +10287,14 @@ packages: assert: 1.5.0 chai: 4.2.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 karma: 4.2.0 karma-chrome-launcher: 2.2.0 karma-coverage: 1.1.2 @@ -10305,7 +10327,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + source-map-support: 0.5.13 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -10313,7 +10335,7 @@ packages: dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-1LG76xEV+Au4m4UWojUPbVrOzIRQwUCIFKCat3SnhecAKaclpisUV9jZi0QtMWrdldxyKrpLXv1NoGEO0gKR0A== + integrity: sha512-GTQM+glliP/d7vxPSkXYr+h/mCWBAo8KdWEuGHgrnDj8ngOlcJbiORLMpD9aRBan38Jb+rgBSU5j0w8Gwu8oKA== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': @@ -10323,7 +10345,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10334,14 +10356,14 @@ packages: assert: 1.5.0 chai: 4.2.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 karma: 4.2.0 karma-chrome-launcher: 2.2.0 karma-coverage: 1.1.2 @@ -10374,7 +10396,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + source-map-support: 0.5.13 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -10382,7 +10404,7 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-2BkoWHCHM7mwug++tnAJT11TU1o5itq5prJqfjeLOrhrUWieS6GPpwveClcV6CHXGIiZjJ5O0XITdt0/hOPDwA== + integrity: sha512-e+a+ULs+RLtRRqV/FDghXuuoV2d3jsgArafnFd8tE348UWkqrGmI2N6lcOkBHpQ5+mSSCpl3wT0ayC+wmlmM+Q== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/service-bus.tgz': @@ -10410,7 +10432,7 @@ packages: cross-env: 5.2.0 debug: 3.2.6 delay: 4.3.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10460,15 +10482,15 @@ packages: dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-CXD8nf7msxREoaGxjqroFnPJ2h685ONI1KTzp3NLawORv7wJy6OD/KtoAlRSW9gvc0njwaRgiM/HihWLsBzivg== + integrity: sha512-tUY+4clZnQdMrD7mpzAxW/GBUiNStACPr/wk/ToXS08V/yRAXMHi7ljcNdMuZbkyBn3/nifiOlhjgsLnoQ7omQ== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': dependencies: - '@azure/ms-rest-js': 2.0.3 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10478,7 +10500,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10487,9 +10509,9 @@ packages: eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 events: 3.0.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 karma-chrome-launcher: 2.2.0 @@ -10523,23 +10545,23 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-rAKd6l+SZnmTB90UeFJ9QuyO+qEENo84HxkI3WDh7jkJoPl4GrKCGqIN4Wa1e6yZTvacXA+0FkXPKPAMoudz7g== + integrity: sha512-HjEUL9dhBjgba7hXKV9x6Tb4h1Qp1bZTJ31OIEzlnqgc2pHpQuv8kbh3ZAPSA6DbH8YNc+2Am7Z7rFYWOvJtHQ== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file.tgz': dependencies: - '@azure/ms-rest-js': 2.0.3 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10549,7 +10571,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10558,9 +10580,9 @@ packages: eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 events: 3.0.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 karma-chrome-launcher: 2.2.0 @@ -10594,23 +10616,23 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-file' resolution: - integrity: sha512-KuevB5Q7BkW92XIGBpLmUnLQTFSDLlOdlDHeDQD3Miz7rp+R5xIAypxbzX0g02SoEx6Sn924hUmYy7uEZTc5kQ== + integrity: sha512-bRyE0Ed4FzqGxUHMrEUI/lygBbbjOC1jxfnbRtYODlCcCzgCmVtgwLObbo+FcuT6GxG9ZcCESjID6h/EuorllQ== tarball: 'file:projects/storage-file.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: - '@azure/ms-rest-js': 2.0.3 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10620,7 +10642,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10628,9 +10650,9 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 karma-chrome-launcher: 2.2.0 @@ -10664,20 +10686,19 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-RR3iZUa7RTVgQ1nLR61smd8m7nFDZfTXtghHKlJZ+lf/Szae5++8Tpm4edrABKCCNhkzBGzVPZB7xBxklHl7Lw== + integrity: sha512-9xaNXDS3q2AZRVJJsskWabT27QuDc4V3F7bJ97i2fUpBHEM1gzSI2p+LTHSvuw2P2AcT4Q9VSiJS2t1BFWncUg== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': dependencies: - '@azure/ms-rest-js': 1.8.13 '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 @@ -10720,11 +10741,11 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/template' resolution: - integrity: sha512-bkijVcpP7T7f+wl0fsgoWt23POw1yTKtlxF9Zua6ZmN64A80PK2eYV5i3NQ6O8W8GcQ9wEmZembE90TbegjEZQ== + integrity: sha512-vjwXidhvwZKemAOYjKCZP9El5ZmQBzYZ4LP5fBvYa/KfD24X1o8x5/1ns4/kQHXnsgUtbjsm9Kd3M8wrB7nnWA== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/testhub.tgz': @@ -10749,17 +10770,20 @@ packages: dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-uQ91pvb6TuE26BO2DT8IQHUmfgKFtLZ8jywOUsTLTjCFHboNdq5uXcd7+RBY+CSGrnr/CwTs3d262Jt11jj7LA== + integrity: sha512-rdhMvXi7mvg+wP0vVdqhouZr17v9a3n4KDMSyuUPU9qhOvY6bMfqoeIXrzgWkCXtR9yjL15gwJHKWsBlByGE4A== tarball: 'file:projects/testhub.tgz' version: 0.0.0 +registry: '' specifiers: '@azure/abort-controller': 1.0.0-preview.1 '@azure/amqp-common': 1.0.0-preview.6 '@azure/arm-servicebus': ^3.2.0 '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 '@azure/event-hubs': ^2.1.1 '@azure/logger-js': ^1.0.2 + '@azure/ms-rest-js': ^2.0.0 '@azure/ms-rest-nodeauth': ^0.9.2 '@microsoft/api-extractor': ^7.1.5 '@rush-temp/abort-controller': 'file:./projects/abort-controller.tgz' @@ -10789,7 +10813,7 @@ specifiers: '@types/debug': ^0.0.31 '@types/dotenv': ^6.1.0 '@types/express': ^4.16.0 - '@types/fs-extra': ~7.0.0 + '@types/fs-extra': ^8.0.0 '@types/glob': ^7.1.1 '@types/is-buffer': ^2.0.0 '@types/jssha': ^2.0.0 @@ -10805,9 +10829,9 @@ specifiers: '@types/query-string': 6.2.0 '@types/semaphore': ^1.1.0 '@types/semver': ^5.5.0 - '@types/sinon': ^5.0.5 - '@types/tough-cookie': ^2.3.3 - '@types/tunnel': ^0.0.0 + '@types/sinon': ^7.0.13 + '@types/tough-cookie': ^2.3.5 + '@types/tunnel': ^0.0.1 '@types/underscore': ^1.8.8 '@types/uuid': ^3.4.3 '@types/webpack': ^4.4.13 @@ -10833,7 +10857,7 @@ specifiers: death: ^1.1.0 debug: ^3.1.0 delay: ^4.2.0 - dotenv: ^7.0.0 + dotenv: ^8.0.0 es6-promise: ^4.2.5 eslint: ^5.16.0 eslint-config-prettier: ^4.2.0 @@ -10845,10 +10869,10 @@ specifiers: execa: 1.0.0 express: ^4.16.3 form-data: ^2.5.0 - fs-extra: ~8.0.1 + fs-extra: ^8.1.0 glob: ^7.1.2 gulp: ^4.0.0 - gulp-zip: ^4.2.0 + gulp-zip: ^5.0.0 https-proxy-agent: ^2.2.1 inherits: ^2.0.3 is-buffer: ^2.0.3 @@ -10885,7 +10909,6 @@ specifiers: nock: ^10.0.6 npm-run-all: ^4.1.5 nyc: ^14.0.0 - opn-cli: ^4.0.0 path-browserify: ^1.0.0 prettier: ^1.16.4 priorityqueuejs: 1.0.0 @@ -10920,16 +10943,16 @@ specifiers: source-map-support: ^0.5.9 stream-browserify: ^2.0.2 stream-http: ^2.8.3 - tough-cookie: ^2.4.3 - ts-loader: ^5.3.1 + tough-cookie: ^3.0.1 + ts-loader: ^6.0.4 ts-mocha: ^6.0.0 ts-node: ^7.0.1 tslib: ^1.9.3 - tunnel: 0.0.6 + tunnel: ^0.0.6 typescript: ^3.2.2 uglify-js: ^3.4.9 url: ^0.11.0 - util: ^0.11.1 + util: ^0.12.1 uuid: ^3.3.2 webpack: ^4.16.3 webpack-cli: ^3.2.3 diff --git a/eng/tools/analyze-deps/deps.html.hbs b/eng/tools/analyze-deps/deps.html.hbs new file mode 100644 index 00000000000..b24b7481187 --- /dev/null +++ b/eng/tools/analyze-deps/deps.html.hbs @@ -0,0 +1,220 @@ + + + + + {{ capitalize repo_name }} Dependency Report + + + + + +
+

{{ capitalize repo_name }} Dependency Report

+

+ Generated at {{ curtime }} + {{#if release}} + for release {{ release }} + {{else if build}} + for build {{ build }} + {{#if branch}} +
from branch {{ branch }} + {{#if isfork}} + in repo {{ repo }} + {{/if}} + {{/if}} + {{#if commit}} + ({{ truncate commit 7 }}) + {{/if}} + {{/if}} +

+

+ {{ sub (len dependencies) (len external) }} internal and {{ len external }} external package {{ pluralize (len dependencies) 'dependency was' 'dependencies were' }} analyzed to determine if any packages declare inconsistent dependency versions.
+ {{#if inconsistent}} + {{ len inconsistent }} inconsistent package dependency {{ pluralize (len inconsistent) 'version was' 'versions were' }} discovered.

+ {{else}} + No inconsistent package dependency versions were discovered.

+ {{/if}} +
This report scanned {{ len packages }} {{ pluralize (len packages) 'package' 'packages' }}. +

+ + {{#each (sorted dependencies) as |dep|}} + + + + {{#if @first}} + + + + {{/if}} + + + + + + {{#each (sorted dep.[1]) as |spec|}} + + + + + {{/each}} + +
Dependencies Discovered in Packages
{{ title (dep_type dep.[0]) }} Dependency: {{ dep.[0] }}
{{ default spec.[0] '(empty)' }} + {{#each (sorted spec.[1]) as |package|}} + {{ package.[0] }} {{ package.[1] }}
+ {{/each}} +
+
+ {{/each}} +

+


+
+ + + + + + + + + + + + + {{#each (sorted packages) as |entry|}} + + + + + + {{/each}} + +
Packages Scanned for this Report
Package AnalyzedPackage VersionPackage Source
{{ entry.[0] }}{{ entry.[1].ver }}{{ entry.[1].src }}
+
+ + + diff --git a/eng/tools/analyze-deps/index.js b/eng/tools/analyze-deps/index.js new file mode 100644 index 00000000000..7bfdda40fa7 --- /dev/null +++ b/eng/tools/analyze-deps/index.js @@ -0,0 +1,237 @@ +const Buffer = require("buffer").Buffer; +const fs = require("fs"); +const path = require("path"); +const process = require("process"); +const util = require("util"); + +const argparse = require("argparse"); +const Handlebars = require("handlebars"); +const jju = require("jju"); +const tar = require("tar"); + +const readdir = util.promisify(fs.readdir); +const readFile = util.promisify(fs.readFile); +const writeFile = util.promisify(fs.writeFile); + +const appendPackageData = (data, pkgSrc, pkgJson) => { + data[pkgJson.name] = { + src: pkgSrc, + ver: pkgJson.version, + run: pkgJson.dependencies, + dev: pkgJson.devDependencies, + peer: pkgJson.peerDependencies + }; +}; + +const getRushPackages = async (rushPath) => { + const baseDir = path.dirname(rushPath); + const rushJson = jju.parse(await readFile(rushPath, "utf8")); + const packageData = {}; + + for (const proj of rushJson.projects) { + const projDir = path.join(baseDir, proj.projectFolder); + const packageJson = jju.parse(await readFile(path.join(projDir, "package.json"), "utf8")); + appendPackageData(packageData, projDir, packageJson); + } + + return packageData; +}; + +const readCompressedFile = async (archivePath, filePath, encoding) => { + const data = []; + let processed = false; + + await tar.t( + { + file: archivePath, + onentry: (entry) => { + if (!processed) { + processed = true; + entry.on("data", (c) => { + data.push(c); + }); + } + } + }, + [filePath] + ); + + if (data) { + return Buffer.concat(data).toString(encoding); + } else { + return undefined; + } +}; + +const getTarballPackages = async (tarballDir) => { + const files = await readdir(tarballDir); + const packageData = {}; + + for (const file of files) { + const filePath = path.join(tarballDir, file); + if (path.extname(filePath).toLowerCase() === ".tgz") { + const packageJson = jju.parse( + await readCompressedFile(filePath, "package/package.json", "utf8") + ); + appendPackageData(packageData, filePath, packageJson); + } + } + return packageData; +}; + +const render = async (context, dest) => { + context.repo_name = "azure-sdk-for-js"; + context.branch = + process.env.SYSTEM_PULLREQUEST_SOURCEBRANCH || process.env.BUILD_SOURCEBRANCHNAME; + context.build = process.env.BUILD_BUILDNUMBER; + context.build_url = `${process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${process.env.SYSTEM_TEAMPROJECT}/_build/results?buildId=${process.env.BUILD_BUILDID}`; + context.commit = process.env.BUILD_SOURCEVERSION; + context.isfork = process.env.SYSTEM_PULLREQUEST_ISFORK === "True"; + context.rel_url = process.env.RELEASE_RELEASEWEBURL; + context.release = process.env.RELEASE_RELEASENAME; + context.repo = context.isfork ? process.env.BUILD_REPOSITORY_NAME : `Azure/${context.repo_name}`; + context.curtime = new Date().toISOString(); + + Handlebars.registerHelper({ + and: (a, b) => a && b, + capitalize: (s) => new Handlebars.SafeString(s ? s.charAt(0).toUpperCase() + s.slice(1) : ""), + contains: (c, i) => (typeof c.includes === "function" ? c.includes(i) : i in c), + default: (s, def) => new Handlebars.SafeString(s ? s : def), + dep_type: (p) => { + const ret = []; + if (context.inconsistent.includes(p)) { + ret.push("inconsistent"); + } + if (context.external.includes(p)) { + ret.push("external"); + } else { + ret.push("internal"); + } + return ret.join(" "); + }, + len: (c) => (typeof c.length === "number" ? c.length : Object.keys(c).length), + ne: (a, b) => a !== b, + or: (a, b) => a || b, + pluralize: (num, singular, plural) => new Handlebars.SafeString(num === 1 ? singular : plural), + sorted: (c) => (typeof c.sort === "function" ? c.sort() : Object.entries(c).sort()), + sub: (a, b) => a - b, + title: (s) => new Handlebars.SafeString(s ? s.replace(/\b\S/g, (t) => t.toUpperCase()) : ""), + truncate: (s, len) => new Handlebars.SafeString(s.substr(0, len)) + }); + + const template = await readFile("deps.html.hbs", "utf8"); + return writeFile(dest, Handlebars.compile(template)(context)); +}; + +const appendDependencyData = (dependencies, dep, spec, package, depType) => { + if (!dependencies[dep]) { + dependencies[dep] = {}; + } + if (!dependencies[dep][spec]) { + dependencies[dep][spec] = []; + } + dependencies[dep][spec].push([package, depType]); +}; + +const constructDeps = (pkgs) => { + const dependencies = {}; + + for (const [name, data] of Object.entries(pkgs)) { + for (const [dep, spec] of Object.entries(data.run || {})) { + appendDependencyData(dependencies, dep, spec, name, "runtime"); + } + for (const [dep, spec] of Object.entries(data.dev || {})) { + appendDependencyData(dependencies, dep, spec, name, "dev"); + } + for (const [dep, spec] of Object.entries(data.peer || {})) { + appendDependencyData(dependencies, dep, spec, name, "peer"); + } + } + + return dependencies; +}; + +const main = async () => { + const parser = new argparse.ArgumentParser({ + prog: "analyze-deps", + description: "Analyze dependencies in NodeJS packages." + }); + parser.addArgument("--verbose", { help: "verbose output", action: "storeTrue" }); + parser.addArgument("--out", { metavar: "FILE", help: "write HTML-formatted report to FILE" }); + parser.addArgument("--packdir", { + metavar: "DIR", + help: "analyze packed tarballs in DIR rather than source packages in this repository" + }); + const args = parser.parseArgs(); + + const context = { + packages: {}, + dependencies: {}, + external: [], + inconsistent: [] + }; + + const rushPackages = await getRushPackages(path.resolve(`${__dirname}/../../../rush.json`)); + context.packages = args.packdir + ? await getTarballPackages(path.resolve(args.packdir)) + : rushPackages; + context.dependencies = constructDeps(context.packages); + context.external = Object.keys(context.dependencies).filter((p) => !(p in rushPackages)); + context.inconsistent = Object.keys(context.dependencies).filter( + (p) => Object.keys(context.dependencies[p]).length > 1 + ); + + if (args.verbose) { + console.log("Packages analyzed:"); + for (const package of Object.keys(context.packages).sort()) { + const info = context.packages[package]; + console.log(`${package} ${info.ver}`); + console.log(` from ${info.src}`); + } + + console.log("\nDependencies discovered:"); + for (const dep of Object.keys(context.dependencies).sort()) { + const info = context.dependencies[dep]; + console.log(`${dep}`); + for (const ver of Object.keys(info).sort()) { + const pkgs = info[ver]; + console.log(`${ver}`); + for (const pkg of pkgs.sort()) { + console.log(` * ${pkg[0]} (${pkg[1]})`); + } + } + console.log(""); + } + + for (const inc of context.inconsistent) { + const info = context.dependencies[inc]; + const vers = Object.keys(info).sort(); + console.log(`\nDependency '${inc}' has ${vers.length} unique specifiers:`); + for (const ver of vers.sort()) { + const pkgs = info[ver]; + console.log(`'${ver}'`); + console.log(`${"-".repeat(ver.length + 2)}`); + for (const pkg of pkgs.sort()) { + console.log(` * ${pkg[0]} (${pkg[1]})`); + } + console.log(""); + } + } + } + + if (context.inconsistent.length > 0) { + if (!args.verbose) { + console.log( + "Incompatible dependency versions detected in libraries, run this script with --verbose for details" + ); + } + } else { + console.log("All library dependencies verified, no incompatible versions detected"); + } + + if (args.out) { + await render(context, args.out); + } +}; + +main(); diff --git a/eng/tools/analyze-deps/package-lock.json b/eng/tools/analyze-deps/package-lock.json new file mode 100644 index 00000000000..c69535dd97f --- /dev/null +++ b/eng/tools/analyze-deps/package-lock.json @@ -0,0 +1,170 @@ +{ + "name": "analyze-deps", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "chownr": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", + "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==" + }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "optional": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "fs-minipass": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", + "requires": { + "minipass": "^2.2.1" + } + }, + "handlebars": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "tar": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "uglify-js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "optional": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + } + } +} diff --git a/eng/tools/analyze-deps/package.json b/eng/tools/analyze-deps/package.json new file mode 100644 index 00000000000..9625eb69533 --- /dev/null +++ b/eng/tools/analyze-deps/package.json @@ -0,0 +1,19 @@ +{ + "name": "analyze-deps", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "analyze-deps": "node index.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "argparse": "^1.0.10", + "handlebars": "^4.1.2", + "jju": "^1.4.0", + "js-yaml": "^3.13.1", + "semver": "^6.2.0", + "tar": "^4.4.10" + } +} diff --git a/sdk/core/core-amqp/changelog.md b/sdk/core/core-amqp/changelog.md index f27c5b4c337..6fe74f59aed 100644 --- a/sdk/core/core-amqp/changelog.md +++ b/sdk/core/core-amqp/changelog.md @@ -1,3 +1,7 @@ +## 1.0.0-preview.2.0 - Coming soon... + +- `sendRequest()` function in the `RequestResponseLink` now excludes default retries and leaves it up to the users to implement it as necessary. + ## 1.0.0-preview.1.0 - 28th June, 2019 This library is based off of the [@azure/amqp-common](https://www.npmjs.com/package/@azure/amqp-common) diff --git a/sdk/core/core-amqp/package.json b/sdk/core/core-amqp/package.json index 13b82d121fe..a6313bb76e6 100644 --- a/sdk/core/core-amqp/package.json +++ b/sdk/core/core-amqp/package.json @@ -66,7 +66,7 @@ "stream-browserify": "^2.0.2", "tslib": "^1.9.3", "url": "^0.11.0", - "util": "^0.11.1" + "util": "^0.12.1" }, "peerDependencies": { "rhea-promise": "^1.0.0" @@ -80,14 +80,14 @@ "@types/jssha": "^2.0.0", "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", - "@types/sinon": "^5.0.5", + "@types/sinon": "^7.0.13", "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", "assert": "^1.4.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", diff --git a/sdk/core/core-amqp/src/ConnectionContextBase.ts b/sdk/core/core-amqp/src/ConnectionContextBase.ts index 6cf827519c4..f095693dff6 100644 --- a/sdk/core/core-amqp/src/ConnectionContextBase.ts +++ b/sdk/core/core-amqp/src/ConnectionContextBase.ts @@ -117,11 +117,11 @@ export interface CreateConnectionContextBaseParameters { */ isEntityPathRequired?: boolean; /** - * @property {number} [operationTimeoutInSeconds] - The duration in which the promise should + * @property {number} [operationTimeoutInMs] - The duration in which the promise should * complete (resolve/reject). If it is not completed, then the Promise will be rejected after - * timeout occurs. Default: `60 seconds`. + * timeout occurs. Default: `60000 milliseconds`. */ - operationTimeoutInSeconds?: number; + operationTimeoutInMs?: number; } export module ConnectionContextBase { @@ -156,7 +156,9 @@ export module ConnectionContextBase { platform: `(${os.arch()}-${os.type()}-${os.release()})`, framework: `Node/${process.version}` }, - operationTimeoutInSeconds: parameters.operationTimeoutInSeconds + operationTimeoutInSeconds: parameters.operationTimeoutInMs + ? parameters.operationTimeoutInMs / 1000 + : undefined }; if ( diff --git a/sdk/core/core-amqp/src/requestResponseLink.ts b/sdk/core/core-amqp/src/requestResponseLink.ts index 1b3e18a25b8..cd74a547309 100644 --- a/sdk/core/core-amqp/src/requestResponseLink.ts +++ b/sdk/core/core-amqp/src/requestResponseLink.ts @@ -3,7 +3,6 @@ import { AbortSignalLike, AbortError } from "@azure/abort-controller"; import * as Constants from "./util/constants"; -import { retry, RetryConfig, RetryOperationType } from "./retry"; import { Session, Connection, @@ -15,8 +14,7 @@ import { SenderOptions, ReceiverOptions, ReceiverEvents, - ReqResLink, - generate_uuid + ReqResLink } from "rhea-promise"; import { translate, ConditionStatusMapper } from "./errors"; import * as log from "./log"; @@ -31,20 +29,10 @@ export interface SendRequestOptions { */ abortSignal?: AbortSignalLike; /** - * @property {number} [timeoutInSeconds] Max time to wait for the operation to complete. - * Default: `10 seconds`. + * @property {number} [timeoutInMs] Max time to wait for the operation to complete. + * Default: `60000 milliseconds`. */ - timeoutInSeconds?: number; - /** - * @property {number} [maxRetries] Number of times the operation needs to be retried in case - * of error. Default: 3. - */ - maxRetries?: number; - /** - * @property {number} [delayInSeconds] Amount of time to wait in seconds before making the - * next attempt. Default: 15. - */ - delayInSeconds?: number; + timeoutInMs?: number; /** * @property {string} [requestName] Name of the request being performed. */ @@ -86,180 +74,153 @@ export class RequestResponseLink implements ReqResLink { /** * Sends the given request message and returns the received response. If the operation is not - * completed in the provided timeout in seconds `default: 10`, then the request will be retried - * linearly for the provided number of times `default: 3` with the provided delay in seconds - * `default: 15` between each attempt. + * completed in the provided timeout in milliseconds `default: 60000`, then `OperationTimeoutError` is thrown. * * @param {Message} request The AMQP (request) message. * @param {SendRequestOptions} [options] Options that can be provided while sending a request. * @returns {Promise} Promise The AMQP (response) message. */ - sendRequest(request: AmqpMessage, options?: SendRequestOptions): Promise { - if (!options) options = {}; - - if (!options.timeoutInSeconds) { - options.timeoutInSeconds = 10; + sendRequest(request: AmqpMessage, options: SendRequestOptions = {}): Promise { + if (!options.timeoutInMs) { + options.timeoutInMs = Constants.defaultOperationTimeoutInMs; } - let count: number = 0; - const aborter: AbortSignalLike | undefined = options && options.abortSignal; + const aborter: AbortSignalLike | undefined = options.abortSignal; - const sendRequestPromise = () => - new Promise((resolve: any, reject: any) => { - let waitTimer: any; - let timeOver: boolean = false; - type NormalizedInfo = { - statusCode: number; - statusDescription: string; - errorCondition: string; - }; + return new Promise((resolve: any, reject: any) => { + let waitTimer: any; + let timeOver: boolean = false; + type NormalizedInfo = { + statusCode: number; + statusDescription: string; + errorCondition: string; + }; - count++; - if (count !== 1) { - // Generate a new message_id every time after the first attempt - request.message_id = generate_uuid(); - } else if (!request.message_id) { - // Set the message_id in the first attempt only if it is not set - request.message_id = generate_uuid(); - } + const rejectOnAbort = () => { + const address = this.receiver.address || "address"; + const requestName = options.requestName; + const desc: string = + `[${this.connection.id}] The request "${requestName}" ` + + `to "${address}" has been cancelled by the user.`; + log.error(desc); + const error = new AbortError( + `The ${requestName ? requestName + " " : ""}operation has been cancelled by the user.` + ); - const rejectOnAbort = () => { - const address = this.receiver.address || "address"; - const requestName = options!.requestName; - const desc: string = - `[${this.connection.id}] The request "${requestName}" ` + - `to "${address}" has been cancelled by the user.`; - log.error(desc); - const error = new AbortError( - `The ${requestName ? requestName + " " : ""}operation has been cancelled by the user.` - ); + reject(error); + }; - reject(error); - }; - - const onAbort = () => { - // remove the event listener as this will be registered next time someone makes a request. - this.receiver.removeListener(ReceiverEvents.message, messageCallback); - // safe to clear the timeout if it hasn't already occurred. - if (!timeOver) { - clearTimeout(waitTimer); - } - aborter!.removeEventListener("abort", onAbort); + const onAbort = () => { + // remove the event listener as this will be registered next time someone makes a request. + this.receiver.removeListener(ReceiverEvents.message, messageCallback); + // safe to clear the timeout if it hasn't already occurred. + if (!timeOver) { + clearTimeout(waitTimer); + } + aborter!.removeEventListener("abort", onAbort); - rejectOnAbort(); - }; + rejectOnAbort(); + }; - if (aborter) { - // the aborter may have been triggered between request attempts - // so check if it was triggered and reject if needed. - if (aborter.aborted) { - return rejectOnAbort(); - } - aborter.addEventListener("abort", onAbort); + if (aborter) { + // the aborter may have been triggered between request attempts + // so check if it was triggered and reject if needed. + if (aborter.aborted) { + return rejectOnAbort(); } + aborter.addEventListener("abort", onAbort); + } - // Handle different variations of property names in responses emitted by EventHubs and ServiceBus. - const getCodeDescriptionAndError = (props: any): NormalizedInfo => { - if (!props) props = {}; - return { - statusCode: (props[Constants.statusCode] || props.statusCode) as number, - statusDescription: (props[Constants.statusDescription] || - props.statusDescription) as string, - errorCondition: (props[Constants.errorCondition] || props.errorCondition) as string - }; + // Handle different variations of property names in responses emitted by EventHubs and ServiceBus. + const getCodeDescriptionAndError = (props: any): NormalizedInfo => { + if (!props) props = {}; + return { + statusCode: (props[Constants.statusCode] || props.statusCode) as number, + statusDescription: (props[Constants.statusDescription] || + props.statusDescription) as string, + errorCondition: (props[Constants.errorCondition] || props.errorCondition) as string }; + }; - const messageCallback = (context: EventContext) => { - // remove the event listeners as they will be registered next time when someone makes a request. - this.receiver.removeListener(ReceiverEvents.message, messageCallback); - if (aborter) { - aborter.removeEventListener("abort", onAbort); - } - const info = getCodeDescriptionAndError(context.message!.application_properties); - const responseCorrelationId = context.message!.correlation_id; - log.reqres( - "[%s] %s response: ", - this.connection.id, - request.to || "$management", - context.message - ); - if (info.statusCode > 199 && info.statusCode < 300) { - if ( - request.message_id === responseCorrelationId || - request.correlation_id === responseCorrelationId - ) { - if (!timeOver) { - clearTimeout(waitTimer); - } - log.reqres( - "[%s] request-messageId | '%s' == '%s' | response-correlationId.", - this.connection.id, - request.message_id, - responseCorrelationId - ); - return resolve(context.message); - } else { - log.error( - "[%s] request-messageId | '%s' != '%s' | response-correlationId. " + - "Hence dropping this response and waiting for the next one.", - this.connection.id, - request.message_id, - responseCorrelationId - ); + const messageCallback = (context: EventContext) => { + // remove the event listeners as they will be registered next time when someone makes a request. + this.receiver.removeListener(ReceiverEvents.message, messageCallback); + if (aborter) { + aborter.removeEventListener("abort", onAbort); + } + const info = getCodeDescriptionAndError(context.message!.application_properties); + const responseCorrelationId = context.message!.correlation_id; + log.reqres( + "[%s] %s response: ", + this.connection.id, + request.to || "$management", + context.message + ); + if (info.statusCode > 199 && info.statusCode < 300) { + if ( + request.message_id === responseCorrelationId || + request.correlation_id === responseCorrelationId + ) { + if (!timeOver) { + clearTimeout(waitTimer); } + log.reqres( + "[%s] request-messageId | '%s' == '%s' | response-correlationId.", + this.connection.id, + request.message_id, + responseCorrelationId + ); + return resolve(context.message); } else { - const condition = - info.errorCondition || - ConditionStatusMapper[info.statusCode] || - "amqp:internal-error"; - const e: AmqpError = { - condition: condition, - description: info.statusDescription - }; - const error = translate(e); - log.error(error); - return reject(error); - } - }; - - const actionAfterTimeout = () => { - timeOver = true; - this.receiver.removeListener(ReceiverEvents.message, messageCallback); - if (aborter) { - aborter.removeEventListener("abort", onAbort); + log.error( + "[%s] request-messageId | '%s' != '%s' | response-correlationId. " + + "Hence dropping this response and waiting for the next one.", + this.connection.id, + request.message_id, + responseCorrelationId + ); } - const address = this.receiver.address || "address"; - const desc: string = - `The request with message_id "${request.message_id}" to "${address}" ` + - `endpoint timed out. Please try again later.`; + } else { + const condition = + info.errorCondition || ConditionStatusMapper[info.statusCode] || "amqp:internal-error"; const e: AmqpError = { - condition: ConditionStatusMapper[408], - description: desc + condition: condition, + description: info.statusDescription }; - return reject(translate(e)); + const error = translate(e); + log.error(error); + return reject(error); + } + }; + + const actionAfterTimeout = () => { + timeOver = true; + this.receiver.removeListener(ReceiverEvents.message, messageCallback); + if (aborter) { + aborter.removeEventListener("abort", onAbort); + } + const address = this.receiver.address || "address"; + const desc: string = + `The request with message_id "${request.message_id}" to "${address}" ` + + `endpoint timed out. Please try again later.`; + const e: Error = { + name: "OperationTimeoutError", + message: desc }; + return reject(translate(e)); + }; - this.receiver.on(ReceiverEvents.message, messageCallback); - waitTimer = setTimeout(actionAfterTimeout, options!.timeoutInSeconds! * 1000); - log.reqres( - "[%s] %s request sent: %O", - this.connection.id, - request.to || "$managment", - request - ); - this.sender.send(request); - }); - const config: RetryConfig = { - operation: sendRequestPromise, - connectionId: this.connection.id, - operationType: - request.to && request.to === Constants.cbsEndpoint - ? RetryOperationType.cbsAuth - : RetryOperationType.management, - delayInSeconds: options.delayInSeconds, - maxRetries: options.maxRetries - }; - return retry(config); + waitTimer = setTimeout(actionAfterTimeout, options.timeoutInMs); + this.receiver.on(ReceiverEvents.message, messageCallback); + + log.reqres( + "[%s] %s request sent: %O", + this.connection.id, + request.to || "$managment", + request + ); + this.sender.send(request); + }); } /** diff --git a/sdk/core/core-amqp/src/retry.ts b/sdk/core/core-amqp/src/retry.ts index adec1cb2bd3..130e88fd0b6 100644 --- a/sdk/core/core-amqp/src/retry.ts +++ b/sdk/core/core-amqp/src/retry.ts @@ -6,7 +6,7 @@ import { delay, isNode } from "./util/utils"; import * as log from "./log"; import { defaultMaxRetries, - defaultDelayBetweenOperationRetriesInSeconds, + defaultDelayBetweenOperationRetriesInMs, defaultMaxDelayForExponentialRetryInMs, defaultMinDelayForExponentialRetryInMs } from "./util/constants"; @@ -79,12 +79,12 @@ export interface RetryConfig { */ maxRetries?: number; /** - * @property {number} [delayInSeconds] Amount of time to wait in seconds before making the - * next attempt. Default: 30. + * @property {number} [delayInMs] Amount of time to wait in milliseconds before making the + * next attempt. Default: `30000 milliseconds`. * When `retryPolicy` option is set to `ExponentialRetryPolicy`, \ * this is used to compute the exponentially increasing delays between retries. */ - delayInSeconds?: number; + delayInMs?: number; /** * @property {string} connectionHost The host ".servicebus.windows.net". * Used to check network connectivity. @@ -160,8 +160,8 @@ export async function retry(config: RetryConfig): Promise { if (config.maxRetries == undefined || config.maxRetries < 0) { config.maxRetries = defaultMaxRetries; } - if (config.delayInSeconds == undefined || config.delayInSeconds < 0) { - config.delayInSeconds = defaultDelayBetweenOperationRetriesInSeconds; + if (config.delayInMs == undefined || config.delayInMs < 0) { + config.delayInMs = defaultDelayBetweenOperationRetriesInMs; } if (config.maxExponentialRetryDelayInMs == undefined || config.maxExponentialRetryDelayInMs < 0) { config.maxExponentialRetryDelayInMs = defaultMaxDelayForExponentialRetryInMs; @@ -169,6 +169,9 @@ export async function retry(config: RetryConfig): Promise { if (config.minExponentialRetryDelayInMs == undefined || config.minExponentialRetryDelayInMs < 0) { config.minExponentialRetryDelayInMs = defaultMinDelayForExponentialRetryInMs; } + if (config.retryPolicy == undefined) { + config.retryPolicy = RetryPolicy.LinearRetryPolicy; + } let lastError: MessagingError | undefined; let result: any; let success = false; @@ -213,12 +216,12 @@ export async function retry(config: RetryConfig): Promise { i, err ); - let targetDelayInMs = config.delayInSeconds; + let targetDelayInMs = config.delayInMs; if (config.retryPolicy === RetryPolicy.ExponentialRetryPolicy) { let incrementDelta = Math.pow(2, i) - 1; const boundedRandDelta = - config.delayInSeconds * 0.8 + - Math.floor(Math.random() * (config.delayInSeconds * 1.2 - config.delayInSeconds * 0.8)); + config.delayInMs * 0.8 + + Math.floor(Math.random() * (config.delayInMs * 1.2 - config.delayInMs * 0.8)); incrementDelta *= boundedRandDelta; targetDelayInMs = Math.min( @@ -229,9 +232,9 @@ export async function retry(config: RetryConfig): Promise { if (lastError && lastError.retryable) { log.error( - "[%s] Sleeping for %d seconds for '%s'.", + "[%s] Sleeping for %d milliseconds for '%s'.", config.connectionId, - targetDelayInMs / 1000, + targetDelayInMs, config.operationType ); await delay(targetDelayInMs); diff --git a/sdk/core/core-amqp/src/util/constants.ts b/sdk/core/core-amqp/src/util/constants.ts index f1992189b18..4a0201408ef 100644 --- a/sdk/core/core-amqp/src/util/constants.ts +++ b/sdk/core/core-amqp/src/util/constants.ts @@ -50,7 +50,7 @@ export const receiverError = "receiver_error"; export const senderError = "sender_error"; export const sessionError = "session_error"; export const connectionError = "connection_error"; -export const defaultOperationTimeoutInSeconds = 60; +export const defaultOperationTimeoutInMs = 60000; export const managementRequestKey = "managementRequest"; export const negotiateCbsKey = "negotiateCbs"; export const negotiateClaim = "negotiateClaim"; @@ -71,13 +71,13 @@ export const maxDurationValue = 922337203685477; export const minDurationValue = -922337203685477; // https://github.com/Azure/azure-amqp/blob/master/Microsoft.Azure.Amqp/Amqp/AmqpConstants.cs#L47 export const maxAbsoluteExpiryTime = new Date("9999-12-31T07:59:59.000Z").getTime(); -export const aadTokenValidityMarginSeconds = 5; +export const aadTokenValidityMarginInMs = 5000; export const connectionReconnectDelay = 300; export const defaultMaxRetries = 3; export const defaultMaxRetriesForConnection = 150; -export const defaultDelayBetweenOperationRetriesInSeconds = 30; -export const defaultMaxDelayForExponentialRetryInMs = 1000 * 90; -export const defaultMinDelayForExponentialRetryInMs = 1000 * 3; +export const defaultDelayBetweenOperationRetriesInMs = 30000; +export const defaultMaxDelayForExponentialRetryInMs = 90000; +export const defaultMinDelayForExponentialRetryInMs = 3000; export const receiverSettleMode = "receiver-settle-mode"; export const dispositionStatus = "disposition-status"; export const fromSequenceNumber = "from-sequence-number"; diff --git a/sdk/core/core-amqp/test/requestResponse.spec.ts b/sdk/core/core-amqp/test/requestResponse.spec.ts index 5dc5a54a8e1..ae4ed033bd8 100644 --- a/sdk/core/core-amqp/test/requestResponse.spec.ts +++ b/sdk/core/core-amqp/test/requestResponse.spec.ts @@ -2,11 +2,18 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import * as assert from "assert"; -import { RequestResponseLink, AmqpMessage, ErrorNameConditionMapper } from "../src"; -import { Connection } from "rhea-promise"; +import { + RequestResponseLink, + AmqpMessage, + ErrorNameConditionMapper, + RetryConfig, + RetryOperationType, + retry +} from "../src"; +import { Connection, Message } from "rhea-promise"; import { stub } from "sinon"; import EventEmitter from "events"; -import { AbortController } from "@azure/abort-controller"; +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; describe("RequestResponseLink", function() { it("should send a request and receive a response correctly", async function() { @@ -27,7 +34,7 @@ describe("RequestResponseLink", function() { createReceiver: () => { return Promise.resolve(rcvr); } - }); + } as any); const sessionStub = await connectionStub.createSession(); const senderStub = await sessionStub.createSender(); const receiverStub = await sessionStub.createReceiver(); @@ -53,11 +60,11 @@ describe("RequestResponseLink", function() { assert.equal(response.correlation_id, req.message_id); }); - it("should send a request and receive a response correctly", async function() { + it("should surface error up through retry", async function() { const connectionStub = stub(new Connection()); const rcvr = new EventEmitter(); let messageId: string = ""; - let counter = 0; + let count = 0; connectionStub.createSession.resolves({ connection: { id: "connection-1" @@ -65,12 +72,7 @@ describe("RequestResponseLink", function() { createSender: () => { return Promise.resolve({ send: (request: any) => { - counter++; - if (counter != 1) { - assert.notEqual(messageId, undefined); - assert.notEqual(request.message_id, undefined); - assert.notEqual(messageId, request.message_id); - } + count++; messageId = request.message_id; } }); @@ -78,7 +80,7 @@ describe("RequestResponseLink", function() { createReceiver: () => { return Promise.resolve(rcvr); } - }); + } as any); const sessionStub = await connectionStub.createSession(); const senderStub = await sessionStub.createSender(); const receiverStub = await sessionStub.createReceiver(); @@ -98,7 +100,7 @@ describe("RequestResponseLink", function() { } } }); - }, 2000); + }, 200); setTimeout(() => { rcvr.emit("message", { message: { @@ -112,12 +114,26 @@ describe("RequestResponseLink", function() { body: "Hello World!!" } }); - }, 4000); - const response = await link.sendRequest(request, { - delayInSeconds: 1, - timeoutInSeconds: 5 - }); - assert.equal(response.correlation_id, messageId); + }, 2000); + + const sendRequestPromise = async (): Promise => { + return await link.sendRequest(request, { + timeoutInMs: 5000 + }); + }; + + const config: RetryConfig = { + operation: sendRequestPromise, + connectionId: "connection-1", + operationType: RetryOperationType.management, + maxRetries: 3, + delayInMs: 1000 + }; + + const message = await retry(config); + assert.equal(count, 2, "It should retry twice"); + assert.equal(message == undefined, false, "It should return a valid message"); + assert.equal(message.body, "Hello World!!", `Message '${message.body}' is not as expected`); }); it("should abort a request and response correctly", async function() { @@ -138,7 +154,7 @@ describe("RequestResponseLink", function() { createReceiver: () => { return Promise.resolve(rcvr); } - }); + } as any); const sessionStub = await connectionStub.createSession(); const senderStub = await sessionStub.createSender(); const receiverStub = await sessionStub.createReceiver(); @@ -171,15 +187,19 @@ describe("RequestResponseLink", function() { /The foo operation has been cancelled by the user.$/, "gi" ); - assert.equal(expectedErrorRegex.test(err.message), true); + assert.equal(err.name, "AbortError", `Error name ${err.name} is not as expected`); + assert.equal( + expectedErrorRegex.test(err.message), + true, + `Incorrect error received "${err.message}"` + ); } }); - it("should abort a request and response correctly when retried", async function() { + it("should abort a request and response correctly when abort signal is already fired", async function() { const connectionStub = stub(new Connection()); const rcvr = new EventEmitter(); - let messageId: string = ""; - let counter = 0; + let req: any = {}; connectionStub.createSession.resolves({ connection: { id: "connection-1" @@ -187,20 +207,14 @@ describe("RequestResponseLink", function() { createSender: () => { return Promise.resolve({ send: (request: any) => { - counter++; - if (counter != 1) { - assert.notEqual(messageId, undefined); - assert.notEqual(request.message_id, undefined); - assert.notEqual(messageId, request.message_id); - } - messageId = request.message_id; + req = request; } }); }, createReceiver: () => { return Promise.resolve(rcvr); } - }); + } as any); const sessionStub = await connectionStub.createSession(); const senderStub = await sessionStub.createSender(); const receiverStub = await sessionStub.createReceiver(); @@ -211,20 +225,7 @@ describe("RequestResponseLink", function() { setTimeout(() => { rcvr.emit("message", { message: { - correlation_id: messageId, - application_properties: { - statusCode: 500, - errorCondition: ErrorNameConditionMapper.InternalServerError, - statusDescription: "Please retry later.", - "com.microsoft:tracking-id": "1" - } - } - }); - }, 2000); - setTimeout(() => { - rcvr.emit("message", { - message: { - correlation_id: messageId, + correlation_id: req.message_id, application_properties: { statusCode: 200, errorCondition: null, @@ -234,19 +235,19 @@ describe("RequestResponseLink", function() { body: "Hello World!!" } }); - }, 4000); + }, 2000); try { const controller = new AbortController(); - const signal = controller.signal; - setTimeout(controller.abort.bind(controller), 100); - await link.sendRequest(request, { - delayInSeconds: 1, - timeoutInSeconds: 5, - abortSignal: signal // cancel between request attempts - }); + const signal: AbortSignalLike = controller.signal; + controller.abort(); + await link.sendRequest(request, { abortSignal: signal, requestName: "foo" }); throw new Error(`Test failure`); } catch (err) { - const expectedErrorRegex = new RegExp(/The operation has been cancelled by the user.$/, "gi"); + const expectedErrorRegex = new RegExp( + /The foo operation has been cancelled by the user.$/, + "gi" + ); + assert.equal(err.name, "AbortError", `Error name ${err.name} is not as expected`); assert.equal( expectedErrorRegex.test(err.message), true, diff --git a/sdk/core/core-amqp/test/retry.spec.ts b/sdk/core/core-amqp/test/retry.spec.ts index a289e1be37f..acf802f6bfb 100644 --- a/sdk/core/core-amqp/test/retry.spec.ts +++ b/sdk/core/core-amqp/test/retry.spec.ts @@ -38,7 +38,7 @@ dotenv.config(); }, connectionId: "connection-1", operationType: RetryOperationType.cbsAuth, - delayInSeconds: 15, + delayInMs: 15000, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -66,7 +66,7 @@ dotenv.config(); }, connectionId: "connection-1", operationType: RetryOperationType.management, - delayInSeconds: 15, + delayInMs: 15000, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -101,7 +101,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.receiverLink, maxRetries: 2, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -140,7 +140,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.senderLink, maxRetries: 2, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -180,7 +180,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.sendMessage, maxRetries: 2, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -207,7 +207,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.session, maxRetries: 4, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -236,7 +236,7 @@ dotenv.config(); }, connectionId: "connection-1", operationType: RetryOperationType.cbsAuth, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -265,7 +265,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.management, maxRetries: Infinity, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -300,7 +300,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.receiverLink, maxRetries: Infinity, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -339,7 +339,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.senderLink, maxRetries: Infinity, - delayInSeconds: 0.5, + delayInMs: 500, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; @@ -379,7 +379,7 @@ dotenv.config(); connectionId: "connection-1", operationType: RetryOperationType.sendMessage, maxRetries: Constants.defaultMaxRetriesForConnection, - delayInSeconds: 0.001, + delayInMs: 1, minExponentialRetryDelayInMs: 0, retryPolicy: retryPolicy }; diff --git a/sdk/core/core-arm/package.json b/sdk/core/core-arm/package.json index c8985167f5d..5a25a4660c4 100644 --- a/sdk/core/core-arm/package.json +++ b/sdk/core/core-arm/package.json @@ -63,14 +63,12 @@ "mocha-multi-reporters": "^1.1.7", "npm-run-all": "^4.1.5", "nyc": "^14.0.0", - "opn-cli": "^4.0.0", "rimraf": "^2.6.2", "rollup": "^1.16.3", "rollup-plugin-node-resolve": "^5.0.2", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-visualizer": "^2.0.0", "shx": "^0.3.2", - "ts-loader": "^5.3.1", "ts-node": "^7.0.1", "typescript": "^3.2.2", "uglify-js": "^3.4.9", @@ -121,7 +119,6 @@ "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", "unit-test:node": "nyc mocha", - "test:coverage": "npm run test && opn coverage/index.html", "pack": "npm pack 2>&1", "prebuild": "npm run clean" }, diff --git a/sdk/core/core-auth/package.json b/sdk/core/core-auth/package.json index af877825d61..3c0699cdb52 100644 --- a/sdk/core/core-auth/package.json +++ b/sdk/core/core-auth/package.json @@ -1,6 +1,6 @@ { "name": "@azure/core-auth", - "version": "1.0.0-preview.1", + "version": "1.0.0-preview.3", "description": "Provides low-level interfaces and helper methods for authentication in Azure SDK", "sdk-type": "client", "main": "dist/index.js", @@ -57,10 +57,10 @@ "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/core/core-auth", "sideEffects": false, "dependencies": { + "@azure/abort-controller": "1.0.0-preview.1", "tslib": "^1.9.3" }, "devDependencies": { - "@azure/abort-controller": "1.0.0-preview.1", "@microsoft/api-extractor": "^7.1.5", "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", @@ -90,6 +90,6 @@ "rollup-plugin-terser": "^5.1.1", "rollup-plugin-visualizer": "^2.0.0", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/core/core-http/lib/axiosHttpClient.ts b/sdk/core/core-http/lib/axiosHttpClient.ts index 164d48b9799..d59668dbc84 100644 --- a/sdk/core/core-http/lib/axiosHttpClient.ts +++ b/sdk/core/core-http/lib/axiosHttpClient.ts @@ -227,9 +227,10 @@ declare type ProxyAgent = { isHttps: boolean; agent: http.Agent | https.Agent }; export function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeaders): ProxyAgent { const tunnelOptions: tunnel.HttpsOverHttpsOptions = { proxy: { - host: URLBuilder.parse(proxySettings.host).getHost(), + // TODO: Handle case where getHost() returns undefined + host: URLBuilder.parse(proxySettings.host).getHost()!, port: proxySettings.port, - headers: (headers && headers.rawHeaders()) || {} + headers: (headers && headers.rawHeaders()) } }; diff --git a/sdk/core/core-http/package.json b/sdk/core/core-http/package.json index cc837b10867..3f8e59ddfe4 100644 --- a/sdk/core/core-http/package.json +++ b/sdk/core/core-http/package.json @@ -111,13 +111,12 @@ }, "dependencies": { "@azure/core-auth": "1.0.0-preview.1", - "@types/tunnel": "^0.0.0", "axios": "^0.19.0", "form-data": "^2.5.0", "process": "^0.11.10", - "tough-cookie": "^2.4.3", + "tough-cookie": "^3.0.1", "tslib": "^1.9.3", - "tunnel": "0.0.6", + "tunnel": "^0.0.6", "uuid": "^3.3.2", "xml2js": "^0.4.19" }, @@ -130,8 +129,9 @@ "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", "@types/semver": "^5.5.0", - "@types/sinon": "^5.0.5", - "@types/tough-cookie": "^2.3.3", + "@types/sinon": "^7.0.13", + "@types/tough-cookie": "^2.3.5", + "@types/tunnel": "^0.0.1", "@types/uuid": "^3.4.3", "@types/webpack": "^4.4.13", "@types/webpack-dev-middleware": "^2.0.2", @@ -163,7 +163,6 @@ "mocha-multi-reporters": "^1.1.7", "npm-run-all": "^4.1.5", "nyc": "^14.0.0", - "opn-cli": "^4.0.0", "puppeteer": "^1.11.0", "rimraf": "^2.6.2", "rollup": "^1.16.3", @@ -178,7 +177,7 @@ "semver": "^5.5.0", "shx": "^0.3.2", "sinon": "^7.1.0", - "ts-loader": "^5.3.1", + "ts-loader": "^6.0.4", "ts-node": "^7.0.1", "typescript": "^3.2.2", "uglify-js": "^3.4.9", diff --git a/sdk/core/core-http/test/axiosHttpClientTests.node.ts b/sdk/core/core-http/test/axiosHttpClientTests.node.ts index d0759be0ed7..f3d7d5431b9 100644 --- a/sdk/core/core-http/test/axiosHttpClientTests.node.ts +++ b/sdk/core/core-http/test/axiosHttpClientTests.node.ts @@ -39,8 +39,8 @@ describe("AxiosHttpClient", () => { proxyAgent.isHttps.should.equal(testCase.isProxyHttps); const agent = proxyAgent.agent as HttpsAgent; should().equal(agent.defaultPort, testCase.port); - agent.options.proxy.host!.should.equal(urlHost); - agent.options.proxy.port!.should.equal(proxySettings.port); + agent.options.proxy.host.should.equal(urlHost); + agent.options.proxy.port.should.equal(proxySettings.port); done(); }); }); @@ -57,7 +57,8 @@ describe("AxiosHttpClient", () => { const proxyAgent = createProxyAgent("http://example.com", proxySettings, headers); const agent = proxyAgent.agent as HttpsAgent; - agent.proxyOptions.headers.should.contain({ "user-agent": "Node.js" }); + should().exist(agent.proxyOptions.headers); + agent.proxyOptions.headers!.should.contain({ "user-agent": "Node.js" }); done(); }); }); @@ -86,8 +87,8 @@ describe("AxiosHttpClient", () => { }; const tunnel = createTunnel(false, value, tunnelConfig) as HttpsAgent; - tunnel.options.proxy.host!.should.equal(defaultProxySettings.host); - tunnel.options.proxy.port!.should.equal(defaultProxySettings.port); + tunnel.options.proxy.host.should.equal(defaultProxySettings.host); + tunnel.options.proxy.port.should.equal(defaultProxySettings.port); should().not.exist(tunnel.defaultPort); }); }); @@ -103,8 +104,8 @@ describe("AxiosHttpClient", () => { }; const tunnel = createTunnel(true, value, tunnelConfig) as HttpsAgent; - tunnel.options.proxy.host!.should.equal(defaultProxySettings.host); - tunnel.options.proxy.port!.should.equal(defaultProxySettings.port); + tunnel.options.proxy.host.should.equal(defaultProxySettings.host); + tunnel.options.proxy.port.should.equal(defaultProxySettings.port); tunnel.defaultPort!.should.equal(443); }); }); diff --git a/sdk/cosmosdb/cosmos/package.json b/sdk/cosmosdb/cosmos/package.json index 169648a14ae..820b53b68cd 100644 --- a/sdk/cosmosdb/cosmos/package.json +++ b/sdk/cosmosdb/cosmos/package.json @@ -51,8 +51,8 @@ "@types/node": "^8.0.0", "@types/priorityqueuejs": "^1.0.1", "@types/semaphore": "^1.1.0", - "@types/sinon": "^5.0.5", - "@types/tunnel": "^0.0.0", + "@types/sinon": "^7.0.13", + "@types/tunnel": "^0.0.1", "@types/underscore": "^1.8.8", "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", @@ -82,7 +82,7 @@ "semaphore": "1.0.5", "stream-http": "^2.8.3", "tslib": "^1.9.3", - "tunnel": "0.0.6" + "tunnel": "^0.0.6" }, "repository": { "type": "git", diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index ceea6976292..62d22156d12 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -94,7 +94,7 @@ "chai-as-promised": "^7.1.1", "chai-string": "^1.5.0", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", diff --git a/sdk/eventhub/event-hubs/review/event-hubs.api.md b/sdk/eventhub/event-hubs/review/event-hubs.api.md index 2df4c943a29..d6d1f5f4a2f 100644 --- a/sdk/eventhub/event-hubs/review/event-hubs.api.md +++ b/sdk/eventhub/event-hubs/review/event-hubs.api.md @@ -15,6 +15,7 @@ import { EventHubConnectionConfig } from '@azure/core-amqp'; import { MessagingError } from '@azure/core-amqp'; import { Receiver } from 'rhea-promise'; import { ReceiverOptions } from 'rhea-promise'; +import { RetryPolicy } from '@azure/core-amqp'; import { Sender } from 'rhea-promise'; import { SharedKeyCredential } from '@azure/core-amqp'; import { TokenCredential } from '@azure/core-amqp'; @@ -28,6 +29,31 @@ export interface BatchOptions { partitionKey?: string; } +// @public +export interface Checkpoint { + consumerGroupName: string; + eventHubName: string; + instanceId: string; + offset: number; + partitionId: string; + sequenceNumber: number; +} + +// @public +export class CheckpointManager { + // (undocumented) + updateCheckpoint(eventData: EventData): Promise; + // (undocumented) + updateCheckpoint(offset: string, sequenceNumber: number): Promise; +} + +// @public +export enum CloseReason { + OwnershipLost = "OwnershipLost", + Shutdown = "Shutdown", + Unknown = "Unknown" +} + export { DataTransformer } export { DefaultDataTransformer } @@ -146,6 +172,30 @@ export class EventPosition { sequenceNumber?: number; } +// @public +export class EventProcessor { + constructor(consumerGroupName: string, eventHubClient: EventHubClient, partitionProcessorFactory: PartitionProcessorFactory, partitionManager: PartitionManager, options?: EventProcessorOptions); + start(): void; + stop(): Promise; +} + +// @public (undocumented) +export interface EventProcessorOptions { + // (undocumented) + initialEventPosition?: EventPosition; + // (undocumented) + maxBatchSize?: number; + // (undocumented) + maxWaitTimeInSeconds?: number; +} + +// @public +export class InMemoryPartitionManager implements PartitionManager { + claimOwnerships(partitionOwnerships: PartitionOwnership[]): Promise; + listOwnerships(eventHubName: string, consumerGroupName: string): Promise; + updateCheckpoint(checkpoint: Checkpoint): Promise; +} + export { MessagingError } // @public @@ -154,6 +204,47 @@ export type OnError = (error: MessagingError | Error) => void; // @public export type OnMessage = (eventData: ReceivedEventData) => void; +// @public +export interface PartitionContext { + readonly consumerGroupName: string; + readonly eventHubName: string; + readonly partitionId: string; +} + +// @public +export interface PartitionManager { + claimOwnerships(partitionOwnerships: PartitionOwnership[]): Promise; + listOwnerships(eventHubName: string, consumerGroupName: string): Promise; + updateCheckpoint(checkpoint: Checkpoint): Promise; +} + +// @public +export interface PartitionOwnership { + consumerGroupName: string; + eTag?: string; + eventHubName: string; + instanceId: string; + lastModifiedTimeInMS?: number; + offset?: number; + ownerLevel: number; + partitionId: string; + sequenceNumber?: number; +} + +// @public (undocumented) +export interface PartitionProcessor { + close?(reason: CloseReason): Promise; + initialize?(): Promise; + processError(error: Error): Promise; + processEvents(events: EventData[]): Promise; +} + +// @public +export interface PartitionProcessorFactory { + // (undocumented) + (context: PartitionContext, checkpointManager: CheckpointManager): PartitionProcessor; +} + // @public export interface PartitionProperties { beginningSequenceNumber: number; @@ -190,8 +281,11 @@ export class ReceiveHandler { // @public export interface RetryOptions { + maxExponentialRetryDelayInMs?: number; maxRetries?: number; + minExponentialRetryDelayInMs?: number; retryInterval?: number; + retryPolicy?: RetryPolicy; timeoutInMs?: number; } diff --git a/sdk/eventhub/event-hubs/samples/eventProcessor.ts b/sdk/eventhub/event-hubs/samples/eventProcessor.ts new file mode 100644 index 00000000000..9015fe7cf59 --- /dev/null +++ b/sdk/eventhub/event-hubs/samples/eventProcessor.ts @@ -0,0 +1,71 @@ +import { + EventHubClient, + EventData, + EventPosition, + delay, + EventProcessor, + PartitionContext +} from "@azure/event-hubs"; + +class SimplePartitionProcessor { + private _context: PartitionContext; + constructor(context: PartitionContext) { + this._context = context; + } + async processEvents(events: EventData[]) { + for (const event of events) { + console.log( + "Received event: '%s' from partition: '%s' and consumer group: '%s'", + event.body, + this._context.partitionId, + this._context.consumerGroupName + ); + } + } + + async processError(error: Error) { + console.log(`Encountered an error: ${error.message}`); + } + + async initialize() { + console.log(`Started processing`); + } + + async close() { + console.log(`Stopped processing`); + } +} + +// Define connection string and related Event Hubs entity name here +const connectionString = ""; +const eventHubName = ""; + +async function main() { + const client = new EventHubClient(connectionString, eventHubName); + + const eventProcessorFactory = (context: PartitionContext) => { + return new SimplePartitionProcessor(context); + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + eventProcessorFactory, + "partitionManager" as any, + { + initialEventPosition: EventPosition.earliest(), + maxBatchSize: 10, + maxWaitTimeInSeconds: 20 + } + ); + await processor.start(); + // after 2 seconds, stop processing + await delay(2000); + + await processor.stop(); + await client.close(); +} + +main().catch((err) => { + console.log("Error occurred: ", err); +}); diff --git a/sdk/eventhub/event-hubs/src/checkpointManager.ts b/sdk/eventhub/event-hubs/src/checkpointManager.ts index 5822392396e..f97c5cac402 100644 --- a/sdk/eventhub/event-hubs/src/checkpointManager.ts +++ b/sdk/eventhub/event-hubs/src/checkpointManager.ts @@ -9,11 +9,29 @@ import { EventData } from "./eventData"; * Used by createCheckpoint in PartitionManager **/ export interface Checkpoint { + /** + * @property The event hub name + */ eventHubName: string; + /** + * @property The consumer group name + */ consumerGroupName: string; + /** + * @property The unique instance identifier + */ instanceId: string; + /** + * @property The identifier of the Event Hub partition + */ partitionId: string; + /** + * @property The sequence number of the event. + */ sequenceNumber: number; + /** + * @property The offset of the event. + */ offset: number; } diff --git a/sdk/eventhub/event-hubs/src/eventHubClient.ts b/sdk/eventhub/event-hubs/src/eventHubClient.ts index 8eef02f7087..bad6a4716d7 100644 --- a/sdk/eventhub/event-hubs/src/eventHubClient.ts +++ b/sdk/eventhub/event-hubs/src/eventHubClient.ts @@ -10,7 +10,8 @@ import { SharedKeyCredential, ConnectionConfig, isTokenCredential, - Constants + Constants, + RetryPolicy } from "@azure/core-amqp"; import { ConnectionContext } from "./connectionContext"; @@ -37,19 +38,23 @@ export interface RetryOptions { retryInterval?: number; /** * Number of milliseconds to wait before declaring that current attempt has timed out which will trigger a retry - * A minimum value of 60 seconds will be used if a value not greater than this is provided. + * A minimum value of `60000` milliseconds will be used if a value not greater than this is provided. */ timeoutInMs?: number; - // /** - // * The maximum value the `retryInterval` gets incremented exponentially between retries. - // * Not applicable, when `isExponential` is set to `false`. - // */ - // maxRetryInterval?: number; - // /** - // * Boolean denoting if the `retryInterval` should be incremented exponentially between - // * retries or kept the same. - // */ - // isExponential?: boolean; + /** + * @property {RetryPolicy} [retryPolicy] Denotes which retry policy to apply. If undefined, defaults to `LinearRetryPolicy` + */ + retryPolicy?: RetryPolicy; + /** + * @property {number} [maxExponentialRetryDelayInMs] Denotes the maximum delay between retries + * that the retry attempts will be capped at. Applicable only when performing exponential retry. + */ + maxExponentialRetryDelayInMs?: number; + /** + * @property {number} [minExponentialRetryDelayInMs] Denotes the minimum delay between retries + * to use. Applicable only when performing exponential retry. + */ + minExponentialRetryDelayInMs?: number; } export function getRetryAttemptTimeoutInMs(retryOptions: RetryOptions | undefined): number { @@ -57,8 +62,8 @@ export function getRetryAttemptTimeoutInMs(retryOptions: RetryOptions | undefine retryOptions == undefined || typeof retryOptions.timeoutInMs !== "number" || !isFinite(retryOptions.timeoutInMs) || - retryOptions.timeoutInMs < Constants.defaultOperationTimeoutInSeconds * 1000 - ? Constants.defaultOperationTimeoutInSeconds * 1000 + retryOptions.timeoutInMs < Constants.defaultOperationTimeoutInMs + ? Constants.defaultOperationTimeoutInMs : retryOptions.timeoutInMs; return timeoutInMs; } diff --git a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts index e4b3566eb3c..944dfc8f554 100644 --- a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts +++ b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts @@ -528,7 +528,7 @@ export class EventHubReceiver extends LinkEntity { const linkCreationConfig: RetryConfig = { connectionId: this._context.connectionId, connectionHost: this._context.config.host, - delayInSeconds: 15, + delayInMs: 15000, operation: () => this.initialize(initOptions), operationType: RetryOperationType.receiverLink, maxRetries: Constants.defaultMaxRetriesForConnection diff --git a/sdk/eventhub/event-hubs/src/eventHubSender.ts b/sdk/eventhub/event-hubs/src/eventHubSender.ts index 5b24d7a54fa..68b194f9fc6 100644 --- a/sdk/eventhub/event-hubs/src/eventHubSender.ts +++ b/sdk/eventhub/event-hubs/src/eventHubSender.ts @@ -26,10 +26,14 @@ import { import { EventData, toAmqpMessage } from "./eventData"; import { ConnectionContext } from "./connectionContext"; import { LinkEntity } from "./linkEntity"; -import { SendOptions, EventHubProducerOptions } from "./eventHubClient"; +import { + SendOptions, + EventHubProducerOptions, + getRetryAttemptTimeoutInMs, + RetryOptions +} from "./eventHubClient"; import { AbortSignalLike, AbortError } from "@azure/abort-controller"; import { EventDataBatch } from "./eventDataBatch"; -import { getRetryAttemptTimeoutInMs, RetryOptions } from "./eventHubClient"; /** * @ignore @@ -289,7 +293,7 @@ export class EventHubSender extends LinkEntity { operationType: RetryOperationType.senderLink, maxRetries: Constants.defaultMaxRetriesForConnection, connectionHost: this._context.config.host, - delayInSeconds: 15 + delayInMs: 15000 }; return retry(config); }); @@ -347,12 +351,14 @@ export class EventHubSender extends LinkEntity { * @returns Promise * @throws {AbortError} Thrown if the operation is cancelled via the abortSignal. */ - async getMaxMessageSize(options?: { - retryOptions?: RetryOptions; - abortSignal?: AbortSignalLike; - }): Promise { - const abortSignal = options && options.abortSignal; - const retryOptions = options && options.retryOptions; + async getMaxMessageSize( + options: { + retryOptions?: RetryOptions; + abortSignal?: AbortSignalLike; + } = {} + ): Promise { + const abortSignal = options.abortSignal; + const retryOptions = options.retryOptions || {}; if (this.isOpen()) { return this._sender!.maxMessageSize; } @@ -386,23 +392,15 @@ export class EventHubSender extends LinkEntity { this.senderLock ); await defaultLock.acquire(this.senderLock, () => { - const maxRetries = - retryOptions && typeof retryOptions.maxRetries === "number" - ? retryOptions.maxRetries - : Constants.defaultMaxRetries; - const retryInterval = - retryOptions && - typeof retryOptions.retryInterval === "number" && - retryOptions.retryInterval > 0 - ? retryOptions.retryInterval / 1000 - : Constants.defaultDelayBetweenOperationRetriesInSeconds; - const config: RetryConfig = { operation: () => this._init(), connectionId: this._context.connectionId, operationType: RetryOperationType.senderLink, - maxRetries: maxRetries, - delayInSeconds: retryInterval + maxRetries: retryOptions.maxRetries, + delayInMs: retryOptions.retryInterval, + retryPolicy: retryOptions.retryPolicy, + minExponentialRetryDelayInMs: retryOptions.minExponentialRetryDelayInMs, + maxExponentialRetryDelayInMs: retryOptions.maxExponentialRetryDelayInMs }; return retry(config); @@ -555,6 +553,7 @@ export class EventHubSender extends LinkEntity { options: SendOptions & EventHubProducerOptions = {} ): Promise { const abortSignal: AbortSignalLike | undefined = options.abortSignal; + const retryOptions = options.retryOptions || {}; const sendEventPromise = () => new Promise(async (resolve, reject) => { let waitTimer: any; @@ -567,9 +566,8 @@ export class EventHubSender extends LinkEntity { const rejectOnAbort = () => { const desc: string = - `[${this._context.connectionId}] The send operation on the Sender "${ - this.name - }" with ` + `address "${this.address}" has been cancelled by the user.`; + `[${this._context.connectionId}] The send operation on the Sender "${this.name}" with ` + + `address "${this.address}" has been cancelled by the user.`; log.error(desc); return reject(new AbortError("The send operation has been cancelled by the user.")); }; @@ -742,19 +740,15 @@ export class EventHubSender extends LinkEntity { } }); - const maxRetries = options.retryOptions && options.retryOptions.maxRetries; - const delayInSeconds = - options.retryOptions && - options.retryOptions.retryInterval && - options.retryOptions.retryInterval >= 0 - ? options.retryOptions.retryInterval / 1000 - : Constants.defaultDelayBetweenOperationRetriesInSeconds; const config: RetryConfig = { operation: sendEventPromise, connectionId: this._context.connectionId, operationType: RetryOperationType.sendMessage, - maxRetries: maxRetries, - delayInSeconds: delayInSeconds + maxRetries: retryOptions.maxRetries, + delayInMs: retryOptions.retryInterval, + retryPolicy: retryOptions.retryPolicy, + minExponentialRetryDelayInMs: retryOptions.minExponentialRetryDelayInMs, + maxExponentialRetryDelayInMs: retryOptions.maxExponentialRetryDelayInMs }; return retry(config); } diff --git a/sdk/eventhub/event-hubs/src/eventProcessor.ts b/sdk/eventhub/event-hubs/src/eventProcessor.ts index 8a9ebc04ca6..ca0de998f71 100644 --- a/sdk/eventhub/event-hubs/src/eventProcessor.ts +++ b/sdk/eventhub/event-hubs/src/eventProcessor.ts @@ -1,11 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import uuid from "uuid/v4"; import { EventHubClient } from "./eventHubClient"; import { EventPosition } from "./eventPosition"; import { PartitionContext } from "./partitionContext"; import { CheckpointManager, Checkpoint } from "./checkpointManager"; import { EventData } from "./eventData"; +import { PumpManager } from "./pumpManager"; +import { AbortSignalLike, AbortController } from "@azure/abort-controller"; +import * as log from "./log"; +import { cancellableDelay } from "./util/cancellableDelay"; + +/** + * Reason for closing a PartitionProcessor. + */ +export enum CloseReason { + /** + * The PartitionProcessor was shutdown due to some internal or service exception. + */ + EventHubException = "EventHubException", + /** + * Ownership of the partition was lost or transitioned to a new processor instance. + */ + OwnershipLost = "OwnershipLost", + /** + * The EventProcessor was shutdown. + */ + Shutdown = "Shutdown" +} export interface PartitionProcessor { /** @@ -17,7 +40,7 @@ export interface PartitionProcessor { * This may occur when control of the partition switches to another EPH or when user stops EPH * TODO: update string -> CloseReason */ - close?(reason: string): Promise; + close?(reason: CloseReason): Promise; /** * Called when a batch of events have been received. */ @@ -33,15 +56,43 @@ export interface PartitionProcessor { * returned by listOwnerships */ export interface PartitionOwnership { + /** + * @property The event hub name + */ eventHubName: string; + /** + * @property The consumer group name + */ consumerGroupName: string; + /** + * @property The unique instance identifier + */ instanceId: string; + /** + * @property The identifier of the Event Hub partition + */ partitionId: string; + /** + * @property + * The owner level + */ ownerLevel: number; + /** + * @property The offset of the event. + */ offset?: number; + /** + * @property The sequence number of the event. + */ sequenceNumber?: number; - lastModifiedTime?: number; - ETag?: string; + /** + * @property The last modified time. + */ + lastModifiedTimeInMS?: number; + /** + * @property The unique identifier for the operation. + */ + eTag?: string; } /** @@ -57,16 +108,37 @@ export interface PartitionProcessorFactory { * Deals mainly with read/write to the chosen storage service */ export interface PartitionManager { + /** + * Called to get the list of all existing partition ownership from the underlying data store. Could return empty + * results if there are is no existing ownership information. + * + * @param eventHubName The event hub name. + * @param consumerGroupName The consumer group name. + * @return A list of partition ownership details of all the partitions that have/had an owner. + */ listOwnerships(eventHubName: string, consumerGroupName: string): Promise; + /** + * Called to claim ownership of a list of partitions. This will return the list of partitions that were owned + * successfully. + * + * @param partitionOwnerships The list of partition ownerships this instance is claiming to own. + * @return A list of partitions this instance successfully claimed ownership. + */ claimOwnerships(partitionOwnerships: PartitionOwnership[]): Promise; - createCheckpoint(checkpoint: Checkpoint): Promise; + /** + * Updates the checkpoint in the data store for a partition. + * + * @param checkpoint The checkpoint. + * @return The new eTag on successful update. + */ + updateCheckpoint(checkpoint: Checkpoint): Promise; } // Options passed when creating EventProcessor, everything is optional export interface EventProcessorOptions { initialEventPosition?: EventPosition; maxBatchSize?: number; - maxWaitTime?: number; + maxWaitTimeInSeconds?: number; } /** @@ -74,26 +146,157 @@ export interface EventProcessorOptions { * @class EventProcessorHost */ export class EventProcessor { + private _consumerGroupName: string; + private _eventHubClient: EventHubClient; + private _partitionProcessorFactory: PartitionProcessorFactory; + private _processorOptions: EventProcessorOptions; + private _pumpManager: PumpManager; + private _id: string = uuid(); + private _isRunning: boolean = false; + private _loopTask?: PromiseLike; + private _abortController?: AbortController; + constructor( consumerGroupName: string, eventHubClient: EventHubClient, partitionProcessorFactory: PartitionProcessorFactory, partitionManager: PartitionManager, options?: EventProcessorOptions - ) {} + ) { + if (!options) options = {}; + + this._consumerGroupName = consumerGroupName; + this._eventHubClient = eventHubClient; + this._partitionProcessorFactory = partitionProcessorFactory; + this._processorOptions = options; + this._pumpManager = new PumpManager(this._id, options); + } + + private async _getInactivePartitions(): Promise { + try { + // get all partition ids on the event hub + const partitionIds = await this._eventHubClient.getPartitionIds(); + // get partitions this EventProcessor is actively processing + const activePartitionIds = this._pumpManager.receivingFromPartitions(); + + // get a list of partition ids that are not being processed by this EventProcessor + const inactivePartitionIds: string[] = partitionIds.filter( + (id) => activePartitionIds.indexOf(id) === -1 + ); + return inactivePartitionIds; + } catch (err) { + log.error(`[${this._id}] An error occured when retrieving partition ids: ${err}`); + throw err; + } + } + + /** + * Starts the EventProcessor loop. + * Load-balancing and partition ownership should be checked inside the loop. + * @ignore + */ + private async _runLoop(abortSignal: AbortSignalLike): Promise { + // periodically check if there is any partition not being processed and process it + const waitIntervalInMs = 30000; + while (!abortSignal.aborted) { + try { + // get a list of partition ids that are not being processed by this EventProcessor + const partitionsToAdd = await this._getInactivePartitions(); + // check if the loop has been cancelled + if (abortSignal.aborted) { + return; + } + + const tasks: PromiseLike[] = []; + // create partition pumps to process any partitions we should be processing + for (const partitionId of partitionsToAdd) { + const partitionContext: PartitionContext = { + consumerGroupName: this._consumerGroupName, + eventHubName: this._eventHubClient.eventHubName, + partitionId: partitionId + }; + + const checkpointManager = new CheckpointManager(); + + log.eventProcessor( + `[${this._id}] [${partitionId}] Calling user-provided PartitionProcessorFactory.` + ); + const partitionProcessor = this._partitionProcessorFactory( + partitionContext, + checkpointManager + ); + + // eventually this will 1st check if the existing PartitionOwnership has a position + const eventPosition = + this._processorOptions.initialEventPosition || EventPosition.earliest(); + + tasks.push( + this._pumpManager.createPump( + this._eventHubClient, + partitionContext, + eventPosition, + partitionProcessor + ) + ); + } + + // wait for all the new pumps to be created + await Promise.all(tasks); + log.eventProcessor(`[${this._id}] PartitionPumps created within EventProcessor.`); + + // sleep + log.eventProcessor( + `[${this._id}] Pausing the EventProcessor loop for ${waitIntervalInMs} ms.` + ); + await cancellableDelay(waitIntervalInMs, abortSignal); + } catch (err) { + log.error(`[${this._id}] An error occured within the EventProcessor loop: ${err}`); + } + } + + // loop has completed, remove all existing pumps + return this._pumpManager.removeAllPumps(CloseReason.Shutdown); + } /** * Starts the event processor, fetching the list of partitions, and attempting to grab leases * For each successful lease, it will get the details from the blob and start a receiver at the * point where it left off previously. * - * @return {Promise} + * @return {void} */ - async start(): Promise {} + start(): void { + if (this._isRunning) { + log.eventProcessor(`[${this._id}] Attempted to start an already running EventProcessor.`); + return; + } + + this._isRunning = true; + this._abortController = new AbortController(); + log.eventProcessor(`[${this._id}] Starting an EventProcessor.`); + this._loopTask = this._runLoop(this._abortController.signal); + } /** * Stops the EventProcessor from processing messages. * @return {Promise} */ - async stop(): Promise {} + async stop(): Promise { + log.eventProcessor(`[${this._id}] Stopping an EventProcessor.`); + if (this._abortController) { + // cancel the event processor loop + this._abortController.abort(); + } + + this._isRunning = false; + try { + // waits for the event processor loop to complete + // will complete immediately if _loopTask is undefined + await this._loopTask; + } catch (err) { + log.error(`[${this._id}] An error occured while stopping the EventProcessor: ${err}`); + } finally { + log.eventProcessor(`[${this._id}] EventProcessor stopped.`); + } + } } diff --git a/sdk/eventhub/event-hubs/src/inMemoryPartitionManager.ts b/sdk/eventhub/event-hubs/src/inMemoryPartitionManager.ts new file mode 100644 index 00000000000..07e43beb31f --- /dev/null +++ b/sdk/eventhub/event-hubs/src/inMemoryPartitionManager.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { PartitionManager, PartitionOwnership } from "./eventProcessor"; +import { Checkpoint } from "./checkpointManager"; +import { generate_uuid } from "rhea-promise"; + +/** + * A simple in-memory implementation of a `PartitionManager` + * @class + */ +export class InMemoryPartitionManager implements PartitionManager { + private _partitionOwnershipMap: Map = new Map(); + + /** + * Get the list of all existing partition ownership from the underlying data store. Could return empty + * results if there are is no existing ownership information. + * + * @param eventHubName The event hub name. + * @param consumerGroupName The consumer group name. + * @return Partition ownership details of all the partitions that have/had an owner.. + */ + async listOwnerships( + eventHubName: string, + consumerGroupName: string + ): Promise { + return Array.from(this._partitionOwnershipMap.values()); + } + + /** + * Claim ownership of a list of partitions. This will return the list of partitions that were owned + * successfully. + * + * @param partitionOwnerships The list of partition ownerships this instance is claiming to own. + * @return A list partitions this instance successfully claimed ownership. + */ + async claimOwnerships(partitionOwnerships: PartitionOwnership[]): Promise { + for (const partitionOwnership of partitionOwnerships) { + if (!this._partitionOwnershipMap.has(partitionOwnership.partitionId)) { + partitionOwnership.eTag = generate_uuid(); + this._partitionOwnershipMap.set(partitionOwnership.partitionId, partitionOwnership); + } + } + return partitionOwnerships; + } + + /** + * Updates the checkpoint in the data store for a partition. + * + * @param checkpoint The checkpoint. + * @return Promise + */ + async updateCheckpoint(checkpoint: Checkpoint): Promise { + const partitionOwnership = this._partitionOwnershipMap.get(checkpoint.partitionId); + if (partitionOwnership) { + partitionOwnership.sequenceNumber = checkpoint.sequenceNumber; + partitionOwnership.offset = checkpoint.offset; + partitionOwnership.eTag = generate_uuid(); + } + } +} diff --git a/sdk/eventhub/event-hubs/src/index.ts b/sdk/eventhub/event-hubs/src/index.ts index fed523ce759..78bddbc5e3b 100644 --- a/sdk/eventhub/event-hubs/src/index.ts +++ b/sdk/eventhub/event-hubs/src/index.ts @@ -21,6 +21,19 @@ export { PartitionProperties, EventHubProperties } from "./managementClient"; export { EventHubProducer } from "./sender"; export { EventHubConsumer, EventIteratorOptions } from "./receiver"; export { EventDataBatch } from "./eventDataBatch"; +export { CheckpointManager } from "./checkpointManager"; +export { + EventProcessor, + CloseReason, + EventProcessorOptions, + PartitionProcessor, + PartitionManager, + PartitionProcessorFactory, + PartitionOwnership +} from "./eventProcessor"; +export { PartitionContext } from "./partitionContext"; +export { InMemoryPartitionManager} from "./inMemoryPartitionManager" +export { Checkpoint } from "./checkpointManager"; export { MessagingError, DataTransformer, diff --git a/sdk/eventhub/event-hubs/src/linkEntity.ts b/sdk/eventhub/event-hubs/src/linkEntity.ts index f97ad8f6deb..0533c78f886 100644 --- a/sdk/eventhub/event-hubs/src/linkEntity.ts +++ b/sdk/eventhub/event-hubs/src/linkEntity.ts @@ -97,10 +97,10 @@ export class LinkEntity { */ protected _tokenRenewalTimer?: NodeJS.Timer; /** - * @property _tokenTimeout Indicates token timeout + * @property _tokenTimeout Indicates token timeout in milliseconds * @protected */ - protected _tokenTimeout?: number; + protected _tokenTimeoutInMs?: number; /** * Creates a new LinkEntity instance. * @ignore @@ -147,7 +147,7 @@ export class LinkEntity { tokenObject = this._context.tokenCredential.getToken(this.audience); tokenType = TokenType.CbsTokenTypeSas; // renew sas token in every 45 minutess - this._tokenTimeout = (3600 - 900) * 1000; + this._tokenTimeoutInMs = (3600 - 900) * 1000; } else { const aadToken = await this._context.tokenCredential.getToken(Constants.aadEventHubsScope); if (!aadToken) { @@ -155,7 +155,7 @@ export class LinkEntity { } tokenObject = aadToken; tokenType = TokenType.CbsTokenTypeJwt; - this._tokenTimeout = tokenObject.expiresOnTimestamp - Date.now() - 2 * 60 * 1000; + this._tokenTimeoutInMs = tokenObject.expiresOnTimestamp - Date.now() - 2 * 60 * 1000; } log.link( @@ -195,7 +195,7 @@ export class LinkEntity { * @returns */ protected async _ensureTokenRenewal(): Promise { - if (!this._tokenTimeout) { + if (!this._tokenTimeoutInMs) { return; } this._tokenRenewalTimer = setTimeout(async () => { @@ -211,15 +211,15 @@ export class LinkEntity { err ); } - }, this._tokenTimeout); + }, this._tokenTimeoutInMs); log.link( - "[%s] %s '%s' with address %s, has next token renewal in %d seconds @(%s).", + "[%s] %s '%s' with address %s, has next token renewal in %d milliseconds @(%s).", this._context.connectionId, this._type, this.name, this.address, - this._tokenTimeout / 1000, - new Date(Date.now() + this._tokenTimeout).toString() + this._tokenTimeoutInMs, + new Date(Date.now() + this._tokenTimeoutInMs).toString() ); } diff --git a/sdk/eventhub/event-hubs/src/log.ts b/sdk/eventhub/event-hubs/src/log.ts index 3c0b0d91fc6..b4ae70c53b0 100644 --- a/sdk/eventhub/event-hubs/src/log.ts +++ b/sdk/eventhub/event-hubs/src/log.ts @@ -53,3 +53,18 @@ export const client = debugModule("azure:event-hubs:client"); * log statements for iothub client */ export const iotClient = debugModule("azure:event-hubs:iothubClient"); +/** + * @ignore + * log statements for partitionManager + */ +export const partitionPump = debugModule("azure:event-hubs:partitionPump"); +/** + * @ignore + * log statements for pumpManager + */ +export const pumpManager = debugModule("azure:event-hubs:pumpManager"); +/** + * @ignore + * log statements for eventProcessor + */ +export const eventProcessor = debugModule("azure:event-hubs:eventProcessor"); diff --git a/sdk/eventhub/event-hubs/src/managementClient.ts b/sdk/eventhub/event-hubs/src/managementClient.ts index 26e615be262..8de26db709e 100644 --- a/sdk/eventhub/event-hubs/src/managementClient.ts +++ b/sdk/eventhub/event-hubs/src/managementClient.ts @@ -7,7 +7,10 @@ import { defaultLock, translate, Constants, - SendRequestOptions + SendRequestOptions, + retry, + RetryConfig, + RetryOperationType } from "@azure/core-amqp"; import { Message, @@ -15,13 +18,14 @@ import { SenderEvents, ReceiverEvents, SenderOptions, - ReceiverOptions + ReceiverOptions, + generate_uuid } from "rhea-promise"; import { ConnectionContext } from "./connectionContext"; import { LinkEntity } from "./linkEntity"; import * as log from "./log"; import { RetryOptions, getRetryAttemptTimeoutInMs } from "./eventHubClient"; -import { AbortSignalLike } from "@azure/abort-controller"; +import { AbortSignalLike, AbortError } from "@azure/abort-controller"; /** * Describes the runtime information of an Event Hub. * @interface HubRuntimeInformation @@ -303,34 +307,122 @@ export class ManagementClient extends LinkEntity { */ private async _makeManagementRequest( request: Message, - options?: { retryOptions?: RetryOptions; abortSignal?: AbortSignalLike; requestName?: string } + options: { + retryOptions?: RetryOptions; + abortSignal?: AbortSignalLike; + requestName?: string; + } = {} ): Promise { + const retryOptions = options.retryOptions || {}; try { - log.mgmt( - "[%s] Acquiring lock to get the management req res link.", - this._context.connectionId - ); - await defaultLock.acquire(this.managementLock, () => { - return this._init(); - }); + const aborter: AbortSignalLike | undefined = options && options.abortSignal; - if (!options) { - options = {}; - } + const sendOperationPromise = () => + new Promise(async (resolve, reject) => { + let count = 0; + + const retryTimeoutInMs = getRetryAttemptTimeoutInMs(options.retryOptions); + let timeTakenByInit = 0; + + const rejectOnAbort = () => { + const requestName = options.requestName; + const desc: string = + `[${this._context.connectionId}] The request "${requestName}" ` + + `to has been cancelled by the user.`; + log.error(desc); + const error = new AbortError( + `The ${requestName ? requestName + " " : ""}operation has been cancelled by the user.` + ); + + reject(error); + }; + + if (aborter) { + if (aborter.aborted) { + return rejectOnAbort(); + } + } + + if (!this._isMgmtRequestResponseLinkOpen()) { + log.mgmt( + "[%s] Acquiring lock to get the management req res link.", + this._context.connectionId + ); + + const initOperationStartTime = Date.now(); + + const actionAfterTimeout = () => { + const desc: string = `The request with message_id "${request.message_id}" timed out. Please try again later.`; + const e: Error = { + name: "OperationTimeoutError", + message: desc + }; + + return reject(translate(e)); + }; + + const waitTimer = setTimeout(actionAfterTimeout, retryTimeoutInMs); + + try { + await defaultLock.acquire(this.managementLock, () => { + return this._init(); + }); + } catch (err) { + return reject(translate(err)); + } finally { + clearTimeout(waitTimer); + } + timeTakenByInit = Date.now() - initOperationStartTime; + } + + const remainingOperationTimeoutInMs = retryTimeoutInMs - timeTakenByInit; + + const sendRequestOptions: SendRequestOptions = { + abortSignal: options.abortSignal, + requestName: options.requestName, + timeoutInMs: remainingOperationTimeoutInMs + }; + + count++; + if (count !== 1) { + // Generate a new message_id every time after the first attempt + request.message_id = generate_uuid(); + } else if (!request.message_id) { + // Set the message_id in the first attempt only if it is not set + request.message_id = generate_uuid(); + } + + try { + const result = await this._mgmtReqResLink!.sendRequest(request, sendRequestOptions); + resolve(result); + } catch (err) { + err = translate(err); + const address = + this._mgmtReqResLink || this._mgmtReqResLink!.sender.address + ? "address" + : this._mgmtReqResLink!.sender.address; + log.error( + "[%s] An error occurred during send on management request-response link with address " + + "'%s': %O", + this._context.connectionId, + address, + err + ); + reject(err); + } + }); - const sendRequestOptions: SendRequestOptions = { - maxRetries: options.retryOptions && options.retryOptions.maxRetries, - abortSignal: options.abortSignal, - requestName: options.requestName, - timeoutInSeconds: getRetryAttemptTimeoutInMs(options.retryOptions) / 1000, - delayInSeconds: - options.retryOptions && - options.retryOptions.retryInterval && - options.retryOptions.retryInterval >= 0 - ? options.retryOptions.retryInterval / 1000 - : undefined + const config: RetryConfig = { + operation: sendOperationPromise, + connectionId: this._context.connectionId, + operationType: RetryOperationType.management, + maxRetries: retryOptions.maxRetries, + delayInMs: retryOptions.retryInterval, + retryPolicy: retryOptions.retryPolicy, + minExponentialRetryDelayInMs: retryOptions.minExponentialRetryDelayInMs, + maxExponentialRetryDelayInMs: retryOptions.maxExponentialRetryDelayInMs }; - return (await this._mgmtReqResLink!.sendRequest(request, sendRequestOptions)).body; + return (await retry(config)).body; } catch (err) { err = translate(err); log.error("An error occurred while making the request to $management endpoint: %O", err); diff --git a/sdk/eventhub/event-hubs/src/partitionContext.ts b/sdk/eventhub/event-hubs/src/partitionContext.ts index 32876804f20..ac0c67a8d12 100644 --- a/sdk/eventhub/event-hubs/src/partitionContext.ts +++ b/sdk/eventhub/event-hubs/src/partitionContext.ts @@ -6,7 +6,19 @@ * about the partition, the EventProcessor will be processing events from. */ export interface PartitionContext { + /** + * @property The identifier of the Event Hub partition + * @readonly + */ readonly partitionId: string; + /** + * @property The event hub name + * @readonly + */ readonly eventHubName: string; + /** + * @property The consumer group name + * @readonly + */ readonly consumerGroupName: string; } diff --git a/sdk/eventhub/event-hubs/src/partitionPump.ts b/sdk/eventhub/event-hubs/src/partitionPump.ts new file mode 100644 index 00000000000..9ffbebb84d3 --- /dev/null +++ b/sdk/eventhub/event-hubs/src/partitionPump.ts @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as log from "./log"; +import { EventProcessorOptions, PartitionProcessor, CloseReason } from "./eventProcessor"; +import { PartitionContext } from "./partitionContext"; +import { EventHubClient } from "./eventHubClient"; +import { EventPosition } from "./eventPosition"; +import { EventHubConsumer } from "./receiver"; +import { AbortController } from "@azure/abort-controller"; +import { MessagingError } from "@azure/core-amqp"; + +export class PartitionPump { + private _partitionContext: PartitionContext; + private _eventHubClient: EventHubClient; + private _partitionProcessor: PartitionProcessor; + private _processorOptions: EventProcessorOptions; + private _receiver: EventHubConsumer | undefined; + private _isReceiving: boolean = false; + private _abortController: AbortController; + + constructor( + eventHubClient: EventHubClient, + partitionContext: PartitionContext, + partitionProcessor: PartitionProcessor, + options?: EventProcessorOptions + ) { + if (!options) options = {}; + this._eventHubClient = eventHubClient; + this._partitionContext = partitionContext; + this._partitionProcessor = partitionProcessor; + this._processorOptions = options; + this._abortController = new AbortController(); + } + + public get isReceiving(): boolean { + return this._isReceiving; + } + + async start(): Promise { + this._isReceiving = true; + if (typeof this._partitionProcessor.initialize === "function") { + try { + await this._partitionProcessor.initialize(); + } catch { + // swallow the error from the user-defined code + } + } + this._receiveEvents(this._partitionContext.partitionId); + log.partitionPump("Successfully started the receiver."); + } + + private async _receiveEvents(partitionId: string): Promise { + this._receiver = this._eventHubClient.createConsumer( + this._partitionContext.consumerGroupName, + partitionId, + this._processorOptions.initialEventPosition || EventPosition.earliest() + ); + + while (this._isReceiving) { + try { + const receivedEvents = await this._receiver.receiveBatch( + this._processorOptions.maxBatchSize || 1, + this._processorOptions.maxWaitTimeInSeconds, + this._abortController.signal + ); + // avoid calling user's processEvents handler if the pump was stopped while receiving events + if (!this._isReceiving) { + return; + } + await this._partitionProcessor.processEvents(receivedEvents); + } catch (err) { + // check if this pump is still receiving + // it may not be if the EventProcessor was stopped during processEvents + if (!this._isReceiving) { + // no longer receiving, so close was called from somewhere else + return; + } + + // forward error to user's processError and swallow errors they may throw + try { + await this._partitionProcessor.processError(err); + } catch (err) { + log.error("An error was thrown by user's processError method: ", err); + } + + // close the partition processor if a non-retryable error was encountered + if (typeof err !== "object" || !(err as MessagingError).retryable) { + try { + // this will close the pump and will break us out of the while loop + return await this.stop(CloseReason.EventHubException); + } catch (err) { + log.error( + `An error occurred while closing the receiver with reason ${CloseReason.EventHubException}: `, + err + ); + } + } + } + } + } + + async stop(reason: CloseReason): Promise { + this._isReceiving = false; + try { + if (this._receiver) { + await this._receiver.close(); + } + this._abortController.abort(); + if (typeof this._partitionProcessor.close === "function") { + await this._partitionProcessor.close(reason); + } + } catch (err) { + log.error("An error occurred while closing the receiver.", err); + throw err; + } + } +} diff --git a/sdk/eventhub/event-hubs/src/pumpManager.ts b/sdk/eventhub/event-hubs/src/pumpManager.ts new file mode 100644 index 00000000000..cdcc9a7ebe1 --- /dev/null +++ b/sdk/eventhub/event-hubs/src/pumpManager.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { EventHubClient } from "./eventHubClient"; +import { PartitionContext } from "./partitionContext"; +import { EventPosition } from "./eventPosition"; +import { PartitionProcessor, EventProcessorOptions, CloseReason } from "./eventProcessor"; +import { PartitionPump } from "./partitionPump"; +import * as log from "./log"; + +/** + * The PumpManager handles the creation and removal of PartitionPumps. + * It also starts a PartitionPump when it is created, and stops a + * PartitionPump when it is removed. + * @ignore + */ +export class PumpManager { + private readonly _eventProcessorName: string; + private readonly _options: EventProcessorOptions; + private _partitionIdToPumps: { + [partitionId: string]: PartitionPump | undefined; + } = {}; + + /** + * @ignore + */ + constructor(eventProcessorName: string, eventProcessorOptions: EventProcessorOptions = {}) { + this._eventProcessorName = eventProcessorName; + this._options = eventProcessorOptions; + } + + /** + * Returns a list of partitionIds that are actively receiving messages. + * @ignore + */ + public receivingFromPartitions(): string[] { + return Object.keys(this._partitionIdToPumps).filter((id) => { + const pump = this._partitionIdToPumps[id]; + return Boolean(pump && pump.isReceiving); + }); + } + + /** + * Creates and starts a PartitionPump. + * @param eventHubClient The EventHubClient to forward to the PartitionPump. + * @param partitionContext The PartitionContext to forward to the PartitionPump. + * @param initialEventPosition The EventPosition to forward to the PartitionPump. + * @param partitionProcessor The PartitionProcessor to forward to the PartitionPump. + * @param abortSignal Used to cancel pump creation. + * @ignore + */ + public async createPump( + eventHubClient: EventHubClient, + partitionContext: PartitionContext, + initialEventPosition: EventPosition, + partitionProcessor: PartitionProcessor + ): Promise { + const partitionId = partitionContext.partitionId; + // attempt to get an existing pump + const existingPump = this._partitionIdToPumps[partitionId]; + if (existingPump) { + if (existingPump.isReceiving) { + log.pumpManager( + `[${this._eventProcessorName}] [${partitionId}] The existing pump is running.` + ); + return; + } + log.pumpManager( + `[${this._eventProcessorName}] [${partitionId}] The existing pump is not running.` + ); + await this.removePump(partitionId, CloseReason.EventHubException); + } + + log.pumpManager(`[${this._eventProcessorName}] [${partitionId}] Creating a new pump.`); + + const pump = new PartitionPump(eventHubClient, partitionContext, partitionProcessor, { + ...this._options, + initialEventPosition + }); + + try { + await pump.start(); + this._partitionIdToPumps[partitionId] = pump; + } catch (err) { + log.error( + `[${this._eventProcessorName}] [${partitionId}] An error occured while adding/updating a pump: ${err}` + ); + } + } + + /** + * Stop a PartitionPump and removes it from the internal map. + * @param partitionId The partitionId to remove the associated PartitionPump from. + * @param reason The reason for removing the pump. + * @ignore + */ + public async removePump(partitionId: string, reason: CloseReason): Promise { + try { + const pump = this._partitionIdToPumps[partitionId]; + if (pump) { + delete this._partitionIdToPumps[partitionId]; + log.pumpManager(`[${this._eventProcessorName}] [${partitionId}] Stopping the pump.`); + await pump.stop(reason); + } else { + log.pumpManager( + `[${this._eventProcessorName}] [${partitionId}] No pump was found to remove.` + ); + } + } catch (err) { + log.error( + `[${this._eventProcessorName}] [${partitionId}] An error occured while removing a pump: ${err}` + ); + } + } + + /** + * Stops all PartitionPumps and removes them from the internal map. + * @param reason The reason for removing the pump. + * @ignore + */ + public async removeAllPumps(reason: CloseReason): Promise { + const partitionIds = Object.keys(this._partitionIdToPumps); + + log.pumpManager(`[${this._eventProcessorName}] Removing all pumps due to reason ${reason}.`); + + const tasks: PromiseLike[] = []; + for (const partitionId of partitionIds) { + const pump = this._partitionIdToPumps[partitionId]; + if (pump) { + tasks.push(pump.stop(reason)); + } + } + + try { + await Promise.all(tasks); + } catch (err) { + log.error(`[${this._eventProcessorName}] An error occured while removing all pumps: ${err}`); + } finally { + this._partitionIdToPumps = {}; + } + } +} diff --git a/sdk/eventhub/event-hubs/src/receiver.ts b/sdk/eventhub/event-hubs/src/receiver.ts index 89ee9e6bbad..f736adc12d9 100644 --- a/sdk/eventhub/event-hubs/src/receiver.ts +++ b/sdk/eventhub/event-hubs/src/receiver.ts @@ -73,7 +73,7 @@ export class EventHubConsumer { /** * @property The set of retry options to configure the receiveBatch operation. */ - private _retryOptions: Required>; + private _retryOptions: RetryOptions; /** * @property Returns `true` if the consumer is closed. This can happen either because the consumer @@ -112,7 +112,7 @@ export class EventHubConsumer { * @readonly */ get ownerLevel(): number | undefined { - return this._receiverOptions && this._receiverOptions.ownerLevel; + return this._receiverOptions.ownerLevel; } /** @@ -139,7 +139,7 @@ export class EventHubConsumer { this._consumerGroup = consumerGroup; this._partitionId = partitionId; this._receiverOptions = options || {}; - this._retryOptions = this._initRetryOptions(this._receiverOptions.retryOptions); + this._retryOptions = this._receiverOptions.retryOptions || {}; this._baseConsumer = new EventHubReceiver( context, consumerGroup, @@ -234,7 +234,7 @@ export class EventHubConsumer { options: EventIteratorOptions = {} ): AsyncIterableIterator { const maxMessageCount = 1; - const maxWaitTimeInSeconds = Constants.defaultOperationTimeoutInSeconds; + const maxWaitTimeInSeconds = Constants.defaultOperationTimeoutInMs / 1000; while (true) { const currentBatch = await this.receiveBatch( @@ -370,7 +370,7 @@ export class EventHubConsumer { ); const addTimeout = (): void => { - let msg = "[%s] Setting the wait timer for %d seconds for receiver '%s'."; + const msg = "[%s] Setting the wait timer for %d seconds for receiver '%s'."; log.batching( msg, this._context.connectionId, @@ -404,10 +404,13 @@ export class EventHubConsumer { const config: RetryConfig = { connectionHost: this._context.config.host, connectionId: this._context.connectionId, - delayInSeconds: retryOptions.retryInterval, + delayInMs: retryOptions.retryInterval, operation: retrieveEvents, operationType: RetryOperationType.receiveMessage, - maxRetries: retryOptions.maxRetries + maxRetries: retryOptions.maxRetries, + retryPolicy: retryOptions.retryPolicy, + minExponentialRetryDelayInMs: retryOptions.minExponentialRetryDelayInMs, + maxExponentialRetryDelayInMs: retryOptions.maxExponentialRetryDelayInMs }; return retry(config); } @@ -436,24 +439,6 @@ export class EventHubConsumer { } } - private _initRetryOptions( - retryOptions: RetryOptions = {} - ): Required> { - const maxRetries = - typeof retryOptions.maxRetries === "number" - ? retryOptions.maxRetries - : Constants.defaultMaxRetries; - const retryInterval = - typeof retryOptions.retryInterval === "number" && retryOptions.retryInterval > 0 - ? retryOptions.retryInterval / 1000 - : Constants.defaultDelayBetweenOperationRetriesInSeconds; - - return { - maxRetries, - retryInterval - }; - } - private _throwIfAlreadyReceiving(): void { if (this.isReceivingMessages) { const errorMessage = `The EventHubConsumer for "${this._context.config.entityPath}" is already receiving messages.`; diff --git a/sdk/eventhub/event-hubs/src/util/cancellableDelay.ts b/sdk/eventhub/event-hubs/src/util/cancellableDelay.ts new file mode 100644 index 00000000000..45a037e9f36 --- /dev/null +++ b/sdk/eventhub/event-hubs/src/util/cancellableDelay.ts @@ -0,0 +1,17 @@ +import { AbortSignalLike, AbortError } from "@azure/abort-controller"; + +export function cancellableDelay(delayInMs: number, abortSignal?: AbortSignalLike): Promise { + return new Promise((resolve, reject) => { + if (abortSignal && abortSignal.aborted) { + return reject(new AbortError(`The delay was cancelled by the user.`)); + } + + const timer = setTimeout(resolve, delayInMs); + if (abortSignal) { + abortSignal.addEventListener("abort", () => { + clearTimeout(timer); + reject(new AbortError(`The delay was cancelled by the user.`)); + }); + } + }); +} diff --git a/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts b/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts new file mode 100644 index 00000000000..0a779d9ad59 --- /dev/null +++ b/sdk/eventhub/event-hubs/test/eventProcessor.spec.ts @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import chai from "chai"; +const should = chai.should(); +import chaiAsPromised from "chai-as-promised"; +chai.use(chaiAsPromised); +import debugModule from "debug"; +const debug = debugModule("azure:event-hubs:partitionPump"); +import { + EventPosition, + EventHubClient, + EventData, + EventProcessor, + PartitionContext, + delay, + InMemoryPartitionManager, + PartitionOwnership, + Checkpoint, + PartitionProcessorFactory, + CloseReason +} from "../src"; +import { EnvVarKeys, getEnvVars } from "./utils/testUtils"; +import { generate_uuid } from "rhea-promise"; +const env = getEnvVars(); + +describe("Event Processor", function(): void { + const service = { + connectionString: env[EnvVarKeys.EVENTHUB_CONNECTION_STRING], + path: env[EnvVarKeys.EVENTHUB_NAME] + }; + const client: EventHubClient = new EventHubClient(service.connectionString, service.path); + before("validate environment", async function(): 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." + ); + }); + + after("close the connection", async function(): Promise { + await client.close(); + }); + + it("should treat consecutive start invocations as idempotent", async function(): Promise { + const partitionIds = await client.getPartitionIds(); + + // ensure we have at least 2 partitions + partitionIds.length.should.gte(2); + + const partitionResultsMap = new Map< + string, + { events: string[]; initialized: boolean; closeReason?: CloseReason } + >(); + partitionIds.forEach((id) => partitionResultsMap.set(id, { events: [], initialized: false })); + let didError = false; + + // The partitionProcess will need to add events to the partitionResultsMap as they are received + const factory: PartitionProcessorFactory = (context) => { + return { + async initialize() { + partitionResultsMap.get(context.partitionId)!.initialized = true; + }, + async close(reason) { + partitionResultsMap.get(context.partitionId)!.closeReason = reason; + }, + async processEvents(events) { + const existingEvents = partitionResultsMap.get(context.partitionId)!.events; + events.forEach((event) => existingEvents.push(event.body)); + }, + async processError() { + didError = true; + } + }; + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + factory, + undefined as any, + { + initialEventPosition: EventPosition.fromEnqueuedTime(new Date()) + } + ); + + processor.start(); + processor.start(); + processor.start(); + + // 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(); + } + + // shutdown the processor + await processor.stop(); + + didError.should.be.false; + // validate correct events captured for each partition + for (const partitionId of partitionIds) { + const results = partitionResultsMap.get(partitionId)!; + const events = results.events; + events.length.should.equal(1); + events[0].should.equal(expectedMessagePrefix + partitionId); + results.initialized.should.be.true; + (results.closeReason === CloseReason.Shutdown).should.be.true; + } + }); + + it("should not throw if stop is called without start", async function(): Promise { + let didPartitionProcessorStart = false; + + // The partitionProcess will need to add events to the partitionResultsMap as they are received + const factory: PartitionProcessorFactory = (context) => { + return { + async initialize() { + didPartitionProcessorStart = true; + }, + async close() { + didPartitionProcessorStart = true; + }, + async processEvents(events) { + didPartitionProcessorStart = true; + }, + async processError() { + didPartitionProcessorStart = true; + } + }; + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + factory, + undefined as any, + { + initialEventPosition: EventPosition.fromEnqueuedTime(new Date()) + } + ); + + // shutdown the processor + await processor.stop(); + + didPartitionProcessorStart.should.be.false; + }); + + it("should support start after stopping", async function(): Promise { + const partitionIds = await client.getPartitionIds(); + + // ensure we have at least 2 partitions + partitionIds.length.should.gte(2); + + const partitionResultsMap = new Map< + string, + { events: string[]; initialized: boolean; closeReason?: CloseReason } + >(); + partitionIds.forEach((id) => partitionResultsMap.set(id, { events: [], initialized: false })); + let didError = false; + + // The partitionProcess will need to add events to the partitionResultsMap as they are received + const factory: PartitionProcessorFactory = (context) => { + return { + async initialize() { + partitionResultsMap.get(context.partitionId)!.initialized = true; + }, + async close(reason) { + partitionResultsMap.get(context.partitionId)!.closeReason = reason; + }, + async processEvents(events) { + const existingEvents = partitionResultsMap.get(context.partitionId)!.events; + events.forEach((event) => existingEvents.push(event.body)); + }, + async processError() { + didError = true; + } + }; + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + factory, + undefined as any, + { + initialEventPosition: EventPosition.fromEnqueuedTime(new Date()) + } + ); + + processor.start(); + + // 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(); + } + + // set a delay to give a consumers a chance to receive a message + await delay(1000); + + // shutdown the processor + await processor.stop(); + + didError.should.be.false; + // validate correct events captured for each partition + for (const partitionId of partitionIds) { + const results = partitionResultsMap.get(partitionId)!; + const events = results.events; + events.length.should.equal(1); + events[0].should.equal(expectedMessagePrefix + partitionId); + results.initialized.should.be.true; + (results.closeReason === CloseReason.Shutdown).should.be.true; + // reset fields + results.initialized = false; + results.closeReason = undefined; + results.events = []; + } + + // start it again + // note: since checkpointing isn't implemented yet, + // EventProcessor will retrieve events from the initialEventPosition. + processor.start(); + + // set a delay to give a consumers a chance to receive a message + await delay(1000); + + await processor.stop(); + + didError.should.be.false; + // validate correct events captured for each partition + for (const partitionId of partitionIds) { + const results = partitionResultsMap.get(partitionId)!; + const events = results.events; + events.length.should.equal(1); + events[0].should.equal(expectedMessagePrefix + partitionId); + results.initialized.should.be.true; + (results.closeReason === CloseReason.Shutdown).should.be.true; + } + }); + + describe("Partition processor", function(): void { + it("should support processing events across multiple partitions", async function(): Promise< + void + > { + const partitionIds = await client.getPartitionIds(); + + // ensure we have at least 2 partitions + partitionIds.length.should.gte(2); + + const partitionResultsMap = new Map< + string, + { events: string[]; initialized: boolean; closeReason?: CloseReason } + >(); + partitionIds.forEach((id) => partitionResultsMap.set(id, { events: [], initialized: false })); + let didError = false; + + // The partitionProcess will need to add events to the partitionResultsMap as they are received + const factory: PartitionProcessorFactory = (context) => { + return { + async initialize() { + partitionResultsMap.get(context.partitionId)!.initialized = true; + }, + async close(reason) { + partitionResultsMap.get(context.partitionId)!.closeReason = reason; + }, + async processEvents(events) { + const existingEvents = partitionResultsMap.get(context.partitionId)!.events; + events.forEach((event) => existingEvents.push(event.body)); + }, + async processError() { + didError = true; + } + }; + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + factory, + undefined as any, + { + initialEventPosition: EventPosition.fromEnqueuedTime(new Date()) + } + ); + + processor.start(); + + // 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(); + } + + // set a delay to give a consumers a chance to receive a message + await delay(1000); + + // shutdown the processor + await processor.stop(); + + didError.should.be.false; + // validate correct events captured for each partition + for (const partitionId of partitionIds) { + const results = partitionResultsMap.get(partitionId)!; + const events = results.events; + events.length.should.equal(1); + events[0].should.equal(expectedMessagePrefix + partitionId); + results.initialized.should.be.true; + (results.closeReason === CloseReason.Shutdown).should.be.true; + } + }); + + it("should support processing events across multiple partitions without initialize or close", async function(): Promise< + void + > { + const partitionIds = await client.getPartitionIds(); + + // ensure we have at least 2 partitions + partitionIds.length.should.gte(2); + + const partitionResultsMap = new Map(); + partitionIds.forEach((id) => partitionResultsMap.set(id, [])); + let didError = false; + + // The partitionProcess will need to add events to the partitionResultsMap as they are received + const factory: PartitionProcessorFactory = (context) => { + return { + async processEvents(events) { + const existingEvents = partitionResultsMap.get(context.partitionId)!; + events.forEach((event) => existingEvents.push(event.body)); + }, + async processError() { + didError = true; + } + }; + }; + + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + factory, + undefined as any, + { + initialEventPosition: EventPosition.fromEnqueuedTime(new Date()) + } + ); + + processor.start(); + + // 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(); + } + + // set a delay to give a consumers a chance to receive a message + await delay(1000); + + // shutdown the processor + await processor.stop(); + + didError.should.be.false; + // validate correct events captured for each partition + for (const partitionId of partitionIds) { + const events = partitionResultsMap.get(partitionId)!; + events.length.should.equal(1); + events[0].should.equal(expectedMessagePrefix + partitionId); + } + }); + + it("should call methods on a PartitionProcessor ", async function(): Promise { + const receivedEvents: EventData[] = []; + let isinitializeCalled = false; + let isCloseCalled = false; + class SimpleEventProcessor { + async initialize() { + isinitializeCalled = true; + debug(`Started processing`); + } + async processEvents(events: EventData[]) { + for (const event of events) { + receivedEvents.push(event); + debug("Received event", event.body); + } + } + + async processError(error: Error) { + debug(`Encountered an error: ${error.message}`); + } + + async close() { + isCloseCalled = true; + debug(`Stopped processing`); + } + } + const eventProcessorFactory = (context: PartitionContext) => { + return new SimpleEventProcessor(); + }; + const partitionInfo = await client.getPartitionProperties("0"); + const processor = new EventProcessor( + EventHubClient.defaultConsumerGroupName, + client, + eventProcessorFactory, + "partitionManager" as any, + { + initialEventPosition: EventPosition.fromSequenceNumber( + partitionInfo.lastEnqueuedSequenceNumber + ), + maxBatchSize: 1, + maxWaitTimeInSeconds: 5 + } + ); + const producer = client.createProducer({ partitionId: "0" }); + await producer.send({ body: "Hello world!!!" }); + + await processor.start(); + // after 2 seconds, stop processing + await delay(2000); + await processor.stop(); + await producer.close(); + isinitializeCalled.should.equal(true); + receivedEvents.length.should.equal(1); + receivedEvents[0].body.should.equal("Hello world!!!"); + isCloseCalled.should.equal(true); + }); + }); + + describe("InMemory Partition Manager", function(): void { + it("should claim ownership, get a list of ownership and update checkpoint", async function(): Promise { + const inMemoryPartitionManager = new InMemoryPartitionManager(); + const partitionOwnership1: PartitionOwnership = { + eventHubName: "myEventHub", + consumerGroupName: EventHubClient.defaultConsumerGroupName, + instanceId: generate_uuid(), + partitionId: "0", + ownerLevel: 10 + }; + const partitionOwnership2: PartitionOwnership = { + eventHubName: "myEventHub", + consumerGroupName: EventHubClient.defaultConsumerGroupName, + instanceId: generate_uuid(), + partitionId: "1", + ownerLevel: 10 + }; + const partitionOwnership = await inMemoryPartitionManager.claimOwnerships([ + partitionOwnership1, + partitionOwnership2 + ]); + partitionOwnership.length.should.equals(2); + + const ownershipslist = await inMemoryPartitionManager.listOwnerships( + "myEventHub", + EventHubClient.defaultConsumerGroupName + ); + ownershipslist.length.should.equals(2); + + const checkpoint: Checkpoint = { + eventHubName: "myEventHub", + consumerGroupName: EventHubClient.defaultConsumerGroupName, + instanceId: generate_uuid(), + partitionId: "0", + sequenceNumber: 10, + offset: 50 + }; + + await inMemoryPartitionManager.updateCheckpoint(checkpoint); + const partitionOwnershipList = await inMemoryPartitionManager.listOwnerships( + "myEventHub", + EventHubClient.defaultConsumerGroupName + ); + partitionOwnershipList[0].partitionId.should.equals(checkpoint.partitionId); + partitionOwnershipList[0].sequenceNumber!.should.equals(checkpoint.sequenceNumber); + partitionOwnershipList[0].offset!.should.equals(checkpoint.offset); + }); + }); +}).timeout(90000); diff --git a/sdk/eventhub/event-processor-host/package.json b/sdk/eventhub/event-processor-host/package.json index a7af59b3fa2..e47a28abdf4 100644 --- a/sdk/eventhub/event-processor-host/package.json +++ b/sdk/eventhub/event-processor-host/package.json @@ -59,10 +59,10 @@ }, "dependencies": { "@azure/event-hubs": "^2.1.1", + "@azure/ms-rest-nodeauth": "^0.9.2", "async-lock": "^1.1.3", "azure-storage": "^2.10.2", "debug": "^3.1.0", - "@azure/ms-rest-nodeauth": "^0.9.2", "path-browserify": "^1.0.0", "tslib": "^1.9.3", "uuid": "^3.3.2" @@ -78,19 +78,21 @@ "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", "@types/uuid": "^3.4.3", + "@types/ws": "^6.0.1", "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-string": "^1.5.0", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", + "https-proxy-agent": "^2.2.1", "mocha": "^5.2.0", "mocha-junit-reporter": "^1.18.0", "mocha-multi": "^1.0.1", @@ -107,8 +109,6 @@ "rollup-plugin-uglify": "^6.0.0", "ts-node": "^7.0.1", "typescript": "^3.2.2", - "@types/ws": "^6.0.1", - "https-proxy-agent": "^2.2.1", "ws": "^6.2.1" } } diff --git a/sdk/identity/identity/package.json b/sdk/identity/identity/package.json index 598c2681e0a..da48c4ad5e5 100644 --- a/sdk/identity/identity/package.json +++ b/sdk/identity/identity/package.json @@ -113,6 +113,6 @@ "rollup-plugin-terser": "^5.1.1", "rollup-plugin-visualizer": "^2.0.0", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/identity/identity/src/client/identityClient.ts b/sdk/identity/identity/src/client/identityClient.ts index 36bc1cfb7db..d9ff32589a3 100644 --- a/sdk/identity/identity/src/client/identityClient.ts +++ b/sdk/identity/identity/src/client/identityClient.ts @@ -20,6 +20,10 @@ export class IdentityClient extends ServiceClient { super(undefined, options); this.baseUri = this.authorityHost = options.authorityHost; + + if (!this.baseUri.startsWith("https:")) { + throw new Error("The authorityHost address must use the 'https' protocol."); + } } createWebResource(requestOptions: RequestPrepareOptions): WebResource { diff --git a/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts b/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts new file mode 100644 index 00000000000..427be842e2b --- /dev/null +++ b/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import qs from "qs"; +import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; +import { IdentityClientOptions, IdentityClient } from "../client/identityClient"; + +/** + * Enables authentication to Azure Active Directory using a user's + * username and password. This credential requires a high degree of + * trust you should only use it when other, more secure, credentials + * can't be used. + */ +export class UsernamePasswordCredential implements TokenCredential { + private identityClient: IdentityClient; + private tenantId: string; + private clientId: string; + private username: string; + private password: string; + + /** + * Creates an instance of the UsernamePasswordCredential with the details + * needed to authenticate against Azure Active Directory with a username + * and password. + * + * @param tenantIdOrName The Azure Active Directory tenant (directory) ID or name. + * @param clientId The client (application) ID of an App Registration in the tenant. + * @param username The user account's e-mail address (user name). + * @param password The user account's account password + * @param options Options for configuring the client which makes the authentication request. + */ + constructor( + tenantIdOrName: string, + clientId: string, + username: string, + password: string, + options?: IdentityClientOptions + ) { + this.identityClient = new IdentityClient(options); + this.tenantId = tenantIdOrName; + this.clientId = clientId; + this.username = username; + this.password = password; + } + + /** + * Authenticates with Azure Active Directory and returns an {@link AccessToken} if + * successful. If authentication cannot be performed at this time, this method may + * return null. If an error occurs during authentication, an {@link AuthenticationError} + * containing failure details will be thrown. + * + * @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 getToken( + scopes: string | string[], + options?: GetTokenOptions + ): Promise { + const webResource = this.identityClient.createWebResource({ + url: `${this.identityClient.authorityHost}/${this.tenantId}/oauth2/v2.0/token`, + method: "POST", + disableJsonStringifyOnBody: true, + deserializationMapper: undefined, + body: qs.stringify({ + response_type: "token", + grant_type: "password", + client_id: this.clientId, + username: this.username, + password: this.password, + scope: typeof scopes === "string" ? scopes : scopes.join(" ") + }), + headers: { + Accept: "application/json", + "Content-Type": "application/x-www-form-urlencoded" + }, + abortSignal: options && options.abortSignal + }); + + return this.identityClient.sendTokenRequest(webResource); + } +} diff --git a/sdk/identity/identity/src/index.ts b/sdk/identity/identity/src/index.ts index c83481de93f..5ae8bb91e6d 100644 --- a/sdk/identity/identity/src/index.ts +++ b/sdk/identity/identity/src/index.ts @@ -11,6 +11,7 @@ export { ClientSecretCredential } from "./credentials/clientSecretCredential"; export { ClientCertificateCredential } from "./credentials/clientCertificateCredential"; export { ManagedIdentityCredential } from "./credentials/managedIdentityCredential"; export { DefaultAzureCredential } from "./credentials/defaultAzureCredential"; +export { UsernamePasswordCredential } from "./credentials/usernamePasswordCredential"; export { AuthenticationError, AggregateAuthenticationError } from "./client/errors"; export { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; diff --git a/sdk/identity/identity/test/identityClient.spec.ts b/sdk/identity/identity/test/identityClient.spec.ts index 3188cff742b..bb46cf83c97 100644 --- a/sdk/identity/identity/test/identityClient.spec.ts +++ b/sdk/identity/identity/test/identityClient.spec.ts @@ -5,6 +5,7 @@ import assert from "assert"; import { assertRejects } from "./authTestUtils"; import { MockAuthHttpClient } from "./authTestUtils"; import { AuthenticationError } from "../src/"; +import { IdentityClient } from "../src/client/identityClient"; import { ClientSecretCredential } from "../src"; function isExpectedError(expectedErrorName: string): (error: any) => boolean { @@ -35,6 +36,17 @@ describe("IdentityClient", function () { ); }); + it("throws an exception when an authorityHost using 'http' is provided", async () => { + assert.throws( + () => { new IdentityClient({ authorityHost: "http://totallyinsecure.lol" }) }, + Error, + "The authorityHost address must use the 'https' protocol."); + assert.throws( + () => { new IdentityClient({ authorityHost: "httpsomg.com" }) }, + Error, + "The authorityHost address must use the 'https' protocol."); + }); + it("returns a usable error when the authentication response doesn't contain a body", async () => { const mockHttp = new MockAuthHttpClient({ authResponse: { diff --git a/sdk/identity/identity/test/usernamePasswordCredential.spec.ts b/sdk/identity/identity/test/usernamePasswordCredential.spec.ts new file mode 100644 index 00000000000..18b62a3470a --- /dev/null +++ b/sdk/identity/identity/test/usernamePasswordCredential.spec.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import assert from "assert"; +import { UsernamePasswordCredential } from "../src"; +import { MockAuthHttpClient } from "./authTestUtils"; + +describe("UsernamePasswordCredential", function () { + it("sends an authorization request with the given username and password", async () => { + const mockHttpClient = new MockAuthHttpClient(); + + const credential = new UsernamePasswordCredential( + "tenant", + "client", + "user@domain.com", + "p4s$w0rd", + mockHttpClient.identityClientOptions + ); + + await credential.getToken("scope"); + + const authRequest = await mockHttpClient.getAuthRequest(); + if (!authRequest) { + assert.fail("No authentication request was intercepted"); + } else { + assert.strictEqual( + authRequest.url.startsWith(`https://authority/tenant`), + true, + "Request body doesn't contain expected tenantId" + ); + assert.strictEqual( + authRequest.body.indexOf(`client_id=client`) > -1, + true, + "Request body doesn't contain expected clientId" + ); + assert.strictEqual( + authRequest.body.indexOf(`username=user%40domain.com`) > -1, + true, + "Request body doesn't contain expected username" + ); + assert.strictEqual( + authRequest.body.indexOf(`password=p4s%24w0rd`) > -1, + true, + "Request body doesn't contain expected username" + ); + } + }); +}); diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index c3dacb301ed..9bc5fb4037d 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -79,7 +79,7 @@ "@microsoft/api-extractor": "^7.1.5", "@types/chai": "^4.1.6", "@types/dotenv": "^6.1.0", - "@types/fs-extra": "~7.0.0", + "@types/fs-extra": "^8.0.0", "@types/mocha": "^5.2.5", "@types/nise": "^1.4.0", "@types/nock": "^10.0.1", @@ -90,14 +90,14 @@ "assert": "^1.4.1", "chai": "^4.2.0", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "fs-extra": "~8.0.1", + "fs-extra": "^8.1.0", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", "karma-coverage": "^1.1.2", diff --git a/sdk/keyvault/keyvault-keys/tests/utils/recorder.ts b/sdk/keyvault/keyvault-keys/tests/utils/recorder.ts index f2f22b5d58e..6a86badc44c 100644 --- a/sdk/keyvault/keyvault-keys/tests/utils/recorder.ts +++ b/sdk/keyvault/keyvault-keys/tests/utils/recorder.ts @@ -7,7 +7,7 @@ import { retry as realRetry } from "./retry"; import { isNode as coreIsNode, delay as coreDelay } from "@azure/core-http"; import queryString from "query-string"; import * as dotenv from "dotenv"; -dotenv.config({ path: "../../.env" }); +dotenv.config({ path: "../.env" }); export function isBrowser(): boolean { return typeof window !== "undefined"; diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index 0fb4b03d1d5..0e41b5ba72c 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -68,8 +68,8 @@ }, "sideEffects": false, "dependencies": { - "@azure/core-arm": "1.0.0-preview.2", "@azure/abort-controller": "1.0.0-preview.1", + "@azure/core-arm": "1.0.0-preview.2", "@azure/core-http": "1.0.0-preview.2", "@azure/core-paging": "1.0.0-preview.1", "@azure/identity": "1.0.0-preview.2", @@ -79,7 +79,7 @@ "@microsoft/api-extractor": "^7.1.5", "@types/chai": "^4.1.6", "@types/dotenv": "^6.1.0", - "@types/fs-extra": "~7.0.0", + "@types/fs-extra": "^8.0.0", "@types/mocha": "^5.2.5", "@types/nise": "^1.4.0", "@types/nock": "^10.0.1", @@ -90,14 +90,14 @@ "assert": "^1.4.1", "chai": "^4.2.0", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "fs-extra": "~8.0.1", + "fs-extra": "^8.1.0", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", "karma-coverage": "^1.1.2", diff --git a/sdk/keyvault/keyvault-secrets/tests/utils/recorder.ts b/sdk/keyvault/keyvault-secrets/tests/utils/recorder.ts index f60217fc2a9..087c0646ad3 100644 --- a/sdk/keyvault/keyvault-secrets/tests/utils/recorder.ts +++ b/sdk/keyvault/keyvault-secrets/tests/utils/recorder.ts @@ -8,7 +8,7 @@ import { retry as realRetry } from "./retry"; import { isNode as coreIsNode } from "@azure/core-http"; import queryString from "query-string"; import * as dotenv from "dotenv"; -dotenv.config({ path: "../../.env" }); +dotenv.config({ path: "../.env" }); export function isBrowser(): boolean { return typeof window !== "undefined"; diff --git a/sdk/kusto/arm-kusto/package.json b/sdk/kusto/arm-kusto/package.json index 2d1b67f8f6d..7ae52fcb598 100644 --- a/sdk/kusto/arm-kusto/package.json +++ b/sdk/kusto/arm-kusto/package.json @@ -2,10 +2,10 @@ "name": "@azure/arm-kusto", "author": "Microsoft Corporation", "description": "KustoManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.0.2", + "version": "2.0.3", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.0", - "@azure/ms-rest-js": "^2.0.3", + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", "tslib": "^1.10.0" }, "keywords": [ diff --git a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts index 661dd742e09..abc2b2dd2c1 100644 --- a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts +++ b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.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-kusto"; -const packageVersion = "2.0.2"; +const packageVersion = "2.0.3"; export class KustoManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/policy/arm-policy/package.json b/sdk/policy/arm-policy/package.json index 93debc7b855..cbca4c13070 100644 --- a/sdk/policy/arm-policy/package.json +++ b/sdk/policy/arm-policy/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-policy", "author": "Microsoft Corporation", "description": "PolicyClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.2", + "version": "2.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^1.3.2", "@azure/ms-rest-js": "^1.8.1", diff --git a/sdk/policy/arm-policy/src/models/index.ts b/sdk/policy/arm-policy/src/models/index.ts index 427a4211dde..b6689df20b2 100644 --- a/sdk/policy/arm-policy/src/models/index.ts +++ b/sdk/policy/arm-policy/src/models/index.ts @@ -135,10 +135,9 @@ export interface PolicyDefinition extends BaseResource { */ policyType?: PolicyType; /** - * The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible - * values include: 'NotSpecified', 'Indexed', 'All' + * The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. */ - mode?: PolicyMode; + mode?: string; /** * The display name of the policy definition. */ @@ -328,14 +327,6 @@ export type ResourceIdentityType = 'SystemAssigned' | 'None'; */ export type PolicyType = 'NotSpecified' | 'BuiltIn' | 'Custom'; -/** - * Defines values for PolicyMode. - * Possible values include: 'NotSpecified', 'Indexed', 'All' - * @readonly - * @enum {string} - */ -export type PolicyMode = 'NotSpecified' | 'Indexed' | 'All'; - /** * Contains response data for the deleteMethod operation. */ diff --git a/sdk/policy/arm-policy/src/operations/policyAssignments.ts b/sdk/policy/arm-policy/src/operations/policyAssignments.ts index d3423fcd625..b39b2d92c6f 100644 --- a/sdk/policy/arm-policy/src/operations/policyAssignments.ts +++ b/sdk/policy/arm-policy/src/operations/policyAssignments.ts @@ -179,9 +179,8 @@ export class PolicyAssignments { * contained within the resource group. If $filter=atScope() is provided, the returned list * includes all policy assignments that apply to the resource group, which is everything in the * unfiltered list except those applied to resources contained within the resource group. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the resource group and assign the policy definition whose id is - * {value}. + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value} that apply to the resource group. * @summary Retrieves all policy assignments that apply to a resource group. * @param resourceGroupName The name of the resource group that contains policy assignments. * @param [options] The optional parameters @@ -218,11 +217,11 @@ export class PolicyAssignments { * resources contained within the resource. If $filter=atScope() is provided, the returned list * includes all policy assignments that apply to the resource, which is everything in the * unfiltered list except those applied to resources contained within the resource. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the resource and assign the policy definition whose id is {value}. - * Three parameters plus the resource name are used to identify a specific resource. If the - * resource is not part of a parent resource (the more common case), the parent resource path - * should not be provided (or provided as ''). For example a web app could be specified as + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value} that apply to the resource. Three + * parameters plus the resource name are used to identify a specific resource. If the resource is + * not part of a parent resource (the more common case), the parent resource path should not be + * provided (or provided as ''). For example a web app could be specified as * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all * parameters should be provided. For example a virtual machine DNS name could be specified as @@ -290,8 +289,8 @@ export class PolicyAssignments { * contained within the subscription. If $filter=atScope() is provided, the returned list includes * all policy assignments that apply to the subscription, which is everything in the unfiltered * list except those applied to objects contained within the subscription. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the subscription and assign the policy definition whose id is {value}. + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. * @summary Retrieves all policy assignments that apply to a subscription. * @param [options] The optional parameters * @returns Promise @@ -445,9 +444,8 @@ export class PolicyAssignments { * contained within the resource group. If $filter=atScope() is provided, the returned list * includes all policy assignments that apply to the resource group, which is everything in the * unfiltered list except those applied to resources contained within the resource group. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the resource group and assign the policy definition whose id is - * {value}. + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value} that apply to the resource group. * @summary Retrieves all policy assignments that apply to a resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters @@ -484,11 +482,11 @@ export class PolicyAssignments { * resources contained within the resource. If $filter=atScope() is provided, the returned list * includes all policy assignments that apply to the resource, which is everything in the * unfiltered list except those applied to resources contained within the resource. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the resource and assign the policy definition whose id is {value}. - * Three parameters plus the resource name are used to identify a specific resource. If the - * resource is not part of a parent resource (the more common case), the parent resource path - * should not be provided (or provided as ''). For example a web app could be specified as + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value} that apply to the resource. Three + * parameters plus the resource name are used to identify a specific resource. If the resource is + * not part of a parent resource (the more common case), the parent resource path should not be + * provided (or provided as ''). For example a web app could be specified as * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all * parameters should be provided. For example a virtual machine DNS name could be specified as @@ -534,8 +532,8 @@ export class PolicyAssignments { * contained within the subscription. If $filter=atScope() is provided, the returned list includes * all policy assignments that apply to the subscription, which is everything in the unfiltered * list except those applied to objects contained within the subscription. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy - * assignments that apply to the subscription and assign the policy definition whose id is {value}. + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. * @summary Retrieves all policy assignments that apply to a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters diff --git a/sdk/policy/arm-policy/src/policyClientContext.ts b/sdk/policy/arm-policy/src/policyClientContext.ts index 5333b15ad59..3c2285df367 100644 --- a/sdk/policy/arm-policy/src/policyClientContext.ts +++ b/sdk/policy/arm-policy/src/policyClientContext.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-policy"; -const packageVersion = "1.0.2"; +const packageVersion = "2.0.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class PolicyClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-05-01'; + this.apiVersion = '2019-01-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/security/arm-security/LICENSE.txt b/sdk/security/arm-security/LICENSE.txt index a70e8cf6603..b73b4a1293c 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) 2019 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 86b7c9aa941..5dfa158c4b7 100644 --- a/sdk/security/arm-security/README.md +++ b/sdk/security/arm-security/README.md @@ -9,23 +9,23 @@ 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 -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### 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 +34,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 +44,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 +78,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 +97,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/sdk/security/arm-security/README.png) diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index 69b6df73c8f..2da1afc3127 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -4,9 +4,9 @@ "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", "version": "1.2.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.0", + "@azure/ms-rest-js": "^2.0.3", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -23,15 +23,16 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "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" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/security/arm-security/rollup.config.js b/sdk/security/arm-security/rollup.config.js index 651c85e10ed..43a7bd9aa06 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({ module: true }), + 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 00000000000..7483b83a7d5 --- /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, + AppWhitelistingPutGroupData, + CloudError, + PathRecommendation, + PublisherInfo, + UserRecommendation, + VmRecommendation +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts index a5728932eab..46a777bfc5f 100644 --- a/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts +++ b/sdk/security/arm-security/src/models/advancedThreatProtectionMappers.ts @@ -1,34 +1,48 @@ /* * 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, AdvancedThreatProtectionSetting, - Resource, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 db7d75be970..8067565671d 100644 --- a/sdk/security/arm-security/src/models/alertsMappers.ts +++ b/sdk/security/arm-security/src/models/alertsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, Alert, - Resource, - BaseResource, - AlertEntity, AlertConfidenceReason, - CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, + AlertEntity, + AlertList, + AscLocation, AutoProvisioningSetting, + BaseResource, + CloudError, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 d8a8951a705..3c08bb7fe3f 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/autoProvisioningSettingsMappers.ts b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts index 8c012f3647a..0f9248a804c 100644 --- a/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/autoProvisioningSettingsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, AutoProvisioningSetting, - Resource, + AutoProvisioningSettingList, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + WorkspaceSetting } 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 00000000000..ba2ae09c693 --- /dev/null +++ b/sdk/security/arm-security/src/models/complianceResultsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceResultList, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 a38fc6ae804..f06142d53e7 100644 --- a/sdk/security/arm-security/src/models/compliancesMappers.ts +++ b/sdk/security/arm-security/src/models/compliancesMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, - ComplianceSegment, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, - AdvancedThreatProtectionSetting, + Compliance, + ComplianceList, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 fbd7462a632..7b504741880 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 16f85ea6d5a..55f2be16966 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 dc38e6a5aba..a666c68362b 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,3316 @@ 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 { - /** - * @member {string} email The email of this security contact - */ - email: string; - /** - * @member {string} [phone] The phone number of this security contact - */ - phone?: string; - /** - * @member {AlertNotifications} alertNotifications Whether to send security - * alerts notifications to the security contact. Possible values include: - * 'On', 'Off' - */ - alertNotifications: AlertNotifications; - /** - * @member {AlertsToAdmins} alertsToAdmins Whether to send security alerts - * notifications to subscription admins. Possible values include: 'On', 'Off' - */ - alertsToAdmins: AlertsToAdmins; +export interface AscLocation extends Resource { + properties?: any; } /** - * @interface - * An interface representing Pricing. * Pricing tier will be applied for the scope based on the resource ID - * - * @extends Resource */ export interface Pricing extends Resource { /** - * @member {PricingTier} pricingTier Pricing tier type. Possible values - * include: 'Free', 'Standard' + * 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' */ pricingTier: PricingTier; + /** + * 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 freeTrialRemainingTime?: string; } /** - * @interface - * An interface representing WorkspaceSetting. - * Configures where to store the OMS agent data for workspaces under a scope - * - * @extends Resource + * List of pricing configurations response */ -export interface WorkspaceSetting extends Resource { - /** - * @member {string} workspaceId The full Azure ID of the workspace to save - * the data in - */ - workspaceId: string; +export interface PricingList { /** - * @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 + * List of pricing configurations */ - scope: string; + value: Pricing[]; } /** - * @interface - * An interface representing AutoProvisioningSetting. - * Auto provisioning setting - * - * @extends Resource + * Changing set of properties depending on the entity type. */ -export interface AutoProvisioningSetting extends Resource { +export interface AlertEntity { /** - * @member {AutoProvision} autoProvision Describes what kind of security - * agent provisioning action to take. Possible values include: 'On', 'Off' + * Type of entity + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - autoProvision: AutoProvision; + readonly type?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; } /** - * @interface - * An interface representing ComplianceSegment. - * A segment of a compliance assessment. - * + * Factors that increase our confidence that the alert is a true positive */ -export interface ComplianceSegment { +export interface AlertConfidenceReason { /** - * @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.** + * Type of confidence factor + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly segmentType?: string; + readonly type?: string; /** - * @member {number} [percentage] The size (%) of the segment. - * **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 percentage?: number; + readonly reason?: string; } /** - * @interface - * An interface representing Compliance. - * Compliance of a scope - * - * @extends Resource + * Security alert */ -export interface Compliance extends Resource { +export interface Alert 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.** + * State of the alert (Active, Dismissed etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly assessmentTimestampUtcDate?: Date; + readonly state?: string; /** - * @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 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 resourceCount?: number; + readonly reportedTimeUtc?: Date; /** - * @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.** + * Name of the vendor that discovered the incident + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly assessmentResult?: ComplianceSegment[]; -} - -/** - * @interface - * An interface representing AdvancedThreatProtectionSetting. - * The Advanced Threat Protection resource. - * - * @extends Resource - */ -export interface AdvancedThreatProtectionSetting extends Resource { + readonly vendorName?: string; /** - * @member {boolean} [isEnabled] Indicates whether Advanced Threat Protection - * is enabled. + * Name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - isEnabled?: boolean; -} - -/** - * Contains the possible cases for Setting. - */ -export type SettingUnion = Setting | DataExportSetting; - -/** - * @interface - * An interface representing Setting. - * Represents a security setting in Azure Security Center. - * - */ -export interface Setting { + readonly alertName?: string; /** - * @member {string} kind Polymorphic Discriminator + * Display name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - kind: "Setting"; + readonly alertDisplayName?: 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 detected by the vendor + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly detectedTimeUtc?: Date; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Description of the incident and what it means + * **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.** + * Recommended steps to reradiate the incident + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; -} - -/** - * @interface - * An interface representing DataExportSetting. - * Represents a data export setting - * - */ -export interface DataExportSetting { + readonly remediationSteps?: string; /** - * @member {string} kind Polymorphic Discriminator + * 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.** */ - kind: "DataExportSetting"; + readonly actionTaken?: string; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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.** */ - readonly id?: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The entity that the incident happened on + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly compromisedEntity?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource ID of the associated resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly associatedResource?: string; + extendedProperties?: { [propertyName: string]: any }; /** - * @member {boolean} enabled Is the data export setting is enabled + * The type of the alerted resource (Azure, Non-Azure) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled: boolean; + readonly systemSource?: string; + /** + * 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.** + */ + readonly canBeInvestigated?: boolean; + /** + * 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.** + */ + readonly isIncident?: boolean; + /** + * objects that are related to this alerts + */ + entities?: AlertEntity[]; + /** + * level of confidence we have on the alert + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly confidenceScore?: number; + /** + * reasons the alert got the confidenceScore value + */ + confidenceReasons?: AlertConfidenceReason[]; + /** + * 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.** + */ + readonly subscriptionId?: string; + /** + * Instance ID of the alert. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceId?: string; + /** + * 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.** + */ + readonly workspaceArmId?: string; + /** + * 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.** + */ + readonly correlationKey?: string; } /** - * @interface - * An interface representing SettingKind1. * The kind of the security setting - * */ -export interface SettingKind1 { +export interface SettingResource extends Resource { /** - * @member {SettingKind} [kind] the kind of the settings string. Possible - * values include: 'DataExportSetting' + * the kind of the settings string (DataExportSetting). Possible values include: + * 'DataExportSetting', 'AlertSuppressionSetting' */ - kind?: SettingKind; + kind: SettingKind; } /** - * @interface - * An interface representing SensitivityLabel. - * The sensitivity label. - * + * Represents a security setting in Azure Security Center. */ -export interface SensitivityLabel { - /** - * @member {string} [displayName] The name of the sensitivity label. - */ - displayName?: string; +export interface Setting extends SettingResource { +} + +/** + * Represents a data export setting + */ +export interface DataExportSetting extends Setting { /** - * @member {number} [order] The order of the sensitivity label. + * Is the data export setting is enabled */ - order?: number; + enabled: boolean; +} + +/** + * A container holding only the Tags for a resource, allowing the user to update the tags. + */ +export interface TagsResource { /** - * @member {boolean} [enabled] Indicates whether the label is enabled or not. + * Resource tags */ - enabled?: boolean; + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing InformationProtectionKeyword. - * The information type keyword. - * + * Properties of the solution's user defined resources. */ -export interface InformationProtectionKeyword { +export interface UserDefinedResourcesProperties { /** - * @member {string} [pattern] The keyword pattern. + * Azure Resource Graph query which represents the security solution's user defined resources. + * Required to start with "where type != "Microsoft.Devices/IotHubs"" */ - pattern?: string; + query: string; /** - * @member {boolean} [custom] Indicates whether the keyword is custom or not. + * List of Azure subscription ids on which the user defined resources query should be executed. */ - custom?: boolean; + querySubscriptions: string[]; +} + +/** + * Recommendation configuration + */ +export interface RecommendationConfigurationProperties { /** - * @member {boolean} [canBeNumeric] Indicates whether the keyword can be - * applied on numeric types or not. + * The recommendation type. 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' */ - canBeNumeric?: boolean; + recommendationType: RecommendationType; /** - * @member {boolean} [excluded] Indicates whether the keyword is excluded or - * not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - excluded?: boolean; + readonly name?: string; + /** + * Recommendation status. The recommendation is not generated when the status is disabled. + * Possible values include: 'Disabled', 'Enabled'. Default value: 'Enabled'. + */ + status: RecommendationConfigStatus; } /** - * @interface - * An interface representing InformationType. - * The information type. - * + * Security Solution */ -export interface InformationType { +export interface IoTSecuritySolutionModel { /** - * @member {string} [displayName] The name of the information type. + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - displayName?: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {number} [order] The order of the information type. + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - order?: number; + readonly compromisedEntity?: string; /** - * @member {string} [recommendedLabelId] The recommended label id to be - * associated with this information type. + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - recommendedLabelId?: string; + readonly associatedResource?: string; + extendedProperties?: { [propertyName: string]: any }; /** - * @member {boolean} [enabled] Indicates whether the information type is - * enabled or not. + * Resource tags */ - enabled?: boolean; + tags?: { [propertyName: string]: string }; /** - * @member {boolean} [custom] Indicates whether the information type is - * custom or not. + * The resource location. */ - custom?: boolean; + location?: string; /** - * @member {InformationProtectionKeyword[]} [keywords] The information type - * keywords. + * Workspace resource ID */ - keywords?: InformationProtectionKeyword[]; + workspace: string; + /** + * Resource display name. + */ + displayName: string; + /** + * Security solution status. Possible values include: 'Enabled', 'Disabled'. Default value: + * 'Enabled'. + */ + status?: SecuritySolutionStatus; + /** + * List of additional export to workspace data options + */ + 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[]; } /** - * @interface - * An interface representing InformationProtectionPolicy. - * Information protection policy. - * - * @extends Resource + * An interface representing UpdateIotSecuritySolutionData. */ -export interface InformationProtectionPolicy extends Resource { +export interface UpdateIotSecuritySolutionData extends TagsResource { + userDefinedResources?: UserDefinedResourcesProperties; + recommendationsConfiguration?: RecommendationConfigurationProperties[]; +} + +/** + * Severity metrics + */ +export interface IoTSeverityMetrics { /** - * @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.** + * count of high severity items */ - readonly lastModifiedUtc?: Date; + high?: number; /** - * @member {{ [propertyName: string]: SensitivityLabel }} [labels] Dictionary - * of sensitivity labels. + * count of medium severity items */ - labels?: { [propertyName: string]: SensitivityLabel }; + medium?: number; /** - * @member {{ [propertyName: string]: InformationType }} [informationTypes] - * The sensitivity information types. + * count of low severity items */ - informationTypes?: { [propertyName: string]: InformationType }; + low?: number; } /** - * @interface - * An interface representing Location. - * Describes an Azure resource with location - * + * An interface representing IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. */ -export interface Location { +export interface IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem { /** - * @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 date of the metrics */ - readonly location?: string; + date?: Date; + /** + * devices alerts count by severity. + */ + devicesMetrics?: IoTSeverityMetrics; } /** - * @interface - * An interface representing OperationDisplay. - * Security operation display - * + * Statistic information about the number of alerts per device during the last period */ -export interface OperationDisplay { - /** - * @member {string} [provider] The resource provider for the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly provider?: string; +export interface IoTSecurityAlertedDevice { /** - * @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.** + * Name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resource?: string; + readonly deviceId?: 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.** + * the number of alerts raised for this device + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; + readonly alertsCount?: number; +} + +/** + * List of devices with the count of raised alerts + */ +export interface IoTSecurityAlertedDevicesList { /** - * @member {string} [description] The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of aggregated alerts data */ - readonly description?: string; + value: IoTSecurityAlertedDevice[]; } /** - * @interface - * An interface representing Operation. - * Possible operation in the REST API of Microsoft.Security - * + * Statistic information about the number of alerts per alert type during the last period */ -export interface Operation { +export interface IoTSecurityDeviceAlert { /** - * @member {string} [name] Name of the operation - * **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 name?: string; + readonly alertDisplayName?: string; /** - * @member {string} [origin] Where the operation is originated - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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.** */ - readonly origin?: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {OperationDisplay} [display] + * the number of alerts raised for this alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly alertsCount?: number; } /** - * @interface - * An interface representing SecurityTaskParameters. - * Changing set of properties, depending on the task type that is derived from - * the name field - * + * List of alerts with the count of raised alerts */ -export interface SecurityTaskParameters { +export interface IoTSecurityDeviceAlertsList { /** - * @member {string} [name] Name of the task type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of top alerts data */ - readonly name?: string; + value: IoTSecurityDeviceAlert[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - [property: string]: any; + readonly nextLink?: string; } /** - * @interface - * An interface representing SecurityTask. - * Security task that we recommend to do in order to strengthen security - * - * @extends Resource + * Statistic information about the number of recommendations per recommendation type */ -export interface SecurityTask extends Resource { +export interface IoTSecurityDeviceRecommendation { /** - * @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.** + * Display name of the recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly state?: string; + readonly recommendationDisplayName?: string; /** - * @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.** + * Estimated severity of this recommendation. Possible values include: 'Informational', 'Low', + * 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creationTimeUtc?: Date; - /** - * @member {SecurityTaskParameters} [securityTaskParameters] - */ - securityTaskParameters?: SecurityTaskParameters; + readonly reportedSeverity?: ReportedSeverity; /** - * @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.** + * the number of device with this recommendation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastStateChangeTimeUtc?: Date; - /** - * @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.** - */ - readonly subState?: string; + readonly devicesCount?: number; } /** - * @interface - * An interface representing AscLocation. - * The ASC location of the subscription is in the "name" field - * - * @extends Resource + * List of recommendations with the count of devices */ -export interface AscLocation extends Resource { +export interface IoTSecurityDeviceRecommendationsList { /** - * @member {any} [properties] + * List of aggregated recommendation data */ - properties?: any; + value: IoTSecurityDeviceRecommendation[]; } /** - * @interface - * An interface representing AlertEntity. - * Changing set of properties depending on the entity type. - * + * Security Analytics of a security solution */ -export interface AlertEntity { +export interface IoTSecuritySolutionAnalyticsModel extends Resource { /** - * @member {string} [type] Type of entity - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Security Analytics of a security solution + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly metrics?: IoTSeverityMetrics; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * number of unhealthy devices + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - [property: string]: any; + readonly unhealthyDeviceCount?: number; + /** + * The list of devices metrics by the aggregated date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly devicesMetrics?: IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem[]; + /** + * The list of top 3 devices with the most attacked. + */ + topAlertedDevices?: IoTSecurityAlertedDevicesList; + /** + * The list of most prevalent 3 alerts. + */ + mostPrevalentDeviceAlerts?: IoTSecurityDeviceAlertsList; + /** + * The list of most prevalent 3 recommendations. + */ + mostPrevalentDeviceRecommendations?: IoTSecurityDeviceRecommendationsList; } /** - * @interface - * An interface representing AlertConfidenceReason. - * Factors that increase our confidence that the alert is a true positive - * + * List of Security Analytics of a security solution */ -export interface AlertConfidenceReason { +export interface IoTSecuritySolutionAnalyticsModelList { /** - * @member {string} [type] Type of confidence factor - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of Security Analytics of a security solution */ - readonly type?: string; + value: IoTSecuritySolutionAnalyticsModel[]; /** - * @member {string} [reason] description of the confidence reason - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URI to fetch the next page. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reason?: string; + readonly nextLink?: string; } /** - * @interface - * An interface representing Alert. - * Security alert - * - * @extends Resource + * Security Solution Aggregated Alert information */ -export interface Alert extends Resource { +export interface IoTSecurityAggregatedAlert { /** - * @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.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly state?: string; + readonly id?: string; /** - * @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.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reportedTimeUtc?: Date; + value: IoTSecurityDeviceAlert[]; /** - * @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.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly vendorName?: string; + readonly type?: string; /** - * @member {string} [alertName] Name of the alert type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags */ - readonly alertName?: string; + tags?: { [propertyName: string]: string }; /** - * @member {string} [alertDisplayName] Display name of the alert 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 alertDisplayName?: string; + readonly alertType?: string; /** - * @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.** + * Display name of the alert type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly detectedTimeUtc?: Date; + readonly alertDisplayName?: 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 date the incidents were detected by the vendor + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly aggregatedDateUtc?: Date; /** - * @member {string} [remediationSteps] Recommended steps to reradiate the - * incident - * **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 remediationSteps?: string; + readonly vendorName?: string; /** - * @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.** + * 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.** */ - readonly actionTaken?: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {string} [reportedSeverity] Estimated severity of this alert - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Recommended steps for remediation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reportedSeverity?: string; + readonly remediationSteps?: string; /** - * @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.** + * Description of the incident and what it means + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly compromisedEntity?: string; + readonly description?: string; /** - * @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.** + * Occurrence number of the alert within the aggregated date + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly associatedResource?: string; + readonly count?: number; /** - * @member {{ [propertyName: string]: any }} [extendedProperties] + * Azure resource ID of the resource that got the alerts + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - extendedProperties?: { [propertyName: string]: any }; + readonly effectedResourceType?: 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 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; /** - * @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.** + * 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.** */ - readonly canBeInvestigated?: boolean; + readonly actionTaken?: string; /** - * @member {AlertEntity[]} [entities] objects that are related to this alerts + * query in log analytics to get the list of affected devices/alerts + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - entities?: AlertEntity[]; + readonly logAnalyticsQuery?: string; +} + +/** + * Security Solution Recommendation Information + */ +export interface IoTSecurityAggregatedRecommendation { /** - * @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.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly confidenceScore?: number; + readonly id?: string; /** - * @member {AlertConfidenceReason[]} [confidenceReasons] reasons the alert - * got the confidenceScore value + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - confidenceReasons?: AlertConfidenceReason[]; + readonly name?: 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.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionId?: string; + readonly type?: string; /** - * @member {string} [instanceId] Instance ID of the alert. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags */ - readonly instanceId?: string; + tags?: { [propertyName: string]: string }; /** - * @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.** + * Name of the recommendation */ - readonly workspaceArmId?: string; -} - -/** - * @interface - * An interface representing DiscoveredSecuritySolution. - */ -export interface DiscoveredSecuritySolution { + recommendationName?: string; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Display name of the recommendation type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly recommendationDisplayName?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Description of the incident and what it means + * **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.** + * The recommendation-type GUID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly recommendationTypeId?: 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.** + * Name of the vendor that discovered the issue + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly detectedBy?: string; /** - * @member {SecurityFamily} securityFamily The security family of the - * discovered solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', - * 'Va' + * Recommended steps for remediation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - securityFamily: SecurityFamily; + readonly remediationSteps?: string; /** - * @member {string} offer The security solutions' image offer + * Estimated severity of this recommendation. Possible values include: 'Informational', 'Low', + * 'Medium', 'High' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - offer: string; + readonly reportedSeverity?: ReportedSeverity; /** - * @member {string} publisher The security solutions' image publisher + * the number of the healthy devices within the solution + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - publisher: string; + readonly healthyDevices?: number; /** - * @member {string} sku The security solutions' image sku + * the number of the unhealthy devices within the solution + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sku: string; + readonly unhealthyDeviceCount?: number; + /** + * query in log analytics to get 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 TopologySingleResourceParent. + * Describes properties of a connected resource */ -export interface TopologySingleResourceParent { +export interface ConnectedResource { /** - * @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 Azure resource id of the connected resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceId?: string; + 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; } /** - * @interface - * An interface representing TopologySingleResourceChild. + * Describes the allowed inbound and outbound traffic of an Azure resource */ -export interface TopologySingleResourceChild { +export interface ConnectableResource { /** - * @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 Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceId?: string; + 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[]; } /** - * @interface - * An interface representing TopologySingleResource. + * The resource whose properties describes the allowed traffic between Azure resources */ -export interface TopologySingleResource { - /** - * @member {string} [resourceId] Azure resource id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly resourceId?: string; +export interface AllowedConnectionsResource { /** - * @member {string} [severity] The security severity of the resource - * **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 severity?: string; + readonly description?: string; /** - * @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.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly recommendationsExist?: boolean; + readonly recommendationTypeId?: string; /** - * @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.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly networkZones?: string; + readonly detectedBy?: 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.** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly topologyScore?: number; + readonly remediationSteps?: string; /** - * @member {string} [location] The location of this resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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 location?: string; + readonly calculatedDateTime?: Date; /** - * @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.** + * List of connectable resources + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly parents?: TopologySingleResourceParent[]; + readonly connectableResources?: ConnectableResource[]; +} + +/** + * Describes an Azure resource with location + */ +export interface Location { /** - * @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.** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly children?: TopologySingleResourceChild[]; + readonly location?: string; } /** - * @interface - * An interface representing TopologyResource. + * An interface representing DiscoveredSecuritySolution. */ -export interface TopologyResource { +export interface DiscoveredSecuritySolution { /** - * @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; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @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 security family of the discovered solution. Possible values include: 'Waf', 'Ngfw', + * 'SaasWaf', 'Va' */ - readonly calculatedDateTime?: Date; + securityFamily: SecurityFamily; /** - * @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 security solutions' image offer */ - readonly topologyResources?: TopologySingleResource[]; + offer: string; + /** + * The security solutions' image publisher + */ + publisher: string; + /** + * The security solutions' image sku + */ + sku: string; } /** - * @interface - * An interface representing JitNetworkAccessPortRule. + * Contains the possible cases for ExternalSecuritySolution. */ -export interface JitNetworkAccessPortRule { +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 { /** - * @member {number} number + * Polymorphic Discriminator */ - number: number; + kind: "ExternalSecuritySolution"; /** - * @member {Protocol} protocol Possible values include: 'TCP', 'UDP', 'All' + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - protocol: Protocol; + readonly id?: string; /** - * @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". + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefix?: string; + readonly name?: string; /** - * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with - * the "allowedSourceAddressPrefix" parameter. + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefixes?: string[]; + readonly type?: string; /** - * @member {string} maxRequestAccessDuration Maximum duration requests can be - * made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - maxRequestAccessDuration: string; + readonly location?: string; } /** - * @interface - * An interface representing JitNetworkAccessPolicyVirtualMachine. + * The solution properties (correspond to the solution kind) */ -export interface JitNetworkAccessPolicyVirtualMachine { - /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy - */ - id: string; +export interface ExternalSecuritySolutionProperties { + deviceVendor?: string; + deviceType?: string; + workspace?: ConnectedWorkspace; /** - * @member {JitNetworkAccessPortRule[]} ports Port configurations for the - * virtual machine + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - ports: JitNetworkAccessPortRule[]; + [property: string]: any; } /** - * @interface - * An interface representing JitNetworkAccessRequestPort. + * An interface representing CefSolutionProperties. + * @summary The external security solution properties for CEF solutions */ -export interface JitNetworkAccessRequestPort { - /** - * @member {number} number - */ - number: number; +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 { /** - * @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". + * Polymorphic Discriminator */ - allowedSourceAddressPrefix?: string; + kind: "CEF"; /** - * @member {string[]} [allowedSourceAddressPrefixes] Mutually exclusive with - * the "allowedSourceAddressPrefix" parameter. + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - allowedSourceAddressPrefixes?: string[]; + readonly id?: string; /** - * @member {Date} endTimeUtc The date & time at which the request ends in UTC + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - endTimeUtc: Date; + readonly name?: string; /** - * @member {Status} status The status of the port. Possible values include: - * 'Revoked', 'Initiated' + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - status: Status; + readonly type?: string; /** - * @member {StatusReason} statusReason A description of why the `status` has - * its value. Possible values include: 'Expired', 'UserRequested', - * 'NewerRequestInitiated' + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - statusReason: StatusReason; + readonly location?: string; + properties?: CefSolutionProperties; } /** - * @interface - * An interface representing JitNetworkAccessRequestVirtualMachine. + * An interface representing AtaSolutionProperties. + * @summary The external security solution properties for ATA solutions */ -export interface JitNetworkAccessRequestVirtualMachine { - /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy - */ - id: string; - /** - * @member {JitNetworkAccessRequestPort[]} ports The ports that were opened - * for the virtual machine - */ - ports: JitNetworkAccessRequestPort[]; +export interface AtaSolutionProperties extends ExternalSecuritySolutionProperties { + lastEventReceived?: string; } /** - * @interface - * An interface representing JitNetworkAccessRequest. + * Represents an ATA security solution which sends logs to an OMS workspace */ -export interface JitNetworkAccessRequest { - /** - * @member {JitNetworkAccessRequestVirtualMachine[]} virtualMachines - */ - virtualMachines: JitNetworkAccessRequestVirtualMachine[]; - /** - * @member {Date} startTimeUtc The start time of the request in UTC - */ - startTimeUtc: Date; +export interface AtaExternalSecuritySolution { /** - * @member {string} requestor The identity of the person who made the request + * Polymorphic Discriminator */ - requestor: string; -} - -/** - * @interface - * An interface representing JitNetworkAccessPolicy. - */ -export interface JitNetworkAccessPolicy { + kind: "ATA"; /** - * @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; /** - * @member {string} [kind] Kind of the resource - */ - kind?: 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.** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; - /** - * @member {JitNetworkAccessPolicyVirtualMachine[]} virtualMachines - * Configurations for Microsoft.Compute/virtualMachines resource type. - */ - virtualMachines: JitNetworkAccessPolicyVirtualMachine[]; - /** - * @member {JitNetworkAccessRequest[]} [requests] - */ - requests?: JitNetworkAccessRequest[]; - /** - * @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.** - */ - readonly provisioningState?: string; -} - -/** - * @interface - * An interface representing JitNetworkAccessPolicyInitiatePort. - */ -export interface JitNetworkAccessPolicyInitiatePort { - /** - * @member {number} number - */ - number: number; - /** - * @member {string} [allowedSourceAddressPrefix] Source of the allowed - * traffic. If omitted, the request will be for the source IP address of the - * initiate request. - */ - allowedSourceAddressPrefix?: string; - /** - * @member {Date} endTimeUtc The time to close the request in UTC - */ - endTimeUtc: Date; + properties?: AtaSolutionProperties; } /** - * @interface - * An interface representing JitNetworkAccessPolicyInitiateVirtualMachine. + * An interface representing ConnectedWorkspace. + * @summary Represents an OMS workspace to which the solution is connected */ -export interface JitNetworkAccessPolicyInitiateVirtualMachine { - /** - * @member {string} id Resource ID of the virtual machine that is linked to - * this policy - */ - id: string; +export interface ConnectedWorkspace { /** - * @member {JitNetworkAccessPolicyInitiatePort[]} ports The ports to open for - * the resource with the `id` + * Azure resource ID of the connected OMS workspace */ - ports: JitNetworkAccessPolicyInitiatePort[]; + id?: string; } /** - * @interface - * An interface representing JitNetworkAccessPolicyInitiateRequest. + * An interface representing AadSolutionProperties. + * @summary The external security solution properties for AAD solutions */ -export interface JitNetworkAccessPolicyInitiateRequest { +export interface AadSolutionProperties { + deviceVendor?: string; + deviceType?: string; + workspace?: ConnectedWorkspace; /** - * @member {JitNetworkAccessPolicyInitiateVirtualMachine[]} virtualMachines A - * list of virtual machines & ports to open access for + * The connectivity state of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' */ - virtualMachines: JitNetworkAccessPolicyInitiateVirtualMachine[]; + connectivityState?: AadConnectivityState; } /** - * 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. - * + * Represents an AAD identity protection solution which sends logs to an OMS workspace. */ -export interface ExternalSecuritySolution { +export interface AadExternalSecuritySolution { /** - * @member {string} kind Polymorphic Discriminator + * Polymorphic Discriminator */ - kind: "ExternalSecuritySolution"; + kind: "AAD"; /** - * @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; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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; } /** - * @interface - * An interface representing ExternalSecuritySolutionProperties. - * The solution properties (correspond to the solution kind) - * + * Describes an Azure resource with kind */ -export interface ExternalSecuritySolutionProperties { +export interface ExternalSecuritySolutionKind1 { /** - * @member {string} [deviceVendor] + * The kind of the external solution. Possible values include: 'CEF', 'ATA', 'AAD' */ - deviceVendor?: string; + kind?: ExternalSecuritySolutionKind; +} + +/** + * Describes an Azure resource with kind + */ +export interface AadConnectivityState1 { /** - * @member {string} [deviceType] + * The connectivity state of the external AAD solution . Possible values include: 'Discovered', + * 'NotLicensed', 'Connected' */ - deviceType?: string; + connectivityState?: AadConnectivityState; +} + +/** + * An interface representing JitNetworkAccessPortRule. + */ +export interface JitNetworkAccessPortRule { + number: number; /** - * @member {ConnectedWorkspace} [workspace] + * Possible values include: 'TCP', 'UDP', 'All' */ - workspace?: ConnectedWorkspace; + protocol: Protocol; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * 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". */ - [property: string]: any; + 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; } /** - * @interface - * An interface representing CefSolutionProperties. - * @summary The external security solution properties for CEF solutions - * - * @extends ExternalSecuritySolutionProperties + * An interface representing JitNetworkAccessPolicyVirtualMachine. */ -export interface CefSolutionProperties extends ExternalSecuritySolutionProperties { +export interface JitNetworkAccessPolicyVirtualMachine { /** - * @member {string} [hostname] + * Resource ID of the virtual machine that is linked to this policy */ - hostname?: string; + id: string; /** - * @member {string} [agent] + * Port configurations for the virtual machine */ - agent?: string; + ports: JitNetworkAccessPortRule[]; /** - * @member {string} [lastEventReceived] + * Public IP address of the Azure Firewall that is linked to this policy, if applicable */ - lastEventReceived?: string; + publicIpAddress?: string; } /** - * @interface - * An interface representing CefExternalSecuritySolution. - * Represents a security solution which sends CEF logs to an OMS workspace - * + * An interface representing JitNetworkAccessRequestPort. */ -export interface CefExternalSecuritySolution { +export interface JitNetworkAccessRequestPort { + number: number; /** - * @member {string} kind Polymorphic Discriminator + * 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". */ - kind: "CEF"; + allowedSourceAddressPrefix?: string; /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Mutually exclusive with the "allowedSourceAddressPrefix" parameter. */ - readonly id?: string; + allowedSourceAddressPrefixes?: string[]; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The date & time at which the request ends in UTC */ - readonly name?: string; + endTimeUtc: Date; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The status of the port. Possible values include: 'Revoked', 'Initiated' */ - readonly type?: string; + status: Status; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A description of why the `status` has its value. Possible values include: 'Expired', + * 'UserRequested', 'NewerRequestInitiated' */ - readonly location?: string; + statusReason: StatusReason; /** - * @member {CefSolutionProperties} [properties] + * The port which is mapped to this port's `number` in the Azure Firewall, if applicable */ - properties?: CefSolutionProperties; + mappedPort?: number; } /** - * @interface - * An interface representing AtaSolutionProperties. - * @summary The external security solution properties for ATA solutions - * - * @extends ExternalSecuritySolutionProperties + * An interface representing JitNetworkAccessRequestVirtualMachine. */ -export interface AtaSolutionProperties extends ExternalSecuritySolutionProperties { +export interface JitNetworkAccessRequestVirtualMachine { /** - * @member {string} [lastEventReceived] + * Resource ID of the virtual machine that is linked to this policy */ - lastEventReceived?: string; + id: string; + /** + * The ports that were opened for the virtual machine + */ + ports: JitNetworkAccessRequestPort[]; } /** - * @interface - * An interface representing AtaExternalSecuritySolution. - * Represents an ATA security solution which sends logs to an OMS workspace - * + * An interface representing JitNetworkAccessRequest. */ -export interface AtaExternalSecuritySolution { +export interface JitNetworkAccessRequest { + virtualMachines: JitNetworkAccessRequestVirtualMachine[]; /** - * @member {string} kind Polymorphic Discriminator + * The start time of the request in UTC */ - kind: "ATA"; + startTimeUtc: Date; + /** + * The identity of the person who made the request + */ + requestor: string; +} + +/** + * An interface representing JitNetworkAccessPolicy. + */ +export interface JitNetworkAccessPolicy { /** - * @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; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Kind of the resource */ - readonly location?: string; + kind?: string; /** - * @member {AtaSolutionProperties} [properties] + * 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; } /** - * @interface * An interface representing ConnectedWorkspace. * @summary Represents an OMS workspace to which the solution is connected - * */ export interface ConnectedWorkspace { /** - * @member {string} [id] Azure resource ID of the connected OMS workspace + * Configurations for Microsoft.Compute/virtualMachines resource type. */ - id?: string; + 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.** + */ + connectivityState?: AadConnectivityState; } /** - * @interface - * An interface representing AadSolutionProperties. - * @summary The external security solution properties for AAD solutions - * + * An interface representing JitNetworkAccessPolicyInitiatePort. */ -export interface AadSolutionProperties { +export interface JitNetworkAccessPolicyInitiatePort { + number: number; /** - * @member {string} [deviceVendor] + * Source of the allowed traffic. If omitted, the request will be for the source IP address of + * the initiate request. */ - deviceVendor?: string; + issue?: Issue; /** - * @member {string} [deviceType] + * The time to close the request in UTC */ - deviceType?: string; + numberOfVms?: number; +} + +/** + * An interface representing JitNetworkAccessPolicyInitiateVirtualMachine. + */ +export interface VmRecommendation { /** - * @member {ConnectedWorkspace} [workspace] + * Resource ID of the virtual machine that is linked to this policy */ - workspace?: ConnectedWorkspace; + configurationStatus?: ConfigurationStatus; /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * The ports to open for the resource with the `id` */ - connectivityState?: AadConnectivityState; + readonly location?: string; + properties?: AadSolutionProperties; } /** - * @interface - * An interface representing AadExternalSecuritySolution. - * Represents an AAD identity protection solution which sends logs to an OMS - * workspace. - * + * An interface representing JitNetworkAccessPolicyInitiateRequest. */ -export interface AadExternalSecuritySolution { +export interface ExternalSecuritySolutionKind1 { /** - * @member {string} kind Polymorphic Discriminator + * A list of virtual machines & ports to open access for */ - kind: "AAD"; + kind?: ExternalSecuritySolutionKind; +} + +/** + * Describes an Azure resource with kind + */ +export interface Kind { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Kind of the resource */ - readonly id?: string; + kind?: string; +} + +/** + * Represents a summary of the alerts of the VM/server group + */ +export interface AppWhitelistingIssueSummary { /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Possible values include: 'ViolationsAudited', 'ViolationsBlocked', + * 'MsiAndScriptViolationsAudited', 'MsiAndScriptViolationsBlocked', + * 'ExecutableViolationsAudited', 'RulesViolatedManually' */ - readonly name?: string; + issue?: Issue; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The number of machines in the VM/server group that have this alert */ - readonly type?: string; + numberOfVms?: number; +} + +/** + * Represents a machine that is part of a VM/server group + */ +export interface VmRecommendation { /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' */ - readonly location?: string; + configurationStatus?: ConfigurationStatus; /** - * @member {AadSolutionProperties} [properties] + * Possible values include: 'Recommended', 'Add', 'Remove' */ - properties?: AadSolutionProperties; + recommendationAction?: RecommendationAction; + resourceId?: string; } /** - * @interface - * An interface representing ExternalSecuritySolutionKind1. - * Describes an Azure resource with kind - * + * Represents the publisher information of a process/rule */ -export interface ExternalSecuritySolutionKind1 { +export interface PublisherInfo { /** - * @member {ExternalSecuritySolutionKind} [kind] The kind of the external - * solution. Possible values include: 'CEF', 'ATA', 'AAD' + * 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 */ - kind?: ExternalSecuritySolutionKind; + 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; } /** - * @interface - * An interface representing AadConnectivityState1. - * Describes an Azure resource with kind - * + * Represents a user that is recommended to be allowed for a certain rule */ -export interface AadConnectivityState1 { +export interface UserRecommendation { /** - * @member {AadConnectivityState} [connectivityState] The connectivity state - * of the external AAD solution . Possible values include: 'Discovered', - * 'NotLicensed', 'Connected' + * Represents a user that is recommended to be allowed for a certain rule */ - connectivityState?: AadConnectivityState; + username?: string; + /** + * Possible values include: 'Recommended', 'Add', 'Remove' + */ + recommendationAction?: RecommendationAction1; } /** - * @interface - * An interface representing ConnectedResource. - * Describes properties of a connected resource - * + * Represents a path that is recommended to be allowed and its properties */ -export interface ConnectedResource { +export interface PathRecommendation { /** - * @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.** + * The full path to whitelist */ - readonly connectedResourceId?: string; + path?: string; /** - * @member {string} [tcpPorts] The allowed tcp ports - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Possible values include: 'Recommended', 'Add', 'Remove' */ - readonly tcpPorts?: string; + action?: Action; /** - * @member {string} [udpPorts] The allowed udp ports - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Possible values include: 'File', 'FileHash', 'PublisherSignature', 'ProductSignature', + * 'BinarySignature', 'VersionAndAboveSignature' */ - readonly udpPorts?: string; -} - -/** - * @interface - * An interface representing ConnectableResource. - * Describes the allowed inbound and outbound traffic of an Azure resource - * - */ -export interface ConnectableResource { + type?: Type; + publisherInfo?: PublisherInfo; /** - * @member {string} [id] The Azure resource id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Whether the path is commonly run on the machine */ - readonly id?: string; + common?: boolean; + userSids?: string[]; + usernames?: UserRecommendation[]; /** - * @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.** + * Possible values include: 'Exe', 'Dll', 'Msi', 'Script', 'Executable', 'Unknown' */ - readonly inboundConnectedResources?: ConnectedResource[]; + fileType?: FileType; /** - * @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.** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' */ - readonly outboundConnectedResources?: ConnectedResource[]; + configurationStatus?: ConfigurationStatus1; } /** - * @interface - * An interface representing AllowedConnectionsResource. - * The resource whose properties describes the allowed traffic between Azure - * resources - * + * An interface representing AppWhitelistingGroup. */ -export interface AllowedConnectionsResource { +export interface AppWhitelistingGroup { /** - * @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; /** - * @member {string} [location] Location where the resource is stored - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Location where the resource is stored + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @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.** + * Possible values include: 'Audit', 'Enforce' */ - readonly calculatedDateTime?: Date; + enforcementMode?: EnforcementMode; /** - * @member {ConnectableResource[]} [connectableResources] List of connectable - * resources - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Possible values include: 'Configured', 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' */ - readonly connectableResources?: ConnectableResource[]; + configurationStatus?: ConfigurationStatus2; + /** + * Possible values include: 'Recommended', 'NotRecommended', 'NotAvailable', 'NoStatus' + */ + recommendationStatus?: RecommendationStatus; + issues?: AppWhitelistingIssueSummary[]; + /** + * Possible values include: 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker', + * 'NonAzure_AuditD', 'None' + */ + sourceSystem?: SourceSystem; + vmRecommendations?: VmRecommendation[]; + pathRecommendations?: PathRecommendation[]; } /** - * @interface - * An interface representing TasksListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Represents a list of VM/server groups and set of rules that are Recommended by Azure Security + * Center to be allowed */ -export interface TasksListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] OData filter. Optional. - */ - filter?: string; +export interface AppWhitelistingGroups { + value?: AppWhitelistingGroup[]; } /** - * @interface - * An interface representing TasksListByHomeRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The altered data of the recommended VM/server group policy */ -export interface TasksListByHomeRegionOptionalParams extends msRest.RequestOptionsBase { +export interface AppWhitelistingPutGroupData { /** - * @member {string} [filter] OData filter. Optional. + * Possible values include: 'Audit', 'Enforce' */ - filter?: string; + enforcementMode?: EnforcementMode1; + vmRecommendations?: VmRecommendation[]; + pathRecommendations?: PathRecommendation[]; } /** - * @interface - * An interface representing TasksListByResourceGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Security operation display */ -export interface TasksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface OperationDisplay { /** - * @member {string} [filter] OData filter. Optional. + * The resource provider for the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; -} - -/** - * @interface - * An interface representing AlertsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { + readonly provider?: string; /** - * @member {string} [filter] OData filter. Optional. + * 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.** */ - filter?: string; + readonly resource?: string; /** - * @member {string} [select] OData select. Optional. + * The display name of the security operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + readonly operation?: string; /** - * @member {string} [expand] OData expand. Optional. + * The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly description?: string; } /** - * @interface - * An interface representing AlertsListByResourceGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Possible operation in the REST API of Microsoft.Security */ -export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] OData filter. Optional. - */ - filter?: string; +export interface Operation { /** - * @member {string} [select] OData select. Optional. + * Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + issue?: Issue; /** - * @member {string} [expand] OData expand. Optional. + * Where the operation is originated + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly origin?: string; + display?: OperationDisplay; } /** - * @interface - * An interface representing AlertsListSubscriptionLevelAlertsByRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Changing set of properties, depending on the task type that is derived from the name field */ -export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] OData filter. Optional. - */ - filter?: string; +export interface SecurityTaskParameters { /** - * @member {string} [select] OData select. Optional. + * Name of the task type + * **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. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - expand?: string; + [property: string]: any; } /** - * @interface - * An interface representing AlertsListResourceGroupLevelAlertsByRegionOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Security task that we recommend to do in order to strengthen security */ -export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { +export interface SecurityTask extends Resource { /** - * @member {string} [filter] OData filter. Optional. + * State of the task (Active, Resolved etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly state?: string; /** - * @member {string} [select] OData select. Optional. + * The time this task was discovered in UTC + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - select?: string; + readonly creationTimeUtc?: Date; + securityTaskParameters?: SecurityTaskParameters; /** - * @member {string} [expand] OData expand. Optional. + * 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.** */ - expand?: string; -} - -/** - * @interface - * An interface representing SecurityCenterOptions. - * @extends AzureServiceClientOptions - */ -export interface SecurityCenterOptions extends AzureServiceClientOptions { + readonly lastStateChangeTimeUtc?: Date; /** - * @member {string} [baseUri] + * Additional data on the state of the task + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - baseUri?: string; + readonly subState?: string; } - /** - * @interface - * An interface representing the PricingList. - * List of pricing configurations response - * - * @extends Array + * An interface representing TopologySingleResourceParent. */ -export interface PricingList extends Array { +export interface TopologySingleResourceParent { /** - * @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.** + * 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 nextLink?: string; + readonly resourceId?: string; } /** - * @interface - * An interface representing the SecurityContactList. - * List of security contacts response - * - * @extends Array + * An interface representing TopologySingleResourceChild. */ -export interface SecurityContactList extends Array { +export interface TopologySingleResourceChild { /** - * @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.** + * 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 nextLink?: string; + readonly resourceId?: string; } /** - * @interface - * An interface representing the WorkspaceSettingList. - * List of workspace settings response - * - * @extends Array + * An interface representing TopologySingleResource. */ -export interface WorkspaceSettingList extends Array { +export interface TopologySingleResource { /** - * @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.** + * Azure resource id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the AutoProvisioningSettingList. - * List of all the auto provisioning settings response - * - * @extends Array - */ -export interface AutoProvisioningSettingList extends Array { + readonly resourceId?: string; /** - * @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 security severity of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ComplianceList. - * List of Compliance objects response - * - * @extends Array - */ -export interface ComplianceList extends Array { + readonly severity?: string; /** - * @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.** + * Indicates if the resource has security recommendations + * **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 - */ -export interface SettingsList extends Array { + readonly recommendationsExist?: boolean; /** - * @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.** + * 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 nextLink?: string; + 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[]; } /** - * @interface - * An interface representing the InformationProtectionPolicyList. - * Information protection policies response. - * - * @extends Array + * An interface representing TopologyResource. */ -export interface InformationProtectionPolicyList extends Array { +export interface TopologyResource { /** - * @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; + /** + * 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.** + */ + enforcementMode?: EnforcementMode; + /** + * 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[]; } /** - * @interface - * An interface representing the OperationList. - * List of possible operations for Microsoft.Security resource provider - * - * @extends Array + * The Advanced Threat Protection resource. */ -export interface OperationList extends Array { +export interface AdvancedThreatProtectionSetting 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.** + * Indicates whether Advanced Threat Protection is enabled. */ - readonly nextLink?: string; + isEnabled?: boolean; } /** - * @interface - * An interface representing the AscLocationList. - * List of locations where ASC saves your data - * - * @extends Array + * Auto provisioning setting */ -export interface AscLocationList 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 SecurityTaskList. - * List of security task recommendations - * - * @extends Array + * A segment of a compliance assessment. */ -export interface SecurityTaskList 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 AlertList. - * List of security alerts - * - * @extends Array + * Compliance of a scope */ -export interface AlertList 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 DiscoveredSecuritySolutionList. - * @extends Array + * The sensitivity label. */ -export interface DiscoveredSecuritySolutionList 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 order of the sensitivity label. + */ + order?: number; + /** + * Indicates whether the label is enabled or not. + */ + enabled?: boolean; } /** - * @interface - * An interface representing the JitNetworkAccessPoliciesList. - * @extends Array + * The information type keyword. */ -export interface JitNetworkAccessPoliciesList extends Array { +export interface InformationProtectionKeyword { /** - * @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 keyword pattern. */ - readonly nextLink?: string; + 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; } /** - * @interface - * An interface representing the ExternalSecuritySolutionList. - * @extends Array + * The information type. */ -export interface ExternalSecuritySolutionList extends Array { +export interface InformationType { /** - * @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 information type. */ - readonly nextLink?: string; -} - + displayName?: 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[]; +} + /** - * @interface - * An interface representing the TopologyList. - * @extends Array + * Information protection policy. */ -export interface TopologyList extends Array { +export interface InformationProtectionPolicy 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 the last UTC time the policy was modified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly lastModifiedUtc?: Date; + /** + * Dictionary of sensitivity labels. + */ + labels?: { [propertyName: string]: SensitivityLabel }; + /** + * The sensitivity information types. + */ + informationTypes?: { [propertyName: string]: InformationType }; } /** - * @interface - * An interface representing the AllowedConnectionsList. - * List of all possible traffic between Azure resources - * - * @extends Array + * Contact details for security issues */ -export interface AllowedConnectionsList extends Array { +export interface SecurityContact 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 email of this security contact */ - readonly nextLink?: string; + 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 AlertNotifications. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Configures where to store the OMS agent data for workspaces under a scope */ -export type AlertNotifications = 'On' | 'Off'; +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 AlertsToAdmins. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Regulatory compliance standard details and state */ -export type AlertsToAdmins = 'On' | 'Off'; +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 PricingTier. - * Possible values include: 'Free', 'Standard' - * @readonly - * @enum {string} + * Regulatory compliance control details and state */ -export type PricingTier = 'Free' | 'Standard'; +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 AutoProvision. - * Possible values include: 'On', 'Off' - * @readonly - * @enum {string} + * Regulatory compliance assessment details and state */ -export type AutoProvision = 'On' | 'Off'; +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 SettingKind. - * Possible values include: 'DataExportSetting' - * @readonly - * @enum {string} + * Describes the server vulnerability assessment details on a resource + */ +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; +} + +/** + * List of server vulnerability assessments */ -export type SettingKind = 'DataExportSetting'; +export interface ServerVulnerabilityAssessmentsList { + value?: ServerVulnerabilityAssessment[]; +} /** - * Defines values for SecurityFamily. - * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - * @readonly - * @enum {string} + * Optional Parameters. */ -export type SecurityFamily = 'Waf' | 'Ngfw' | 'SaasWaf' | 'Va'; +export interface AlertsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListSubscriptionLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface AlertsListResourceGroupLevelAlertsByRegionOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter. Optional. + */ + filter?: string; + /** + * OData select. Optional. + */ + select?: string; + /** + * OData expand. Optional. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface IoTSecuritySolutionsListOptionalParams extends msRest.RequestOptionsBase { + /** + * filter the Security Solution with OData syntax. supporting filter by iotHubs + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IoTSecuritySolutionsResourceGroupListOptionalParams extends msRest.RequestOptionsBase { + /** + * filter the Security Solution with OData syntax. supporting filter by iotHubs + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface IoTSecuritySolutionsAnalyticsAggregatedAlertsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to retrieve. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface IoTSecuritySolutionsAnalyticsRecommendationsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to retrieve. + */ + top?: number; +} + +/** + * 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 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; +} + +/** + * 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 iot 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 aggregated security alerts + * @extends Array + */ +export interface IoTSecurityAggregatedAlertList 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 aggregated security recommendations + * @extends Array + */ +export interface IoTSecurityAggregatedRecommendationList 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 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 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 + * 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 + * 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 + * 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 + * 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; +} + +/** + * 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 SettingKind. + * Possible values include: 'DataExportSetting', 'AlertSuppressionSetting' + * @readonly + * @enum {string} + */ +export type SettingKind = 'DataExportSetting' | 'AlertSuppressionSetting'; + +/** + * 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 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 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 AutoProvision. + * Possible values include: 'On', 'Off' + * @readonly + * @enum {string} + */ +export type AutoProvision = 'On' | 'Off'; + +/** + * 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 ConnectionType. + * Possible values include: 'Internal', 'External' + * @readonly + * @enum {string} + */ +export type ConnectionType = 'Internal' | 'External'; + +/** + * 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 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' + * @readonly + * @enum {string} + */ +export type EnforcementMode = 'Audit' | 'Enforce'; + +/** + * 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 EnforcementMode1. + * Possible values include: 'Audit', 'Enforce' + * @readonly + * @enum {string} + */ +export type EnforcementMode1 = 'Audit' | 'Enforce'; + +/** + * 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 AlertUpdateActionType. + * Possible values include: 'Dismiss', 'Reactivate' + * @readonly + * @enum {string} + */ +export type AlertUpdateActionType = 'Dismiss' | 'Reactivate'; + +/** + * Defines values for AlertUpdateActionType1. + * Possible values include: 'Dismiss', 'Reactivate' + * @readonly + * @enum {string} + */ +export type AlertUpdateActionType1 = 'Dismiss' | 'Reactivate'; + +/** + * 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; + }; +}; /** - * Defines values for Protocol. - * Possible values include: 'TCP', 'UDP', 'All' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type Protocol = 'TCP' | 'UDP' | '*'; +export type SettingsGetResponse = Setting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Status. - * Possible values include: 'Revoked', 'Initiated' - * @readonly - * @enum {string} - */ -export type Status = 'Revoked' | 'Initiated'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Setting; + }; +}; /** - * Defines values for StatusReason. - * Possible values include: 'Expired', 'UserRequested', 'NewerRequestInitiated' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type StatusReason = 'Expired' | 'UserRequested' | 'NewerRequestInitiated'; +export type SettingsUpdateResponse = Setting & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for AadConnectivityState. - * Possible values include: 'Discovered', 'NotLicensed', 'Connected' - * @readonly - * @enum {string} - */ -export type AadConnectivityState = 'Discovered' | 'NotLicensed' | 'Connected'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Setting; + }; +}; /** - * Defines values for ExternalSecuritySolutionKind. - * Possible values include: 'CEF', 'ATA', 'AAD' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type ExternalSecuritySolutionKind = 'CEF' | 'ATA' | 'AAD'; +export type SettingsListNextResponse = SettingsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ConnectionType. - * Possible values include: 'Internal', 'External' - * @readonly - * @enum {string} - */ -export type ConnectionType = 'Internal' | 'External'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SettingsList; + }; +}; /** - * Defines values for SettingName. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type SettingName = 'MCAS' | 'WDATP'; +export type IoTSecuritySolutionsListResponse = 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; + }; +}; /** - * Defines values for SettingName1. - * Possible values include: 'MCAS', 'WDATP' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type SettingName1 = 'MCAS' | 'WDATP'; +export type IoTSecuritySolutionsListNextResponse = 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; + }; +}; /** - * Defines values for InformationProtectionPolicyName. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Contains response data for the getDefault operation. */ -export type InformationProtectionPolicyName = 'effective' | 'custom'; +export type IoTSecuritySolutionsResourceGroupListResponse = 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; + }; +}; /** - * Defines values for InformationProtectionPolicyName1. - * Possible values include: 'effective', 'custom' - * @readonly - * @enum {string} + * Contains response data for the listNext operation. */ -export type InformationProtectionPolicyName1 = 'effective' | 'custom'; +export type IoTSecuritySolutionsResourceGroupListNextResponse = 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; + }; +}; /** - * Defines values for TaskUpdateActionType. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type TaskUpdateActionType = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; +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; + }; +}; /** - * Defines values for TaskUpdateActionType1. - * Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close' - * @readonly - * @enum {string} + * Contains response data for the create operation. */ -export type TaskUpdateActionType1 = 'Activate' | 'Dismiss' | 'Start' | 'Resolve' | 'Close'; +export type IotSecuritySolutionCreateResponse = 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; + }; +}; /** - * Defines values for AlertUpdateActionType. - * Possible values include: 'Dismiss', 'Reactivate' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type AlertUpdateActionType = 'Dismiss' | 'Reactivate'; +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; + }; +}; /** - * Defines values for AlertUpdateActionType1. - * Possible values include: 'Dismiss', 'Reactivate' - * @readonly - * @enum {string} + * Contains response data for the getAll operation. */ -export type AlertUpdateActionType1 = 'Dismiss' | 'Reactivate'; +export type IoTSecuritySolutionsAnalyticsGetAllResponse = 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 list operation. + * Contains response data for the getDefault operation. */ -export type PricingsListResponse = PricingList & { +export type IoTSecuritySolutionsAnalyticsGetDefaultResponse = IoTSecuritySolutionAnalyticsModel & { /** * The underlying HTTP response. */ @@ -2106,17 +3329,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: IoTSecuritySolutionAnalyticsModel; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type PricingsListByResourceGroupResponse = PricingList & { +export type IoTSecuritySolutionsAnalyticsAggregatedAlertsListResponse = IoTSecurityAggregatedAlertList & { /** * The underlying HTTP response. */ @@ -2125,17 +3349,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: IoTSecurityAggregatedAlertList; }; }; /** - * Contains response data for the getSubscriptionPricing operation. + * Contains response data for the listNext operation. */ -export type PricingsGetSubscriptionPricingResponse = Pricing & { +export type IoTSecuritySolutionsAnalyticsAggregatedAlertsListNextResponse = IoTSecurityAggregatedAlertList & { /** * The underlying HTTP response. */ @@ -2144,17 +3369,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: IoTSecurityAggregatedAlertList; }; }; /** - * Contains response data for the updateSubscriptionPricing operation. + * Contains response data for the get operation. */ -export type PricingsUpdateSubscriptionPricingResponse = Pricing & { +export type IoTSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurityAggregatedAlert & { /** * The underlying HTTP response. */ @@ -2163,17 +3389,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: IoTSecurityAggregatedAlert; }; }; /** - * Contains response data for the getResourceGroupPricing operation. + * Contains response data for the get operation. */ -export type PricingsGetResourceGroupPricingResponse = Pricing & { +export type IoTSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurityAggregatedRecommendation & { /** * The underlying HTTP response. */ @@ -2182,17 +3409,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: IoTSecurityAggregatedRecommendation; }; }; /** - * Contains response data for the createOrUpdateResourceGroupPricing operation. + * Contains response data for the list operation. */ -export type PricingsCreateOrUpdateResourceGroupPricingResponse = Pricing & { +export type IoTSecuritySolutionsAnalyticsRecommendationsListResponse = IoTSecurityAggregatedRecommendationList & { /** * The underlying HTTP response. */ @@ -2201,17 +3429,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: IoTSecurityAggregatedRecommendationList; }; }; /** * Contains response data for the listNext operation. */ -export type PricingsListNextResponse = PricingList & { +export type IoTSecuritySolutionsAnalyticsRecommendationsListNextResponse = IoTSecurityAggregatedRecommendationList & { /** * The underlying HTTP response. */ @@ -2220,17 +3449,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: IoTSecurityAggregatedRecommendationList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the list operation. */ -export type PricingsListByResourceGroupNextResponse = PricingList & { +export type AllowedConnectionsListResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -2239,17 +3469,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: AllowedConnectionsList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByHomeRegion operation. */ -export type SecurityContactsListResponse = SecurityContactList & { +export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -2258,17 +3489,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: AllowedConnectionsList; }; }; /** * Contains response data for the get operation. */ -export type SecurityContactsGetResponse = SecurityContact & { +export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { /** * The underlying HTTP response. */ @@ -2277,17 +3509,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: AllowedConnectionsResource; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type SecurityContactsCreateResponse = SecurityContact & { +export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -2296,17 +3529,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: AllowedConnectionsList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type SecurityContactsUpdateResponse = SecurityContact & { +export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { /** * The underlying HTTP response. */ @@ -2315,17 +3549,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: AllowedConnectionsList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type SecurityContactsListNextResponse = SecurityContactList & { +export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2334,17 +3569,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: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByHomeRegion operation. */ -export type WorkspaceSettingsListResponse = WorkspaceSettingList & { +export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2353,17 +3589,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: DiscoveredSecuritySolutionList; }; }; /** * Contains response data for the get operation. */ -export type WorkspaceSettingsGetResponse = WorkspaceSetting & { +export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { /** * The underlying HTTP response. */ @@ -2372,17 +3609,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: DiscoveredSecuritySolution; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { +export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2391,17 +3629,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: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { +export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2410,17 +3649,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: DiscoveredSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { +export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2429,17 +3669,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: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByHomeRegion operation. */ -export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { +export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2448,17 +3689,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: ExternalSecuritySolutionList; }; }; /** * Contains response data for the get operation. */ -export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { +export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion & { /** * The underlying HTTP response. */ @@ -2467,17 +3709,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: ExternalSecuritySolutionUnion; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listNext operation. */ -export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { +export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2486,17 +3729,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: ExternalSecuritySolutionList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { +export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecuritySolutionList & { /** * The underlying HTTP response. */ @@ -2505,17 +3749,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: ExternalSecuritySolutionList; }; }; /** * Contains response data for the list operation. */ -export type CompliancesListResponse = ComplianceList & { +export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2524,17 +3769,18 @@ export type CompliancesListResponse = ComplianceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ComplianceList; + parsedBody: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByRegion operation. */ -export type CompliancesGetResponse = Compliance & { +export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2543,17 +3789,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroup operation. */ -export type CompliancesListNextResponse = ComplianceList & { +export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2562,17 +3809,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupAndRegion operation. */ -export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2581,17 +3829,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listByResourceGroupAndRegion operation. */ -export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { +export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -2600,17 +3849,18 @@ export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSet * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AdvancedThreatProtectionSetting; + parsedBody: JitNetworkAccessPolicy; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type SettingsListResponse = SettingsList & { +export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { /** * The underlying HTTP response. */ @@ -2619,17 +3869,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: JitNetworkAccessPolicy; }; }; /** - * Contains response data for the get operation. + * Contains response data for the initiate operation. */ -export type SettingsGetResponse = SettingUnion & { +export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { /** * The underlying HTTP response. */ @@ -2638,17 +3889,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: JitNetworkAccessRequest; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listNext operation. */ -export type SettingsUpdateResponse = SettingUnion & { +export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2657,17 +3909,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByRegionNext operation. */ -export type SettingsListNextResponse = SettingsList & { +export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2676,17 +3929,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { +export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2695,17 +3949,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: JitNetworkAccessPoliciesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByResourceGroupAndRegionNext operation. */ -export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { +export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { /** * The underlying HTTP response. */ @@ -2714,17 +3969,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: JitNetworkAccessPoliciesList; }; }; /** * Contains response data for the list operation. */ -export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { +export type AdaptiveApplicationControlsListResponse = AppWhitelistingGroups & { /** * The underlying HTTP response. */ @@ -2733,17 +3989,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: AppWhitelistingGroups; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { +export type AdaptiveApplicationControlsGetResponse = AppWhitelistingGroup & { /** * The underlying HTTP response. */ @@ -2752,17 +4009,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: AppWhitelistingGroup; }; }; /** - * Contains response data for the list operation. + * Contains response data for the put operation. */ -export type OperationsListResponse = OperationList & { +export type AdaptiveApplicationControlsPutResponse = AppWhitelistingGroup & { /** * The underlying HTTP response. */ @@ -2771,17 +4029,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: AppWhitelistingGroup; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the put operation. */ -export type OperationsListNextResponse = OperationList & { +export type LocationsListResponse = AscLocationList & { /** * The underlying HTTP response. */ @@ -2790,17 +4049,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: AscLocationList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type LocationsListResponse = AscLocationList & { +export type LocationsGetResponse = AscLocation & { /** * The underlying HTTP response. */ @@ -2809,17 +4069,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: AscLocation; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type LocationsGetResponse = AscLocation & { +export type LocationsListNextResponse = AscLocationList & { /** * The underlying HTTP response. */ @@ -2828,6 +4089,7 @@ export type LocationsGetResponse = AscLocation & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2836,9 +4098,9 @@ export type LocationsGetResponse = AscLocation & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type LocationsListNextResponse = AscLocationList & { +export type OperationsListResponse = OperationList & { /** * The underlying HTTP response. */ @@ -2847,17 +4109,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: OperationList; }; }; /** * Contains response data for the list operation. */ -export type TasksListResponse = SecurityTaskList & { +export type OperationsListNextResponse = OperationList & { /** * The underlying HTTP response. */ @@ -2866,17 +4129,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: OperationList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the get operation. */ -export type TasksListByHomeRegionResponse = SecurityTaskList & { +export type OperationsListNextResponse = OperationList & { /** * The underlying HTTP response. */ @@ -2885,17 +4149,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: OperationList; }; }; /** - * Contains response data for the getSubscriptionLevelTask operation. + * Contains response data for the create operation. */ -export type TasksGetSubscriptionLevelTaskResponse = SecurityTask & { +export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { /** * The underlying HTTP response. */ @@ -2904,17 +4169,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: AdvancedThreatProtectionSetting; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type TasksListByResourceGroupResponse = SecurityTaskList & { +export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { /** * The underlying HTTP response. */ @@ -2923,17 +4189,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: AutoProvisioningSettingList; }; }; /** - * Contains response data for the getResourceGroupLevelTask operation. + * Contains response data for the get operation. */ -export type TasksGetResourceGroupLevelTaskResponse = SecurityTask & { +export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { /** * The underlying HTTP response. */ @@ -2942,17 +4209,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: AutoProvisioningSetting; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the create operation. */ -export type TasksListNextResponse = SecurityTaskList & { +export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { /** * The underlying HTTP response. */ @@ -2961,17 +4229,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: AutoProvisioningSetting; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listNext operation. */ -export type TasksListByHomeRegionNextResponse = SecurityTaskList & { +export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { /** * The underlying HTTP response. */ @@ -2980,17 +4249,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: AutoProvisioningSettingList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the list operation. */ -export type TasksListByResourceGroupNextResponse = SecurityTaskList & { +export type CompliancesListResponse = ComplianceList & { /** * The underlying HTTP response. */ @@ -2999,17 +4269,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: ComplianceList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type AlertsListResponse = AlertList & { +export type TasksListByResourceGroupNextResponse = SecurityTaskList & { /** * The underlying HTTP response. */ @@ -3018,17 +4289,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: SecurityTaskList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type AlertsListByResourceGroupResponse = AlertList & { +export type TopologyListResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3037,17 +4309,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: TopologyList; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegion operation. + * Contains response data for the listByHomeRegion operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionResponse = AlertList & { +export type TopologyListByHomeRegionResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3056,17 +4329,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: TopologyList; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegion operation. + * Contains response data for the get operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionResponse = AlertList & { +export type TopologyGetResponse = TopologyResource & { /** * The underlying HTTP response. */ @@ -3075,17 +4349,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: TopologyResource; }; }; /** - * Contains response data for the getSubscriptionLevelAlert operation. + * Contains response data for the listNext operation. */ -export type AlertsGetSubscriptionLevelAlertResponse = Alert & { +export type TopologyListNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3094,17 +4369,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: TopologyList; }; }; /** - * Contains response data for the getResourceGroupLevelAlerts operation. + * Contains response data for the listByHomeRegionNext operation. */ -export type AlertsGetResourceGroupLevelAlertsResponse = Alert & { +export type TopologyListByHomeRegionNextResponse = TopologyList & { /** * The underlying HTTP response. */ @@ -3113,17 +4389,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 get operation. */ -export type AlertsListNextResponse = AlertList & { +export type AdvancedThreatProtectionGetResponse = AdvancedThreatProtectionSetting & { /** * The underlying HTTP response. */ @@ -3132,17 +4409,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: AdvancedThreatProtectionSetting; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the create operation. */ -export type AlertsListByResourceGroupNextResponse = AlertList & { +export type AdvancedThreatProtectionCreateResponse = AdvancedThreatProtectionSetting & { /** * The underlying HTTP response. */ @@ -3151,17 +4429,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: AdvancedThreatProtectionSetting; }; }; /** - * Contains response data for the listSubscriptionLevelAlertsByRegionNext operation. + * Contains response data for the list operation. */ -export type AlertsListSubscriptionLevelAlertsByRegionNextResponse = AlertList & { +export type AutoProvisioningSettingsListResponse = AutoProvisioningSettingList & { /** * The underlying HTTP response. */ @@ -3170,17 +4449,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: AutoProvisioningSettingList; }; }; /** - * Contains response data for the listResourceGroupLevelAlertsByRegionNext operation. + * Contains response data for the get operation. */ -export type AlertsListResourceGroupLevelAlertsByRegionNextResponse = AlertList & { +export type AutoProvisioningSettingsGetResponse = AutoProvisioningSetting & { /** * The underlying HTTP response. */ @@ -3189,17 +4469,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: AutoProvisioningSetting; }; }; /** - * Contains response data for the list operation. + * Contains response data for the create operation. */ -export type DiscoveredSecuritySolutionsListResponse = DiscoveredSecuritySolutionList & { +export type AutoProvisioningSettingsCreateResponse = AutoProvisioningSetting & { /** * The underlying HTTP response. */ @@ -3208,17 +4489,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: AutoProvisioningSetting; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the listNext operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionResponse = DiscoveredSecuritySolutionList & { +export type AutoProvisioningSettingsListNextResponse = AutoProvisioningSettingList & { /** * The underlying HTTP response. */ @@ -3227,17 +4509,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: AutoProvisioningSettingList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type DiscoveredSecuritySolutionsGetResponse = DiscoveredSecuritySolution & { +export type CompliancesListResponse = ComplianceList & { /** * The underlying HTTP response. */ @@ -3246,17 +4529,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: ComplianceList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type DiscoveredSecuritySolutionsListNextResponse = DiscoveredSecuritySolutionList & { +export type CompliancesGetResponse = Compliance & { /** * The underlying HTTP response. */ @@ -3265,17 +4549,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: Compliance; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the listNext operation. */ -export type DiscoveredSecuritySolutionsListByHomeRegionNextResponse = DiscoveredSecuritySolutionList & { +export type CompliancesListNextResponse = ComplianceList & { /** * The underlying HTTP response. */ @@ -3284,17 +4569,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: ComplianceList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesListResponse = JitNetworkAccessPoliciesList & { +export type InformationProtectionPoliciesGetResponse = InformationProtectionPolicy & { /** * The underlying HTTP response. */ @@ -3303,17 +4589,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: InformationProtectionPolicy; }; }; /** - * Contains response data for the listByRegion operation. + * Contains response data for the createOrUpdate operation. */ -export type JitNetworkAccessPoliciesListByRegionResponse = JitNetworkAccessPoliciesList & { +export type InformationProtectionPoliciesCreateOrUpdateResponse = InformationProtectionPolicy & { /** * The underlying HTTP response. */ @@ -3322,17 +4609,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: InformationProtectionPolicy; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAccessPoliciesList & { +export type InformationProtectionPoliciesListResponse = InformationProtectionPolicyList & { /** * The underlying HTTP response. */ @@ -3341,17 +4629,18 @@ export type JitNetworkAccessPoliciesListByResourceGroupResponse = JitNetworkAcce * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: InformationProtectionPolicyList; }; }; /** - * Contains response data for the listByResourceGroupAndRegion operation. + * Contains response data for the listNext operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNetworkAccessPoliciesList & { +export type InformationProtectionPoliciesListNextResponse = InformationProtectionPolicyList & { /** * The underlying HTTP response. */ @@ -3360,17 +4649,18 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionResponse = JitNe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: InformationProtectionPolicyList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesGetResponse = JitNetworkAccessPolicy & { +export type SecurityContactsListResponse = SecurityContactList & { /** * The underlying HTTP response. */ @@ -3379,17 +4669,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: SecurityContactList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesCreateOrUpdateResponse = JitNetworkAccessPolicy & { +export type SecurityContactsGetResponse = SecurityContact & { /** * The underlying HTTP response. */ @@ -3398,17 +4689,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: SecurityContact; }; }; /** - * Contains response data for the initiate operation. + * Contains response data for the create operation. */ -export type JitNetworkAccessPoliciesInitiateResponse = JitNetworkAccessRequest & { +export type SecurityContactsCreateResponse = SecurityContact & { /** * The underlying HTTP response. */ @@ -3417,17 +4709,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: SecurityContact; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type JitNetworkAccessPoliciesListNextResponse = JitNetworkAccessPoliciesList & { +export type SecurityContactsUpdateResponse = SecurityContact & { /** * The underlying HTTP response. */ @@ -3436,17 +4729,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: SecurityContact; }; }; /** - * Contains response data for the listByRegionNext operation. + * Contains response data for the listNext operation. */ -export type JitNetworkAccessPoliciesListByRegionNextResponse = JitNetworkAccessPoliciesList & { +export type SecurityContactsListNextResponse = SecurityContactList & { /** * The underlying HTTP response. */ @@ -3455,17 +4749,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: SecurityContactList; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the list operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupNextResponse = JitNetworkAccessPoliciesList & { +export type WorkspaceSettingsListResponse = WorkspaceSettingList & { /** * The underlying HTTP response. */ @@ -3474,17 +4769,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: WorkspaceSettingList; }; }; /** - * Contains response data for the listByResourceGroupAndRegionNext operation. + * Contains response data for the get operation. */ -export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = JitNetworkAccessPoliciesList & { +export type WorkspaceSettingsGetResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -3493,17 +4789,18 @@ export type JitNetworkAccessPoliciesListByResourceGroupAndRegionNextResponse = J * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: JitNetworkAccessPoliciesList; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the list operation. + * Contains response data for the create operation. */ -export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList & { +export type WorkspaceSettingsCreateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -3512,17 +4809,18 @@ export type ExternalSecuritySolutionsListResponse = ExternalSecuritySolutionList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the update operation. */ -export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecuritySolutionList & { +export type WorkspaceSettingsUpdateResponse = WorkspaceSetting & { /** * The underlying HTTP response. */ @@ -3531,17 +4829,18 @@ export type ExternalSecuritySolutionsListByHomeRegionResponse = ExternalSecurity * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: WorkspaceSetting; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion & { +export type WorkspaceSettingsListNextResponse = WorkspaceSettingList & { /** * The underlying HTTP response. */ @@ -3550,17 +4849,18 @@ export type ExternalSecuritySolutionsGetResponse = ExternalSecuritySolutionUnion * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionUnion; + parsedBody: WorkspaceSettingList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolutionList & { +export type RegulatoryComplianceStandardsListResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -3569,17 +4869,18 @@ export type ExternalSecuritySolutionsListNextResponse = ExternalSecuritySolution * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: RegulatoryComplianceStandardList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the get operation. */ -export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecuritySolutionList & { +export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStandard & { /** * The underlying HTTP response. */ @@ -3588,17 +4889,18 @@ export type ExternalSecuritySolutionsListByHomeRegionNextResponse = ExternalSecu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ExternalSecuritySolutionList; + parsedBody: RegulatoryComplianceStandard; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type TopologyListResponse = TopologyList & { +export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList & { /** * The underlying HTTP response. */ @@ -3607,17 +4909,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: RegulatoryComplianceStandardList; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the list operation. */ -export type TopologyListByHomeRegionResponse = TopologyList & { +export type RegulatoryComplianceControlsListResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -3626,17 +4929,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: RegulatoryComplianceControlList; }; }; /** * Contains response data for the get operation. */ -export type TopologyGetResponse = TopologyResource & { +export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceControl & { /** * The underlying HTTP response. */ @@ -3645,17 +4949,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: RegulatoryComplianceControl; }; }; /** * Contains response data for the listNext operation. */ -export type TopologyListNextResponse = TopologyList & { +export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList & { /** * The underlying HTTP response. */ @@ -3664,17 +4969,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: RegulatoryComplianceControlList; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the list operation. */ -export type TopologyListByHomeRegionNextResponse = TopologyList & { +export type RegulatoryComplianceAssessmentsListResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -3683,17 +4989,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: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type AllowedConnectionsListResponse = AllowedConnectionsList & { +export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAssessment & { /** * The underlying HTTP response. */ @@ -3702,17 +5009,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: RegulatoryComplianceAssessment; }; }; /** - * Contains response data for the listByHomeRegion operation. + * Contains response data for the listNext operation. */ -export type AllowedConnectionsListByHomeRegionResponse = AllowedConnectionsList & { +export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList & { /** * The underlying HTTP response. */ @@ -3721,17 +5029,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: RegulatoryComplianceAssessmentList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByExtendedResource operation. */ -export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { +export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = ServerVulnerabilityAssessmentsList & { /** * The underlying HTTP response. */ @@ -3740,17 +5049,18 @@ export type AllowedConnectionsGetResponse = AllowedConnectionsResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: AllowedConnectionsResource; + parsedBody: ServerVulnerabilityAssessmentsList; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type AllowedConnectionsListNextResponse = AllowedConnectionsList & { +export type ServerVulnerabilityAssessmentGetResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -3759,17 +5069,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: ServerVulnerabilityAssessment; }; }; /** - * Contains response data for the listByHomeRegionNext operation. + * Contains response data for the createOrUpdate operation. */ -export type AllowedConnectionsListByHomeRegionNextResponse = AllowedConnectionsList & { +export type ServerVulnerabilityAssessmentCreateOrUpdateResponse = ServerVulnerabilityAssessment & { /** * The underlying HTTP response. */ @@ -3778,9 +5089,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: ServerVulnerabilityAssessment; }; }; diff --git a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts index 427b115cf9f..3d573bbd97c 100644 --- a/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts +++ b/sdk/security/arm-security/src/models/informationProtectionPoliciesMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, - SensitivityLabel, - InformationType, - InformationProtectionKeyword, CloudError, - InformationProtectionPolicyList, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationProtectionPolicyList, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + WorkspaceSetting } 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 00000000000..7cdc473949e --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsAggregatedAlertMappers.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 { + discriminators, + CloudError, + IoTSecurityAggregatedAlert +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsAggregatedAlertsMappers.ts b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsAggregatedAlertsMappers.ts new file mode 100644 index 00000000000..a8886eff4e9 --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsAggregatedAlertsMappers.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, + IoTSecurityAggregatedAlert, + IoTSecurityAggregatedAlertList +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsMappers.ts b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsMappers.ts new file mode 100644 index 00000000000..1a277595fdb --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelList, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + WorkspaceSetting +} 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 00000000000..0ee36716bed --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsRecommendationMappers.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 { + discriminators, + CloudError, + IoTSecurityAggregatedRecommendation +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsRecommendationsMappers.ts b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsRecommendationsMappers.ts new file mode 100644 index 00000000000..d0e756980cf --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsAnalyticsRecommendationsMappers.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/ioTSecuritySolutionsMappers.ts b/sdk/security/arm-security/src/models/ioTSecuritySolutionsMappers.ts new file mode 100644 index 00000000000..bb296cbd854 --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsMappers.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 { + discriminators, + CloudError, + IoTSecuritySolutionModel, + IoTSecuritySolutionsList, + RecommendationConfigurationProperties, + UserDefinedResourcesProperties +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/ioTSecuritySolutionsResourceGroupMappers.ts b/sdk/security/arm-security/src/models/ioTSecuritySolutionsResourceGroupMappers.ts new file mode 100644 index 00000000000..bb296cbd854 --- /dev/null +++ b/sdk/security/arm-security/src/models/ioTSecuritySolutionsResourceGroupMappers.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 { + discriminators, + CloudError, + IoTSecuritySolutionModel, + IoTSecuritySolutionsList, + RecommendationConfigurationProperties, + UserDefinedResourcesProperties +} 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 00000000000..7a095fba1bd --- /dev/null +++ b/sdk/security/arm-security/src/models/iotSecuritySolutionMappers.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 { + discriminators, + CloudError, + IoTSecuritySolutionModel, + RecommendationConfigurationProperties, + TagsResource, + UpdateIotSecuritySolutionData, + UserDefinedResourcesProperties +} from "../models/mappers"; diff --git a/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts b/sdk/security/arm-security/src/models/jitNetworkAccessPoliciesMappers.ts index c7f8d5b6800..81a91877bca 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 a9e459ba15e..f6db6280412 100644 --- a/sdk/security/arm-security/src/models/locationsMappers.ts +++ b/sdk/security/arm-security/src/models/locationsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, AscLocation, - Resource, + AscLocationList, + AutoProvisioningSetting, BaseResource, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 b54822ca337..090e6622c56 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,38 +61,17 @@ 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", - 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", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Object" } } } @@ -112,360 +91,348 @@ export const Pricing: msRest.CompositeMapper = { type: { name: "String" } + }, + freeTrialRemainingTime: { + readOnly: true, + serializedName: "properties.freeTrialRemainingTime", + type: { + name: "TimeSpan" + } } } } }; -export const WorkspaceSetting: msRest.CompositeMapper = { - serializedName: "WorkspaceSetting", +export const PricingList: msRest.CompositeMapper = { + serializedName: "PricingList", type: { name: "Composite", - className: "WorkspaceSetting", + className: "PricingList", modelProperties: { - ...Resource.type.modelProperties, - workspaceId: { - required: true, - serializedName: "properties.workspaceId", - type: { - name: "String" - } - }, - scope: { + value: { required: true, - serializedName: "properties.scope", + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Pricing" + } + } } } } } }; -export const AutoProvisioningSetting: msRest.CompositeMapper = { - serializedName: "AutoProvisioningSetting", +export const AlertEntity: msRest.CompositeMapper = { + serializedName: "AlertEntity", type: { name: "Composite", - className: "AutoProvisioningSetting", + className: "AlertEntity", modelProperties: { - ...Resource.type.modelProperties, - autoProvision: { - required: true, - serializedName: "properties.autoProvision", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } } + }, + additionalProperties: { + type: { + name: "Object" + } } } }; -export const ComplianceSegment: msRest.CompositeMapper = { - serializedName: "ComplianceSegment", +export const AlertConfidenceReason: msRest.CompositeMapper = { + serializedName: "AlertConfidenceReason", type: { name: "Composite", - className: "ComplianceSegment", + className: "AlertConfidenceReason", modelProperties: { - segmentType: { + type: { readOnly: true, - serializedName: "segmentType", + serializedName: "type", type: { name: "String" } }, - percentage: { + reason: { readOnly: true, - serializedName: "percentage", + serializedName: "reason", type: { - name: "Number" + name: "String" } } } } }; -export const Compliance: msRest.CompositeMapper = { - serializedName: "Compliance", +export const Alert: msRest.CompositeMapper = { + serializedName: "Alert", type: { name: "Composite", - className: "Compliance", + className: "Alert", modelProperties: { ...Resource.type.modelProperties, - assessmentTimestampUtcDate: { + state: { readOnly: true, - serializedName: "properties.assessmentTimestampUtcDate", + serializedName: "properties.state", type: { - name: "DateTime" + name: "String" } }, - resourceCount: { + reportedTimeUtc: { readOnly: true, - serializedName: "properties.resourceCount", + serializedName: "properties.reportedTimeUtc", type: { - name: "Number" + name: "DateTime" } }, - assessmentResult: { + vendorName: { readOnly: true, - serializedName: "properties.assessmentResult", + serializedName: "properties.vendorName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ComplianceSegment" - } - } + name: "String" } - } - } - } -}; - -export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { - serializedName: "AdvancedThreatProtectionSetting", - type: { - name: "Composite", - className: "AdvancedThreatProtectionSetting", - modelProperties: { - ...Resource.type.modelProperties, - isEnabled: { - serializedName: "properties.isEnabled", + }, + alertName: { + readOnly: true, + serializedName: "properties.alertName", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const Setting: msRest.CompositeMapper = { - serializedName: "Setting", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Setting", - className: "Setting", - modelProperties: { - id: { + }, + alertDisplayName: { readOnly: true, - serializedName: "id", + serializedName: "properties.alertDisplayName", type: { name: "String" } }, - name: { + detectedTimeUtc: { readOnly: true, - serializedName: "name", + serializedName: "properties.detectedTimeUtc", type: { - name: "String" + name: "DateTime" } }, - type: { + description: { readOnly: true, - serializedName: "type", + serializedName: "properties.description", type: { name: "String" } }, - kind: { - required: true, - serializedName: "kind", + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", type: { name: "String" } - } - } - } -}; - -export const DataExportSetting: msRest.CompositeMapper = { - serializedName: "DataExportSetting", - type: { - name: "Composite", - polymorphicDiscriminator: Setting.type.polymorphicDiscriminator, - uberParent: "Setting", - className: "DataExportSetting", - modelProperties: { - ...Setting.type.modelProperties, - enabled: { - required: true, - serializedName: "properties.enabled", + }, + actionTaken: { + readOnly: true, + serializedName: "properties.actionTaken", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const SettingKind1: msRest.CompositeMapper = { - serializedName: "SettingKind", - type: { - name: "Composite", - className: "SettingKind1", - modelProperties: { - kind: { - serializedName: "kind", + }, + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", type: { name: "String" } - } - } - } -}; - -export const SensitivityLabel: msRest.CompositeMapper = { - serializedName: "SensitivityLabel", - type: { - name: "Composite", - className: "SensitivityLabel", - modelProperties: { - displayName: { - serializedName: "displayName", + }, + compromisedEntity: { + readOnly: true, + serializedName: "properties.compromisedEntity", type: { name: "String" } }, - order: { - serializedName: "order", + associatedResource: { + readOnly: true, + serializedName: "properties.associatedResource", type: { - name: "Number" + name: "String" } }, - enabled: { - serializedName: "enabled", + extendedProperties: { + serializedName: "properties.extendedProperties", type: { - name: "Boolean" - } - } - } - } -}; - -export const InformationProtectionKeyword: msRest.CompositeMapper = { - serializedName: "InformationProtectionKeyword", - type: { - name: "Composite", - className: "InformationProtectionKeyword", - modelProperties: { - pattern: { - serializedName: "pattern", + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + systemSource: { + readOnly: true, + serializedName: "properties.systemSource", type: { name: "String" } }, - custom: { - serializedName: "custom", + canBeInvestigated: { + readOnly: true, + serializedName: "properties.canBeInvestigated", type: { name: "Boolean" } }, - canBeNumeric: { - serializedName: "canBeNumeric", + isIncident: { + readOnly: true, + serializedName: "properties.isIncident", type: { name: "Boolean" } }, - excluded: { - serializedName: "excluded", + entities: { + serializedName: "properties.entities", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertEntity", + additionalProperties: { + type: { + name: "Object" + } + } + } + } } - } - } - } -}; - -export const InformationType: msRest.CompositeMapper = { - serializedName: "InformationType", - type: { - name: "Composite", - className: "InformationType", - modelProperties: { - displayName: { - serializedName: "displayName", + }, + confidenceScore: { + readOnly: true, + serializedName: "properties.confidenceScore", + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } }, - order: { - serializedName: "order", + confidenceReasons: { + serializedName: "properties.confidenceReasons", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertConfidenceReason" + } + } } }, - recommendedLabelId: { - serializedName: "recommendedLabelId", + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", type: { - name: "Uuid" + name: "String" } }, - enabled: { - serializedName: "enabled", + instanceId: { + readOnly: true, + serializedName: "properties.instanceId", type: { - name: "Boolean" + name: "String" } }, - custom: { - serializedName: "custom", + workspaceArmId: { + readOnly: true, + serializedName: "properties.workspaceArmId", type: { - name: "Boolean" + name: "String" } }, - keywords: { - serializedName: "keywords", + correlationKey: { + readOnly: true, + serializedName: "properties.correlationKey", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InformationProtectionKeyword" - } - } + name: "String" } } } } }; -export const InformationProtectionPolicy: msRest.CompositeMapper = { - serializedName: "InformationProtectionPolicy", +export const SettingResource: msRest.CompositeMapper = { + serializedName: "SettingResource", type: { name: "Composite", - className: "InformationProtectionPolicy", + className: "SettingResource", modelProperties: { ...Resource.type.modelProperties, - lastModifiedUtc: { - readOnly: true, - serializedName: "properties.lastModifiedUtc", + kind: { + required: true, + serializedName: "kind", type: { - name: "DateTime" + name: "String" } - }, - labels: { - serializedName: "properties.labels", + } + } + } +}; + +export const Setting: msRest.CompositeMapper = { + serializedName: "Setting", + type: { + name: "Composite", + className: "Setting", + modelProperties: { + ...SettingResource.type.modelProperties + } + } +}; + +export const DataExportSetting: msRest.CompositeMapper = { + serializedName: "DataExportSetting", + type: { + name: "Composite", + className: "DataExportSetting", + modelProperties: { + ...Setting.type.modelProperties, + enabled: { + required: true, + serializedName: "properties.enabled", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "Composite", - className: "SensitivityLabel" + className: "JitNetworkAccessPortRule" } } } - }, - informationTypes: { - serializedName: "properties.informationTypes", + } + } + } +}; + +export const TagsResource: msRest.CompositeMapper = { + serializedName: "TagsResource", + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", type: { name: "Dictionary", value: { type: { - name: "Composite", - className: "InformationType" + name: "String" } } } @@ -474,53 +441,61 @@ export const InformationProtectionPolicy: msRest.CompositeMapper = { } }; -export const Location: msRest.CompositeMapper = { - serializedName: "Location", +export const UserDefinedResourcesProperties: msRest.CompositeMapper = { + serializedName: "UserDefinedResourcesProperties", type: { name: "Composite", - className: "Location", + className: "UserDefinedResourcesProperties", modelProperties: { - location: { - readOnly: true, - serializedName: "location", + 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 OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", +export const RecommendationConfigurationProperties: msRest.CompositeMapper = { + serializedName: "RecommendationConfigurationProperties", type: { name: "Composite", - className: "OperationDisplay", + className: "RecommendationConfigurationProperties", modelProperties: { - provider: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - readOnly: true, - serializedName: "resource", + recommendationType: { + required: true, + serializedName: "recommendationType", type: { name: "String" } }, - operation: { + name: { readOnly: true, - serializedName: "operation", + serializedName: "name", type: { name: "String" } }, - description: { - readOnly: true, - serializedName: "description", + status: { + required: true, + serializedName: "status", + defaultValue: 'Enabled', type: { name: "String" } @@ -529,12 +504,19 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const IoTSecuritySolutionModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionModel", type: { name: "Composite", - className: "Operation", + className: "IoTSecuritySolutionModel", modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, name: { readOnly: true, serializedName: "name", @@ -542,333 +524,445 @@ export const Operation: msRest.CompositeMapper = { name: "String" } }, - origin: { + type: { readOnly: true, - serializedName: "origin", + serializedName: "type", type: { name: "String" } }, - display: { - serializedName: "display", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "OperationDisplay" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const SecurityTaskParameters: msRest.CompositeMapper = { - serializedName: "SecurityTaskParameters", - type: { - name: "Composite", - className: "SecurityTaskParameters", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", + }, + location: { + serializedName: "location", type: { name: "String" } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const SecurityTask: msRest.CompositeMapper = { - serializedName: "SecurityTask", - type: { - name: "Composite", - className: "SecurityTask", - modelProperties: { - ...Resource.type.modelProperties, - state: { - readOnly: true, - serializedName: "properties.state", + }, + workspace: { + required: true, + serializedName: "properties.workspace", type: { name: "String" } }, - creationTimeUtc: { - readOnly: true, - serializedName: "properties.creationTimeUtc", + displayName: { + required: true, + serializedName: "properties.displayName", type: { - name: "DateTime" + name: "String" } }, - securityTaskParameters: { - serializedName: "properties.securityTaskParameters", + status: { + serializedName: "properties.status", + defaultValue: 'Enabled', type: { - name: "Composite", - className: "SecurityTaskParameters", - additionalProperties: { + name: "String" + } + }, + exportProperty: { + serializedName: "properties.export", + type: { + name: "Sequence", + element: { type: { - name: "Object" + name: "String" } } } }, - lastStateChangeTimeUtc: { - readOnly: true, - serializedName: "properties.lastStateChangeTimeUtc", + disabledDataSources: { + serializedName: "properties.disabledDataSources", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - subState: { + 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.subState", + serializedName: "properties.autoDiscoveredResources", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + recommendationsConfiguration: { + serializedName: "properties.recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } } } } } }; -export const AscLocation: msRest.CompositeMapper = { - serializedName: "AscLocation", +export const UpdateIotSecuritySolutionData: msRest.CompositeMapper = { + serializedName: "UpdateIotSecuritySolutionData", type: { name: "Composite", - className: "AscLocation", + className: "UpdateIotSecuritySolutionData", modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", + ...TagsResource.type.modelProperties, + userDefinedResources: { + serializedName: "userDefinedResources", type: { - name: "Object" + name: "Composite", + className: "UserDefinedResourcesProperties" + } + }, + recommendationsConfiguration: { + serializedName: "recommendationsConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationConfigurationProperties" + } + } } } } } }; -export const AlertEntity: msRest.CompositeMapper = { - serializedName: "AlertEntity", +export const IoTSeverityMetrics: msRest.CompositeMapper = { + serializedName: "IoTSeverityMetrics", type: { name: "Composite", - className: "AlertEntity", + className: "IoTSeverityMetrics", modelProperties: { - type: { - readOnly: true, - serializedName: "type", + high: { + serializedName: "high", type: { - name: "String" + name: "Number" + } + }, + medium: { + serializedName: "medium", + type: { + name: "Number" + } + }, + low: { + serializedName: "low", + type: { + name: "Number" } - } - }, - additionalProperties: { - type: { - name: "Object" } } } }; -export const AlertConfidenceReason: msRest.CompositeMapper = { - serializedName: "AlertConfidenceReason", +export const IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModelProperties_devicesMetricsItem", type: { name: "Composite", - className: "AlertConfidenceReason", + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem", modelProperties: { - type: { - readOnly: true, - serializedName: "type", + date: { + serializedName: "date", type: { - name: "String" + name: "DateTime" } }, - reason: { - readOnly: true, - serializedName: "reason", + devicesMetrics: { + serializedName: "devicesMetrics", type: { - name: "String" + name: "Composite", + className: "IoTSeverityMetrics" } } } } }; -export const Alert: msRest.CompositeMapper = { - serializedName: "Alert", +export const IoTSecurityAlertedDevice: msRest.CompositeMapper = { + serializedName: "IoTSecurityAlertedDevice", type: { name: "Composite", - className: "Alert", + className: "IoTSecurityAlertedDevice", modelProperties: { - ...Resource.type.modelProperties, - state: { + deviceId: { readOnly: true, - serializedName: "properties.state", + serializedName: "deviceId", type: { name: "String" } }, - reportedTimeUtc: { + alertsCount: { readOnly: true, - serializedName: "properties.reportedTimeUtc", + serializedName: "alertsCount", type: { - name: "DateTime" + name: "Number" } - }, - vendorName: { - readOnly: true, - serializedName: "properties.vendorName", + } + } + } +}; + +export const IoTSecurityAlertedDevicesList: msRest.CompositeMapper = { + serializedName: "IoTSecurityAlertedDevicesList", + type: { + name: "Composite", + className: "IoTSecurityAlertedDevicesList", + modelProperties: { + value: { + required: true, + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityAlertedDevice" + } + } } - }, - alertName: { + } + } + } +}; + +export const IoTSecurityDeviceAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceAlert", + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert", + modelProperties: { + alertDisplayName: { readOnly: true, - serializedName: "properties.alertName", + serializedName: "alertDisplayName", type: { name: "String" } }, - alertDisplayName: { + reportedSeverity: { readOnly: true, - serializedName: "properties.alertDisplayName", + serializedName: "reportedSeverity", type: { name: "String" } }, - detectedTimeUtc: { + alertsCount: { readOnly: true, - serializedName: "properties.detectedTimeUtc", + serializedName: "alertsCount", type: { - name: "DateTime" + name: "Number" } - }, - description: { - readOnly: true, - serializedName: "properties.description", + } + } + } +}; + +export const IoTSecurityDeviceAlertsList: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceAlertsList", + type: { + name: "Composite", + className: "IoTSecurityDeviceAlertsList", + modelProperties: { + value: { + required: true, + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecurityDeviceAlert" + } + } } }, - remediationSteps: { + nextLink: { readOnly: true, - serializedName: "properties.remediationSteps", + serializedName: "nextLink", type: { name: "String" } - }, - actionTaken: { + } + } + } +}; + +export const IoTSecurityDeviceRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceRecommendation", + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendation", + modelProperties: { + recommendationDisplayName: { readOnly: true, - serializedName: "properties.actionTaken", + serializedName: "recommendationDisplayName", type: { name: "String" } }, reportedSeverity: { readOnly: true, - serializedName: "properties.reportedSeverity", - type: { - name: "String" - } - }, - compromisedEntity: { - readOnly: true, - serializedName: "properties.compromisedEntity", + serializedName: "reportedSeverity", type: { name: "String" } }, - associatedResource: { + devicesCount: { readOnly: true, - serializedName: "properties.associatedResource", + serializedName: "devicesCount", type: { - name: "String" + name: "Number" } - }, - extendedProperties: { - serializedName: "properties.extendedProperties", + } + } + } +}; + +export const IoTSecurityDeviceRecommendationsList: msRest.CompositeMapper = { + serializedName: "IoTSecurityDeviceRecommendationsList", + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendationsList", + modelProperties: { + value: { + required: true, + serializedName: "value", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "Object" + name: "Composite", + className: "IoTSecurityDeviceRecommendation" } } } - }, - systemSource: { - readOnly: true, - serializedName: "properties.systemSource", + } + } + } +}; + +export const IoTSecuritySolutionAnalyticsModel: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionAnalyticsModel", + type: { + name: "Composite", + className: "IoTSecuritySolutionAnalyticsModel", + modelProperties: { + ...Resource.type.modelProperties, + metrics: { + readOnly: true, + serializedName: "properties.metrics", type: { - name: "String" + name: "Composite", + className: "IoTSeverityMetrics" } }, - canBeInvestigated: { + unhealthyDeviceCount: { readOnly: true, - serializedName: "properties.canBeInvestigated", + serializedName: "properties.unhealthyDeviceCount", type: { - name: "Boolean" + name: "Number" } }, - entities: { - serializedName: "properties.entities", + devicesMetrics: { + readOnly: true, + serializedName: "properties.devicesMetrics", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AlertEntity", - additionalProperties: { - type: { - name: "Object" - } - } + className: "IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem" } } } }, - confidenceScore: { - readOnly: true, - serializedName: "properties.confidenceScore", - constraints: { - InclusiveMaximum: 1, - InclusiveMinimum: 0 - }, + topAlertedDevices: { + serializedName: "properties.topAlertedDevices", type: { - name: "Number" + name: "Composite", + className: "IoTSecurityAlertedDevicesList" } }, - confidenceReasons: { - serializedName: "properties.confidenceReasons", + mostPrevalentDeviceAlerts: { + serializedName: "properties.mostPrevalentDeviceAlerts", + type: { + name: "Composite", + className: "IoTSecurityDeviceAlertsList" + } + }, + mostPrevalentDeviceRecommendations: { + serializedName: "properties.mostPrevalentDeviceRecommendations", + type: { + name: "Composite", + className: "IoTSecurityDeviceRecommendationsList" + } + } + } + } +}; + +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: "AlertConfidenceReason" + className: "IoTSecuritySolutionAnalyticsModel" } } } }, - subscriptionId: { - readOnly: true, - serializedName: "properties.subscriptionId", - type: { - name: "String" - } - }, - instanceId: { - readOnly: true, - serializedName: "properties.instanceId", - type: { - name: "String" - } - }, - workspaceArmId: { + nextLink: { readOnly: true, - serializedName: "properties.workspaceArmId", + serializedName: "nextLink", type: { name: "String" } @@ -877,11 +971,11 @@ export const Alert: msRest.CompositeMapper = { } }; -export const DiscoveredSecuritySolution: msRest.CompositeMapper = { - serializedName: "DiscoveredSecuritySolution", +export const IoTSecurityAggregatedAlert: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlert", type: { name: "Composite", - className: "DiscoveredSecuritySolution", + className: "IoTSecurityAggregatedAlert", modelProperties: { id: { readOnly: true, @@ -904,162 +998,110 @@ export const DiscoveredSecuritySolution: msRest.CompositeMapper = { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - securityFamily: { - required: true, - serializedName: "properties.securityFamily", + alertType: { + readOnly: true, + serializedName: "properties.alertType", type: { name: "String" } }, - offer: { - required: true, - serializedName: "properties.offer", + alertDisplayName: { + readOnly: true, + serializedName: "properties.alertDisplayName", type: { name: "String" } }, - publisher: { - required: true, - serializedName: "properties.publisher", + aggregatedDateUtc: { + readOnly: true, + serializedName: "properties.aggregatedDateUtc", type: { - name: "String" + name: "Date" } }, - sku: { - required: true, - serializedName: "properties.sku", - type: { - name: "String" - } - } - } - } -}; - -export const TopologySingleResourceParent: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceParent", - type: { - name: "Composite", - className: "TopologySingleResourceParent", - modelProperties: { - resourceId: { + vendorName: { readOnly: true, - serializedName: "resourceId", + serializedName: "properties.vendorName", type: { name: "String" } - } - } - } -}; - -export const TopologySingleResourceChild: msRest.CompositeMapper = { - serializedName: "TopologySingleResourceChild", - type: { - name: "Composite", - className: "TopologySingleResourceChild", - modelProperties: { - resourceId: { + }, + reportedSeverity: { readOnly: true, - serializedName: "resourceId", + serializedName: "properties.reportedSeverity", type: { name: "String" } - } - } - } -}; - -export const TopologySingleResource: msRest.CompositeMapper = { - serializedName: "TopologySingleResource", - type: { - name: "Composite", - className: "TopologySingleResource", - modelProperties: { - resourceId: { + }, + remediationSteps: { readOnly: true, - serializedName: "resourceId", + serializedName: "properties.remediationSteps", type: { name: "String" } }, - severity: { + description: { readOnly: true, - serializedName: "severity", + serializedName: "properties.description", type: { name: "String" } }, - recommendationsExist: { + count: { readOnly: true, - serializedName: "recommendationsExist", + serializedName: "properties.count", type: { - name: "Boolean" + name: "Number" } }, - networkZones: { + effectedResourceType: { readOnly: true, - serializedName: "networkZones", + serializedName: "properties.effectedResourceType", type: { name: "String" } }, - topologyScore: { - readOnly: true, - serializedName: "topologyScore", - type: { - name: "Number" - } - }, - location: { + systemSource: { readOnly: true, - serializedName: "location", + serializedName: "properties.systemSource", type: { name: "String" } }, - parents: { + actionTaken: { readOnly: true, - serializedName: "parents", + serializedName: "properties.actionTaken", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResourceParent" - } - } + name: "String" } }, - children: { + logAnalyticsQuery: { readOnly: true, - serializedName: "children", + serializedName: "properties.logAnalyticsQuery", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResourceChild" - } - } + name: "String" } } } } }; -export const TopologyResource: msRest.CompositeMapper = { - serializedName: "TopologyResource", +export const IoTSecurityAggregatedRecommendation: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedRecommendation", type: { name: "Composite", - className: "TopologyResource", + className: "IoTSecurityAggregatedRecommendation", modelProperties: { id: { readOnly: true, @@ -1082,77 +1124,82 @@ export const TopologyResource: msRest.CompositeMapper = { name: "String" } }, - location: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + recommendationName: { + serializedName: "properties.recommendationName", + type: { + name: "String" + } + }, + recommendationDisplayName: { readOnly: true, - serializedName: "location", + serializedName: "properties.recommendationDisplayName", type: { name: "String" } }, - calculatedDateTime: { + description: { readOnly: true, - serializedName: "properties.calculatedDateTime", + serializedName: "properties.description", type: { - name: "DateTime" + name: "String" } }, - topologyResources: { + recommendationTypeId: { readOnly: true, - serializedName: "properties.topologyResources", + serializedName: "properties.recommendationTypeId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TopologySingleResource" - } - } + name: "String" } - } - } - } -}; - -export const JitNetworkAccessPortRule: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPortRule", - type: { - name: "Composite", - className: "JitNetworkAccessPortRule", - modelProperties: { - number: { - required: true, - serializedName: "number", + }, + detectedBy: { + readOnly: true, + serializedName: "properties.detectedBy", type: { - name: "Number" + name: "String" } }, - protocol: { - required: true, - serializedName: "protocol", + remediationSteps: { + readOnly: true, + serializedName: "properties.remediationSteps", type: { name: "String" } }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + reportedSeverity: { + readOnly: true, + serializedName: "properties.reportedSeverity", type: { name: "String" } }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", + healthyDevices: { + readOnly: true, + serializedName: "properties.healthyDevices", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - maxRequestAccessDuration: { - required: true, - serializedName: "maxRequestAccessDuration", + unhealthyDeviceCount: { + readOnly: true, + serializedName: "properties.unhealthyDeviceCount", + type: { + name: "Number" + } + }, + logAnalyticsQuery: { + readOnly: true, + serializedName: "properties.logAnalyticsQuery", type: { name: "String" } @@ -1161,83 +1208,29 @@ export const JitNetworkAccessPortRule: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPolicyVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyVirtualMachine", - type: { - name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine", - 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 ConnectedResource: msRest.CompositeMapper = { + serializedName: "ConnectedResource", type: { name: "Composite", - className: "JitNetworkAccessRequestPort", + className: "ConnectedResource", modelProperties: { - number: { - required: true, - serializedName: "number", - type: { - name: "Number" - } - }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", + connectedResourceId: { + readOnly: true, + serializedName: "connectedResourceId", type: { name: "String" } }, - allowedSourceAddressPrefixes: { - serializedName: "allowedSourceAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", - type: { - name: "DateTime" - } - }, - status: { - required: true, - serializedName: "status", + tcpPorts: { + readOnly: true, + serializedName: "tcpPorts", type: { name: "String" } }, - statusReason: { - required: true, - serializedName: "statusReason", + udpPorts: { + readOnly: true, + serializedName: "udpPorts", type: { name: "String" } @@ -1246,78 +1239,54 @@ export const JitNetworkAccessRequestPort: msRest.CompositeMapper = { } }; -export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequestVirtualMachine", +export const ConnectableResource: msRest.CompositeMapper = { + serializedName: "ConnectableResource", type: { name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine", + className: "ConnectableResource", modelProperties: { id: { - required: true, + readOnly: true, serializedName: "id", type: { name: "String" } }, - ports: { - required: true, - serializedName: "ports", + inboundConnectedResources: { + readOnly: true, + serializedName: "inboundConnectedResources", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessRequestPort" + className: "ConnectedResource" } } } - } - } - } -}; - -export const JitNetworkAccessRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessRequest", - type: { - name: "Composite", - className: "JitNetworkAccessRequest", - modelProperties: { - virtualMachines: { - required: true, - serializedName: "virtualMachines", + }, + outboundConnectedResources: { + readOnly: true, + serializedName: "outboundConnectedResources", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessRequestVirtualMachine" + className: "ConnectedResource" } } } - }, - startTimeUtc: { - required: true, - serializedName: "startTimeUtc", - type: { - name: "DateTime" - } - }, - requestor: { - required: true, - serializedName: "requestor", - type: { - name: "String" - } } } } }; -export const JitNetworkAccessPolicy: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicy", +export const AllowedConnectionsResource: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsResource", type: { name: "Composite", - className: "JitNetworkAccessPolicy", + className: "AllowedConnectionsResource", modelProperties: { id: { readOnly: true, @@ -1340,12 +1309,6 @@ export const JitNetworkAccessPolicy: msRest.CompositeMapper = { name: "String" } }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, location: { readOnly: true, serializedName: "location", @@ -1353,94 +1316,22 @@ export const JitNetworkAccessPolicy: msRest.CompositeMapper = { name: "String" } }, - virtualMachines: { - required: true, - serializedName: "properties.virtualMachines", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyVirtualMachine" - } - } - } - }, - requests: { - serializedName: "properties.requests", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessRequest" - } - } - } - }, - provisioningState: { + calculatedDateTime: { 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: "number", - type: { - name: "Number" - } - }, - allowedSourceAddressPrefix: { - serializedName: "allowedSourceAddressPrefix", - type: { - name: "String" - } - }, - endTimeUtc: { - required: true, - serializedName: "endTimeUtc", + serializedName: "properties.calculatedDateTime", type: { name: "DateTime" } - } - } - } -}; - -export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } }, - ports: { - required: true, - serializedName: "ports", + connectableResources: { + readOnly: true, + serializedName: "properties.connectableResources", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiatePort" + className: "ConnectableResource" } } } @@ -1449,39 +1340,28 @@ export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMappe } }; -export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPolicyInitiateRequest", +export const Location: msRest.CompositeMapper = { + serializedName: "Location", type: { name: "Composite", - className: "JitNetworkAccessPolicyInitiateRequest", + className: "Location", modelProperties: { - virtualMachines: { - required: true, - serializedName: "virtualMachines", + location: { + readOnly: true, + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitNetworkAccessPolicyInitiateVirtualMachine" - } - } + name: "String" } } } } }; -export const ExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolution", +export const DiscoveredSecuritySolution: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolution", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "ExternalSecuritySolution", - className: "ExternalSecuritySolution", + className: "DiscoveredSecuritySolution", modelProperties: { id: { readOnly: true, @@ -1511,9 +1391,80 @@ export const ExternalSecuritySolution: msRest.CompositeMapper = { name: "String" } }, - kind: { + securityFamily: { required: true, - serializedName: "kind", + serializedName: "properties.securityFamily", + type: { + name: "String" + } + }, + offer: { + required: true, + serializedName: "properties.offer", + type: { + name: "String" + } + }, + publisher: { + required: true, + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + sku: { + required: true, + serializedName: "properties.sku", + type: { + name: "String" + } + } + } + } +}; + +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", type: { name: "String" } @@ -1556,175 +1507,1729 @@ export const ExternalSecuritySolutionProperties: msRest.CompositeMapper = { } }; -export const CefSolutionProperties: msRest.CompositeMapper = { - serializedName: "CefSolutionProperties", +export const CefSolutionProperties: msRest.CompositeMapper = { + serializedName: "CefSolutionProperties", + type: { + name: "Composite", + className: "CefSolutionProperties", + modelProperties: { + ...ExternalSecuritySolutionProperties.type.modelProperties, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + agent: { + serializedName: "agent", + type: { + name: "String" + } + }, + lastEventReceived: { + serializedName: "lastEventReceived", + type: { + name: "String" + } + } + }, + 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: "Composite", + className: "CefSolutionProperties", + additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + } + } + } + } +}; + +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 ConnectedWorkspace: msRest.CompositeMapper = { + serializedName: "ConnectedWorkspace", + type: { + name: "Composite", + className: "ConnectedWorkspace", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AadSolutionProperties: msRest.CompositeMapper = { + serializedName: "AadSolutionProperties", + type: { + name: "Composite", + className: "AadSolutionProperties", + modelProperties: { + deviceVendor: { + serializedName: "deviceVendor", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "deviceType", + type: { + name: "String" + } + }, + workspace: { + serializedName: "workspace", + type: { + name: "Composite", + className: "ConnectedWorkspace" + } + }, + connectivityState: { + serializedName: "connectivityState", + type: { + name: "String" + } + } + } + } +}; + +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" + } + } + } + } +}; + +export const AadConnectivityState1: msRest.CompositeMapper = { + serializedName: "AadConnectivityState", + type: { + name: "Composite", + className: "AadConnectivityState1", + modelProperties: { + connectivityState: { + serializedName: "connectivityState", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPortRule: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPortRule", + type: { + name: "Composite", + className: "JitNetworkAccessPortRule", + modelProperties: { + number: { + required: true, + serializedName: "number", + type: { + name: "Number" + } + }, + protocol: { + required: true, + serializedName: "protocol", + type: { + name: "String" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + 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" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPortRule" + } + } + } + }, + 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" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + allowedSourceAddressPrefixes: { + serializedName: "allowedSourceAddressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", + type: { + name: "DateTime" + } + }, + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusReason: { + required: true, + serializedName: "statusReason", + type: { + name: "String" + } + }, + mappedPort: { + serializedName: "mappedPort", + type: { + name: "Number" + } + } + } + } +}; + +export const JitNetworkAccessRequestVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessRequestVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessRequestVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequestPort" + } + } + } + } + } + } +}; + +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: "JitNetworkAccessRequestVirtualMachine" + } + } + } + }, + startTimeUtc: { + required: true, + serializedName: "startTimeUtc", + type: { + name: "DateTime" + } + }, + requestor: { + required: true, + serializedName: "requestor", + type: { + name: "String" + } + } + } + } +}; + +export const JitNetworkAccessPolicy: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicy", + type: { + name: "Composite", + className: "JitNetworkAccessPolicy", + 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" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + virtualMachines: { + required: true, + serializedName: "properties.virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyVirtualMachine" + } + } + } + }, + requests: { + serializedName: "properties.requests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessRequest" + } + } + } + }, + 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: "number", + type: { + name: "Number" + } + }, + allowedSourceAddressPrefix: { + serializedName: "allowedSourceAddressPrefix", + type: { + name: "String" + } + }, + endTimeUtc: { + required: true, + serializedName: "endTimeUtc", + type: { + name: "DateTime" + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiateVirtualMachine: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateVirtualMachine", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ports: { + required: true, + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiatePort" + } + } + } + } + } + } +}; + +export const JitNetworkAccessPolicyInitiateRequest: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPolicyInitiateRequest", + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateRequest", + modelProperties: { + virtualMachines: { + required: true, + serializedName: "virtualMachines", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JitNetworkAccessPolicyInitiateVirtualMachine" + } + } + } + } + } + } +}; + +export const Kind: msRest.CompositeMapper = { + serializedName: "Kind", + type: { + name: "Composite", + className: "Kind", + modelProperties: { + kind: { + serializedName: "kind", + 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" + } + } + } + } +}; + +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: "Sequence", + element: { + type: { + name: "Composite", + className: "AppWhitelistingIssueSummary" + } + } + } + }, + configurationStatus: { + serializedName: "properties.configurationStatus", + type: { + name: "String" + } + }, + recommendationStatus: { + serializedName: "properties.recommendationStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmRecommendation" + } + } + } + }, + issues: { + serializedName: "properties.issues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppWhitelistingIssueSummary" + } + } + } + }, + sourceSystem: { + serializedName: "properties.sourceSystem", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppWhitelistingGroup" + } + } + } + }, + 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 AppWhitelistingPutGroupData: msRest.CompositeMapper = { + serializedName: "AppWhitelistingPutGroupData", + type: { + name: "Composite", + className: "AppWhitelistingPutGroupData", + modelProperties: { + enforcementMode: { + serializedName: "enforcementMode", + type: { + name: "String" + } + }, + vmRecommendations: { + serializedName: "vmRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmRecommendation" + } + } + } + }, + pathRecommendations: { + serializedName: "pathRecommendations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PathRecommendation" + } + } + } + } + } + } +}; + +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: { + 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 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" + } + }, + topologyResources: { + readOnly: true, + serializedName: "properties.topologyResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TopologySingleResource" + } + } + } + } + } + } +}; + +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 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" + } + }, + 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" + } + }, + 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" + } + }, + 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: "CefSolutionProperties", + className: "SecurityContact", modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - hostname: { - serializedName: "hostname", + ...Resource.type.modelProperties, + email: { + required: true, + serializedName: "properties.email", type: { name: "String" } }, - agent: { - serializedName: "agent", + phone: { + serializedName: "properties.phone", type: { name: "String" } }, - lastEventReceived: { - serializedName: "lastEventReceived", + alertNotifications: { + required: true, + serializedName: "properties.alertNotifications", type: { name: "String" } - } - }, - 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", + }, + alertsToAdmins: { + required: true, + serializedName: "properties.alertsToAdmins", type: { - name: "Composite", - className: "CefSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + name: "String" } } } } }; -export const AtaSolutionProperties: msRest.CompositeMapper = { - serializedName: "AtaSolutionProperties", +export const WorkspaceSetting: msRest.CompositeMapper = { + serializedName: "WorkspaceSetting", type: { name: "Composite", - className: "AtaSolutionProperties", + className: "WorkspaceSetting", modelProperties: { - ...ExternalSecuritySolutionProperties.type.modelProperties, - lastEventReceived: { - serializedName: "lastEventReceived", + ...Resource.type.modelProperties, + workspaceId: { + required: true, + serializedName: "properties.workspaceId", 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", + }, + scope: { + required: true, + serializedName: "properties.scope", type: { - name: "Composite", - className: "AtaSolutionProperties", - additionalProperties: ExternalSecuritySolutionProperties.type.additionalProperties + name: "String" } } } } }; -export const ConnectedWorkspace: msRest.CompositeMapper = { - serializedName: "ConnectedWorkspace", +export const RegulatoryComplianceStandard: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandard", type: { name: "Composite", - className: "ConnectedWorkspace", + className: "RegulatoryComplianceStandard", modelProperties: { - id: { - serializedName: "id", + ...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 AadSolutionProperties: msRest.CompositeMapper = { - serializedName: "AadSolutionProperties", +export const RegulatoryComplianceControl: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControl", type: { name: "Composite", - className: "AadSolutionProperties", + className: "RegulatoryComplianceControl", modelProperties: { - deviceVendor: { - serializedName: "deviceVendor", + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", type: { name: "String" } }, - deviceType: { - serializedName: "deviceType", + state: { + serializedName: "properties.state", type: { name: "String" } }, - workspace: { - serializedName: "workspace", + passedAssessments: { + readOnly: true, + serializedName: "properties.passedAssessments", type: { - name: "Composite", - className: "ConnectedWorkspace" + name: "Number" } }, - connectivityState: { - serializedName: "connectivityState", + failedAssessments: { + readOnly: true, + serializedName: "properties.failedAssessments", type: { - name: "String" + name: "Number" + } + }, + skippedAssessments: { + readOnly: true, + serializedName: "properties.skippedAssessments", + type: { + name: "Number" } } } } }; -export const AadExternalSecuritySolution: msRest.CompositeMapper = { - serializedName: "AAD", +export const RegulatoryComplianceAssessment: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessment", type: { name: "Composite", - polymorphicDiscriminator: ExternalSecuritySolution.type.polymorphicDiscriminator, - uberParent: "ExternalSecuritySolution", - className: "AadExternalSecuritySolution", + className: "RegulatoryComplianceAssessment", modelProperties: { - ...ExternalSecuritySolution.type.modelProperties, - properties: { - serializedName: "properties", + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", type: { - name: "Composite", - className: "AadSolutionProperties" + name: "Number" + } + }, + failedAssessments: { + readOnly: true, + serializedName: "properties.failedAssessments", + type: { + name: "Number" + } + }, + skippedAssessments: { + readOnly: true, + serializedName: "properties.skippedAssessments", + type: { + name: "Number" + } + }, + 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 ExternalSecuritySolutionKind1: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionKind", +export const ServerVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", type: { name: "Composite", - className: "ExternalSecuritySolutionKind1", + className: "ServerVulnerabilityAssessment", modelProperties: { - kind: { - serializedName: "kind", + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } @@ -1733,88 +3238,85 @@ export const ExternalSecuritySolutionKind1: msRest.CompositeMapper = { } }; -export const AadConnectivityState1: msRest.CompositeMapper = { - serializedName: "AadConnectivityState", +export const ServerVulnerabilityAssessmentsList: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessmentsList", type: { name: "Composite", - className: "AadConnectivityState1", + className: "ServerVulnerabilityAssessmentsList", modelProperties: { - connectivityState: { - serializedName: "connectivityState", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment" + } + } } } } } }; -export const ConnectedResource: msRest.CompositeMapper = { - serializedName: "ConnectedResource", +export const ComplianceResultList: msRest.CompositeMapper = { + serializedName: "ComplianceResultList", type: { name: "Composite", - className: "ConnectedResource", + className: "ComplianceResultList", modelProperties: { - connectedResourceId: { - readOnly: true, - serializedName: "connectedResourceId", - type: { - name: "String" - } - }, - tcpPorts: { - readOnly: true, - serializedName: "tcpPorts", + value: { + required: true, + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComplianceResult" + } + } } }, - udpPorts: { + nextLink: { readOnly: true, - serializedName: "udpPorts", + serializedName: "nextLink", type: { - name: "String" + name: "Number" } } } } }; -export const ConnectableResource: msRest.CompositeMapper = { - serializedName: "ConnectableResource", +export const AlertList: msRest.CompositeMapper = { + serializedName: "AlertList", type: { name: "Composite", - className: "ConnectableResource", + className: "AlertList", 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: "Alert" } } } }, - outboundConnectedResources: { + nextLink: { readOnly: true, - serializedName: "outboundConnectedResources", + serializedName: "nextLink", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectedResource" + className: "ServerVulnerabilityAssessment" } } } @@ -1823,69 +3325,100 @@ export const ConnectableResource: msRest.CompositeMapper = { } }; -export const AllowedConnectionsResource: msRest.CompositeMapper = { - serializedName: "AllowedConnectionsResource", +export const SettingsList: msRest.CompositeMapper = { + serializedName: "SettingsList", type: { name: "Composite", - className: "AllowedConnectionsResource", + className: "SettingsList", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Setting" + } + } } }, - name: { + nextLink: { readOnly: true, - serializedName: "name", + serializedName: "nextLink", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const IoTSecuritySolutionsList: msRest.CompositeMapper = { + serializedName: "IoTSecuritySolutionsList", + type: { + name: "Composite", + className: "IoTSecuritySolutionsList", + modelProperties: { + value: { + required: true, + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IoTSecuritySolutionModel" + } + } } }, - 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 IoTSecurityAggregatedAlertList: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedAlertList", + type: { + name: "Composite", + className: "IoTSecurityAggregatedAlertList", + modelProperties: { + value: { + required: true, + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectableResource" + className: "IoTSecurityAggregatedAlert" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const PricingList: msRest.CompositeMapper = { - serializedName: "PricingList", +export const IoTSecurityAggregatedRecommendationList: msRest.CompositeMapper = { + serializedName: "IoTSecurityAggregatedRecommendationList", type: { name: "Composite", - className: "PricingList", + className: "IoTSecurityAggregatedRecommendationList", modelProperties: { value: { required: true, @@ -1895,7 +3428,7 @@ export const PricingList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Pricing" + className: "IoTSecurityAggregatedRecommendation" } } } @@ -1911,11 +3444,11 @@ export const PricingList: msRest.CompositeMapper = { } }; -export const SecurityContactList: msRest.CompositeMapper = { - serializedName: "SecurityContactList", +export const AllowedConnectionsList: msRest.CompositeMapper = { + serializedName: "AllowedConnectionsList", type: { name: "Composite", - className: "SecurityContactList", + className: "AllowedConnectionsList", modelProperties: { value: { readOnly: true, @@ -1925,7 +3458,7 @@ export const SecurityContactList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SecurityContact" + className: "AllowedConnectionsResource" } } } @@ -1941,21 +3474,20 @@ export const SecurityContactList: msRest.CompositeMapper = { } }; -export const WorkspaceSettingList: msRest.CompositeMapper = { - serializedName: "WorkspaceSettingList", +export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { + serializedName: "DiscoveredSecuritySolutionList", type: { name: "Composite", - className: "WorkspaceSettingList", + className: "DiscoveredSecuritySolutionList", modelProperties: { value: { - required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkspaceSetting" + className: "DiscoveredSecuritySolution" } } } @@ -1971,11 +3503,11 @@ export const WorkspaceSettingList: msRest.CompositeMapper = { } }; -export const AutoProvisioningSettingList: msRest.CompositeMapper = { - serializedName: "AutoProvisioningSettingList", +export const ExternalSecuritySolutionList: msRest.CompositeMapper = { + serializedName: "ExternalSecuritySolutionList", type: { name: "Composite", - className: "AutoProvisioningSettingList", + className: "ExternalSecuritySolutionList", modelProperties: { value: { serializedName: "", @@ -1984,7 +3516,7 @@ export const AutoProvisioningSettingList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AutoProvisioningSetting" + className: "ExternalSecuritySolution" } } } @@ -2000,11 +3532,11 @@ export const AutoProvisioningSettingList: msRest.CompositeMapper = { } }; -export const ComplianceList: msRest.CompositeMapper = { - serializedName: "ComplianceList", +export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { + serializedName: "JitNetworkAccessPoliciesList", type: { name: "Composite", - className: "ComplianceList", + className: "JitNetworkAccessPoliciesList", modelProperties: { value: { serializedName: "", @@ -2013,7 +3545,7 @@ export const ComplianceList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Compliance" + className: "JitNetworkAccessPolicy" } } } @@ -2029,20 +3561,21 @@ export const ComplianceList: msRest.CompositeMapper = { } }; -export const SettingsList: msRest.CompositeMapper = { - serializedName: "SettingsList", +export const AscLocationList: msRest.CompositeMapper = { + serializedName: "AscLocationList", type: { name: "Composite", - className: "SettingsList", + className: "AscLocationList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Setting" + className: "AscLocation" } } } @@ -2058,20 +3591,21 @@ export const SettingsList: msRest.CompositeMapper = { } }; -export const InformationProtectionPolicyList: msRest.CompositeMapper = { - serializedName: "InformationProtectionPolicyList", +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", type: { name: "Composite", - className: "InformationProtectionPolicyList", + className: "OperationList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "InformationProtectionPolicy" + className: "Operation" } } } @@ -2087,20 +3621,21 @@ export const InformationProtectionPolicyList: msRest.CompositeMapper = { } }; -export const OperationList: msRest.CompositeMapper = { - serializedName: "OperationList", +export const SecurityTaskList: msRest.CompositeMapper = { + serializedName: "SecurityTaskList", type: { name: "Composite", - className: "OperationList", + className: "SecurityTaskList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "SecurityTask" } } } @@ -2116,11 +3651,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const AscLocationList: msRest.CompositeMapper = { - serializedName: "AscLocationList", +export const TopologyList: msRest.CompositeMapper = { + serializedName: "TopologyList", type: { name: "Composite", - className: "AscLocationList", + className: "TopologyList", modelProperties: { value: { readOnly: true, @@ -2130,7 +3665,7 @@ export const AscLocationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AscLocation" + className: "TopologyResource" } } } @@ -2146,21 +3681,20 @@ export const AscLocationList: msRest.CompositeMapper = { } }; -export const SecurityTaskList: msRest.CompositeMapper = { - serializedName: "SecurityTaskList", +export const AutoProvisioningSettingList: msRest.CompositeMapper = { + serializedName: "AutoProvisioningSettingList", type: { name: "Composite", - className: "SecurityTaskList", + className: "AutoProvisioningSettingList", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SecurityTask" + className: "AutoProvisioningSetting" } } } @@ -2176,11 +3710,11 @@ export const SecurityTaskList: msRest.CompositeMapper = { } }; -export const AlertList: msRest.CompositeMapper = { - serializedName: "AlertList", +export const ComplianceList: msRest.CompositeMapper = { + serializedName: "ComplianceList", type: { name: "Composite", - className: "AlertList", + className: "ComplianceList", modelProperties: { value: { serializedName: "", @@ -2189,7 +3723,7 @@ export const AlertList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Alert" + className: "Compliance" } } } @@ -2205,11 +3739,11 @@ export const AlertList: msRest.CompositeMapper = { } }; -export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { - serializedName: "DiscoveredSecuritySolutionList", +export const InformationProtectionPolicyList: msRest.CompositeMapper = { + serializedName: "InformationProtectionPolicyList", type: { name: "Composite", - className: "DiscoveredSecuritySolutionList", + className: "InformationProtectionPolicyList", modelProperties: { value: { serializedName: "", @@ -2218,7 +3752,7 @@ export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "DiscoveredSecuritySolution" + className: "InformationProtectionPolicy" } } } @@ -2234,20 +3768,21 @@ export const DiscoveredSecuritySolutionList: msRest.CompositeMapper = { } }; -export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { - serializedName: "JitNetworkAccessPoliciesList", +export const SecurityContactList: msRest.CompositeMapper = { + serializedName: "SecurityContactList", type: { name: "Composite", - className: "JitNetworkAccessPoliciesList", + className: "SecurityContactList", modelProperties: { value: { + readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JitNetworkAccessPolicy" + className: "SecurityContact" } } } @@ -2263,20 +3798,21 @@ export const JitNetworkAccessPoliciesList: msRest.CompositeMapper = { } }; -export const ExternalSecuritySolutionList: msRest.CompositeMapper = { - serializedName: "ExternalSecuritySolutionList", +export const WorkspaceSettingList: msRest.CompositeMapper = { + serializedName: "WorkspaceSettingList", type: { name: "Composite", - className: "ExternalSecuritySolutionList", + className: "WorkspaceSettingList", modelProperties: { value: { + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ExternalSecuritySolution" + className: "WorkspaceSetting" } } } @@ -2292,21 +3828,21 @@ export const ExternalSecuritySolutionList: msRest.CompositeMapper = { } }; -export const TopologyList: msRest.CompositeMapper = { - serializedName: "TopologyList", +export const RegulatoryComplianceStandardList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceStandardList", type: { name: "Composite", - className: "TopologyList", + className: "RegulatoryComplianceStandardList", modelProperties: { value: { - readOnly: true, + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TopologyResource" + className: "RegulatoryComplianceStandard" } } } @@ -2322,21 +3858,51 @@ export const TopologyList: msRest.CompositeMapper = { } }; -export const AllowedConnectionsList: msRest.CompositeMapper = { - serializedName: "AllowedConnectionsList", +export const RegulatoryComplianceControlList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceControlList", type: { name: "Composite", - className: "AllowedConnectionsList", + className: "RegulatoryComplianceControlList", modelProperties: { value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegulatoryComplianceControl" + } + } + } + }, + nextLink: { readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RegulatoryComplianceAssessmentList: msRest.CompositeMapper = { + serializedName: "RegulatoryComplianceAssessmentList", + type: { + name: "Composite", + className: "RegulatoryComplianceAssessmentList", + modelProperties: { + value: { + required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AllowedConnectionsResource" + className: "RegulatoryComplianceAssessment" } } } @@ -2353,10 +3919,9 @@ export const AllowedConnectionsList: msRest.CompositeMapper = { }; export const discriminators = { - 'Setting' : Setting, - 'Setting.DataExportSetting' : DataExportSetting, '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 f2e907d8212..786d9130f59 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 fb823bdaca2..354053bede0 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -20,6 +20,26 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +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: { @@ -46,13 +66,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 +120,30 @@ 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 ascLocation: msRest.OperationURLParameter = { parameterPath: "ascLocation", mapper: { @@ -84,6 +164,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: { @@ -138,6 +228,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 +303,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 +358,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: { @@ -248,6 +420,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 +454,16 @@ export const settingName1: msRest.OperationURLParameter = { } } }; +export const solutionName: msRest.OperationURLParameter = { + parameterPath: "solutionName", + mapper: { + required: true, + serializedName: "solutionName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -283,6 +477,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 +509,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 457b9ad15a1..d5fb2136090 100644 --- a/sdk/security/arm-security/src/models/pricingsMappers.ts +++ b/sdk/security/arm-security/src/models/pricingsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, CloudError, - SecurityContact, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + PricingList, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 00000000000..30d461f22a5 --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceAssessmentsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceAssessmentList, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 00000000000..0e4644136e1 --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceControlsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceControlList, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 00000000000..6c9185a2347 --- /dev/null +++ b/sdk/security/arm-security/src/models/regulatoryComplianceStandardsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + RegulatoryComplianceStandardList, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 1e4d8593b77..c8e0ffed047 100644 --- a/sdk/security/arm-security/src/models/securityContactsMappers.ts +++ b/sdk/security/arm-security/src/models/securityContactsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, CloudError, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityContactList, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 00000000000..873acbd517c --- /dev/null +++ b/sdk/security/arm-security/src/models/serverVulnerabilityAssessmentOperationsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, + CloudError, + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + ServerVulnerabilityAssessmentsList, + Setting, + SettingResource, + 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 127c4620490..9e2be3631c6 100644 --- a/sdk/security/arm-security/src/models/settingsMappers.ts +++ b/sdk/security/arm-security/src/models/settingsMappers.ts @@ -1,18 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, + BaseResource, CloudError, - DataExportSetting + Compliance, + ComplianceResult, + ComplianceSegment, + DataExportSetting, + InformationProtectionKeyword, + InformationProtectionPolicy, + InformationType, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + SettingsList, + 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 5e5eb961a56..3225aa016e5 100644 --- a/sdk/security/arm-security/src/models/tasksMappers.ts +++ b/sdk/security/arm-security/src/models/tasksMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, - SecurityTaskParameters, CloudError, - SecurityContact, - Pricing, - WorkspaceSetting, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, + SecurityTask, + SecurityTaskList, + SecurityTaskParameters, + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 2f721b7b6c8..80804dc1264 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 df56c1d9def..88b341eaaeb 100644 --- a/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts +++ b/sdk/security/arm-security/src/models/workspaceSettingsMappers.ts @@ -1,35 +1,49 @@ /* * 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, + AdvancedThreatProtectionSetting, + Alert, + AlertConfidenceReason, + AlertEntity, + AscLocation, + AutoProvisioningSetting, BaseResource, CloudError, - SecurityContact, - Pricing, - AutoProvisioningSetting, Compliance, + ComplianceResult, ComplianceSegment, - AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionKeyword, InformationProtectionPolicy, - SensitivityLabel, InformationType, - InformationProtectionKeyword, + IoTSecurityAlertedDevice, + IoTSecurityAlertedDevicesList, + IoTSecurityDeviceAlert, + IoTSecurityDeviceAlertsList, + IoTSecurityDeviceRecommendation, + IoTSecurityDeviceRecommendationsList, + IoTSecuritySolutionAnalyticsModel, + IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, + IoTSeverityMetrics, + Pricing, + RegulatoryComplianceAssessment, + RegulatoryComplianceControl, + RegulatoryComplianceStandard, + Resource, + SecurityContact, SecurityTask, SecurityTaskParameters, - AscLocation, - Alert, - AlertEntity, - AlertConfidenceReason + SensitivityLabel, + ServerVulnerabilityAssessment, + Setting, + SettingResource, + 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 00000000000..c216a9b59d0 --- /dev/null +++ b/sdk/security/arm-security/src/operations/adaptiveApplicationControls.ts @@ -0,0 +1,196 @@ +/* + * 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 The updated VM/server group data + * @param [options] The optional parameters + * @returns Promise + */ + put(groupName: string, body: Models.AppWhitelistingPutGroupData, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of an application control VM/server group + * @param body The updated VM/server group data + * @param callback The callback + */ + put(groupName: string, body: Models.AppWhitelistingPutGroupData, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of an application control VM/server group + * @param body The updated VM/server group data + * @param options The optional parameters + * @param callback The callback + */ + put(groupName: string, body: Models.AppWhitelistingPutGroupData, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(groupName: string, body: Models.AppWhitelistingPutGroupData, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + body, + options + }, + putOperationSpec, + callback) as Promise; + } +} + +// 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.apiVersion4, + 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.apiVersion4 + ], + 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.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.AppWhitelistingPutGroupData, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AppWhitelistingGroup + }, + 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 7c141526f4d..e066ac72441 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.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -121,7 +121,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.settingName1 ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/alerts.ts b/sdk/security/arm-security/src/operations/alerts.ts index 5437e2d49e7..d9963abce16 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 @@ -307,7 +307,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,7 +402,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, Parameters.expand @@ -429,7 +429,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, Parameters.expand @@ -456,7 +456,7 @@ const listSubscriptionLevelAlertsByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, Parameters.expand @@ -484,7 +484,7 @@ const listResourceGroupLevelAlertsByRegionOperationSpec: msRest.OperationSpec = Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.select, Parameters.expand @@ -512,7 +512,7 @@ const getSubscriptionLevelAlertOperationSpec: msRest.OperationSpec = { Parameters.alertName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +538,7 @@ const getResourceGroupLevelAlertsOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -564,7 +564,7 @@ const updateSubscriptionLevelAlertStateOperationSpec: msRest.OperationSpec = { Parameters.alertUpdateActionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -589,7 +589,7 @@ const updateResourceGroupLevelAlertStateOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/allowedConnections.ts b/sdk/security/arm-security/src/operations/allowedConnections.ts index b738cdb1d55..af6538eb105 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.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +203,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -229,7 +229,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.connectionType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts index be242ac19ac..352f1989c6d 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/complianceResults.ts b/sdk/security/arm-security/src/operations/complianceResults.ts new file mode 100644 index 00000000000..66c2d16295d --- /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 73cb750b550..951f8b8f7ab 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/discoveredSecuritySolutions.ts b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts index 08ce2d37ee8..a65a6cd10bb 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.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.discoveredSecuritySolutionName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts index 564bd6cab18..33c0cc88276 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.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.externalSecuritySolutionsName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index dd820149dfa..f8898525e16 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -8,20 +8,34 @@ * regenerated. */ +export * from "./complianceResults"; export * from "./pricings"; -export * from "./securityContacts"; -export * from "./workspaceSettings"; -export * from "./autoProvisioningSettings"; -export * from "./compliances"; -export * from "./advancedThreatProtection"; -export * from "./settings"; -export * from "./informationProtectionPolicies"; -export * from "./operations"; -export * from "./locations"; -export * from "./tasks"; export * from "./alerts"; +export * from "./settings"; +export * from "./ioTSecuritySolutions"; +export * from "./ioTSecuritySolutionsResourceGroup"; +export * from "./iotSecuritySolution"; +export * from "./ioTSecuritySolutionsAnalytics"; +export * from "./ioTSecuritySolutionsAnalyticsAggregatedAlerts"; +export * from "./ioTSecuritySolutionsAnalyticsAggregatedAlert"; +export * from "./ioTSecuritySolutionsAnalyticsRecommendation"; +export * from "./ioTSecuritySolutionsAnalyticsRecommendations"; +export * from "./allowedConnections"; export * from "./discoveredSecuritySolutions"; -export * from "./jitNetworkAccessPolicies"; export * from "./externalSecuritySolutions"; +export * from "./jitNetworkAccessPolicies"; +export * from "./adaptiveApplicationControls"; +export * from "./locations"; +export * from "./operations"; +export * from "./tasks"; export * from "./topology"; -export * from "./allowedConnections"; +export * from "./advancedThreatProtection"; +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"; diff --git a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts index 59e511fb044..b8ac678e1e1 100644 --- a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts +++ b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts @@ -181,7 +181,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -205,7 +205,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.informationProtectionPolicyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage @@ -231,7 +231,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion5 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/ioTSecuritySolutions.ts b/sdk/security/arm-security/src/operations/ioTSecuritySolutions.ts new file mode 100644 index 00000000000..413cfa8434b --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutions.ts @@ -0,0 +1,127 @@ +/* + * 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/ioTSecuritySolutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IoTSecuritySolutions. */ +export class IoTSecuritySolutions { + private readonly client: SecurityCenterContext; + + /** + * Create a IoTSecuritySolutions. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List of security solutions + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.IoTSecuritySolutionsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.IoTSecuritySolutionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.IoTSecuritySolutionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List of security solutions + * @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/iotSecuritySolutions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + 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.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalytics.ts b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalytics.ts new file mode 100644 index 00000000000..8a3df6f903c --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalytics.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/ioTSecuritySolutionsAnalyticsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IoTSecuritySolutionsAnalytics. */ +export class IoTSecuritySolutionsAnalytics { + private readonly client: SecurityCenterContext; + + /** + * Create a IoTSecuritySolutionsAnalytics. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param [options] The optional parameters + * @returns Promise + */ + getAll(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 solution manager name + * @param callback The callback + */ + getAll(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 solution manager name + * @param options The optional parameters + * @param callback The callback + */ + getAll(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAll(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + getAllOperationSpec, + callback) as Promise; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param [options] The optional parameters + * @returns Promise + */ + getDefault(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 solution manager name + * @param callback The callback + */ + getDefault(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 solution manager name + * @param options The optional parameters + * @param callback The callback + */ + getDefault(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDefault(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + getDefaultOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getAllOperationSpec: 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 getDefaultOperationSpec: 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 00000000000..247cb47f135 --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsAggregatedAlert.ts @@ -0,0 +1,158 @@ +/* + * 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; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @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 solution manager name + * @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; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @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 solution manager name + * @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); + } +} + +// 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/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 +}; diff --git a/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsAggregatedAlerts.ts b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsAggregatedAlerts.ts new file mode 100644 index 00000000000..f309dc4aa1b --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsAggregatedAlerts.ts @@ -0,0 +1,140 @@ +/* + * 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/ioTSecuritySolutionsAnalyticsAggregatedAlertsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IoTSecuritySolutionsAnalyticsAggregatedAlerts. */ +export class IoTSecuritySolutionsAnalyticsAggregatedAlerts { + private readonly client: SecurityCenterContext; + + /** + * Create a IoTSecuritySolutionsAnalyticsAggregatedAlerts. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, solutionName: string, options?: Models.IoTSecuritySolutionsAnalyticsAggregatedAlertsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, options: Models.IoTSecuritySolutionsAnalyticsAggregatedAlertsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, solutionName: string, options?: Models.IoTSecuritySolutionsAnalyticsAggregatedAlertsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Security Analytics of a 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 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 00000000000..6a5babba7a1 --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsRecommendation.ts @@ -0,0 +1,95 @@ +/* + * 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; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param aggregatedRecommendationName Identifier of the aggregated recommendation + * @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 solution manager name + * @param aggregatedRecommendationName Identifier of the aggregated recommendation + * @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 solution manager name + * @param aggregatedRecommendationName Identifier of the aggregated recommendation + * @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; + } +} + +// 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 +}; diff --git a/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsRecommendations.ts b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsRecommendations.ts new file mode 100644 index 00000000000..c1b5296ba7d --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsAnalyticsRecommendations.ts @@ -0,0 +1,140 @@ +/* + * 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/ioTSecuritySolutionsAnalyticsRecommendationsMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IoTSecuritySolutionsAnalyticsRecommendations. */ +export class IoTSecuritySolutionsAnalyticsRecommendations { + private readonly client: SecurityCenterContext; + + /** + * Create a IoTSecuritySolutionsAnalyticsRecommendations. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * Security Analytics of a security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, solutionName: string, options?: Models.IoTSecuritySolutionsAnalyticsRecommendationsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, solutionName: string, options: Models.IoTSecuritySolutionsAnalyticsRecommendationsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, solutionName: string, options?: Models.IoTSecuritySolutionsAnalyticsRecommendationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Security Analytics of a 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/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/ioTSecuritySolutionsResourceGroup.ts b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsResourceGroup.ts new file mode 100644 index 00000000000..8849261f01d --- /dev/null +++ b/sdk/security/arm-security/src/operations/ioTSecuritySolutionsResourceGroup.ts @@ -0,0 +1,135 @@ +/* + * 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/ioTSecuritySolutionsResourceGroupMappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenterContext } from "../securityCenterContext"; + +/** Class representing a IoTSecuritySolutionsResourceGroup. */ +export class IoTSecuritySolutionsResourceGroup { + private readonly client: SecurityCenterContext; + + /** + * Create a IoTSecuritySolutionsResourceGroup. + * @param {SecurityCenterContext} client Reference to the service client. + */ + constructor(client: SecurityCenterContext) { + this.client = client; + } + + /** + * List of security solutions + * @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 + */ + list(resourceGroupName: string, options?: Models.IoTSecuritySolutionsResourceGroupListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param callback The callback + */ + list(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 + */ + list(resourceGroupName: string, options: Models.IoTSecuritySolutionsResourceGroupListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: Models.IoTSecuritySolutionsResourceGroupListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List of security solutions + * @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", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IoTSecuritySolutionsList + }, + 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.IoTSecuritySolutionsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; 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 00000000000..fd82775b83a --- /dev/null +++ b/sdk/security/arm-security/src/operations/iotSecuritySolution.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/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; + } + + /** + * Details of a specific iot security solution + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @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 solution manager name + * @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; + } + + /** + * Create new solution manager + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @param iotSecuritySolutionData The security solution data + * @param [options] The optional parameters + * @returns Promise + */ + create(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 solution manager name + * @param iotSecuritySolutionData The security solution data + * @param callback The callback + */ + create(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 solution manager name + * @param iotSecuritySolutionData The security solution data + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, solutionName: string, iotSecuritySolutionData: Models.IoTSecuritySolutionModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + solutionName, + iotSecuritySolutionData, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * update existing 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 solution manager name + * @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 solution manager name + * @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 solution manager name + * @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; + } + + /** + * Create new solution manager + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param solutionName The solution manager name + * @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 solution manager name + * @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 solution manager name + * @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); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +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 createOperationSpec: 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 +}; diff --git a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts index a9eca485751..33b07e6a204 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.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -437,7 +437,7 @@ const listByRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -461,7 +461,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -486,7 +486,7 @@ const listByResourceGroupAndRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -512,7 +512,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -538,7 +538,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -571,7 +571,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -597,7 +597,7 @@ const initiateOperationSpec: msRest.OperationSpec = { Parameters.jitNetworkAccessPolicyInitiateType ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/locations.ts b/sdk/security/arm-security/src/operations/locations.ts index ca7e3a22f61..6fddbae9fa1 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 76388bc9221..15d396b057d 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 835af87be06..3bf3fd1e008 100644 --- a/sdk/security/arm-security/src/operations/pricings.ts +++ b/sdk/security/arm-security/src/operations/pricings.ts @@ -27,7 +27,9 @@ export class Pricings { } /** - * Security pricing configurations in the subscription + * A given security pricing configuration in the subscription. Azure Security Center is available + * in two pricing tiers: Free and Standard, on multiple resource types, including Virtual machines, + * SQL Servers, App service plans and Storage accounts. * @param [options] The optional parameters * @returns Promise */ @@ -51,225 +53,67 @@ 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. + * A given security pricing configuration in the subscription. Azure Security Center is available + * in two pricing tiers: Free and Standard, on multiple resource types, including Virtual machines, + * SQL Servers, App service plans and Storage accounts. * @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. + * A given security pricing configuration in the subscription. Azure Security Center is available + * in two pricing tiers: Free and Standard, on multiple resource types, including Virtual machines, + * SQL Servers, App service plans and Storage accounts. * @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 +126,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -298,31 +142,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 +150,7 @@ const getSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -346,7 +166,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 +174,7 @@ const updateSubscriptionPricingOperationSpec: msRest.OperationSpec = { Parameters.pricingName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -376,102 +196,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 00000000000..d9e7f429a94 --- /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 00000000000..5d40b5b0688 --- /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 00000000000..07b2a60f525 --- /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/securityContacts.ts b/sdk/security/arm-security/src/operations/securityContacts.ts index d96d049f457..e368e7b7cf1 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 00000000000..660a35067e2 --- /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 b5d38a32686..78571824c8c 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -52,23 +52,23 @@ 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; + 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 */ - get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, @@ -80,26 +80,26 @@ 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; + update(settingName: Models.SettingName1, setting: Models.Setting, 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; + update(settingName: Models.SettingName1, setting: Models.Setting, 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 */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(settingName: Models.SettingName1, setting: Models.Setting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(settingName: Models.SettingName1, setting: Models.Setting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, @@ -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/tasks.ts b/sdk/security/arm-security/src/operations/tasks.ts index cf2414a50cf..28712385dcf 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 29881ed3773..6be6e733023 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.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -199,7 +199,7 @@ const listByHomeRegionOperationSpec: msRest.OperationSpec = { Parameters.ascLocation ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage @@ -225,7 +225,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.topologyResourceName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/security/arm-security/src/operations/workspaceSettings.ts b/sdk/security/arm-security/src/operations/workspaceSettings.ts index 7aa4886714a..242206b5175 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 5b1f4c9ebf5..9ba69e97dff 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -17,23 +17,37 @@ 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; - settings: operations.Settings; - informationProtectionPolicies: operations.InformationProtectionPolicies; - operations: operations.Operations; - locations: operations.Locations; - tasks: operations.Tasks; alerts: operations.Alerts; + settings: operations.Settings; + ioTSecuritySolutions: operations.IoTSecuritySolutions; + ioTSecuritySolutionsResourceGroup: operations.IoTSecuritySolutionsResourceGroup; + iotSecuritySolution: operations.IotSecuritySolution; + ioTSecuritySolutionsAnalytics: operations.IoTSecuritySolutionsAnalytics; + ioTSecuritySolutionsAnalyticsAggregatedAlerts: operations.IoTSecuritySolutionsAnalyticsAggregatedAlerts; + ioTSecuritySolutionsAnalyticsAggregatedAlert: operations.IoTSecuritySolutionsAnalyticsAggregatedAlert; + ioTSecuritySolutionsAnalyticsRecommendation: operations.IoTSecuritySolutionsAnalyticsRecommendation; + ioTSecuritySolutionsAnalyticsRecommendations: operations.IoTSecuritySolutionsAnalyticsRecommendations; + allowedConnections: operations.AllowedConnections; discoveredSecuritySolutions: operations.DiscoveredSecuritySolutions; - jitNetworkAccessPolicies: operations.JitNetworkAccessPolicies; externalSecuritySolutions: operations.ExternalSecuritySolutions; + jitNetworkAccessPolicies: operations.JitNetworkAccessPolicies; + adaptiveApplicationControls: operations.AdaptiveApplicationControls; + locations: operations.Locations; + operations: operations.Operations; + tasks: operations.Tasks; topology: operations.Topology; - allowedConnections: operations.AllowedConnections; + advancedThreatProtection: operations.AdvancedThreatProtection; + 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; /** * Initializes a new instance of the SecurityCenter class. @@ -45,23 +59,37 @@ 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.settings = new operations.Settings(this); - this.informationProtectionPolicies = new operations.InformationProtectionPolicies(this); - this.operations = new operations.Operations(this); - this.locations = new operations.Locations(this); - this.tasks = new operations.Tasks(this); this.alerts = new operations.Alerts(this); + this.settings = new operations.Settings(this); + this.ioTSecuritySolutions = new operations.IoTSecuritySolutions(this); + this.ioTSecuritySolutionsResourceGroup = new operations.IoTSecuritySolutionsResourceGroup(this); + this.iotSecuritySolution = new operations.IotSecuritySolution(this); + this.ioTSecuritySolutionsAnalytics = new operations.IoTSecuritySolutionsAnalytics(this); + this.ioTSecuritySolutionsAnalyticsAggregatedAlerts = new operations.IoTSecuritySolutionsAnalyticsAggregatedAlerts(this); + this.ioTSecuritySolutionsAnalyticsAggregatedAlert = new operations.IoTSecuritySolutionsAnalyticsAggregatedAlert(this); + this.ioTSecuritySolutionsAnalyticsRecommendation = new operations.IoTSecuritySolutionsAnalyticsRecommendation(this); + this.ioTSecuritySolutionsAnalyticsRecommendations = new operations.IoTSecuritySolutionsAnalyticsRecommendations(this); + this.allowedConnections = new operations.AllowedConnections(this); this.discoveredSecuritySolutions = new operations.DiscoveredSecuritySolutions(this); - this.jitNetworkAccessPolicies = new operations.JitNetworkAccessPolicies(this); this.externalSecuritySolutions = new operations.ExternalSecuritySolutions(this); + this.jitNetworkAccessPolicies = new operations.JitNetworkAccessPolicies(this); + this.adaptiveApplicationControls = new operations.AdaptiveApplicationControls(this); + this.locations = new operations.Locations(this); + this.operations = new operations.Operations(this); + this.tasks = new operations.Tasks(this); this.topology = new operations.Topology(this); - this.allowedConnections = new operations.AllowedConnections(this); + this.advancedThreatProtection = new operations.AdvancedThreatProtection(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); } } diff --git a/sdk/security/arm-security/src/securityCenterContext.ts b/sdk/security/arm-security/src/securityCenterContext.ts index 1456da91b8a..3cbbd0dd847 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 = "1.2.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 87bbf5b5fa4..422b584abd5 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/service-bus/package.json b/sdk/servicebus/service-bus/package.json index c5be64f7b25..bce25a8a177 100644 --- a/sdk/servicebus/service-bus/package.json +++ b/sdk/servicebus/service-bus/package.json @@ -96,7 +96,7 @@ "chai-as-promised": "^7.1.1", "cross-env": "^5.2.0", "delay": "^4.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 17018f59506..b858968d4d8 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -81,7 +81,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.1.5", "@types/dotenv": "^6.1.0", - "@types/fs-extra": "~7.0.0", + "@types/fs-extra": "^8.0.0", "@types/mocha": "^5.2.5", "@types/nise": "^1.4.0", "@types/nock": "^10.0.1", @@ -91,7 +91,7 @@ "@typescript-eslint/parser": "^1.11.0", "assert": "^1.4.1", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "es6-promise": "^4.2.5", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", @@ -99,9 +99,9 @@ "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "fs-extra": "~8.0.1", + "fs-extra": "^8.1.0", "gulp": "^4.0.0", - "gulp-zip": "^4.2.0", + "gulp-zip": "^5.0.0", "inherits": "^2.0.3", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", @@ -138,6 +138,6 @@ "source-map-support": "^0.5.9", "ts-node": "^7.0.1", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/storage/storage-file/package.json b/sdk/storage/storage-file/package.json index e8e11a0afe6..9718266f2a1 100644 --- a/sdk/storage/storage-file/package.json +++ b/sdk/storage/storage-file/package.json @@ -81,7 +81,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.1.5", "@types/dotenv": "^6.1.0", - "@types/fs-extra": "~7.0.0", + "@types/fs-extra": "^8.0.0", "@types/mocha": "^5.2.5", "@types/nise": "^1.4.0", "@types/nock": "^10.0.1", @@ -91,7 +91,7 @@ "@typescript-eslint/parser": "^1.11.0", "assert": "^1.4.1", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "es6-promise": "^4.2.5", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", @@ -99,9 +99,9 @@ "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "fs-extra": "~8.0.1", + "fs-extra": "^8.1.0", "gulp": "^4.0.0", - "gulp-zip": "^4.2.0", + "gulp-zip": "^5.0.0", "inherits": "^2.0.3", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", @@ -138,6 +138,6 @@ "source-map-support": "^0.5.9", "ts-node": "^7.0.1", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/storage/storage-queue/package.json b/sdk/storage/storage-queue/package.json index eddf189cd53..3473428c794 100644 --- a/sdk/storage/storage-queue/package.json +++ b/sdk/storage/storage-queue/package.json @@ -79,7 +79,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.1.5", "@types/dotenv": "^6.1.0", - "@types/fs-extra": "~7.0.0", + "@types/fs-extra": "^8.0.0", "@types/mocha": "^5.2.5", "@types/nise": "^1.4.0", "@types/nock": "^10.0.1", @@ -89,7 +89,7 @@ "@typescript-eslint/parser": "^1.11.0", "assert": "^1.4.1", "cross-env": "^5.2.0", - "dotenv": "^7.0.0", + "dotenv": "^8.0.0", "es6-promise": "^4.2.5", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", @@ -97,9 +97,9 @@ "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "fs-extra": "~8.0.1", + "fs-extra": "^8.1.0", "gulp": "^4.0.0", - "gulp-zip": "^4.2.0", + "gulp-zip": "^5.0.0", "inherits": "^2.0.3", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", @@ -136,6 +136,6 @@ "source-map-support": "^0.5.9", "ts-node": "^7.0.1", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/template/template/package.json b/sdk/template/template/package.json index 3e632f1d9af..fe657f85cd5 100644 --- a/sdk/template/template/package.json +++ b/sdk/template/template/package.json @@ -60,7 +60,7 @@ "sideEffects": false, "private": true, "dependencies": { - "@azure/ms-rest-js": "^1.8.1", + "@azure/core-http": "1.0.0-preview.2", "events": "^3.0.0", "tslib": "^1.9.3" }, @@ -105,6 +105,6 @@ "rollup-plugin-terser": "^5.1.1", "rollup-plugin-visualizer": "^2.0.0", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/template/template/review/template.api.md b/sdk/template/template/review/template.api.md index dded12fcad1..d07e84db640 100644 --- a/sdk/template/template/review/template.api.md +++ b/sdk/template/template/review/template.api.md @@ -5,7 +5,7 @@ ```ts import EventEmitter from 'events'; -import { URLBuilder } from '@azure/ms-rest-js'; +import { URLBuilder } from '@azure/core-http'; // @public (undocumented) export function createEventEmitter(): EventEmitter; diff --git a/sdk/template/template/rollup.base.config.js b/sdk/template/template/rollup.base.config.js index 76a4d7ecb8a..067d58d3a9c 100644 --- a/sdk/template/template/rollup.base.config.js +++ b/sdk/template/template/rollup.base.config.js @@ -58,13 +58,12 @@ export function nodeConfig(test = false) { export function browserConfig(test = false, production = false) { const baseConfig = { input: input, - external: ["@azure/ms-rest-js"], output: { file: "browser/azure-template.js", format: "umd", name: "ExampleClient", sourcemap: true, - globals: { "@azure/ms-rest-js": "msRest" } + globals: { "@azure/core-http": "Azure.Core.HTTP" } }, preserveSymlinks: false, plugins: [ diff --git a/sdk/template/template/src/index.ts b/sdk/template/template/src/index.ts index 6b6105dcf98..28b5d6c1dbd 100644 --- a/sdk/template/template/src/index.ts +++ b/sdk/template/template/src/index.ts @@ -7,10 +7,10 @@ export { print }; // this is a utility function from a library that should be external // for both node and web -import { isNode } from "@azure/ms-rest-js"; +import { isNode } from "@azure/core-http"; // exporting some value from a dependency -export { URLBuilder } from "@azure/ms-rest-js"; +export { URLBuilder } from "@azure/core-http"; export function createEventEmitter() { // use event emitter