refresh-13 (#21616)
This commit is contained in:
Родитель
0442b5c50a
Коммит
2cd96cb4f4
|
@ -662,6 +662,21 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@azure/arm-network/26.0.0:
|
||||
resolution: {integrity: sha512-Hp0Q4ZzChs8C0DUdGZOChWKMrhzZ53V0Q681puREZ9S1E6o2yWM0Vb+cYuWoyPOylwuzP2fjNjJZGtB7WuFd3w==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.0.4
|
||||
'@azure/core-auth': 1.3.2
|
||||
'@azure/core-client': 1.5.0
|
||||
'@azure/core-lro': 2.2.4
|
||||
'@azure/core-paging': 1.2.1
|
||||
'@azure/core-rest-pipeline': 1.8.0
|
||||
tslib: 2.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@azure/communication-signaling/1.0.0-beta.13:
|
||||
resolution: {integrity: sha512-WNB3kewT2unIMVSzN/NkVf0EiPvXJh31pbsfatykU/Z6jfTsnKb0fDW7LhujeLnDIJfhAE0IC1xpW1msGYfsmg==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
@ -10008,11 +10023,12 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-compute.tgz:
|
||||
resolution: {integrity: sha512-U8bi5v2TKt1zbWZ/XqVC6fHPxw3m7I4trTo0ZuMCIO7K4Q3Vo7eIYIuAUIIkQFCQ8t0FP1hhatDKyhXJpgGHHg==, tarball: file:projects/arm-compute.tgz}
|
||||
resolution: {integrity: sha512-gJfRBricy2AcKXFqf/paj3Sx5bBJ7x6MyWuuOlsHRAmOLhevx8hMZjS6K7bvpGHIZij+6jZw7I3LpznW0oOnwA==, tarball: file:projects/arm-compute.tgz}
|
||||
name: '@rush-temp/arm-compute'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/arm-network': 26.0.0
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
|
@ -10847,11 +10863,12 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-eventhub.tgz:
|
||||
resolution: {integrity: sha512-GPsEveNIXUN95tqUn7A+0Jpe3BCEID7xCAXKouanxiM646+d2Dx7K8Q3XAcnSZx+PuUoX5oAZqVtjjeND6AMIg==, tarball: file:projects/arm-eventhub.tgz}
|
||||
resolution: {integrity: sha512-0/bLZaWh1M+YMhOqdV7043GLZJYohPa+NnJY//fRmfNe6PRe8MAmhkBP650zKFudSZa6nh/LTZ8mESRtPj6hYA==, tarball: file:projects/arm-eventhub.tgz}
|
||||
name: '@rush-temp/arm-eventhub'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/arm-network': 26.0.0
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
|
@ -12049,7 +12066,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-netapp.tgz:
|
||||
resolution: {integrity: sha512-jXQUS6wgqFy0SdoEmqNNyWbzER0kUZpN7nQrvBrCsDJmFXpKcOR6V2wfqwq6G5LffGolj5Ep+Xx57fi3zERpeg==, tarball: file:projects/arm-netapp.tgz}
|
||||
resolution: {integrity: sha512-GsGECXocZ7+SLSneV3+bj6/Wl3tdLJUyOOJU8KcuFAbghWB0uYGCgMR3LgqvN+HftyY4SgRc/QaPCGwmHS+PCA==, tarball: file:projects/arm-netapp.tgz}
|
||||
name: '@rush-temp/arm-netapp'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12105,7 +12122,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-network.tgz:
|
||||
resolution: {integrity: sha512-Zu1r4u5cGWe1LwyJRddBnAKGoyHe03iLgllCwpvKLQY+t8DmcBMCFx3foktivIUstD9ndAt6P++rrMKcbCidfg==, tarball: file:projects/arm-network.tgz}
|
||||
resolution: {integrity: sha512-N2yS4vJp7Ff8fgBcUtlrftcIaXZIko266Z6pG19rHmsgvcuUXwF4VDgQKkFT/5ySGKxGpu7OCh0iTuaP4Z4H0Q==, tarball: file:projects/arm-network.tgz}
|
||||
name: '@rush-temp/arm-network'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12114,25 +12131,26 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-notificationhubs.tgz:
|
||||
resolution: {integrity: sha512-S0QZ5pUKVQwVQ/46MxiCjt5UwNjeBUo9o5K4qUO4R2th93n0kmvMMw9i3zZqGdQxhk1T5s+2aYXBi3d9dSRJ+A==, tarball: file:projects/arm-notificationhubs.tgz}
|
||||
resolution: {integrity: sha512-oi7F/O1BZM7OpqeCdkqFKpNc+mTKMbDmN3w5zJY+2YxH+Tn7qcyS9BUfrZqOYjOnVsUY5JXLS+ow0AzXKnqLTQ==, tarball: file:projects/arm-notificationhubs.tgz}
|
||||
name: '@rush-temp/arm-notificationhubs'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12141,52 +12159,54 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-oep.tgz:
|
||||
resolution: {integrity: sha512-i0N7De7tfkLSlJMTF+KuBLxXReWS1qJ8zSGji7KhrPR1xxjJTaGrrDqdVUXJ6OMcWgxNr7MC9Gz1Wd2m1WVCLg==, tarball: file:projects/arm-oep.tgz}
|
||||
resolution: {integrity: sha512-BWUReMOwb+P0wAvpNNgamc+P4tYEazNt05InG9C8t2zgp8j34jWx7sL8twDmk8T97qHAGv8cxQpcDYAKSuxTuQ==, tarball: file:projects/arm-oep.tgz}
|
||||
name: '@rush-temp/arm-oep'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-operationalinsights.tgz:
|
||||
resolution: {integrity: sha512-2IjHVRJ+toF1Mn+W2X2/FLqxHld+VSdDx6exui1N1w11bB0WOwfRwaszjHt0F0RI3cnminV6WxIBEIKSJXe7Rg==, tarball: file:projects/arm-operationalinsights.tgz}
|
||||
resolution: {integrity: sha512-gJ/qbR9WykyF1ZlUYeYugXhFTQcXbO/v2RoZh+PexTREsIbys2pTzAeh+ct7Vn+0/Wr4iKT1VLjyo0gC1Ev/Gg==, tarball: file:projects/arm-operationalinsights.tgz}
|
||||
name: '@rush-temp/arm-operationalinsights'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12195,25 +12215,26 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-operations.tgz:
|
||||
resolution: {integrity: sha512-liCQjjqg+p5F9aWpaHe/fj2wbNc9XxUa5gGbqD4t1nUmJf7AH3kEcXszPiqPmZkXGkOd+mLh+Ha/I66t5xk6Cw==, tarball: file:projects/arm-operations.tgz}
|
||||
resolution: {integrity: sha512-dyi6CvDIV8D/7Wnm7wkbgpQ6F59q2vwAU45FfG0x2ogexhuGI+oKO6xnvTTR41O+75D4scgXvFaCnBrpHXDbhg==, tarball: file:projects/arm-operations.tgz}
|
||||
name: '@rush-temp/arm-operations'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12222,25 +12243,26 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-orbital.tgz:
|
||||
resolution: {integrity: sha512-UE+tzXvGrbdi9t7iJMbAP/Zebg1blhr0vyZOB4McnjmUlZYIFxHQd179JkKQRgOzAoZaeQuGvGuI+nx+wLRqoQ==, tarball: file:projects/arm-orbital.tgz}
|
||||
resolution: {integrity: sha512-MKYb1MM2D/8GNl83L6GsRKy4cp07XJcbO5stOEzjyXvYuMMngWIps7lcz2fO822vWfl+vmQv9g79CSLOCbSlWQ==, tarball: file:projects/arm-orbital.tgz}
|
||||
name: '@rush-temp/arm-orbital'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -12249,45 +12271,47 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-peering.tgz:
|
||||
resolution: {integrity: sha512-S+wMqYpwLV2qZS9s5ahN8GqUeEdvZVaofLlReiUm/dtbz/pisbKuMZpvN+Y7E0ZCRPnMHszN2Me3BGk46HYAtw==, tarball: file:projects/arm-peering.tgz}
|
||||
resolution: {integrity: sha512-iCjeUjq3q8vTLdFpfVUUO1+3rdN5h/wIvRtORw4KsTZttW9NCyxhMcxlBSoGTxdP7USysxgi+RQz4Gkzac+E5w==, tarball: file:projects/arm-peering.tgz}
|
||||
name: '@rush-temp/arm-peering'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2
|
||||
'@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2
|
||||
tslib: 2.4.0
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
@ -12683,11 +12707,12 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-rediscache.tgz:
|
||||
resolution: {integrity: sha512-BBR+e5lm6XMyguWo1CKM3zRaL9wHCgG7UNJgf+MXEOn86RNKuvh6MMmIwimr6WsVTeeRGJlkbN0NGIs3btpq3A==, tarball: file:projects/arm-rediscache.tgz}
|
||||
resolution: {integrity: sha512-cgrn1Lqtga5bArhVbAmnQhf4Ox4Ik9xqruujCVvvexD1rmosYSc98pXzF6F1k5D6Gu3iI8foSYQMiMwvu0AaUA==, tarball: file:projects/arm-rediscache.tgz}
|
||||
name: '@rush-temp/arm-rediscache'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/arm-network': 26.0.0
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
# Release History
|
||||
|
||||
## 15.1.1 (Unreleased)
|
||||
## 15.1.1 (2022-04-27)
|
||||
|
||||
### Features Added
|
||||
**Features**
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
- Bug fix
|
||||
|
||||
## 15.1.0 (2022-03-02)
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "4042a47cff72c950d35dd72149895b044ed79713",
|
||||
"readme": "specification/netapp/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\netapp\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true",
|
||||
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
|
||||
"readme": "specification\\netapp\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\netapp\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-beta.16"
|
||||
}
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
@ -305,7 +305,7 @@ export const ResourceNameAvailabilityRequest: coreClient.CompositeMapper = {
|
|||
name: "String"
|
||||
}
|
||||
},
|
||||
type: {
|
||||
typeParam: {
|
||||
serializedName: "type",
|
||||
required: true,
|
||||
type: {
|
||||
|
@ -385,7 +385,7 @@ export const QuotaAvailabilityRequest: coreClient.CompositeMapper = {
|
|||
name: "String"
|
||||
}
|
||||
},
|
||||
type: {
|
||||
typeParam: {
|
||||
serializedName: "type",
|
||||
required: true,
|
||||
type: {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import {
|
||||
OperationsImpl,
|
||||
|
@ -90,9 +91,33 @@ export class NetAppManagementClient extends coreClient.ServiceClient {
|
|||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
baseUri:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
||||
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
||||
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
||||
(pipelinePolicy) =>
|
||||
pipelinePolicy.name ===
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
);
|
||||
if (!bearerTokenAuthenticationPolicyFound) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
|
|
|
@ -177,11 +177,13 @@ export class AccountBackupsImpl implements AccountBackups {
|
|||
{ resourceGroupName, accountName, backupName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -246,11 +246,13 @@ export class AccountsImpl implements Accounts {
|
|||
{ resourceGroupName, accountName, body, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -330,11 +332,13 @@ export class AccountsImpl implements Accounts {
|
|||
{ resourceGroupName, accountName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -418,11 +422,13 @@ export class AccountsImpl implements Accounts {
|
|||
{ resourceGroupName, accountName, body, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -189,11 +189,13 @@ export class BackupPoliciesImpl implements BackupPolicies {
|
|||
{ resourceGroupName, accountName, backupPolicyName, body, options },
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -285,11 +287,13 @@ export class BackupPoliciesImpl implements BackupPolicies {
|
|||
{ resourceGroupName, accountName, backupPolicyName, body, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -374,11 +378,13 @@ export class BackupPoliciesImpl implements BackupPolicies {
|
|||
{ resourceGroupName, accountName, backupPolicyName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -286,11 +286,13 @@ export class BackupsImpl implements Backups {
|
|||
},
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -394,11 +396,13 @@ export class BackupsImpl implements Backups {
|
|||
},
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -497,11 +501,13 @@ export class BackupsImpl implements Backups {
|
|||
},
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -202,11 +202,13 @@ export class PoolsImpl implements Pools {
|
|||
{ resourceGroupName, accountName, poolName, body, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -295,11 +297,13 @@ export class PoolsImpl implements Pools {
|
|||
{ resourceGroupName, accountName, poolName, body, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -384,11 +388,13 @@ export class PoolsImpl implements Pools {
|
|||
{ resourceGroupName, accountName, poolName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -212,11 +212,13 @@ export class SnapshotPoliciesImpl implements SnapshotPolicies {
|
|||
{ resourceGroupName, accountName, snapshotPolicyName, body, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -301,11 +303,13 @@ export class SnapshotPoliciesImpl implements SnapshotPolicies {
|
|||
{ resourceGroupName, accountName, snapshotPolicyName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -245,11 +245,13 @@ export class SnapshotsImpl implements Snapshots {
|
|||
},
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -359,11 +361,13 @@ export class SnapshotsImpl implements Snapshots {
|
|||
},
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -465,11 +469,13 @@ export class SnapshotsImpl implements Snapshots {
|
|||
},
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -571,10 +577,12 @@ export class SnapshotsImpl implements Snapshots {
|
|||
},
|
||||
restoreFilesOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -261,11 +261,13 @@ export class SubvolumesImpl implements Subvolumes {
|
|||
},
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -375,11 +377,13 @@ export class SubvolumesImpl implements Subvolumes {
|
|||
},
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -481,11 +485,13 @@ export class SubvolumesImpl implements Subvolumes {
|
|||
},
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -589,11 +595,13 @@ export class SubvolumesImpl implements Subvolumes {
|
|||
},
|
||||
getMetadataOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -199,10 +199,12 @@ export class VolumeGroupsImpl implements VolumeGroups {
|
|||
{ resourceGroupName, accountName, volumeGroupName, body, options },
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -287,10 +289,12 @@ export class VolumeGroupsImpl implements VolumeGroups {
|
|||
{ resourceGroupName, accountName, volumeGroupName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -241,11 +241,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, body, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "azure-async-operation"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -339,11 +341,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, body, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -433,11 +437,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -526,11 +532,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, body, options },
|
||||
revertOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -620,11 +628,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, options },
|
||||
breakReplicationOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -733,11 +743,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, options },
|
||||
resyncReplicationOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -826,11 +838,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, options },
|
||||
deleteReplicationOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -920,11 +934,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, body, options },
|
||||
authorizeReplicationOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1014,11 +1030,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, options },
|
||||
reInitializeReplicationOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1107,11 +1125,13 @@ export class VolumesImpl implements Volumes {
|
|||
{ resourceGroupName, accountName, poolName, volumeName, body, options },
|
||||
poolChangeOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
# Release History
|
||||
|
||||
## 27.0.0 (2022-04-27)
|
||||
|
||||
**Features**
|
||||
|
||||
## 26.0.1 (Unreleased)
|
||||
- Added Type Alias SingleQueryResultDirection
|
||||
- Added Type Alias SingleQueryResultMode
|
||||
- Added Type Alias SingleQueryResultSeverity
|
||||
- Added Enum KnownSingleQueryResultDirection
|
||||
- Added Enum KnownSingleQueryResultMode
|
||||
- Added Enum KnownSingleQueryResultSeverity
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
**Breaking Changes**
|
||||
|
||||
- Removed Enum KnownEnum69
|
||||
- Removed Enum KnownEnum70
|
||||
- Removed Enum KnownEnum71
|
||||
|
||||
|
||||
## 26.0.0 (2021-12-06)
|
||||
|
||||
The package of @azure/arm-network is using our next generation design principles since version 26.0.0, which contains breaking changes.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Microsoft
|
||||
Copyright (c) 2022 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
|
||||
|
|
|
@ -16,6 +16,8 @@ Network Client
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { NetworkManagementClient } = require("@azure/arm-network");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new NetworkManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "3b2f85d320fac5b282bc80240f9e5c2c57753bad",
|
||||
"readme": "specification/network/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1",
|
||||
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
|
||||
"readme": "specification\\network\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\network\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20211130.1"
|
||||
}
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
|
||||
"docModel": { "enabled": true },
|
||||
"apiReport": { "enabled": true, "reportFolder": "./review" },
|
||||
"docModel": {
|
||||
"enabled": true
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": true,
|
||||
"reportFolder": "./review"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/arm-network.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": { "logLevel": "none" },
|
||||
"ae-unresolved-link": { "logLevel": "none" }
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"ae-unresolved-link": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for NetworkManagementClient.",
|
||||
"version": "26.0.1",
|
||||
"version": "27.0.0",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
|
@ -11,9 +11,9 @@
|
|||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -30,12 +30,12 @@
|
|||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.18.11",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^2.0.0",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -98,5 +98,21 @@
|
|||
"docs": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"autoPublish": true
|
||||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/networkManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autoPublish": true,
|
||||
"//sampleConfiguration": {
|
||||
"productName": "",
|
||||
"productSlugs": [
|
||||
"azure"
|
||||
],
|
||||
"disableDocsMs": true,
|
||||
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2737,15 +2737,6 @@ export interface EndpointServicesListResult {
|
|||
// @public
|
||||
export type EndpointType = string;
|
||||
|
||||
// @public
|
||||
export type Enum69 = number;
|
||||
|
||||
// @public
|
||||
export type Enum70 = number;
|
||||
|
||||
// @public
|
||||
export type Enum71 = number;
|
||||
|
||||
// @public
|
||||
export interface ErrorDetails {
|
||||
code?: string;
|
||||
|
@ -5597,36 +5588,6 @@ export enum KnownEndpointType {
|
|||
MMAWorkspaceNetwork = "MMAWorkspaceNetwork"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownEnum69 {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Two = 2,
|
||||
// (undocumented)
|
||||
Zero = 0
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownEnum70 {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Three = 3,
|
||||
// (undocumented)
|
||||
Two = 2
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownEnum71 {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Two = 2,
|
||||
// (undocumented)
|
||||
Zero = 0
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownEvaluationState {
|
||||
// (undocumented)
|
||||
|
@ -6489,6 +6450,36 @@ export enum KnownSeverity {
|
|||
Warning = "Warning"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSingleQueryResultDirection {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Two = 2,
|
||||
// (undocumented)
|
||||
Zero = 0
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSingleQueryResultMode {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Two = 2,
|
||||
// (undocumented)
|
||||
Zero = 0
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSingleQueryResultSeverity {
|
||||
// (undocumented)
|
||||
One = 1,
|
||||
// (undocumented)
|
||||
Three = 3,
|
||||
// (undocumented)
|
||||
Two = 2
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSyncRemoteAddressSpace {
|
||||
// (undocumented)
|
||||
|
@ -11200,17 +11191,26 @@ export interface SignaturesOverridesProperties {
|
|||
export interface SingleQueryResult {
|
||||
description?: string;
|
||||
destinationPorts?: string[];
|
||||
direction?: Enum71;
|
||||
direction?: SingleQueryResultDirection;
|
||||
group?: string;
|
||||
inheritedFromParentPolicy?: boolean;
|
||||
lastUpdated?: string;
|
||||
mode?: Enum69;
|
||||
mode?: SingleQueryResultMode;
|
||||
protocol?: string;
|
||||
severity?: Enum70;
|
||||
severity?: SingleQueryResultSeverity;
|
||||
signatureId?: number;
|
||||
sourcePorts?: string[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SingleQueryResultDirection = number;
|
||||
|
||||
// @public
|
||||
export type SingleQueryResultMode = number;
|
||||
|
||||
// @public
|
||||
export type SingleQueryResultSeverity = number;
|
||||
|
||||
// @public
|
||||
export interface Sku {
|
||||
name?: BastionHostSkuName;
|
||||
|
|
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified private endpoint connection on application gateway.
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection on application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json
|
||||
*/
|
||||
async function deleteApplicationGatewayPrivateEndpointConnection() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const connectionName = "connection1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGatewayPrivateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
connectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteApplicationGatewayPrivateEndpointConnection().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified private endpoint connection on application gateway.
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection on application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json
|
||||
*/
|
||||
async function getApplicationGatewayPrivateEndpointConnection() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const connectionName = "connection1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGatewayPrivateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
connectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getApplicationGatewayPrivateEndpointConnection().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all private endpoint connections on an application gateway.
|
||||
*
|
||||
* @summary Lists all private endpoint connections on an application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json
|
||||
*/
|
||||
async function listsAllPrivateEndpointConnectionsOnApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationGatewayPrivateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listsAllPrivateEndpointConnectionsOnApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
ApplicationGatewayPrivateEndpointConnection,
|
||||
NetworkManagementClient
|
||||
} from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates the specified private endpoint connection on application gateway.
|
||||
*
|
||||
* @summary Updates the specified private endpoint connection on application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json
|
||||
*/
|
||||
async function updateApplicationGatewayPrivateEndpointConnection() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const connectionName = "connection1";
|
||||
const parameters: ApplicationGatewayPrivateEndpointConnection = {
|
||||
name: "connection1",
|
||||
privateEndpoint: {
|
||||
id:
|
||||
"/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe"
|
||||
},
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "approved it for some reason.",
|
||||
status: "Approved"
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGatewayPrivateEndpointConnections.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
connectionName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updateApplicationGatewayPrivateEndpointConnection().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all private link resources on an application gateway.
|
||||
*
|
||||
* @summary Lists all private link resources on an application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json
|
||||
*/
|
||||
async function listsAllPrivateLinkResourcesOnApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationGatewayPrivateLinkResources.list(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listsAllPrivateLinkResourcesOnApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
ApplicationGatewayOnDemandProbe,
|
||||
NetworkManagementClient
|
||||
} from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group.
|
||||
*
|
||||
* @summary Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayBackendHealthTest.json
|
||||
*/
|
||||
async function testBackendHealth() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const probeRequest: ApplicationGatewayOnDemandProbe = {
|
||||
path: "/",
|
||||
backendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool"
|
||||
},
|
||||
backendHttpSettings: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings"
|
||||
},
|
||||
pickHostNameFromBackendHttpSettings: true,
|
||||
timeout: 30,
|
||||
protocol: "Http"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginBackendHealthOnDemandAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
probeRequest
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
testBackendHealth().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the backend health of the specified application gateway in a resource group.
|
||||
*
|
||||
* @summary Gets the backend health of the specified application gateway in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayBackendHealthGet.json
|
||||
*/
|
||||
async function getBackendHealth() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "appgw";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginBackendHealthAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getBackendHealth().catch(console.error);
|
|
@ -0,0 +1,296 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
ApplicationGateway,
|
||||
NetworkManagementClient
|
||||
} from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified application gateway.
|
||||
*
|
||||
* @summary Creates or updates the specified application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayCreate.json
|
||||
*/
|
||||
async function createApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const parameters: ApplicationGateway = {
|
||||
backendAddressPools: [
|
||||
{
|
||||
name: "appgwpool",
|
||||
backendAddresses: [{ ipAddress: "10.0.1.1" }, { ipAddress: "10.0.1.2" }]
|
||||
},
|
||||
{
|
||||
name: "appgwpool1",
|
||||
backendAddresses: [{}, {}],
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1"
|
||||
}
|
||||
],
|
||||
backendHttpSettingsCollection: [
|
||||
{
|
||||
name: "appgwbhs",
|
||||
cookieBasedAffinity: "Disabled",
|
||||
port: 80,
|
||||
requestTimeout: 30,
|
||||
protocol: "Http"
|
||||
}
|
||||
],
|
||||
frontendIPConfigurations: [
|
||||
{
|
||||
name: "appgwfip",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip"
|
||||
}
|
||||
}
|
||||
],
|
||||
frontendPorts: [
|
||||
{ name: "appgwfp", port: 443 },
|
||||
{ name: "appgwfp80", port: 80 }
|
||||
],
|
||||
gatewayIPConfigurations: [
|
||||
{
|
||||
name: "appgwipc",
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
globalConfiguration: {
|
||||
enableRequestBuffering: true,
|
||||
enableResponseBuffering: true
|
||||
},
|
||||
httpListeners: [
|
||||
{
|
||||
name: "appgwhl",
|
||||
frontendIPConfiguration: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip"
|
||||
},
|
||||
frontendPort: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp"
|
||||
},
|
||||
requireServerNameIndication: false,
|
||||
sslCertificate: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert"
|
||||
},
|
||||
sslProfile: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1"
|
||||
},
|
||||
protocol: "Https"
|
||||
},
|
||||
{
|
||||
name: "appgwhttplistener",
|
||||
frontendIPConfiguration: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip"
|
||||
},
|
||||
frontendPort: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80"
|
||||
},
|
||||
protocol: "Http"
|
||||
}
|
||||
],
|
||||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1": {}
|
||||
}
|
||||
},
|
||||
loadDistributionPolicies: [
|
||||
{
|
||||
name: "ldp1",
|
||||
loadDistributionAlgorithm: "RoundRobin",
|
||||
loadDistributionTargets: [
|
||||
{
|
||||
name: "ld11",
|
||||
backendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"
|
||||
},
|
||||
weightPerServer: 40
|
||||
},
|
||||
{
|
||||
name: "ld11",
|
||||
backendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1"
|
||||
},
|
||||
weightPerServer: 60
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
location: "eastus",
|
||||
requestRoutingRules: [
|
||||
{
|
||||
name: "appgwrule",
|
||||
backendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"
|
||||
},
|
||||
backendHttpSettings: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"
|
||||
},
|
||||
httpListener: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl"
|
||||
},
|
||||
loadDistributionPolicy: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"
|
||||
},
|
||||
priority: 10,
|
||||
rewriteRuleSet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"
|
||||
},
|
||||
ruleType: "Basic"
|
||||
},
|
||||
{
|
||||
name: "appgwPathBasedRule",
|
||||
httpListener: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhttplistener"
|
||||
},
|
||||
priority: 20,
|
||||
ruleType: "PathBasedRouting",
|
||||
urlPathMap: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/urlPathMaps/pathMap1"
|
||||
}
|
||||
}
|
||||
],
|
||||
rewriteRuleSets: [
|
||||
{
|
||||
name: "rewriteRuleSet1",
|
||||
rewriteRules: [
|
||||
{
|
||||
name: "Set X-Forwarded-For",
|
||||
actionSet: {
|
||||
requestHeaderConfigurations: [
|
||||
{
|
||||
headerName: "X-Forwarded-For",
|
||||
headerValue: "{var_add_x_forwarded_for_proxy}"
|
||||
}
|
||||
],
|
||||
responseHeaderConfigurations: [
|
||||
{
|
||||
headerName: "Strict-Transport-Security",
|
||||
headerValue: "max-age=31536000"
|
||||
}
|
||||
],
|
||||
urlConfiguration: { modifiedPath: "/abc" }
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
ignoreCase: true,
|
||||
negate: false,
|
||||
pattern: "^Bearer",
|
||||
variable: "http_req_Authorization"
|
||||
}
|
||||
],
|
||||
ruleSequence: 102
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "Standard_v2", capacity: 3, tier: "Standard_v2" },
|
||||
sslCertificates: [
|
||||
{ name: "sslcert", data: "****", password: "****" },
|
||||
{ name: "sslcert2", keyVaultSecretId: "https://kv/secret" }
|
||||
],
|
||||
sslProfiles: [
|
||||
{
|
||||
name: "sslProfile1",
|
||||
clientAuthConfiguration: { verifyClientCertIssuerDN: true },
|
||||
sslPolicy: {
|
||||
cipherSuites: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"],
|
||||
minProtocolVersion: "TLSv1_1",
|
||||
policyType: "Custom"
|
||||
},
|
||||
trustedClientCertificates: [
|
||||
{
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
trustedClientCertificates: [{ name: "clientcert", data: "****" }],
|
||||
trustedRootCertificates: [
|
||||
{ name: "rootcert", data: "****" },
|
||||
{ name: "rootcert1", keyVaultSecretId: "https://kv/secret" }
|
||||
],
|
||||
urlPathMaps: [
|
||||
{
|
||||
name: "pathMap1",
|
||||
defaultBackendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"
|
||||
},
|
||||
defaultBackendHttpSettings: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"
|
||||
},
|
||||
defaultLoadDistributionPolicy: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"
|
||||
},
|
||||
defaultRewriteRuleSet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"
|
||||
},
|
||||
pathRules: [
|
||||
{
|
||||
name: "apiPaths",
|
||||
backendAddressPool: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"
|
||||
},
|
||||
backendHttpSettings: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"
|
||||
},
|
||||
loadDistributionPolicy: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"
|
||||
},
|
||||
paths: ["/api", "/v1/api"],
|
||||
rewriteRuleSet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified application gateway.
|
||||
*
|
||||
* @summary Deletes the specified application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayDelete.json
|
||||
*/
|
||||
async function deleteApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified application gateway.
|
||||
*
|
||||
* @summary Gets the specified application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayGet.json
|
||||
*/
|
||||
async function getApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.get(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets Ssl predefined policy with the specified policy name.
|
||||
*
|
||||
* @summary Gets Ssl predefined policy with the specified policy name.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json
|
||||
*/
|
||||
async function getAvailableSslPredefinedPolicyByName() {
|
||||
const subscriptionId = "subid";
|
||||
const predefinedPolicyName = "AppGwSslPolicy20150501";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.getSslPredefinedPolicy(
|
||||
predefinedPolicyName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableSslPredefinedPolicyByName().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the application gateways in a subscription.
|
||||
*
|
||||
* @summary Gets all the application gateways in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayListAll.json
|
||||
*/
|
||||
async function listsAllApplicationGatewaysInASubscription() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationGateways.listAll()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listsAllApplicationGatewaysInASubscription().catch(console.error);
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all available request headers.
|
||||
*
|
||||
* @summary Lists all available request headers.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json
|
||||
*/
|
||||
async function getAvailableRequestHeaders() {
|
||||
const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd0dddd4";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.listAvailableRequestHeaders();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableRequestHeaders().catch(console.error);
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all available response headers.
|
||||
*
|
||||
* @summary Lists all available response headers.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json
|
||||
*/
|
||||
async function getAvailableResponseHeaders() {
|
||||
const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd0dddd4";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.listAvailableResponseHeaders();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableResponseHeaders().catch(console.error);
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all available server variables.
|
||||
*
|
||||
* @summary Lists all available server variables.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json
|
||||
*/
|
||||
async function getAvailableServerVariables() {
|
||||
const subscriptionId = "72f988bf-86f1-41af-91ab-2d7cd0dddd4";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.listAvailableServerVariables();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableServerVariables().catch(console.error);
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists available Ssl options for configuring Ssl policy.
|
||||
*
|
||||
* @summary Lists available Ssl options for configuring Ssl policy.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableSslOptionsGet.json
|
||||
*/
|
||||
async function getAvailableSslOptions() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.listAvailableSslOptions();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableSslOptions().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all SSL predefined policies for configuring Ssl policy.
|
||||
*
|
||||
* @summary Lists all SSL predefined policies for configuring Ssl policy.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json
|
||||
*/
|
||||
async function getAvailableSslPredefinedPolicies() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationGateways.listAvailableSslPredefinedPolicies()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailableSslPredefinedPolicies().catch(console.error);
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all available web application firewall rule sets.
|
||||
*
|
||||
* @summary Lists all available web application firewall rule sets.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json
|
||||
*/
|
||||
async function getAvailableWafRuleSets() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.listAvailableWafRuleSets();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAvailableWafRuleSets().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all application gateways in a resource group.
|
||||
*
|
||||
* @summary Lists all application gateways in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayList.json
|
||||
*/
|
||||
async function listsAllApplicationGatewaysInAResourceGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationGateways.list(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listsAllApplicationGatewaysInAResourceGroup().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Starts the specified application gateway.
|
||||
*
|
||||
* @summary Starts the specified application gateway.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayStart.json
|
||||
*/
|
||||
async function startApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
startApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Stops the specified application gateway in a resource group.
|
||||
*
|
||||
* @summary Stops the specified application gateway in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayStop.json
|
||||
*/
|
||||
async function stopApplicationGateway() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "appgw";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
applicationGatewayName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
stopApplicationGateway().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates the specified application gateway tags.
|
||||
*
|
||||
* @summary Updates the specified application gateway tags.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayUpdateTags.json
|
||||
*/
|
||||
async function updateApplicationGatewayTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationGatewayName = "AppGw";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationGateways.updateTags(
|
||||
resourceGroupName,
|
||||
applicationGatewayName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updateApplicationGatewayTags().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
ApplicationSecurityGroup,
|
||||
NetworkManagementClient
|
||||
} from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates an application security group.
|
||||
*
|
||||
* @summary Creates or updates an application security group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupCreate.json
|
||||
*/
|
||||
async function createApplicationSecurityGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationSecurityGroupName = "test-asg";
|
||||
const parameters: ApplicationSecurityGroup = { location: "westus" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationSecurityGroups.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
applicationSecurityGroupName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createApplicationSecurityGroup().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified application security group.
|
||||
*
|
||||
* @summary Deletes the specified application security group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupDelete.json
|
||||
*/
|
||||
async function deleteApplicationSecurityGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationSecurityGroupName = "test-asg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationSecurityGroups.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
applicationSecurityGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteApplicationSecurityGroup().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets information about the specified application security group.
|
||||
*
|
||||
* @summary Gets information about the specified application security group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupGet.json
|
||||
*/
|
||||
async function getApplicationSecurityGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationSecurityGroupName = "test-asg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationSecurityGroups.get(
|
||||
resourceGroupName,
|
||||
applicationSecurityGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getApplicationSecurityGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all application security groups in a subscription.
|
||||
*
|
||||
* @summary Gets all application security groups in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupListAll.json
|
||||
*/
|
||||
async function listAllApplicationSecurityGroups() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationSecurityGroups.listAll()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllApplicationSecurityGroups().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the application security groups in a resource group.
|
||||
*
|
||||
* @summary Gets all the application security groups in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupList.json
|
||||
*/
|
||||
async function listLoadBalancersInResourceGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.applicationSecurityGroups.list(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listLoadBalancersInResourceGroup().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates an application security group's tags.
|
||||
*
|
||||
* @summary Updates an application security group's tags.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupUpdateTags.json
|
||||
*/
|
||||
async function updateApplicationSecurityGroupTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const applicationSecurityGroupName = "test-asg";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.applicationSecurityGroups.updateTags(
|
||||
resourceGroupName,
|
||||
applicationSecurityGroupName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updateApplicationSecurityGroupTags().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all of the available subnet delegations for this subscription in this region.
|
||||
*
|
||||
* @summary Gets all of the available subnet delegations for this subscription in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableDelegationsSubscriptionGet.json
|
||||
*/
|
||||
async function getAvailableDelegations() {
|
||||
const subscriptionId = "subId";
|
||||
const location = "westcentralus";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availableDelegations.list(location)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailableDelegations().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List what values of endpoint services are available for use.
|
||||
*
|
||||
* @summary List what values of endpoint services are available for use.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/EndpointServicesList.json
|
||||
*/
|
||||
async function endpointServicesList() {
|
||||
const subscriptionId = "subid";
|
||||
const location = "westus";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availableEndpointServices.list(location)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
endpointServicesList().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region.
|
||||
*
|
||||
* @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json
|
||||
*/
|
||||
async function getAvailablePrivateEndpointTypesInTheResourceGroup() {
|
||||
const subscriptionId = "subId";
|
||||
const location = "regionName";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availablePrivateEndpointTypes.listByResourceGroup(
|
||||
location,
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailablePrivateEndpointTypesInTheResourceGroup().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region.
|
||||
*
|
||||
* @summary Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailablePrivateEndpointTypesGet.json
|
||||
*/
|
||||
async function getAvailablePrivateEndpointTypes() {
|
||||
const subscriptionId = "subId";
|
||||
const location = "regionName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availablePrivateEndpointTypes.list(location)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailablePrivateEndpointTypes().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all of the available subnet delegations for this resource group in this region.
|
||||
*
|
||||
* @summary Gets all of the available subnet delegations for this resource group in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableDelegationsResourceGroupGet.json
|
||||
*/
|
||||
async function getAvailableDelegationsInTheResourceGroup() {
|
||||
const subscriptionId = "subId";
|
||||
const location = "westcentralus";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availableResourceGroupDelegations.list(
|
||||
location,
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailableDelegationsInTheResourceGroup().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all available service aliases for this resource group in this region.
|
||||
*
|
||||
* @summary Gets all available service aliases for this resource group in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableServiceAliasesListByResourceGroup.json
|
||||
*/
|
||||
async function getAvailableServiceAliasesInTheResourceGroup() {
|
||||
const subscriptionId = "subId";
|
||||
const resourceGroupName = "rg1";
|
||||
const location = "westcentralus";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availableServiceAliases.listByResourceGroup(
|
||||
resourceGroupName,
|
||||
location
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailableServiceAliasesInTheResourceGroup().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all available service aliases for this subscription in this region.
|
||||
*
|
||||
* @summary Gets all available service aliases for this subscription in this region.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableServiceAliasesList.json
|
||||
*/
|
||||
async function getAvailableServiceAliases() {
|
||||
const subscriptionId = "subId";
|
||||
const location = "westcentralus";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.availableServiceAliases.list(location)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getAvailableServiceAliases().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the Azure Firewall FQDN Tags in a subscription.
|
||||
*
|
||||
* @summary Gets all the Azure Firewall FQDN Tags in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json
|
||||
*/
|
||||
async function listAllAzureFirewallFqdnTagsForAGivenSubscription() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.azureFirewallFqdnTags.listAll()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllAzureFirewallFqdnTagsForAGivenSubscription().catch(console.error);
|
|
@ -0,0 +1,643 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureFirewall, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPut.json
|
||||
*/
|
||||
async function createAzureFirewall() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
applicationRuleCollections: [
|
||||
{
|
||||
name: "apprulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 110,
|
||||
rules: [
|
||||
{
|
||||
name: "rule1",
|
||||
description: "Deny inbound rule",
|
||||
protocols: [{ port: 443, protocolType: "Https" }],
|
||||
sourceAddresses: ["216.58.216.164", "10.0.0.0/24"],
|
||||
targetFqdns: ["www.test.com"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "azureFirewallIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
location: "West US",
|
||||
natRuleCollections: [
|
||||
{
|
||||
name: "natrulecoll",
|
||||
action: { type: "Dnat" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "DNAT-HTTPS-traffic",
|
||||
description: "D-NAT all outbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedAddress: "1.2.3.5",
|
||||
translatedPort: "8443"
|
||||
},
|
||||
{
|
||||
name: "DNAT-HTTP-traffic-With-FQDN",
|
||||
description: "D-NAT all inbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["80"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedFqdn: "internalhttpserver",
|
||||
translatedPort: "880"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
networkRuleCollections: [
|
||||
{
|
||||
name: "netrulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "L4-traffic",
|
||||
description: "Block traffic based on source IPs and ports",
|
||||
destinationAddresses: ["*"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: [
|
||||
"192.168.1.1-192.168.1.12",
|
||||
"10.1.4.12-10.1.4.255"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "L4-traffic-with-FQDN",
|
||||
description:
|
||||
"Block traffic based on source IPs and ports to amazon",
|
||||
destinationFqdns: ["www.amazon.com"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["10.2.4.12-10.2.4.255"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "AZFW_VNet", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
zones: []
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewall().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPutWithAdditionalProperties.json
|
||||
*/
|
||||
async function createAzureFirewallWithAdditionalProperties() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
additionalProperties: { key1: "value1", key2: "value2" },
|
||||
applicationRuleCollections: [
|
||||
{
|
||||
name: "apprulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 110,
|
||||
rules: [
|
||||
{
|
||||
name: "rule1",
|
||||
description: "Deny inbound rule",
|
||||
protocols: [{ port: 443, protocolType: "Https" }],
|
||||
sourceAddresses: ["216.58.216.164", "10.0.0.0/24"],
|
||||
targetFqdns: ["www.test.com"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "azureFirewallIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
ipGroups: [],
|
||||
location: "West US",
|
||||
natRuleCollections: [
|
||||
{
|
||||
name: "natrulecoll",
|
||||
action: { type: "Dnat" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "DNAT-HTTPS-traffic",
|
||||
description: "D-NAT all outbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedAddress: "1.2.3.5",
|
||||
translatedPort: "8443"
|
||||
},
|
||||
{
|
||||
name: "DNAT-HTTP-traffic-With-FQDN",
|
||||
description: "D-NAT all inbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["80"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedFqdn: "internalhttpserver",
|
||||
translatedPort: "880"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
networkRuleCollections: [
|
||||
{
|
||||
name: "netrulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "L4-traffic",
|
||||
description: "Block traffic based on source IPs and ports",
|
||||
destinationAddresses: ["*"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: [
|
||||
"192.168.1.1-192.168.1.12",
|
||||
"10.1.4.12-10.1.4.255"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "L4-traffic-with-FQDN",
|
||||
description:
|
||||
"Block traffic based on source IPs and ports to amazon",
|
||||
destinationFqdns: ["www.amazon.com"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["10.2.4.12-10.2.4.255"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "AZFW_VNet", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
zones: []
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewallWithAdditionalProperties().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPutWithIpGroups.json
|
||||
*/
|
||||
async function createAzureFirewallWithIPGroups() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
applicationRuleCollections: [
|
||||
{
|
||||
name: "apprulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 110,
|
||||
rules: [
|
||||
{
|
||||
name: "rule1",
|
||||
description: "Deny inbound rule",
|
||||
protocols: [{ port: 443, protocolType: "Https" }],
|
||||
sourceAddresses: ["216.58.216.164", "10.0.0.0/24"],
|
||||
targetFqdns: ["www.test.com"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "azureFirewallIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
location: "West US",
|
||||
natRuleCollections: [
|
||||
{
|
||||
name: "natrulecoll",
|
||||
action: { type: "Dnat" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "DNAT-HTTPS-traffic",
|
||||
description: "D-NAT all outbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedAddress: "1.2.3.5",
|
||||
translatedPort: "8443"
|
||||
},
|
||||
{
|
||||
name: "DNAT-HTTP-traffic-With-FQDN",
|
||||
description: "D-NAT all inbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["80"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedFqdn: "internalhttpserver",
|
||||
translatedPort: "880"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
networkRuleCollections: [
|
||||
{
|
||||
name: "netrulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "L4-traffic",
|
||||
description: "Block traffic based on source IPs and ports",
|
||||
destinationAddresses: ["*"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: [
|
||||
"192.168.1.1-192.168.1.12",
|
||||
"10.1.4.12-10.1.4.255"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "L4-traffic-with-FQDN",
|
||||
description:
|
||||
"Block traffic based on source IPs and ports to amazon",
|
||||
destinationFqdns: ["www.amazon.com"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["10.2.4.12-10.2.4.255"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "AZFW_VNet", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
zones: []
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewallWithIPGroups().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPutWithZones.json
|
||||
*/
|
||||
async function createAzureFirewallWithZones() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
applicationRuleCollections: [
|
||||
{
|
||||
name: "apprulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 110,
|
||||
rules: [
|
||||
{
|
||||
name: "rule1",
|
||||
description: "Deny inbound rule",
|
||||
protocols: [{ port: 443, protocolType: "Https" }],
|
||||
sourceAddresses: ["216.58.216.164", "10.0.0.0/24"],
|
||||
targetFqdns: ["www.test.com"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "azureFirewallIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
location: "West US 2",
|
||||
natRuleCollections: [
|
||||
{
|
||||
name: "natrulecoll",
|
||||
action: { type: "Dnat" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "DNAT-HTTPS-traffic",
|
||||
description: "D-NAT all outbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedAddress: "1.2.3.5",
|
||||
translatedPort: "8443"
|
||||
},
|
||||
{
|
||||
name: "DNAT-HTTP-traffic-With-FQDN",
|
||||
description: "D-NAT all inbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["80"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedFqdn: "internalhttpserver",
|
||||
translatedPort: "880"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
networkRuleCollections: [
|
||||
{
|
||||
name: "netrulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "L4-traffic",
|
||||
description: "Block traffic based on source IPs and ports",
|
||||
destinationAddresses: ["*"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: [
|
||||
"192.168.1.1-192.168.1.12",
|
||||
"10.1.4.12-10.1.4.255"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "L4-traffic-with-FQDN",
|
||||
description:
|
||||
"Block traffic based on source IPs and ports to amazon",
|
||||
destinationFqdns: ["www.amazon.com"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["10.2.4.12-10.2.4.255"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "AZFW_VNet", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
zones: ["1", "2", "3"]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewallWithZones().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPutWithMgmtSubnet.json
|
||||
*/
|
||||
async function createAzureFirewallWithManagementSubnet() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
applicationRuleCollections: [
|
||||
{
|
||||
name: "apprulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 110,
|
||||
rules: [
|
||||
{
|
||||
name: "rule1",
|
||||
description: "Deny inbound rule",
|
||||
protocols: [{ port: 443, protocolType: "Https" }],
|
||||
sourceAddresses: ["216.58.216.164", "10.0.0.0/24"],
|
||||
targetFqdns: ["www.test.com"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "azureFirewallIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
|
||||
}
|
||||
}
|
||||
],
|
||||
location: "West US",
|
||||
managementIpConfiguration: {
|
||||
name: "azureFirewallMgmtIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet"
|
||||
}
|
||||
},
|
||||
natRuleCollections: [
|
||||
{
|
||||
name: "natrulecoll",
|
||||
action: { type: "Dnat" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "DNAT-HTTPS-traffic",
|
||||
description: "D-NAT all outbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedAddress: "1.2.3.5",
|
||||
translatedPort: "8443"
|
||||
},
|
||||
{
|
||||
name: "DNAT-HTTP-traffic-With-FQDN",
|
||||
description: "D-NAT all inbound web traffic for inspection",
|
||||
destinationAddresses: ["1.2.3.4"],
|
||||
destinationPorts: ["80"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["*"],
|
||||
translatedFqdn: "internalhttpserver",
|
||||
translatedPort: "880"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
networkRuleCollections: [
|
||||
{
|
||||
name: "netrulecoll",
|
||||
action: { type: "Deny" },
|
||||
priority: 112,
|
||||
rules: [
|
||||
{
|
||||
name: "L4-traffic",
|
||||
description: "Block traffic based on source IPs and ports",
|
||||
destinationAddresses: ["*"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: [
|
||||
"192.168.1.1-192.168.1.12",
|
||||
"10.1.4.12-10.1.4.255"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "L4-traffic-with-FQDN",
|
||||
description:
|
||||
"Block traffic based on source IPs and ports to amazon",
|
||||
destinationFqdns: ["www.amazon.com"],
|
||||
destinationPorts: ["443-444", "8443"],
|
||||
protocols: ["TCP"],
|
||||
sourceAddresses: ["10.2.4.12-10.2.4.255"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sku: { name: "AZFW_VNet", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
zones: []
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewallWithManagementSubnet().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Azure Firewall.
|
||||
*
|
||||
* @summary Creates or updates the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPutInHub.json
|
||||
*/
|
||||
async function createAzureFirewallInVirtualHub() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const parameters: AzureFirewall = {
|
||||
firewallPolicy: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1"
|
||||
},
|
||||
hubIPAddresses: { publicIPs: { addresses: [], count: 1 } },
|
||||
location: "West US",
|
||||
sku: { name: "AZFW_Hub", tier: "Standard" },
|
||||
tags: { key1: "value1" },
|
||||
threatIntelMode: "Alert",
|
||||
virtualHub: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1"
|
||||
},
|
||||
zones: []
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createAzureFirewallInVirtualHub().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified Azure Firewall.
|
||||
*
|
||||
* @summary Deletes the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallDelete.json
|
||||
*/
|
||||
async function deleteAzureFirewall() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteAzureFirewall().catch(console.error);
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Azure Firewall.
|
||||
*
|
||||
* @summary Gets the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGet.json
|
||||
*/
|
||||
async function getAzureFirewall() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.get(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAzureFirewall().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Azure Firewall.
|
||||
*
|
||||
* @summary Gets the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGetWithAdditionalProperties.json
|
||||
*/
|
||||
async function getAzureFirewallWithAdditionalProperties() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.get(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAzureFirewallWithAdditionalProperties().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Azure Firewall.
|
||||
*
|
||||
* @summary Gets the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGetWithIpGroups.json
|
||||
*/
|
||||
async function getAzureFirewallWithIPGroups() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.get(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAzureFirewallWithIPGroups().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Azure Firewall.
|
||||
*
|
||||
* @summary Gets the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGetWithZones.json
|
||||
*/
|
||||
async function getAzureFirewallWithZones() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.get(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAzureFirewallWithZones().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Azure Firewall.
|
||||
*
|
||||
* @summary Gets the specified Azure Firewall.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGetWithMgmtSubnet.json
|
||||
*/
|
||||
async function getAzureFirewallWithManagementSubnet() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const azureFirewallName = "azurefirewall";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.get(
|
||||
resourceGroupName,
|
||||
azureFirewallName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getAzureFirewallWithManagementSubnet().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the Azure Firewalls in a subscription.
|
||||
*
|
||||
* @summary Gets all the Azure Firewalls in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallListBySubscription.json
|
||||
*/
|
||||
async function listAllAzureFirewallsForAGivenSubscription() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.azureFirewalls.listAll()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllAzureFirewallsForAGivenSubscription().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all Azure Firewalls in a resource group.
|
||||
*
|
||||
* @summary Lists all Azure Firewalls in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallListByResourceGroup.json
|
||||
*/
|
||||
async function listAllAzureFirewallsForAGivenResourceGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.azureFirewalls.list(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllAzureFirewallsForAGivenResourceGroup().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates tags of an Azure Firewall resource.
|
||||
*
|
||||
* @summary Updates tags of an Azure Firewall resource.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallUpdateTags.json
|
||||
*/
|
||||
async function updateAzureFirewallTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "azfwtest";
|
||||
const azureFirewallName = "fw1";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.azureFirewalls.beginUpdateTagsAndWait(
|
||||
resourceGroupName,
|
||||
azureFirewallName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updateAzureFirewallTags().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { BastionHost, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates the specified Bastion Host.
|
||||
*
|
||||
* @summary Creates or updates the specified Bastion Host.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostPut.json
|
||||
*/
|
||||
async function createBastionHost() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const bastionHostName = "bastionhosttenant";
|
||||
const parameters: BastionHost = {
|
||||
ipConfigurations: [
|
||||
{
|
||||
name: "bastionHostIpConfiguration",
|
||||
publicIPAddress: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
|
||||
},
|
||||
subnet: {
|
||||
id:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet"
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.bastionHosts.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
bastionHostName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createBastionHost().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified Bastion Host.
|
||||
*
|
||||
* @summary Deletes the specified Bastion Host.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostDelete.json
|
||||
*/
|
||||
async function deleteBastionHost() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const bastionHostName = "bastionhosttenant";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.bastionHosts.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
bastionHostName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteBastionHost().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified Bastion Host.
|
||||
*
|
||||
* @summary Gets the specified Bastion Host.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostGet.json
|
||||
*/
|
||||
async function getBastionHost() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const bastionHostName = "bastionhosttenant'";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.bastionHosts.get(
|
||||
resourceGroupName,
|
||||
bastionHostName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getBastionHost().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all Bastion Hosts in a resource group.
|
||||
*
|
||||
* @summary Lists all Bastion Hosts in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostListByResourceGroup.json
|
||||
*/
|
||||
async function listAllBastionHostsForAGivenResourceGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.bastionHosts.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllBastionHostsForAGivenResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all Bastion Hosts in a subscription.
|
||||
*
|
||||
* @summary Lists all Bastion Hosts in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostListBySubscription.json
|
||||
*/
|
||||
async function listAllBastionHostsForAGivenSubscription() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.bastionHosts.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllBastionHostsForAGivenSubscription().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates Tags for BastionHost resource
|
||||
*
|
||||
* @summary Updates Tags for BastionHost resource
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostPatch.json
|
||||
*/
|
||||
async function patchBastionHost() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const bastionHostName = "bastionhosttenant";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.bastionHosts.beginUpdateTagsAndWait(
|
||||
resourceGroupName,
|
||||
bastionHostName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
patchBastionHost().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the available bgp service communities.
|
||||
*
|
||||
* @summary Gets all the available bgp service communities.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceCommunityList.json
|
||||
*/
|
||||
async function serviceCommunityList() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.bgpServiceCommunities.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
serviceCommunityList().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Checks whether a domain name in the cloudapp.azure.com zone is available for use.
|
||||
*
|
||||
* @summary Checks whether a domain name in the cloudapp.azure.com zone is available for use.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CheckDnsNameAvailability.json
|
||||
*/
|
||||
async function checkDnsNameAvailability() {
|
||||
const subscriptionId = "subid";
|
||||
const location = "westus";
|
||||
const domainNameLabel = "testdns";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.checkDnsNameAvailability(
|
||||
location,
|
||||
domainNameLabel
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
checkDnsNameAvailability().catch(console.error);
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ConnectionMonitor, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a connection monitor.
|
||||
*
|
||||
* @summary Create or update a connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorCreate.json
|
||||
*/
|
||||
async function createConnectionMonitorV1() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const parameters: ConnectionMonitor = {
|
||||
endpoints: [
|
||||
{
|
||||
name: "source",
|
||||
resourceId:
|
||||
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1"
|
||||
},
|
||||
{ name: "destination", address: "bing.com" }
|
||||
],
|
||||
location: "eastus",
|
||||
testConfigurations: [
|
||||
{
|
||||
name: "tcp",
|
||||
tcpConfiguration: { port: 80 },
|
||||
testFrequencySec: 60,
|
||||
protocol: "Tcp"
|
||||
}
|
||||
],
|
||||
testGroups: [
|
||||
{
|
||||
name: "tg",
|
||||
destinations: ["destination"],
|
||||
sources: ["source"],
|
||||
testConfigurations: ["tcp"]
|
||||
}
|
||||
]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createConnectionMonitorV1().catch(console.error);
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a connection monitor.
|
||||
*
|
||||
* @summary Create or update a connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorV2Create.json
|
||||
*/
|
||||
async function createConnectionMonitorV2() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const parameters: ConnectionMonitor = {
|
||||
endpoints: [
|
||||
{
|
||||
name: "vm1",
|
||||
resourceId:
|
||||
"/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1"
|
||||
},
|
||||
{
|
||||
name: "CanaryWorkspaceVamshi",
|
||||
filter: {
|
||||
type: "Include",
|
||||
items: [{ type: "AgentAddress", address: "npmuser" }]
|
||||
},
|
||||
resourceId:
|
||||
"/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace"
|
||||
},
|
||||
{ name: "bing", address: "bing.com" },
|
||||
{ name: "google", address: "google.com" }
|
||||
],
|
||||
outputs: [],
|
||||
testConfigurations: [
|
||||
{
|
||||
name: "testConfig1",
|
||||
tcpConfiguration: { disableTraceRoute: false, port: 80 },
|
||||
testFrequencySec: 60,
|
||||
protocol: "Tcp"
|
||||
}
|
||||
],
|
||||
testGroups: [
|
||||
{
|
||||
name: "test1",
|
||||
destinations: ["bing", "google"],
|
||||
disable: false,
|
||||
sources: ["vm1", "CanaryWorkspaceVamshi"],
|
||||
testConfigurations: ["testConfig1"]
|
||||
}
|
||||
]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createConnectionMonitorV2().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified connection monitor.
|
||||
*
|
||||
* @summary Deletes the specified connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorDelete.json
|
||||
*/
|
||||
async function deleteConnectionMonitor() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteConnectionMonitor().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a connection monitor by name.
|
||||
*
|
||||
* @summary Gets a connection monitor by name.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorGet.json
|
||||
*/
|
||||
async function getConnectionMonitor() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.get(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getConnectionMonitor().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all connection monitors for the specified Network Watcher.
|
||||
*
|
||||
* @summary Lists all connection monitors for the specified Network Watcher.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorList.json
|
||||
*/
|
||||
async function listConnectionMonitors() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.connectionMonitors.list(
|
||||
resourceGroupName,
|
||||
networkWatcherName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listConnectionMonitors().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Query a snapshot of the most recent connection states.
|
||||
*
|
||||
* @summary Query a snapshot of the most recent connection states.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorQuery.json
|
||||
*/
|
||||
async function queryConnectionMonitor() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginQueryAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
queryConnectionMonitor().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Starts the specified connection monitor.
|
||||
*
|
||||
* @summary Starts the specified connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorStart.json
|
||||
*/
|
||||
async function startConnectionMonitor() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
startConnectionMonitor().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Stops the specified connection monitor.
|
||||
*
|
||||
* @summary Stops the specified connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorStop.json
|
||||
*/
|
||||
async function stopConnectionMonitor() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
stopConnectionMonitor().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update tags of the specified connection monitor.
|
||||
*
|
||||
* @summary Update tags of the specified connection monitor.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json
|
||||
*/
|
||||
async function updateConnectionMonitorTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const networkWatcherName = "nw1";
|
||||
const connectionMonitorName = "cm1";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.connectionMonitors.updateTags(
|
||||
resourceGroupName,
|
||||
networkWatcherName,
|
||||
connectionMonitorName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updateConnectionMonitorTags().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { CustomIpPrefix, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a custom IP prefix.
|
||||
*
|
||||
* @summary Creates or updates a custom IP prefix.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixCreateCustomizedValues.json
|
||||
*/
|
||||
async function createCustomIPPrefixAllocationMethod() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const customIpPrefixName = "test-customipprefix";
|
||||
const parameters: CustomIpPrefix = { cidr: "0.0.0.0/24", location: "westus" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.customIPPrefixes.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
customIpPrefixName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createCustomIPPrefixAllocationMethod().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified custom IP prefix.
|
||||
*
|
||||
* @summary Deletes the specified custom IP prefix.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixDelete.json
|
||||
*/
|
||||
async function deleteCustomIPPrefix() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const customIpPrefixName = "test-customipprefix";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.customIPPrefixes.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
customIpPrefixName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteCustomIPPrefix().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified custom IP prefix in a specified resource group.
|
||||
*
|
||||
* @summary Gets the specified custom IP prefix in a specified resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixGet.json
|
||||
*/
|
||||
async function getCustomIPPrefix() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const customIpPrefixName = "test-customipprefix";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.customIPPrefixes.get(
|
||||
resourceGroupName,
|
||||
customIpPrefixName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getCustomIPPrefix().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the custom IP prefixes in a subscription.
|
||||
*
|
||||
* @summary Gets all the custom IP prefixes in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixListAll.json
|
||||
*/
|
||||
async function listAllCustomIPPrefixes() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.customIPPrefixes.listAll()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllCustomIPPrefixes().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all custom IP prefixes in a resource group.
|
||||
*
|
||||
* @summary Gets all custom IP prefixes in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixList.json
|
||||
*/
|
||||
async function listResourceGroupCustomIPPrefixes() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.customIPPrefixes.list(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listResourceGroupCustomIPPrefixes().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates custom IP prefix tags.
|
||||
*
|
||||
* @summary Updates custom IP prefix tags.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixUpdateTags.json
|
||||
*/
|
||||
async function updatePublicIPAddressTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const customIpPrefixName = "test-customipprefix";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.customIPPrefixes.updateTags(
|
||||
resourceGroupName,
|
||||
customIpPrefixName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
updatePublicIPAddressTags().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { DdosCustomPolicy, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a DDoS custom policy.
|
||||
*
|
||||
* @summary Creates or updates a DDoS custom policy.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyCreate.json
|
||||
*/
|
||||
async function createDDoSCustomPolicy() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosCustomPolicyName = "test-ddos-custom-policy";
|
||||
const parameters: DdosCustomPolicy = {
|
||||
location: "centraluseuap",
|
||||
protocolCustomSettings: [{ protocol: "Tcp" }]
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosCustomPolicies.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
ddosCustomPolicyName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createDDoSCustomPolicy().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified DDoS custom policy.
|
||||
*
|
||||
* @summary Deletes the specified DDoS custom policy.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyDelete.json
|
||||
*/
|
||||
async function deleteDDoSCustomPolicy() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosCustomPolicyName = "test-ddos-custom-policy";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosCustomPolicies.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
ddosCustomPolicyName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteDDoSCustomPolicy().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets information about the specified DDoS custom policy.
|
||||
*
|
||||
* @summary Gets information about the specified DDoS custom policy.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyGet.json
|
||||
*/
|
||||
async function getDDoSCustomPolicy() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosCustomPolicyName = "test-ddos-custom-policy";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosCustomPolicies.get(
|
||||
resourceGroupName,
|
||||
ddosCustomPolicyName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getDDoSCustomPolicy().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a DDoS custom policy tags.
|
||||
*
|
||||
* @summary Update a DDoS custom policy tags.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyUpdateTags.json
|
||||
*/
|
||||
async function dDoSCustomPolicyUpdateTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosCustomPolicyName = "test-ddos-custom-policy";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosCustomPolicies.updateTags(
|
||||
resourceGroupName,
|
||||
ddosCustomPolicyName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
dDoSCustomPolicyUpdateTags().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
DdosProtectionPlan,
|
||||
NetworkManagementClient
|
||||
} from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a DDoS protection plan.
|
||||
*
|
||||
* @summary Creates or updates a DDoS protection plan.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanCreate.json
|
||||
*/
|
||||
async function createDDoSProtectionPlan() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosProtectionPlanName = "test-plan";
|
||||
const parameters: DdosProtectionPlan = { location: "westus" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosProtectionPlans.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
ddosProtectionPlanName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createDDoSProtectionPlan().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified DDoS protection plan.
|
||||
*
|
||||
* @summary Deletes the specified DDoS protection plan.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanDelete.json
|
||||
*/
|
||||
async function deleteDDoSProtectionPlan() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosProtectionPlanName = "test-plan";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosProtectionPlans.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
ddosProtectionPlanName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteDDoSProtectionPlan().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets information about the specified DDoS protection plan.
|
||||
*
|
||||
* @summary Gets information about the specified DDoS protection plan.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanGet.json
|
||||
*/
|
||||
async function getDDoSProtectionPlan() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosProtectionPlanName = "test-plan";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosProtectionPlans.get(
|
||||
resourceGroupName,
|
||||
ddosProtectionPlanName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getDDoSProtectionPlan().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all the DDoS protection plans in a resource group.
|
||||
*
|
||||
* @summary Gets all the DDoS protection plans in a resource group.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanList.json
|
||||
*/
|
||||
async function listDDoSProtectionPlansInResourceGroup() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.ddosProtectionPlans.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listDDoSProtectionPlansInResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all DDoS protection plans in a subscription.
|
||||
*
|
||||
* @summary Gets all DDoS protection plans in a subscription.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanListAll.json
|
||||
*/
|
||||
async function listAllDDoSProtectionPlans() {
|
||||
const subscriptionId = "subid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.ddosProtectionPlans.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
listAllDDoSProtectionPlans().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { TagsObject, NetworkManagementClient } from "@azure/arm-network";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a DDoS protection plan tags.
|
||||
*
|
||||
* @summary Update a DDoS protection plan tags.
|
||||
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanUpdateTags.json
|
||||
*/
|
||||
async function dDoSProtectionPlanUpdateTags() {
|
||||
const subscriptionId = "subid";
|
||||
const resourceGroupName = "rg1";
|
||||
const ddosProtectionPlanName = "test-plan";
|
||||
const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new NetworkManagementClient(credential, subscriptionId);
|
||||
const result = await client.ddosProtectionPlans.updateTags(
|
||||
resourceGroupName,
|
||||
ddosProtectionPlanName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
dDoSProtectionPlanUpdateTags().catch(console.error);
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче